@jfdevelops/react-layout 0.22.0 → 0.23.0

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 (119) hide show
  1. package/dist/create-config/create-resource-links.cjs +42 -22
  2. package/dist/create-config/create-resource-links.cjs.map +1 -1
  3. package/dist/create-config/create-resource-links.d.cts +25 -2
  4. package/dist/create-config/create-resource-links.d.cts.map +1 -1
  5. package/dist/create-config/create-resource-links.d.mts +25 -2
  6. package/dist/create-config/create-resource-links.d.mts.map +1 -1
  7. package/dist/create-config/create-resource-links.mjs +43 -22
  8. package/dist/create-config/create-resource-links.mjs.map +1 -1
  9. package/dist/create-config/define-layout.cjs +29 -9
  10. package/dist/create-config/define-layout.cjs.map +1 -1
  11. package/dist/create-config/define-layout.d.cts +13 -1
  12. package/dist/create-config/define-layout.d.cts.map +1 -1
  13. package/dist/create-config/define-layout.d.mts +13 -1
  14. package/dist/create-config/define-layout.d.mts.map +1 -1
  15. package/dist/create-config/define-layout.mjs +30 -10
  16. package/dist/create-config/define-layout.mjs.map +1 -1
  17. package/dist/create-config/for-paths/builder.cjs +6 -6
  18. package/dist/create-config/for-paths/builder.cjs.map +1 -1
  19. package/dist/create-config/for-paths/builder.mjs +6 -6
  20. package/dist/create-config/for-paths/builder.mjs.map +1 -1
  21. package/dist/create-config/for-resource.cjs +2 -1
  22. package/dist/create-config/for-resource.cjs.map +1 -1
  23. package/dist/create-config/for-resource.d.cts.map +1 -1
  24. package/dist/create-config/for-resource.d.mts.map +1 -1
  25. package/dist/create-config/for-resource.mjs +2 -1
  26. package/dist/create-config/for-resource.mjs.map +1 -1
  27. package/dist/create-config/for-resources/create-for-resources.cjs +15 -14
  28. package/dist/create-config/for-resources/create-for-resources.cjs.map +1 -1
  29. package/dist/create-config/for-resources/create-for-resources.mjs +15 -14
  30. package/dist/create-config/for-resources/create-for-resources.mjs.map +1 -1
  31. package/dist/create-config/index.d.cts +2 -2
  32. package/dist/create-config/index.d.mts +2 -2
  33. package/dist/errors/invalid-component.cjs +15 -7
  34. package/dist/errors/invalid-component.cjs.map +1 -1
  35. package/dist/errors/invalid-component.d.cts +106 -10
  36. package/dist/errors/invalid-component.d.cts.map +1 -1
  37. package/dist/errors/invalid-component.d.mts +106 -10
  38. package/dist/errors/invalid-component.d.mts.map +1 -1
  39. package/dist/errors/invalid-component.mjs +15 -7
  40. package/dist/errors/invalid-component.mjs.map +1 -1
  41. package/dist/errors/invalid-config.cjs +8 -3
  42. package/dist/errors/invalid-config.cjs.map +1 -1
  43. package/dist/errors/invalid-config.d.cts +96 -6
  44. package/dist/errors/invalid-config.d.cts.map +1 -1
  45. package/dist/errors/invalid-config.d.mts +96 -6
  46. package/dist/errors/invalid-config.d.mts.map +1 -1
  47. package/dist/errors/invalid-config.mjs +8 -3
  48. package/dist/errors/invalid-config.mjs.map +1 -1
  49. package/dist/errors/invalid-path.cjs +11 -5
  50. package/dist/errors/invalid-path.cjs.map +1 -1
  51. package/dist/errors/invalid-path.d.cts +100 -8
  52. package/dist/errors/invalid-path.d.cts.map +1 -1
  53. package/dist/errors/invalid-path.d.mts +100 -8
  54. package/dist/errors/invalid-path.d.mts.map +1 -1
  55. package/dist/errors/invalid-path.mjs +11 -5
  56. package/dist/errors/invalid-path.mjs.map +1 -1
  57. package/dist/errors/invalid-resource.cjs +11 -5
  58. package/dist/errors/invalid-resource.cjs.map +1 -1
  59. package/dist/errors/invalid-resource.d.cts +100 -8
  60. package/dist/errors/invalid-resource.d.cts.map +1 -1
  61. package/dist/errors/invalid-resource.d.mts +100 -8
  62. package/dist/errors/invalid-resource.d.mts.map +1 -1
  63. package/dist/errors/invalid-resource.mjs +11 -5
  64. package/dist/errors/invalid-resource.mjs.map +1 -1
  65. package/dist/errors/invalid-sub-resource.cjs +12 -5
  66. package/dist/errors/invalid-sub-resource.cjs.map +1 -1
  67. package/dist/errors/invalid-sub-resource.d.cts +103 -9
  68. package/dist/errors/invalid-sub-resource.d.cts.map +1 -1
  69. package/dist/errors/invalid-sub-resource.d.mts +103 -9
  70. package/dist/errors/invalid-sub-resource.d.mts.map +1 -1
  71. package/dist/errors/invalid-sub-resource.mjs +12 -5
  72. package/dist/errors/invalid-sub-resource.mjs.map +1 -1
  73. package/dist/errors/layout-configuration-error.cjs +17 -0
  74. package/dist/errors/layout-configuration-error.cjs.map +1 -0
  75. package/dist/errors/layout-configuration-error.d.cts +99 -0
  76. package/dist/errors/layout-configuration-error.d.cts.map +1 -0
  77. package/dist/errors/layout-configuration-error.d.mts +99 -0
  78. package/dist/errors/layout-configuration-error.d.mts.map +1 -0
  79. package/dist/errors/layout-configuration-error.mjs +17 -0
  80. package/dist/errors/layout-configuration-error.mjs.map +1 -0
  81. package/dist/errors/missing-path-variable.cjs +12 -5
  82. package/dist/errors/missing-path-variable.cjs.map +1 -1
  83. package/dist/errors/missing-path-variable.d.cts +99 -7
  84. package/dist/errors/missing-path-variable.d.cts.map +1 -1
  85. package/dist/errors/missing-path-variable.d.mts +99 -7
  86. package/dist/errors/missing-path-variable.d.mts.map +1 -1
  87. package/dist/errors/missing-path-variable.mjs +12 -5
  88. package/dist/errors/missing-path-variable.mjs.map +1 -1
  89. package/dist/errors/missing-resource-provider.cjs +12 -0
  90. package/dist/errors/missing-resource-provider.cjs.map +1 -0
  91. package/dist/errors/missing-resource-provider.d.cts +91 -0
  92. package/dist/errors/missing-resource-provider.d.cts.map +1 -0
  93. package/dist/errors/missing-resource-provider.d.mts +91 -0
  94. package/dist/errors/missing-resource-provider.d.mts.map +1 -0
  95. package/dist/errors/missing-resource-provider.mjs +12 -0
  96. package/dist/errors/missing-resource-provider.mjs.map +1 -0
  97. package/dist/errors/react-layout-error.cjs +38 -43
  98. package/dist/errors/react-layout-error.cjs.map +1 -1
  99. package/dist/errors/react-layout-error.d.cts +81 -38
  100. package/dist/errors/react-layout-error.d.cts.map +1 -1
  101. package/dist/errors/react-layout-error.d.mts +81 -38
  102. package/dist/errors/react-layout-error.d.mts.map +1 -1
  103. package/dist/errors/react-layout-error.mjs +39 -43
  104. package/dist/errors/react-layout-error.mjs.map +1 -1
  105. package/dist/index.cjs +6 -3
  106. package/dist/index.d.cts +6 -3
  107. package/dist/index.d.mts +6 -3
  108. package/dist/index.mjs +6 -4
  109. 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
  110. 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
  111. 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
  112. 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
  113. package/dist/resource.cjs +2 -1
  114. package/dist/resource.cjs.map +1 -1
  115. package/dist/resource.d.cts.map +1 -1
  116. package/dist/resource.d.mts.map +1 -1
  117. package/dist/resource.mjs +3 -1
  118. package/dist/resource.mjs.map +1 -1
  119. package/package.json +8 -6
@@ -1,16 +1,22 @@
1
1
  import { createReactLayoutError } from "./react-layout-error.mjs";
2
+ import { type } from "arktype";
2
3
 
3
4
  //#region src/errors/invalid-resource.ts
4
- const scope = "resource";
5
+ const context = type({
6
+ "reason?": "string",
7
+ resource: "unknown",
8
+ scope: "'resource'",
9
+ "validResources?": "string[]"
10
+ });
5
11
  /** Thrown when a requested layout resource is invalid or unavailable. */
6
12
  var InvalidResourceError = class extends createReactLayoutError({
7
13
  code: "invalidResource",
8
- scope
9
- })((scope, { resource, validResources, reason }) => {
10
- return `[${scope}]: Resource ${JSON.stringify(resource) ?? `"${String(resource)}"`} is not available.${reason ? ` ${reason}` : ""}${validResources && validResources.length > 0 ? ` Available resources are ${new Intl.ListFormat("en", {
14
+ scope: "resource"
15
+ }).defineContext(context).implement(({ context, scope }) => {
16
+ return `[${scope}]: Resource ${JSON.stringify(context.resource) ?? `"${String(context.resource)}"`} is not available.${context.reason ? ` ${context.reason}` : ""}${context.validResources && context.validResources.length > 0 ? ` Available resources are ${new Intl.ListFormat("en", {
11
17
  style: "long",
12
18
  type: "disjunction"
13
- }).format(validResources)}.` : ""}`;
19
+ }).format(context.validResources)}.` : ""}`;
14
20
  }) {};
15
21
 
16
22
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-resource.mjs","names":[],"sources":["../../src/errors/invalid-resource.ts"],"sourcesContent":["import {\n createReactLayoutError,\n type ReactLayoutErrorContext,\n} from './react-layout-error';\n\nconst scope = 'resource' as const;\n\n/** Context describing a resource that is unavailable to React Layout. */\nexport interface InvalidResourceContext\n extends ReactLayoutErrorContext<typeof scope> {\n resource: unknown;\n validResources?: readonly string[];\n reason?: string;\n}\n\n/** Thrown when a requested layout resource is invalid or unavailable. */\nexport class InvalidResourceError extends createReactLayoutError(\n { code: 'invalidResource', scope },\n)((scope, { resource, validResources, reason }: InvalidResourceContext) => {\n const quotedResource = JSON.stringify(resource) ?? `\"${String(resource)}\"`;\n const reasonMessage = reason ? ` ${reason}` : '';\n const validResourcesMessage =\n validResources && validResources.length > 0\n ? ` Available resources are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(validResources)}.`\n : '';\n\n return `[${scope}]: Resource ${quotedResource} is not available.${reasonMessage}${validResourcesMessage}`;\n}) {}\n"],"mappings":";;;AAKA,MAAM,QAAQ;;AAWd,IAAa,uBAAb,cAA0C,uBACxC;CAAE,MAAM;CAAmB;AAAM,CACnC,GAAG,OAAO,EAAE,UAAU,gBAAgB,aAAqC;CAWzE,OAAO,IAAI,MAAM,cAVM,KAAK,UAAU,QAAQ,KAAK,IAAI,OAAO,QAAQ,EAAE,GAU1B,oBATxB,SAAS,IAAI,WAAW,KAE5C,kBAAkB,eAAe,SAAS,IACtC,4BAA4B,IAAI,KAAK,WAAW,MAAM;EACpD,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,cAAc,EAAE,KAC1B;AAGR,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"invalid-resource.mjs","names":[],"sources":["../../src/errors/invalid-resource.ts"],"sourcesContent":["import { type } from 'arktype';\nimport { createReactLayoutError } from './react-layout-error';\n\nconst context = type({\n 'reason?': 'string',\n resource: 'unknown',\n scope: \"'resource'\",\n 'validResources?': 'string[]',\n});\n\nexport type InvalidResourceContext = typeof context.infer;\n\n/** Thrown when a requested layout resource is invalid or unavailable. */\nexport class InvalidResourceError extends createReactLayoutError({\n code: 'invalidResource',\n scope: 'resource',\n})\n .defineContext(context)\n .implement(({ context, scope }) => {\n const quotedResource =\n JSON.stringify(context.resource) ?? `\"${String(context.resource)}\"`;\n const reasonMessage = context.reason ? ` ${context.reason}` : '';\n const validResourcesMessage =\n context.validResources && context.validResources.length > 0\n ? ` Available resources are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(context.validResources)}.`\n : '';\n\n return `[${scope}]: Resource ${quotedResource} is not available.${reasonMessage}${validResourcesMessage}`;\n }) {}\n"],"mappings":";;;;AAGA,MAAM,UAAU,KAAK;CACnB,WAAW;CACX,UAAU;CACV,OAAO;CACP,mBAAmB;AACrB,CAAC;;AAKD,IAAa,uBAAb,cAA0C,uBAAuB;CAC/D,MAAM;CACN,OAAO;AACT,CAAC,EACE,cAAc,OAAO,EACrB,WAAW,EAAE,SAAS,YAAY;CAYjC,OAAO,IAAI,MAAM,cAVf,KAAK,UAAU,QAAQ,QAAQ,KAAK,IAAI,OAAO,QAAQ,QAAQ,EAAE,GAUrB,oBATxB,QAAQ,SAAS,IAAI,QAAQ,WAAW,KAE5D,QAAQ,kBAAkB,QAAQ,eAAe,SAAS,IACtD,4BAA4B,IAAI,KAAK,WAAW,MAAM;EACpD,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,QAAQ,cAAc,EAAE,KAClC;AAGR,CAAC,EAAE,CAAC"}
@@ -1,16 +1,23 @@
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-sub-resource.ts
4
- const scope = "subResource";
5
+ const context = (0, arktype.type)({
6
+ "reason?": "string",
7
+ "resource?": "string",
8
+ scope: "'subResource'",
9
+ subResource: "unknown",
10
+ "validSubResources?": "string[]"
11
+ });
5
12
  /** Thrown when a requested sub-resource is invalid or unavailable. */
6
13
  var InvalidSubResourceError = class extends require_react_layout_error.createReactLayoutError({
7
14
  code: "invalidSubResource",
8
- scope
9
- })((scope, { subResource, resource, validSubResources, reason }) => {
10
- return `[${scope}]: Sub-resource ${JSON.stringify(subResource) ?? `"${String(subResource)}"`}${resource ? ` for resource "${resource}"` : ""} is not available.${reason ? ` ${reason}` : ""}${validSubResources && validSubResources.length > 0 ? ` Available sub-resources are ${new Intl.ListFormat("en", {
15
+ scope: "subResource"
16
+ }).defineContext(context).implement(({ context, scope }) => {
17
+ return `[${scope}]: Sub-resource ${JSON.stringify(context.subResource) ?? `"${String(context.subResource)}"`}${context.resource ? ` for resource "${context.resource}"` : ""} is not available.${context.reason ? ` ${context.reason}` : ""}${context.validSubResources && context.validSubResources.length > 0 ? ` Available sub-resources are ${new Intl.ListFormat("en", {
11
18
  style: "long",
12
19
  type: "disjunction"
13
- }).format(validSubResources)}.` : ""}`;
20
+ }).format(context.validSubResources)}.` : ""}`;
14
21
  }) {};
15
22
 
16
23
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-sub-resource.cjs","names":["createReactLayoutError"],"sources":["../../src/errors/invalid-sub-resource.ts"],"sourcesContent":["import {\n createReactLayoutError,\n type ReactLayoutErrorContext,\n} from './react-layout-error';\n\nconst scope = 'subResource' as const;\n\n/** Context describing an unavailable sub-resource and its owning resource. */\nexport interface InvalidSubResourceContext\n extends ReactLayoutErrorContext<typeof scope> {\n subResource: unknown;\n resource?: string;\n validSubResources?: readonly string[];\n reason?: string;\n}\n\n/** Thrown when a requested sub-resource is invalid or unavailable. */\nexport class InvalidSubResourceError extends createReactLayoutError(\n { code: 'invalidSubResource', scope },\n)(\n (\n scope,\n {\n subResource,\n resource,\n validSubResources,\n reason,\n }: InvalidSubResourceContext,\n ) => {\n const quotedSubResource =\n JSON.stringify(subResource) ?? `\"${String(subResource)}\"`;\n const resourceMessage = resource ? ` for resource \"${resource}\"` : '';\n const reasonMessage = reason ? ` ${reason}` : '';\n const validSubResourcesMessage =\n validSubResources && validSubResources.length > 0\n ? ` Available sub-resources are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(validSubResources)}.`\n : '';\n\n return `[${scope}]: Sub-resource ${quotedSubResource}${resourceMessage} is not available.${reasonMessage}${validSubResourcesMessage}`;\n },\n) {}\n"],"mappings":";;;AAKA,MAAM,QAAQ;;AAYd,IAAa,0BAAb,cAA6CA,kDAC3C;CAAE,MAAM;CAAsB;AAAM,CACtC,GAEI,OACA,EACE,aACA,UACA,mBACA,aAEC;CAaH,OAAO,IAAI,MAAM,kBAXf,KAAK,UAAU,WAAW,KAAK,IAAI,OAAO,WAAW,EAAE,KACjC,WAAW,kBAAkB,SAAS,KAAK,GAUI,oBATjD,SAAS,IAAI,WAAW,KAE5C,qBAAqB,kBAAkB,SAAS,IAC5C,gCAAgC,IAAI,KAAK,WAAW,MAAM;EACxD,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,iBAAiB,EAAE,KAC7B;AAGR,CACF,EAAE,CAAC"}
1
+ {"version":3,"file":"invalid-sub-resource.cjs","names":["createReactLayoutError"],"sources":["../../src/errors/invalid-sub-resource.ts"],"sourcesContent":["import { type } from 'arktype';\nimport { createReactLayoutError } from './react-layout-error';\n\nconst context = type({\n 'reason?': 'string',\n 'resource?': 'string',\n scope: \"'subResource'\",\n subResource: 'unknown',\n 'validSubResources?': 'string[]',\n});\n\nexport type InvalidSubResourceContext = typeof context.infer;\n\n/** Thrown when a requested sub-resource is invalid or unavailable. */\nexport class InvalidSubResourceError extends createReactLayoutError({\n code: 'invalidSubResource',\n scope: 'subResource',\n})\n .defineContext(context)\n .implement(({ context, scope }) => {\n const quotedSubResource =\n JSON.stringify(context.subResource) ??\n `\"${String(context.subResource)}\"`;\n const resourceMessage = context.resource\n ? ` for resource \"${context.resource}\"`\n : '';\n const reasonMessage = context.reason ? ` ${context.reason}` : '';\n const validSubResourcesMessage =\n context.validSubResources && context.validSubResources.length > 0\n ? ` Available sub-resources are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(context.validSubResources)}.`\n : '';\n\n return `[${scope}]: Sub-resource ${quotedSubResource}${resourceMessage} is not available.${reasonMessage}${validSubResourcesMessage}`;\n }) {}\n"],"mappings":";;;;AAGA,MAAM,4BAAe;CACnB,WAAW;CACX,aAAa;CACb,OAAO;CACP,aAAa;CACb,sBAAsB;AACxB,CAAC;;AAKD,IAAa,0BAAb,cAA6CA,kDAAuB;CAClE,MAAM;CACN,OAAO;AACT,CAAC,EACE,cAAc,OAAO,EACrB,WAAW,EAAE,SAAS,YAAY;CAgBjC,OAAO,IAAI,MAAM,kBAdf,KAAK,UAAU,QAAQ,WAAW,KAClC,IAAI,OAAO,QAAQ,WAAW,EAAE,KACV,QAAQ,WAC5B,kBAAkB,QAAQ,SAAS,KACnC,GAUmE,oBATjD,QAAQ,SAAS,IAAI,QAAQ,WAAW,KAE5D,QAAQ,qBAAqB,QAAQ,kBAAkB,SAAS,IAC5D,gCAAgC,IAAI,KAAK,WAAW,MAAM;EACxD,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,QAAQ,iBAAiB,EAAE,KACrC;AAGR,CAAC,EAAE,CAAC"}
@@ -1,15 +1,109 @@
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-sub-resource.d.ts
4
- declare const scope: "subResource";
5
- /** Context describing an unavailable sub-resource and its owning resource. */
6
- interface InvalidSubResourceContext extends ReactLayoutErrorContext<typeof scope> {
4
+ declare const context: import("arktype/internal/variants/object.ts").ObjectType<{
5
+ scope: "subResource";
7
6
  subResource: unknown;
8
- resource?: string;
9
- validSubResources?: readonly string[];
10
- reason?: string;
11
- }
12
- declare const InvalidSubResourceError_base: CreatedReactLayoutError<"invalidSubResource", "subResource", InvalidSubResourceContext>;
7
+ reason?: string | undefined;
8
+ resource?: string | undefined;
9
+ validSubResources?: string[] | undefined;
10
+ }, {}>;
11
+ type InvalidSubResourceContext = typeof context.infer;
12
+ declare const InvalidSubResourceError_base: ImplementedErrorClass<{
13
+ definition: import("arktype/internal/variants/object.ts").ObjectType<{
14
+ code: string;
15
+ scope: string;
16
+ }, {}>;
17
+ } & {
18
+ data: {
19
+ readonly property: "context";
20
+ readonly resolve: ({
21
+ definition,
22
+ input
23
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
24
+ code: string;
25
+ scope: string;
26
+ }, {}>>) => {
27
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
28
+ };
29
+ };
30
+ message: ({
31
+ definition,
32
+ data,
33
+ implementation
34
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
35
+ code: string;
36
+ scope: string;
37
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
38
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
39
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
40
+ }>;
41
+ } & {
42
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
43
+ code: string;
44
+ scope: string;
45
+ }, {}>>): {
46
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
47
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
48
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
49
+ };
50
+ } & {
51
+ toJSON(error: import("@jfdevelops/create-error/types").BlueprintErrorTemplate<NoInfer<{
52
+ data: {
53
+ readonly property: "context";
54
+ readonly resolve: ({
55
+ definition,
56
+ input
57
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
58
+ code: string;
59
+ scope: string;
60
+ }, {}>>) => {
61
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
62
+ };
63
+ };
64
+ message: ({
65
+ definition,
66
+ data,
67
+ implementation
68
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
69
+ code: string;
70
+ scope: string;
71
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
72
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
73
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
74
+ }>;
75
+ } & {
76
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
77
+ code: string;
78
+ scope: string;
79
+ }, {}>>): {
80
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
81
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
82
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
83
+ };
84
+ }>>): {
85
+ name: string;
86
+ code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
87
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
88
+ message: string;
89
+ context: unknown;
90
+ };
91
+ }, {
92
+ readonly code: string;
93
+ readonly scope: string;
94
+ }, {
95
+ scope: "subResource";
96
+ subResource: unknown;
97
+ reason?: string | undefined;
98
+ resource?: string | undefined;
99
+ validSubResources?: string[] | undefined;
100
+ }, {
101
+ scope: "subResource";
102
+ subResource: unknown;
103
+ reason?: string | undefined;
104
+ resource?: string | undefined;
105
+ validSubResources?: string[] | undefined;
106
+ }>;
13
107
  /** Thrown when a requested sub-resource is invalid or unavailable. */
14
108
  declare class InvalidSubResourceError extends InvalidSubResourceError_base {}
15
109
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-sub-resource.d.cts","names":[],"sources":["../../src/errors/invalid-sub-resource.ts"],"mappings":";;;cAKM,KAAA;;UAGW,yBAAA,SACP,uBAAuB,QAAQ,KAAA;EACvC,WAAA;EACA,QAAA;EACA,iBAAA;EACA,MAAA;AAAA;AAAA,cACD,4BAAA;;cAGY,uBAAA,SAAgC,4BA0B5C"}
1
+ {"version":3,"file":"invalid-sub-resource.d.cts","names":[],"sources":["../../src/errors/invalid-sub-resource.ts"],"mappings":";;;cAGM,OAAA,gDAAO,UAAA;;;;;;;KAQD,yBAAA,UAAmC,OAAA,CAAQ,KAAK;AAAA,cAAC,4BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAGhD,uBAAA,SAAgC,4BAsBzC"}
@@ -1,15 +1,109 @@
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-sub-resource.d.ts
4
- declare const scope: "subResource";
5
- /** Context describing an unavailable sub-resource and its owning resource. */
6
- interface InvalidSubResourceContext extends ReactLayoutErrorContext<typeof scope> {
4
+ declare const context: import("arktype/internal/variants/object.ts").ObjectType<{
5
+ scope: "subResource";
7
6
  subResource: unknown;
8
- resource?: string;
9
- validSubResources?: readonly string[];
10
- reason?: string;
11
- }
12
- declare const InvalidSubResourceError_base: CreatedReactLayoutError<"invalidSubResource", "subResource", InvalidSubResourceContext>;
7
+ reason?: string | undefined;
8
+ resource?: string | undefined;
9
+ validSubResources?: string[] | undefined;
10
+ }, {}>;
11
+ type InvalidSubResourceContext = typeof context.infer;
12
+ declare const InvalidSubResourceError_base: ImplementedErrorClass<{
13
+ definition: import("arktype/internal/variants/object.ts").ObjectType<{
14
+ code: string;
15
+ scope: string;
16
+ }, {}>;
17
+ } & {
18
+ data: {
19
+ readonly property: "context";
20
+ readonly resolve: ({
21
+ definition,
22
+ input
23
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
24
+ code: string;
25
+ scope: string;
26
+ }, {}>>) => {
27
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
28
+ };
29
+ };
30
+ message: ({
31
+ definition,
32
+ data,
33
+ implementation
34
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
35
+ code: string;
36
+ scope: string;
37
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
38
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
39
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
40
+ }>;
41
+ } & {
42
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
43
+ code: string;
44
+ scope: string;
45
+ }, {}>>): {
46
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
47
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
48
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
49
+ };
50
+ } & {
51
+ toJSON(error: import("@jfdevelops/create-error/types").BlueprintErrorTemplate<NoInfer<{
52
+ data: {
53
+ readonly property: "context";
54
+ readonly resolve: ({
55
+ definition,
56
+ input
57
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
58
+ code: string;
59
+ scope: string;
60
+ }, {}>>) => {
61
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
62
+ };
63
+ };
64
+ message: ({
65
+ definition,
66
+ data,
67
+ implementation
68
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
69
+ code: string;
70
+ scope: string;
71
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
72
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
73
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
74
+ }>;
75
+ } & {
76
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
77
+ code: string;
78
+ scope: string;
79
+ }, {}>>): {
80
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
81
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
82
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
83
+ };
84
+ }>>): {
85
+ name: string;
86
+ code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
87
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
88
+ message: string;
89
+ context: unknown;
90
+ };
91
+ }, {
92
+ readonly code: string;
93
+ readonly scope: string;
94
+ }, {
95
+ scope: "subResource";
96
+ subResource: unknown;
97
+ reason?: string | undefined;
98
+ resource?: string | undefined;
99
+ validSubResources?: string[] | undefined;
100
+ }, {
101
+ scope: "subResource";
102
+ subResource: unknown;
103
+ reason?: string | undefined;
104
+ resource?: string | undefined;
105
+ validSubResources?: string[] | undefined;
106
+ }>;
13
107
  /** Thrown when a requested sub-resource is invalid or unavailable. */
14
108
  declare class InvalidSubResourceError extends InvalidSubResourceError_base {}
15
109
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-sub-resource.d.mts","names":[],"sources":["../../src/errors/invalid-sub-resource.ts"],"mappings":";;;cAKM,KAAA;;UAGW,yBAAA,SACP,uBAAuB,QAAQ,KAAA;EACvC,WAAA;EACA,QAAA;EACA,iBAAA;EACA,MAAA;AAAA;AAAA,cACD,4BAAA;;cAGY,uBAAA,SAAgC,4BA0B5C"}
1
+ {"version":3,"file":"invalid-sub-resource.d.mts","names":[],"sources":["../../src/errors/invalid-sub-resource.ts"],"mappings":";;;cAGM,OAAA,gDAAO,UAAA;;;;;;;KAQD,yBAAA,UAAmC,OAAA,CAAQ,KAAK;AAAA,cAAC,4BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAGhD,uBAAA,SAAgC,4BAsBzC"}
@@ -1,16 +1,23 @@
1
1
  import { createReactLayoutError } from "./react-layout-error.mjs";
2
+ import { type } from "arktype";
2
3
 
3
4
  //#region src/errors/invalid-sub-resource.ts
4
- const scope = "subResource";
5
+ const context = type({
6
+ "reason?": "string",
7
+ "resource?": "string",
8
+ scope: "'subResource'",
9
+ subResource: "unknown",
10
+ "validSubResources?": "string[]"
11
+ });
5
12
  /** Thrown when a requested sub-resource is invalid or unavailable. */
6
13
  var InvalidSubResourceError = class extends createReactLayoutError({
7
14
  code: "invalidSubResource",
8
- scope
9
- })((scope, { subResource, resource, validSubResources, reason }) => {
10
- return `[${scope}]: Sub-resource ${JSON.stringify(subResource) ?? `"${String(subResource)}"`}${resource ? ` for resource "${resource}"` : ""} is not available.${reason ? ` ${reason}` : ""}${validSubResources && validSubResources.length > 0 ? ` Available sub-resources are ${new Intl.ListFormat("en", {
15
+ scope: "subResource"
16
+ }).defineContext(context).implement(({ context, scope }) => {
17
+ return `[${scope}]: Sub-resource ${JSON.stringify(context.subResource) ?? `"${String(context.subResource)}"`}${context.resource ? ` for resource "${context.resource}"` : ""} is not available.${context.reason ? ` ${context.reason}` : ""}${context.validSubResources && context.validSubResources.length > 0 ? ` Available sub-resources are ${new Intl.ListFormat("en", {
11
18
  style: "long",
12
19
  type: "disjunction"
13
- }).format(validSubResources)}.` : ""}`;
20
+ }).format(context.validSubResources)}.` : ""}`;
14
21
  }) {};
15
22
 
16
23
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-sub-resource.mjs","names":[],"sources":["../../src/errors/invalid-sub-resource.ts"],"sourcesContent":["import {\n createReactLayoutError,\n type ReactLayoutErrorContext,\n} from './react-layout-error';\n\nconst scope = 'subResource' as const;\n\n/** Context describing an unavailable sub-resource and its owning resource. */\nexport interface InvalidSubResourceContext\n extends ReactLayoutErrorContext<typeof scope> {\n subResource: unknown;\n resource?: string;\n validSubResources?: readonly string[];\n reason?: string;\n}\n\n/** Thrown when a requested sub-resource is invalid or unavailable. */\nexport class InvalidSubResourceError extends createReactLayoutError(\n { code: 'invalidSubResource', scope },\n)(\n (\n scope,\n {\n subResource,\n resource,\n validSubResources,\n reason,\n }: InvalidSubResourceContext,\n ) => {\n const quotedSubResource =\n JSON.stringify(subResource) ?? `\"${String(subResource)}\"`;\n const resourceMessage = resource ? ` for resource \"${resource}\"` : '';\n const reasonMessage = reason ? ` ${reason}` : '';\n const validSubResourcesMessage =\n validSubResources && validSubResources.length > 0\n ? ` Available sub-resources are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(validSubResources)}.`\n : '';\n\n return `[${scope}]: Sub-resource ${quotedSubResource}${resourceMessage} is not available.${reasonMessage}${validSubResourcesMessage}`;\n },\n) {}\n"],"mappings":";;;AAKA,MAAM,QAAQ;;AAYd,IAAa,0BAAb,cAA6C,uBAC3C;CAAE,MAAM;CAAsB;AAAM,CACtC,GAEI,OACA,EACE,aACA,UACA,mBACA,aAEC;CAaH,OAAO,IAAI,MAAM,kBAXf,KAAK,UAAU,WAAW,KAAK,IAAI,OAAO,WAAW,EAAE,KACjC,WAAW,kBAAkB,SAAS,KAAK,GAUI,oBATjD,SAAS,IAAI,WAAW,KAE5C,qBAAqB,kBAAkB,SAAS,IAC5C,gCAAgC,IAAI,KAAK,WAAW,MAAM;EACxD,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,iBAAiB,EAAE,KAC7B;AAGR,CACF,EAAE,CAAC"}
1
+ {"version":3,"file":"invalid-sub-resource.mjs","names":[],"sources":["../../src/errors/invalid-sub-resource.ts"],"sourcesContent":["import { type } from 'arktype';\nimport { createReactLayoutError } from './react-layout-error';\n\nconst context = type({\n 'reason?': 'string',\n 'resource?': 'string',\n scope: \"'subResource'\",\n subResource: 'unknown',\n 'validSubResources?': 'string[]',\n});\n\nexport type InvalidSubResourceContext = typeof context.infer;\n\n/** Thrown when a requested sub-resource is invalid or unavailable. */\nexport class InvalidSubResourceError extends createReactLayoutError({\n code: 'invalidSubResource',\n scope: 'subResource',\n})\n .defineContext(context)\n .implement(({ context, scope }) => {\n const quotedSubResource =\n JSON.stringify(context.subResource) ??\n `\"${String(context.subResource)}\"`;\n const resourceMessage = context.resource\n ? ` for resource \"${context.resource}\"`\n : '';\n const reasonMessage = context.reason ? ` ${context.reason}` : '';\n const validSubResourcesMessage =\n context.validSubResources && context.validSubResources.length > 0\n ? ` Available sub-resources are ${new Intl.ListFormat('en', {\n style: 'long',\n type: 'disjunction',\n }).format(context.validSubResources)}.`\n : '';\n\n return `[${scope}]: Sub-resource ${quotedSubResource}${resourceMessage} is not available.${reasonMessage}${validSubResourcesMessage}`;\n }) {}\n"],"mappings":";;;;AAGA,MAAM,UAAU,KAAK;CACnB,WAAW;CACX,aAAa;CACb,OAAO;CACP,aAAa;CACb,sBAAsB;AACxB,CAAC;;AAKD,IAAa,0BAAb,cAA6C,uBAAuB;CAClE,MAAM;CACN,OAAO;AACT,CAAC,EACE,cAAc,OAAO,EACrB,WAAW,EAAE,SAAS,YAAY;CAgBjC,OAAO,IAAI,MAAM,kBAdf,KAAK,UAAU,QAAQ,WAAW,KAClC,IAAI,OAAO,QAAQ,WAAW,EAAE,KACV,QAAQ,WAC5B,kBAAkB,QAAQ,SAAS,KACnC,GAUmE,oBATjD,QAAQ,SAAS,IAAI,QAAQ,WAAW,KAE5D,QAAQ,qBAAqB,QAAQ,kBAAkB,SAAS,IAC5D,gCAAgC,IAAI,KAAK,WAAW,MAAM;EACxD,OAAO;EACP,MAAM;CACR,CAAC,EAAE,OAAO,QAAQ,iBAAiB,EAAE,KACrC;AAGR,CAAC,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ const require_react_layout_error = require('./react-layout-error.cjs');
2
+ let arktype = require("arktype");
3
+
4
+ //#region src/errors/layout-configuration-error.ts
5
+ const context = (0, arktype.type)("string").pipe((message) => ({
6
+ message,
7
+ scope: "configuration"
8
+ }));
9
+ /** Thrown when a layout or resource configuration cannot be used. */
10
+ var LayoutConfigurationError = class extends require_react_layout_error.createReactLayoutError({
11
+ code: "layoutConfiguration",
12
+ scope: "configuration"
13
+ }).defineContext(context).implement(({ context }) => context.message) {};
14
+
15
+ //#endregion
16
+ exports.LayoutConfigurationError = LayoutConfigurationError;
17
+ //# sourceMappingURL=layout-configuration-error.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-configuration-error.cjs","names":["createReactLayoutError"],"sources":["../../src/errors/layout-configuration-error.ts"],"sourcesContent":["import { type } from 'arktype';\nimport { createReactLayoutError } from './react-layout-error';\n\nconst context = type('string').pipe((message) => ({\n message,\n scope: 'configuration',\n}));\n\nexport type LayoutConfigurationErrorContext = typeof context.infer;\n\n/** Thrown when a layout or resource configuration cannot be used. */\nexport class LayoutConfigurationError extends createReactLayoutError({\n code: 'layoutConfiguration',\n scope: 'configuration',\n})\n .defineContext(context)\n .implement(({ context }) => context.message) {}\n"],"mappings":";;;;AAGA,MAAM,4BAAe,QAAQ,EAAE,MAAM,aAAa;CAChD;CACA,OAAO;AACT,EAAE;;AAKF,IAAa,2BAAb,cAA8CA,kDAAuB;CACnE,MAAM;CACN,OAAO;AACT,CAAC,EACE,cAAc,OAAO,EACrB,WAAW,EAAE,cAAc,QAAQ,OAAO,EAAE,CAAC"}
@@ -0,0 +1,99 @@
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
+
3
+ //#region src/errors/layout-configuration-error.d.ts
4
+ declare const context: import("arktype/internal/variants/object.ts").ObjectType<(In: string) => import("arktype").Out<{
5
+ message: string;
6
+ scope: string;
7
+ }>, {}>;
8
+ type LayoutConfigurationErrorContext = typeof context.infer;
9
+ declare const LayoutConfigurationError_base: ImplementedErrorClass<{
10
+ definition: import("arktype/internal/variants/object.ts").ObjectType<{
11
+ code: string;
12
+ scope: string;
13
+ }, {}>;
14
+ } & {
15
+ data: {
16
+ readonly property: "context";
17
+ readonly resolve: ({
18
+ definition,
19
+ input
20
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
21
+ code: string;
22
+ scope: string;
23
+ }, {}>>) => {
24
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
25
+ };
26
+ };
27
+ message: ({
28
+ definition,
29
+ data,
30
+ implementation
31
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
32
+ code: string;
33
+ scope: string;
34
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
35
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
36
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
37
+ }>;
38
+ } & {
39
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
40
+ code: string;
41
+ scope: string;
42
+ }, {}>>): {
43
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
44
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
45
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
46
+ };
47
+ } & {
48
+ toJSON(error: import("@jfdevelops/create-error/types").BlueprintErrorTemplate<NoInfer<{
49
+ data: {
50
+ readonly property: "context";
51
+ readonly resolve: ({
52
+ definition,
53
+ input
54
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
55
+ code: string;
56
+ scope: string;
57
+ }, {}>>) => {
58
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
59
+ };
60
+ };
61
+ message: ({
62
+ definition,
63
+ data,
64
+ implementation
65
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
66
+ code: string;
67
+ scope: string;
68
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
69
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
70
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
71
+ }>;
72
+ } & {
73
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
74
+ code: string;
75
+ scope: string;
76
+ }, {}>>): {
77
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
78
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
79
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
80
+ };
81
+ }>>): {
82
+ name: string;
83
+ code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
84
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
85
+ message: string;
86
+ context: unknown;
87
+ };
88
+ }, {
89
+ readonly code: string;
90
+ readonly scope: string;
91
+ }, string, {
92
+ message: string;
93
+ scope: string;
94
+ }>;
95
+ /** Thrown when a layout or resource configuration cannot be used. */
96
+ declare class LayoutConfigurationError extends LayoutConfigurationError_base {}
97
+ //#endregion
98
+ export { LayoutConfigurationError, LayoutConfigurationErrorContext };
99
+ //# sourceMappingURL=layout-configuration-error.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-configuration-error.d.cts","names":[],"sources":["../../src/errors/layout-configuration-error.ts"],"mappings":";;;cAGM,OAAA,gDAAO,UAAA,EAAA,EAAA,+BAAA,GAAA;;;;KAKD,+BAAA,UAAyC,OAAA,CAAQ,KAAK;AAAA,cAAC,6BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAGtD,wBAAA,SAAiC,6BAKA"}
@@ -0,0 +1,99 @@
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
+
3
+ //#region src/errors/layout-configuration-error.d.ts
4
+ declare const context: import("arktype/internal/variants/object.ts").ObjectType<(In: string) => import("arktype").Out<{
5
+ message: string;
6
+ scope: string;
7
+ }>, {}>;
8
+ type LayoutConfigurationErrorContext = typeof context.infer;
9
+ declare const LayoutConfigurationError_base: ImplementedErrorClass<{
10
+ definition: import("arktype/internal/variants/object.ts").ObjectType<{
11
+ code: string;
12
+ scope: string;
13
+ }, {}>;
14
+ } & {
15
+ data: {
16
+ readonly property: "context";
17
+ readonly resolve: ({
18
+ definition,
19
+ input
20
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
21
+ code: string;
22
+ scope: string;
23
+ }, {}>>) => {
24
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
25
+ };
26
+ };
27
+ message: ({
28
+ definition,
29
+ data,
30
+ implementation
31
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
32
+ code: string;
33
+ scope: string;
34
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
35
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
36
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
37
+ }>;
38
+ } & {
39
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
40
+ code: string;
41
+ scope: string;
42
+ }, {}>>): {
43
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
44
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
45
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
46
+ };
47
+ } & {
48
+ toJSON(error: import("@jfdevelops/create-error/types").BlueprintErrorTemplate<NoInfer<{
49
+ data: {
50
+ readonly property: "context";
51
+ readonly resolve: ({
52
+ definition,
53
+ input
54
+ }: import("@jfdevelops/create-error/types").ResolveContext<import("arktype/internal/variants/object.ts").ObjectType<{
55
+ code: string;
56
+ scope: string;
57
+ }, {}>>) => {
58
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
59
+ };
60
+ };
61
+ message: ({
62
+ definition,
63
+ data,
64
+ implementation
65
+ }: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
66
+ code: string;
67
+ scope: string;
68
+ }, {}>>) => string & import("@jfdevelops/create-error/types").TypeSlot<"implementationArgument", {
69
+ readonly context: import("@jfdevelops/create-error/types").DataSlot;
70
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
71
+ }>;
72
+ } & {
73
+ properties(context: import("@jfdevelops/create-error/types").BlueprintContext<import("arktype/internal/variants/object.ts").ObjectType<{
74
+ code: string;
75
+ scope: string;
76
+ }, {}>>): {
77
+ readonly code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
78
+ readonly scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
79
+ readonly renderMessage: (renderer?: (scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">, context: import("@jfdevelops/create-error/types").DataSlot) => string) => string;
80
+ };
81
+ }>>): {
82
+ name: string;
83
+ code: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "code">;
84
+ scope: string & import("@jfdevelops/create-error/types").TypeSlot<"definition", "scope">;
85
+ message: string;
86
+ context: unknown;
87
+ };
88
+ }, {
89
+ readonly code: string;
90
+ readonly scope: string;
91
+ }, string, {
92
+ message: string;
93
+ scope: string;
94
+ }>;
95
+ /** Thrown when a layout or resource configuration cannot be used. */
96
+ declare class LayoutConfigurationError extends LayoutConfigurationError_base {}
97
+ //#endregion
98
+ export { LayoutConfigurationError, LayoutConfigurationErrorContext };
99
+ //# sourceMappingURL=layout-configuration-error.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-configuration-error.d.mts","names":[],"sources":["../../src/errors/layout-configuration-error.ts"],"mappings":";;;cAGM,OAAA,gDAAO,UAAA,EAAA,EAAA,+BAAA,GAAA;;;;KAKD,+BAAA,UAAyC,OAAA,CAAQ,KAAK;AAAA,cAAC,6BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAGtD,wBAAA,SAAiC,6BAKA"}
@@ -0,0 +1,17 @@
1
+ import { createReactLayoutError } from "./react-layout-error.mjs";
2
+ import { type } from "arktype";
3
+
4
+ //#region src/errors/layout-configuration-error.ts
5
+ const context = type("string").pipe((message) => ({
6
+ message,
7
+ scope: "configuration"
8
+ }));
9
+ /** Thrown when a layout or resource configuration cannot be used. */
10
+ var LayoutConfigurationError = class extends createReactLayoutError({
11
+ code: "layoutConfiguration",
12
+ scope: "configuration"
13
+ }).defineContext(context).implement(({ context }) => context.message) {};
14
+
15
+ //#endregion
16
+ export { LayoutConfigurationError };
17
+ //# sourceMappingURL=layout-configuration-error.mjs.map