@jfdevelops/react-layout 0.1.1 → 0.3.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.
- package/dist/composable.cjs.map +1 -1
- package/dist/composable.d.cts +3 -1
- package/dist/composable.d.cts.map +1 -1
- package/dist/composable.d.mts +3 -1
- package/dist/composable.d.mts.map +1 -1
- package/dist/composable.mjs.map +1 -1
- package/dist/create-config/define-layout.cjs +144 -0
- package/dist/create-config/define-layout.cjs.map +1 -0
- package/dist/create-config/define-layout.d.cts +106 -0
- package/dist/create-config/define-layout.d.cts.map +1 -0
- package/dist/create-config/define-layout.d.mts +106 -0
- package/dist/create-config/define-layout.d.mts.map +1 -0
- package/dist/create-config/define-layout.mjs +144 -0
- package/dist/create-config/define-layout.mjs.map +1 -0
- package/dist/create-config/get-component.cjs +52 -0
- package/dist/create-config/get-component.cjs.map +1 -0
- package/dist/create-config/get-component.d.cts +62 -0
- package/dist/create-config/get-component.d.cts.map +1 -0
- package/dist/create-config/get-component.d.mts +62 -0
- package/dist/create-config/get-component.d.mts.map +1 -0
- package/dist/create-config/get-component.mjs +51 -0
- package/dist/create-config/get-component.mjs.map +1 -0
- package/dist/create-config/index.d.cts +3 -0
- package/dist/create-config/index.d.mts +3 -0
- package/dist/create-config/types.d.cts +42 -0
- package/dist/create-config/types.d.cts.map +1 -0
- package/dist/create-config/types.d.mts +42 -0
- package/dist/create-config/types.d.mts.map +1 -0
- package/dist/index.cjs +7 -6
- package/dist/index.d.cts +4 -2
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +3 -2
- package/dist/props.d.cts +3 -2
- package/dist/props.d.cts.map +1 -1
- package/dist/props.d.mts +3 -2
- package/dist/props.d.mts.map +1 -1
- package/dist/resource.cjs.map +1 -1
- package/dist/resource.d.cts +23 -3
- package/dist/resource.d.cts.map +1 -1
- package/dist/resource.d.mts +23 -3
- package/dist/resource.d.mts.map +1 -1
- package/dist/resource.mjs.map +1 -1
- package/dist/utils/capitalize.cjs +9 -0
- package/dist/utils/capitalize.cjs.map +1 -0
- package/dist/utils/capitalize.d.cts +7 -0
- package/dist/utils/capitalize.d.cts.map +1 -0
- package/dist/utils/capitalize.d.mts +7 -0
- package/dist/utils/capitalize.d.mts.map +1 -0
- package/dist/utils/capitalize.mjs +8 -0
- package/dist/utils/capitalize.mjs.map +1 -0
- package/dist/utils.cjs +5 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -1
- package/dist/utils.d.cts.map +1 -1
- package/dist/utils.d.mts +2 -1
- package/dist/utils.d.mts.map +1 -1
- package/dist/utils.mjs +5 -1
- package/dist/utils.mjs.map +1 -1
- package/dist/validators/base.cjs +41 -0
- package/dist/validators/base.cjs.map +1 -0
- package/dist/validators/base.d.cts +18 -0
- package/dist/validators/base.d.cts.map +1 -0
- package/dist/validators/base.d.mts +18 -0
- package/dist/validators/base.d.mts.map +1 -0
- package/dist/validators/base.mjs +39 -0
- package/dist/validators/base.mjs.map +1 -0
- package/dist/validators/builders.cjs +137 -0
- package/dist/validators/builders.cjs.map +1 -0
- package/dist/validators/builders.d.cts +156 -0
- package/dist/validators/builders.d.cts.map +1 -0
- package/dist/validators/builders.d.mts +156 -0
- package/dist/validators/builders.d.mts.map +1 -0
- package/dist/validators/builders.mjs +136 -0
- package/dist/validators/builders.mjs.map +1 -0
- package/dist/validators/component.cjs +73 -0
- package/dist/validators/component.cjs.map +1 -0
- package/dist/validators/component.d.cts +28 -0
- package/dist/validators/component.d.cts.map +1 -0
- package/dist/validators/component.d.mts +28 -0
- package/dist/validators/component.d.mts.map +1 -0
- package/dist/validators/component.mjs +71 -0
- package/dist/validators/component.mjs.map +1 -0
- package/dist/validators/enum.cjs +27 -0
- package/dist/validators/enum.cjs.map +1 -0
- package/dist/validators/enum.d.cts +14 -0
- package/dist/validators/enum.d.cts.map +1 -0
- package/dist/validators/enum.d.mts +14 -0
- package/dist/validators/enum.d.mts.map +1 -0
- package/dist/validators/enum.mjs +27 -0
- package/dist/validators/enum.mjs.map +1 -0
- package/dist/validators/index.d.cts +10 -0
- package/dist/validators/index.d.mts +10 -0
- package/dist/validators/literal.cjs +25 -0
- package/dist/validators/literal.cjs.map +1 -0
- package/dist/validators/literal.d.cts +14 -0
- package/dist/validators/literal.d.cts.map +1 -0
- package/dist/validators/literal.d.mts +14 -0
- package/dist/validators/literal.d.mts.map +1 -0
- package/dist/validators/literal.mjs +25 -0
- package/dist/validators/literal.mjs.map +1 -0
- package/dist/validators/object.cjs +53 -0
- package/dist/validators/object.cjs.map +1 -0
- package/dist/validators/object.d.cts +14 -0
- package/dist/validators/object.d.cts.map +1 -0
- package/dist/validators/object.d.mts +14 -0
- package/dist/validators/object.d.mts.map +1 -0
- package/dist/validators/object.mjs +53 -0
- package/dist/validators/object.mjs.map +1 -0
- package/dist/validators/primitive.cjs +80 -0
- package/dist/validators/primitive.cjs.map +1 -0
- package/dist/validators/primitive.d.cts +33 -0
- package/dist/validators/primitive.d.cts.map +1 -0
- package/dist/validators/primitive.d.mts +33 -0
- package/dist/validators/primitive.d.mts.map +1 -0
- package/dist/validators/primitive.mjs +78 -0
- package/dist/validators/primitive.mjs.map +1 -0
- package/dist/validators/types.d.cts +71 -0
- package/dist/validators/types.d.cts.map +1 -0
- package/dist/validators/types.d.mts +71 -0
- package/dist/validators/types.d.mts.map +1 -0
- package/dist/validators/union.cjs +27 -0
- package/dist/validators/union.cjs.map +1 -0
- package/dist/validators/union.d.cts +14 -0
- package/dist/validators/union.d.cts.map +1 -0
- package/dist/validators/union.d.mts +14 -0
- package/dist/validators/union.d.mts.map +1 -0
- package/dist/validators/union.mjs +27 -0
- package/dist/validators/union.mjs.map +1 -0
- package/dist/validators/validate-props.cjs +22 -0
- package/dist/validators/validate-props.cjs.map +1 -0
- package/dist/validators/validate-props.d.cts +7 -0
- package/dist/validators/validate-props.d.cts.map +1 -0
- package/dist/validators/validate-props.d.mts +7 -0
- package/dist/validators/validate-props.d.mts.map +1 -0
- package/dist/validators/validate-props.mjs +21 -0
- package/dist/validators/validate-props.mjs.map +1 -0
- package/package.json +63 -59
- package/dist/create-config.cjs +0 -98
- package/dist/create-config.cjs.map +0 -1
- package/dist/create-config.d.cts +0 -67
- package/dist/create-config.d.cts.map +0 -1
- package/dist/create-config.d.mts +0 -67
- package/dist/create-config.d.mts.map +0 -1
- package/dist/create-config.mjs +0 -98
- package/dist/create-config.mjs.map +0 -1
- package/dist/create-value.cjs +0 -417
- package/dist/create-value.cjs.map +0 -1
- package/dist/create-value.d.cts +0 -348
- package/dist/create-value.d.cts.map +0 -1
- package/dist/create-value.d.mts +0 -348
- package/dist/create-value.d.mts.map +0 -1
- package/dist/create-value.mjs +0 -414
- package/dist/create-value.mjs.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const require_base = require('./base.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/validators/union.ts
|
|
4
|
+
var UnionProp = class UnionProp extends require_base.BaseProp {
|
|
5
|
+
members;
|
|
6
|
+
constructor(members, visibility) {
|
|
7
|
+
super({
|
|
8
|
+
type: "union",
|
|
9
|
+
visibility
|
|
10
|
+
});
|
|
11
|
+
this.members = members;
|
|
12
|
+
}
|
|
13
|
+
optional() {
|
|
14
|
+
return new UnionProp(this.members, "optional");
|
|
15
|
+
}
|
|
16
|
+
validate(value) {
|
|
17
|
+
for (const member of this.members) if (member.allows(value)) return;
|
|
18
|
+
throw this.error;
|
|
19
|
+
}
|
|
20
|
+
allows(value) {
|
|
21
|
+
return this.members.some((member) => member.allows(value));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.UnionProp = UnionProp;
|
|
27
|
+
//# sourceMappingURL=union.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.cjs","names":["BaseProp"],"sources":["../../src/validators/union.ts"],"sourcesContent":["import type { AnyBaseProp, ExtractPropValue, PropVisibility } from './types';\nimport { BaseProp } from './base';\n\nexport class UnionProp<\n const Members extends readonly AnyBaseProp[],\n Visibility extends PropVisibility,\n> extends BaseProp<'union', Visibility, ExtractPropValue<Members[number]>> {\n readonly members: Members;\n\n constructor(members: Members, visibility: Visibility) {\n super({ type: 'union', visibility });\n this.members = members;\n }\n\n optional(this: UnionProp<Members, 'required'>) {\n return new UnionProp(this.members, 'optional');\n }\n\n validate(value: unknown) {\n for (const member of this.members) {\n if (member.allows(value)) return;\n }\n\n throw this.error;\n }\n\n allows(value: unknown): value is ExtractPropValue<Members[number]> {\n return this.members.some((member) => member.allows(value));\n }\n}\n"],"mappings":";;;AAGA,IAAa,YAAb,MAAa,kBAGHA,sBAAiE;CACzE,AAAS;CAET,YAAY,SAAkB,YAAwB;EACpD,MAAM;GAAE,MAAM;GAAS;EAAW,CAAC;EACnC,KAAK,UAAU;CACjB;CAEA,WAA+C;EAC7C,OAAO,IAAI,UAAU,KAAK,SAAS,UAAU;CAC/C;CAEA,SAAS,OAAgB;EACvB,KAAK,MAAM,UAAU,KAAK,SACxB,IAAI,OAAO,OAAO,KAAK,GAAG;EAG5B,MAAM,KAAK;CACb;CAEA,OAAO,OAA4D;EACjE,OAAO,KAAK,QAAQ,MAAM,WAAW,OAAO,OAAO,KAAK,CAAC;CAC3D;AACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnyBaseProp, ExtractPropValue, PropVisibility } from "./types.cjs";
|
|
2
|
+
import { BaseProp } from "./base.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/validators/union.d.ts
|
|
5
|
+
declare class UnionProp<const Members extends readonly AnyBaseProp[], Visibility extends PropVisibility> extends BaseProp<'union', Visibility, ExtractPropValue<Members[number]>> {
|
|
6
|
+
readonly members: Members;
|
|
7
|
+
constructor(members: Members, visibility: Visibility);
|
|
8
|
+
optional(this: UnionProp<Members, 'required'>): UnionProp<Members, "optional">;
|
|
9
|
+
validate(value: unknown): void;
|
|
10
|
+
allows(value: unknown): value is ExtractPropValue<Members[number]>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { UnionProp };
|
|
14
|
+
//# sourceMappingURL=union.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.d.cts","names":[],"sources":["../../src/validators/union.ts"],"mappings":";;;;cAGa,SAAA,gCACoB,WAAA,uBACZ,cAAA,UACX,QAAA,UAAkB,UAAA,EAAY,gBAAA,CAAiB,OAAA;EAAA,SAC9C,OAAA,EAAS,OAAA;cAEN,OAAA,EAAS,OAAA,EAAS,UAAA,EAAY,UAAA;EAK1C,QAAA,CAAS,IAAA,EAAM,SAAA,CAAU,OAAA,gBAAoB,SAAA,CAAA,OAAA;EAI7C,QAAA,CAAS,KAAA;EAQT,MAAA,CAAO,KAAA,YAAiB,KAAA,IAAS,gBAAA,CAAiB,OAAA;AAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnyBaseProp, ExtractPropValue, PropVisibility } from "./types.mjs";
|
|
2
|
+
import { BaseProp } from "./base.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/validators/union.d.ts
|
|
5
|
+
declare class UnionProp<const Members extends readonly AnyBaseProp[], Visibility extends PropVisibility> extends BaseProp<'union', Visibility, ExtractPropValue<Members[number]>> {
|
|
6
|
+
readonly members: Members;
|
|
7
|
+
constructor(members: Members, visibility: Visibility);
|
|
8
|
+
optional(this: UnionProp<Members, 'required'>): UnionProp<Members, "optional">;
|
|
9
|
+
validate(value: unknown): void;
|
|
10
|
+
allows(value: unknown): value is ExtractPropValue<Members[number]>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { UnionProp };
|
|
14
|
+
//# sourceMappingURL=union.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.d.mts","names":[],"sources":["../../src/validators/union.ts"],"mappings":";;;;cAGa,SAAA,gCACoB,WAAA,uBACZ,cAAA,UACX,QAAA,UAAkB,UAAA,EAAY,gBAAA,CAAiB,OAAA;EAAA,SAC9C,OAAA,EAAS,OAAA;cAEN,OAAA,EAAS,OAAA,EAAS,UAAA,EAAY,UAAA;EAK1C,QAAA,CAAS,IAAA,EAAM,SAAA,CAAU,OAAA,gBAAoB,SAAA,CAAA,OAAA;EAI7C,QAAA,CAAS,KAAA;EAQT,MAAA,CAAO,KAAA,YAAiB,KAAA,IAAS,gBAAA,CAAiB,OAAA;AAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseProp } from "./base.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/validators/union.ts
|
|
4
|
+
var UnionProp = class UnionProp extends BaseProp {
|
|
5
|
+
members;
|
|
6
|
+
constructor(members, visibility) {
|
|
7
|
+
super({
|
|
8
|
+
type: "union",
|
|
9
|
+
visibility
|
|
10
|
+
});
|
|
11
|
+
this.members = members;
|
|
12
|
+
}
|
|
13
|
+
optional() {
|
|
14
|
+
return new UnionProp(this.members, "optional");
|
|
15
|
+
}
|
|
16
|
+
validate(value) {
|
|
17
|
+
for (const member of this.members) if (member.allows(value)) return;
|
|
18
|
+
throw this.error;
|
|
19
|
+
}
|
|
20
|
+
allows(value) {
|
|
21
|
+
return this.members.some((member) => member.allows(value));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { UnionProp };
|
|
27
|
+
//# sourceMappingURL=union.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.mjs","names":[],"sources":["../../src/validators/union.ts"],"sourcesContent":["import type { AnyBaseProp, ExtractPropValue, PropVisibility } from './types';\nimport { BaseProp } from './base';\n\nexport class UnionProp<\n const Members extends readonly AnyBaseProp[],\n Visibility extends PropVisibility,\n> extends BaseProp<'union', Visibility, ExtractPropValue<Members[number]>> {\n readonly members: Members;\n\n constructor(members: Members, visibility: Visibility) {\n super({ type: 'union', visibility });\n this.members = members;\n }\n\n optional(this: UnionProp<Members, 'required'>) {\n return new UnionProp(this.members, 'optional');\n }\n\n validate(value: unknown) {\n for (const member of this.members) {\n if (member.allows(value)) return;\n }\n\n throw this.error;\n }\n\n allows(value: unknown): value is ExtractPropValue<Members[number]> {\n return this.members.some((member) => member.allows(value));\n }\n}\n"],"mappings":";;;AAGA,IAAa,YAAb,MAAa,kBAGH,SAAiE;CACzE,AAAS;CAET,YAAY,SAAkB,YAAwB;EACpD,MAAM;GAAE,MAAM;GAAS;EAAW,CAAC;EACnC,KAAK,UAAU;CACjB;CAEA,WAA+C;EAC7C,OAAO,IAAI,UAAU,KAAK,SAAS,UAAU;CAC/C;CAEA,SAAS,OAAgB;EACvB,KAAK,MAAM,UAAU,KAAK,SACxB,IAAI,OAAO,OAAO,KAAK,GAAG;EAG5B,MAAM,KAAK;CACb;CAEA,OAAO,OAA4D;EACjE,OAAO,KAAK,QAAQ,MAAM,WAAW,OAAO,OAAO,KAAK,CAAC;CAC3D;AACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/validators/validate-props.ts
|
|
3
|
+
var MissingRequiredPropError = class extends Error {
|
|
4
|
+
constructor(key) {
|
|
5
|
+
super(`Property "${key}" is required but not provided.`);
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
function validateProps(shape, props) {
|
|
9
|
+
for (const key in shape) {
|
|
10
|
+
const prop = shape[key];
|
|
11
|
+
if (prop.visibility === "required" && !(key in props)) throw new MissingRequiredPropError(key);
|
|
12
|
+
if (prop.visibility === "optional" && !(key in props)) continue;
|
|
13
|
+
const value = props[key];
|
|
14
|
+
if ("type" in prop && prop.type === "JSX.Element" && typeof value === "function") continue;
|
|
15
|
+
prop(value);
|
|
16
|
+
}
|
|
17
|
+
return props;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.validateProps = validateProps;
|
|
22
|
+
//# sourceMappingURL=validate-props.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-props.cjs","names":[],"sources":["../../src/validators/validate-props.ts"],"sourcesContent":["import type { AnyBuiltPropDefinition } from './types';\n\nexport class MissingRequiredPropError extends Error {\n constructor(key: string) {\n super(`Property \"${key}\" is required but not provided.`);\n }\n}\n\nexport function validateProps<T extends object>(\n shape: Record<string, AnyBuiltPropDefinition>,\n props: T,\n) {\n for (const key in shape) {\n const prop = shape[key];\n\n if (prop.visibility === 'required' && !(key in props)) {\n throw new MissingRequiredPropError(key);\n }\n\n if (prop.visibility === 'optional' && !(key in props)) {\n continue;\n }\n\n const value = (props as Record<string, unknown>)[key];\n\n if (\n 'type' in prop &&\n prop.type === 'JSX.Element' &&\n typeof value === 'function'\n ) {\n continue;\n }\n\n prop(value);\n }\n\n return props;\n}\n"],"mappings":";;AAEA,IAAa,2BAAb,cAA8C,MAAM;CAClD,YAAY,KAAa;EACvB,MAAM,aAAa,IAAI,gCAAgC;CACzD;AACF;AAEA,SAAgB,cACd,OACA,OACA;CACA,KAAK,MAAM,OAAO,OAAO;EACvB,MAAM,OAAO,MAAM;EAEnB,IAAI,KAAK,eAAe,cAAc,EAAE,OAAO,QAC7C,MAAM,IAAI,yBAAyB,GAAG;EAGxC,IAAI,KAAK,eAAe,cAAc,EAAE,OAAO,QAC7C;EAGF,MAAM,QAAS,MAAkC;EAEjD,IACE,UAAU,QACV,KAAK,SAAS,iBACd,OAAO,UAAU,YAEjB;EAGF,KAAK,KAAK;CACZ;CAEA,OAAO;AACT"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AnyBuiltPropDefinition } from "./types.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/validators/validate-props.d.ts
|
|
4
|
+
declare function validateProps<T extends object>(shape: Record<string, AnyBuiltPropDefinition>, props: T): T;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { validateProps };
|
|
7
|
+
//# sourceMappingURL=validate-props.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-props.d.cts","names":[],"sources":["../../src/validators/validate-props.ts"],"mappings":";;;iBAQgB,aAAA,mBACd,KAAA,EAAO,MAAA,SAAe,sBAAA,GACtB,KAAA,EAAO,CAAA,GAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AnyBuiltPropDefinition } from "./types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/validators/validate-props.d.ts
|
|
4
|
+
declare function validateProps<T extends object>(shape: Record<string, AnyBuiltPropDefinition>, props: T): T;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { validateProps };
|
|
7
|
+
//# sourceMappingURL=validate-props.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-props.d.mts","names":[],"sources":["../../src/validators/validate-props.ts"],"mappings":";;;iBAQgB,aAAA,mBACd,KAAA,EAAO,MAAA,SAAe,sBAAA,GACtB,KAAA,EAAO,CAAA,GAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/validators/validate-props.ts
|
|
2
|
+
var MissingRequiredPropError = class extends Error {
|
|
3
|
+
constructor(key) {
|
|
4
|
+
super(`Property "${key}" is required but not provided.`);
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
function validateProps(shape, props) {
|
|
8
|
+
for (const key in shape) {
|
|
9
|
+
const prop = shape[key];
|
|
10
|
+
if (prop.visibility === "required" && !(key in props)) throw new MissingRequiredPropError(key);
|
|
11
|
+
if (prop.visibility === "optional" && !(key in props)) continue;
|
|
12
|
+
const value = props[key];
|
|
13
|
+
if ("type" in prop && prop.type === "JSX.Element" && typeof value === "function") continue;
|
|
14
|
+
prop(value);
|
|
15
|
+
}
|
|
16
|
+
return props;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { validateProps };
|
|
21
|
+
//# sourceMappingURL=validate-props.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-props.mjs","names":[],"sources":["../../src/validators/validate-props.ts"],"sourcesContent":["import type { AnyBuiltPropDefinition } from './types';\n\nexport class MissingRequiredPropError extends Error {\n constructor(key: string) {\n super(`Property \"${key}\" is required but not provided.`);\n }\n}\n\nexport function validateProps<T extends object>(\n shape: Record<string, AnyBuiltPropDefinition>,\n props: T,\n) {\n for (const key in shape) {\n const prop = shape[key];\n\n if (prop.visibility === 'required' && !(key in props)) {\n throw new MissingRequiredPropError(key);\n }\n\n if (prop.visibility === 'optional' && !(key in props)) {\n continue;\n }\n\n const value = (props as Record<string, unknown>)[key];\n\n if (\n 'type' in prop &&\n prop.type === 'JSX.Element' &&\n typeof value === 'function'\n ) {\n continue;\n }\n\n prop(value);\n }\n\n return props;\n}\n"],"mappings":";AAEA,IAAa,2BAAb,cAA8C,MAAM;CAClD,YAAY,KAAa;EACvB,MAAM,aAAa,IAAI,gCAAgC;CACzD;AACF;AAEA,SAAgB,cACd,OACA,OACA;CACA,KAAK,MAAM,OAAO,OAAO;EACvB,MAAM,OAAO,MAAM;EAEnB,IAAI,KAAK,eAAe,cAAc,EAAE,OAAO,QAC7C,MAAM,IAAI,yBAAyB,GAAG;EAGxC,IAAI,KAAK,eAAe,cAAc,EAAE,OAAO,QAC7C;EAGF,MAAM,QAAS,MAAkC;EAEjD,IACE,UAAU,QACV,KAAK,SAAS,iBACd,OAAO,UAAU,YAEjB;EAGF,KAAK,KAAK;CACZ;CAEA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,59 +1,63 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jfdevelops/react-layout",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A React library for creating layout components.",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@jfdevelops/react-layout",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "A React library for creating layout components.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/jfdevelops/react-layout.git"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"main": "./dist/index.cjs",
|
|
15
|
+
"module": "./dist/index.mjs",
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": "./dist/index.mjs",
|
|
20
|
+
"require": "./dist/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": ">=18",
|
|
29
|
+
"react-dom": ">=18"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"provenance": true
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
37
|
+
"@vitest/ui": "4.1.5",
|
|
38
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
39
|
+
"@testing-library/react": "16.3.2",
|
|
40
|
+
"@types/node": "24.10.1",
|
|
41
|
+
"@types/react": "18.3.28",
|
|
42
|
+
"@types/react-dom": "18.3.7",
|
|
43
|
+
"@vitejs/plugin-react": "6.0.1",
|
|
44
|
+
"jsdom": "29.0.2",
|
|
45
|
+
"react": "18.3.1",
|
|
46
|
+
"react-dom": "18.3.1",
|
|
47
|
+
"tsdown": "0.22.1",
|
|
48
|
+
"unrun": "0.3.0",
|
|
49
|
+
"typescript": "6.0.3",
|
|
50
|
+
"vite": "8.0.10",
|
|
51
|
+
"vitest": "4.1.5"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"dev": "vite",
|
|
55
|
+
"build": "tsdown",
|
|
56
|
+
"typecheck": "tsc --noEmit",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"test:watch": "vitest",
|
|
59
|
+
"test:ui": "vitest --ui",
|
|
60
|
+
"test:coverage": "vitest run --coverage",
|
|
61
|
+
"preview": "vite preview"
|
|
62
|
+
}
|
|
63
|
+
}
|
package/dist/create-config.cjs
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
const require_utils = require('./utils.cjs');
|
|
2
|
-
const require_composable = require('./composable.cjs');
|
|
3
|
-
const require_create_value = require('./create-value.cjs');
|
|
4
|
-
const require_resource = require('./resource.cjs');
|
|
5
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
-
|
|
7
|
-
//#region src/create-config.tsx
|
|
8
|
-
function isBuiltPropDefinition(value) {
|
|
9
|
-
return typeof value === "function" && value !== null && "visibility" in value;
|
|
10
|
-
}
|
|
11
|
-
function isSplitLayoutInPropDefinition(value) {
|
|
12
|
-
return value !== null && typeof value === "object" && "render" in value && value.render !== void 0;
|
|
13
|
-
}
|
|
14
|
-
function splitLayoutInProps(inProps) {
|
|
15
|
-
const resolvedInProps = {};
|
|
16
|
-
const splitInProps = {};
|
|
17
|
-
for (const [key, value] of Object.entries(inProps)) {
|
|
18
|
-
if (isBuiltPropDefinition(value)) {
|
|
19
|
-
resolvedInProps[key] = value;
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
if (isSplitLayoutInPropDefinition(value)) {
|
|
23
|
-
splitInProps[key] = value.render;
|
|
24
|
-
if (value.props && typeof value.props === "object") Object.assign(resolvedInProps, value.props);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
resolvedInProps,
|
|
29
|
-
splitInProps
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function defineResourceLayout(options) {
|
|
33
|
-
const { options: inProps, resources, layout } = options;
|
|
34
|
-
const normalizedResources = require_resource.normalizeResources(resources);
|
|
35
|
-
const resourcesEnum = require_create_value.createPrimitivePropBuilder("string").enum(require_resource.toResourceEnum(normalizedResources));
|
|
36
|
-
const definedResourceLayout = (layoutOptions) => {
|
|
37
|
-
const { name, props: instancePropDefinitions, ...layoutOptionProps } = layoutOptions;
|
|
38
|
-
const createComposableLayout = require_composable.makeComposable();
|
|
39
|
-
const nameProp = require_create_value.createProp.string().literal(name);
|
|
40
|
-
const { resolvedInProps, splitInProps } = splitLayoutInProps({
|
|
41
|
-
...typeof inProps === "function" ? inProps({
|
|
42
|
-
resource: resourcesEnum,
|
|
43
|
-
name: nameProp
|
|
44
|
-
}) : inProps,
|
|
45
|
-
...instancePropDefinitions,
|
|
46
|
-
...layoutOptionProps
|
|
47
|
-
});
|
|
48
|
-
const { composables, render, props: layoutProps } = layout;
|
|
49
|
-
const customLayoutProps = layoutProps?.custom;
|
|
50
|
-
const includeLayoutProps = layoutProps?.include;
|
|
51
|
-
const resolvedLayoutProps = {
|
|
52
|
-
...require_utils.pick(resolvedInProps, Object.keys(includeLayoutProps ?? {})),
|
|
53
|
-
...customLayoutProps
|
|
54
|
-
};
|
|
55
|
-
const layoutContext = {
|
|
56
|
-
resource: layoutOptions.resource,
|
|
57
|
-
name
|
|
58
|
-
};
|
|
59
|
-
const resolvedComposables = composables ? require_composable.resolveLayoutComposables(composables, layoutContext) : void 0;
|
|
60
|
-
const mergedRenderContext = {
|
|
61
|
-
composables: resolvedComposables,
|
|
62
|
-
resource: layoutContext.resource,
|
|
63
|
-
name: layoutContext.name,
|
|
64
|
-
inProps: splitInProps
|
|
65
|
-
};
|
|
66
|
-
function Component(props) {
|
|
67
|
-
const validatedProps = require_create_value.validateProps(resolvedLayoutProps, props);
|
|
68
|
-
const includedPropKeys = Object.keys(includeLayoutProps ?? {});
|
|
69
|
-
const includedPropDefinitions = require_utils.pick(resolvedInProps, includedPropKeys);
|
|
70
|
-
const validatedIncludedProps = require_create_value.validateProps(includedPropDefinitions, {
|
|
71
|
-
...require_utils.resolvePropDefinitionValues(includedPropDefinitions),
|
|
72
|
-
...require_utils.pick(splitInProps, includedPropKeys),
|
|
73
|
-
...require_utils.pick(layoutOptionProps, includedPropKeys)
|
|
74
|
-
});
|
|
75
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: render({
|
|
76
|
-
...validatedProps,
|
|
77
|
-
...validatedIncludedProps
|
|
78
|
-
}, mergedRenderContext) });
|
|
79
|
-
}
|
|
80
|
-
function createComposition(compositionOptions) {
|
|
81
|
-
if (!compositionOptions.components) return {};
|
|
82
|
-
return { makeComposable: createComposableLayout(compositionOptions) };
|
|
83
|
-
}
|
|
84
|
-
return Object.assign(Component, {
|
|
85
|
-
displayName: name,
|
|
86
|
-
props: void 0,
|
|
87
|
-
...createComposition({
|
|
88
|
-
components: resolvedComposables,
|
|
89
|
-
name
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
return definedResourceLayout;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
//#endregion
|
|
97
|
-
exports.defineResourceLayout = defineResourceLayout;
|
|
98
|
-
//# sourceMappingURL=create-config.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-config.cjs","names":["normalizeResources","createPrimitivePropBuilder","toResourceEnum","makeComposable","createProp","pick","resolveLayoutComposables","validateProps","resolvePropDefinitionValues"],"sources":["../src/create-config.tsx"],"sourcesContent":["import type { JSX } from 'react';\r\nimport {\r\n type ComposableComponents,\r\n type ComposableNameContext,\r\n type CreateLayoutComposable,\r\n MakeComposable,\r\n makeComposable,\r\n MakeComposableOptions,\r\n resolveLayoutComposables,\r\n} from './composable';\r\nimport {\r\n type AnyBuiltPropDefinition,\r\n createPrimitivePropBuilder,\r\n createProp,\r\n type ResolveLayoutProps,\r\n type ResolveProps,\r\n validateProps,\r\n} from './create-value';\r\nimport {\r\n IncludedProps,\r\n InferredInProps,\r\n InPropsDefinition,\r\n InPropsObject,\r\n LayoutRenderProps,\r\n} from './props';\r\nimport {\n normalizeResources,\n toResourceEnum,\n type LayoutResourceKey,\r\n type NormalizeResources,\r\n type ResourceDefinition,\n} from './resource';\nimport { BaseComponent, pick, resolvePropDefinitionValues, Show } from './utils';\n\r\ntype LayoutProps<\r\n Resources extends ReadonlyArray<ResourceDefinition>,\r\n Options extends InPropsDefinition<Resources>,\r\n IncludeProps extends IncludedProps<InferredInProps<Resources, Options>> = {},\r\n CustomProps extends InPropsObject = {},\r\n> = {\r\n /**\r\n * Props to include in the layout.\r\n */\r\n include?: IncludeProps;\r\n /**\r\n * Custom props that the layout will receive.\r\n */\r\n custom?: CustomProps;\r\n};\r\n\r\ntype LayoutRenderContext<\r\n Resources extends ReadonlyArray<ResourceDefinition>,\r\n Composables extends ComposableComponents,\r\n> = {\r\n composables: LayoutRenderComposables<Composables>;\r\n inProps: Record<string, unknown>;\r\n resource: LayoutResourceKey<Resources>;\r\n name: string;\r\n};\r\ntype LayoutRenderComposables<Composables extends ComposableComponents> =\r\n [keyof Composables] extends [never] ? undefined : Composables;\r\n\r\ntype SplitLayoutInPropDefinition<\r\n Props extends InPropsObject = {},\r\n Content = unknown,\r\n> = {\r\n props?: Props;\r\n render: ((props: ResolveProps<Props>) => Content) | Content;\r\n};\r\n\r\nfunction isBuiltPropDefinition(\r\n value: unknown,\r\n): value is AnyBuiltPropDefinition {\r\n return typeof value === 'function' && value !== null && 'visibility' in value;\r\n}\r\n\r\nfunction isSplitLayoutInPropDefinition(\r\n value: unknown,\r\n): value is SplitLayoutInPropDefinition {\r\n return (\r\n value !== null &&\r\n typeof value === 'object' &&\r\n 'render' in value &&\r\n (value as { render?: unknown }).render !== undefined\r\n );\r\n}\r\n\r\nfunction splitLayoutInProps(inProps: Record<string, unknown>) {\r\n const resolvedInProps: Record<string, AnyBuiltPropDefinition> = {};\r\n const splitInProps: Record<string, unknown> = {};\r\n\r\n for (const [key, value] of Object.entries(inProps)) {\r\n if (isBuiltPropDefinition(value)) {\r\n resolvedInProps[key] = value;\r\n continue;\r\n }\r\n\r\n if (isSplitLayoutInPropDefinition(value)) {\r\n splitInProps[key] = value.render;\r\n\r\n if (value.props && typeof value.props === 'object') {\r\n Object.assign(resolvedInProps, value.props);\r\n }\r\n }\r\n }\r\n\r\n return {\r\n resolvedInProps,\r\n splitInProps,\r\n };\r\n}\r\n\r\ntype CreateViewMapOptions<\r\n Resources extends ReadonlyArray<ResourceDefinition>,\r\n Options extends InPropsDefinition<Resources>,\r\n IncludeProps extends IncludedProps<InferredInProps<Resources, Options>> = {},\r\n CustomProps extends InPropsObject = {},\r\n Composables extends ComposableComponents = {},\r\n> = {\r\n /**\r\n * An array of valid resource names to support.\r\n */\r\n resources: Resources;\r\n /**\r\n * The options that are passed into the created resource layout.\r\n */\r\n options: Options;\r\n layout: {\r\n /**\r\n * The props to pass to the layout.\r\n */\r\n props?: LayoutProps<Resources, Options, IncludeProps, CustomProps>;\r\n /**\r\n * Components used to compose the layout. Invoked per layout instance with\r\n * a scoped `create` that resolves composable `name` callbacks using the\r\n * layout's `resource` and `name`.\r\n */\r\n composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => Composables;\r\n /**\r\n * The render function for the layout.\r\n */\r\n render: (\r\n props: LayoutRenderProps<Resources, Options, IncludeProps, CustomProps>,\r\n context: LayoutRenderContext<Resources, Composables>,\r\n ) => JSX.Element;\r\n };\r\n};\r\n\r\ntype ResourceLayoutComposition<\r\n Name extends string,\r\n Composables extends ComposableComponents,\r\n> = [keyof Composables] extends [never]\r\n ? {}\r\n : {\r\n makeComposable: MakeComposable<Composables, Name>;\r\n };\r\ntype ResourceLayoutComponent<\r\n Name extends string,\r\n Props extends InPropsObject = {},\r\n Composables extends ComposableComponents = {},\r\n> = ResourceLayoutComposition<Name, Composables> &\r\n BaseComponent<Name, ResolveProps<Props>> & {\r\n (props: Show<ResolveProps<Props>>): JSX.Element;\r\n };\r\n\r\ntype DefinedResourceLayoutOptions<\r\n Resources extends ReadonlyArray<ResourceDefinition>,\r\n InProps extends InPropsDefinition<Resources>,\r\n Name extends string,\r\n Resource extends LayoutResourceKey<Resources>,\r\n Props extends InPropsObject = {},\r\n> = ResolveLayoutProps<InferredInProps<Resources, InProps>> & {\r\n name: Name;\r\n resource: Resource;\r\n props?: Props;\r\n};\r\ntype DefinedResourceLayout<\r\n Resources extends ReadonlyArray<ResourceDefinition>,\r\n InProps extends InPropsDefinition<Resources>,\r\n IncludeProps extends IncludedProps<InferredInProps<Resources, InProps>> = {},\r\n CustomProps extends InPropsObject = {},\r\n Composables extends ComposableComponents = {},\r\n> = <\r\n Name extends string,\r\n Resource extends LayoutResourceKey<Resources>,\r\n Props extends InPropsObject = {},\r\n>(\r\n options: DefinedResourceLayoutOptions<\r\n Resources,\r\n InProps,\r\n Name,\r\n Resource,\r\n Props\r\n >,\r\n) => ResourceLayoutComponent<Name, CustomProps, Composables>;\r\n\r\nexport function defineResourceLayout<\r\n const Resources extends ReadonlyArray<ResourceDefinition>,\r\n InProps extends InPropsDefinition<Resources>,\r\n IncludeProps extends IncludedProps<InferredInProps<Resources, InProps>> = {},\r\n CustomProps extends InPropsObject = {},\r\n Composables extends ComposableComponents = {},\r\n>(\r\n options: CreateViewMapOptions<\r\n Resources,\r\n InProps,\r\n IncludeProps,\r\n CustomProps,\r\n Composables\r\n >,\r\n) {\r\n const { options: inProps, resources, layout } = options;\r\n const normalizedResources = normalizeResources(resources);\r\n const resourcesEnum = createPrimitivePropBuilder('string').enum(\r\n toResourceEnum(normalizedResources),\r\n );\r\n const definedResourceLayout: DefinedResourceLayout<\r\n Resources,\r\n InProps,\r\n IncludeProps,\r\n CustomProps,\r\n Composables\r\n > = (layoutOptions) => {\r\n const {\r\n name,\r\n props: instancePropDefinitions,\r\n ...layoutOptionProps\r\n } = layoutOptions;\r\n const createComposableLayout =\r\n makeComposable<\r\n LayoutRenderProps<Resources, InProps, IncludeProps, CustomProps>\r\n >();\r\n const nameProp = createProp.string().literal(name);\r\n const rawResolvedOptions =\r\n typeof inProps === 'function'\r\n ? inProps({\r\n resource: resourcesEnum,\r\n name: nameProp,\r\n })\r\n : inProps;\r\n const { resolvedInProps, splitInProps } = splitLayoutInProps({\r\n ...(rawResolvedOptions as Record<string, unknown>),\r\n ...(instancePropDefinitions as Record<string, unknown> | undefined),\r\n ...layoutOptionProps,\r\n });\r\n const { composables, render, props: layoutProps } = layout;\r\n const customLayoutProps = layoutProps?.custom;\r\n const includeLayoutProps = layoutProps?.include;\r\n const resolvedIncludedProps = pick(\r\n resolvedInProps,\r\n Object.keys(includeLayoutProps ?? {}),\r\n );\r\n const resolvedLayoutProps = {\r\n ...resolvedIncludedProps,\r\n ...customLayoutProps,\r\n };\r\n const layoutContext: ComposableNameContext<\r\n LayoutResourceKey<Resources>,\r\n typeof name\r\n > = {\r\n resource: layoutOptions.resource,\r\n name,\r\n };\r\n const resolvedComposables = composables\r\n ? resolveLayoutComposables(composables, layoutContext)\r\n : undefined;\r\n const mergedRenderContext = {\r\n composables: resolvedComposables as LayoutRenderComposables<Composables>,\r\n resource: layoutContext.resource,\r\n name: layoutContext.name,\r\n inProps: splitInProps,\r\n } as LayoutRenderContext<Resources, Composables>;\r\n\r\n function Component(props: Show<ResolveProps<CustomProps>>) {\n const validatedProps = validateProps(resolvedLayoutProps, props);\n const includedPropKeys = Object.keys(includeLayoutProps ?? {});\n const includedPropDefinitions = pick(\n resolvedInProps,\n includedPropKeys,\n ) as Record<string, unknown>;\n const includedPropValues = {\n ...resolvePropDefinitionValues(\n includedPropDefinitions,\n ),\n ...pick(\n splitInProps,\n includedPropKeys as (keyof typeof splitInProps)[],\n ),\n ...pick(\n layoutOptionProps,\n includedPropKeys as (keyof typeof layoutOptionProps)[],\n ),\n };\n const validatedIncludedProps = validateProps(\n includedPropDefinitions as Record<string, AnyBuiltPropDefinition>,\n includedPropValues,\n );\n const layoutRenderProps = {\n ...validatedProps,\n ...validatedIncludedProps,\n } as unknown as LayoutRenderProps<\n Resources,\n InProps,\n IncludeProps,\r\n CustomProps\r\n >;\r\n\r\n return <>{render(layoutRenderProps, mergedRenderContext)}</>;\r\n }\r\n\r\n function createComposition<LayoutName extends string>(\r\n compositionOptions: MakeComposableOptions<Composables, LayoutName>,\r\n ) {\r\n if (!compositionOptions.components) {\r\n return {} as ResourceLayoutComposition<LayoutName, Composables>;\r\n }\r\n\r\n return {\r\n makeComposable: createComposableLayout(compositionOptions),\r\n };\r\n }\r\n\r\n return Object.assign(Component, {\r\n displayName: name,\r\n props: undefined as unknown as ResolveProps<CustomProps>,\r\n ...createComposition({\r\n components: resolvedComposables as Composables | undefined,\r\n name,\r\n }),\r\n });\r\n };\r\n\r\n return definedResourceLayout;\r\n}\r\n"],"mappings":";;;;;;;AAsEA,SAAS,sBACP,OACiC;CACjC,OAAO,OAAO,UAAU,cAAc,UAAU,QAAQ,gBAAgB;AAC1E;AAEA,SAAS,8BACP,OACsC;CACtC,OACE,UAAU,QACV,OA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M,sBAAsB;GAC1B,aAAa;GACb,UAAU,cAAc;GACxB,MAAM,cAAc;GACpB,SAAS;EACX;EAEA,SAAS,UAAU,OAAwC;GACzD,MAAM,iBAAiBC,mCAAc,qBAAqB,KAAK;GAC/D,MAAM,mBAAmB,OAAO,KAAK,sBAAsB,CAAC,CAAC;GAC7D,MAAM,0BAA0BF,mBAC9B,iBACA,gBACF;GAcA,MAAM,yBAAyBE,mCAC7B,yBACA;IAdA,GAAGC,0CACD,uBACF;IACA,GAAGH,mBACD,cACA,gBACF;IACA,GAAGA,mBACD,mBACA,gBACF;GAIiB,CACnB;GAWA,OAAO,mFAAG,OAAO;IATf,GAAG;IACH,GAAG;GAQ4B,GAAG,mBAAmB,EAAI;EAC7D;EAEA,SAAS,kBACP,oBACA;GACA,IAAI,CAAC,mBAAmB,YACtB,OAAO,CAAC;GAGV,OAAO,EACL,gBAAgB,uBAAuB,kBAAkB,EAC3D;EACF;EAEA,OAAO,OAAO,OAAO,WAAW;GAC9B,aAAa;GACb,OAAO;GACP,GAAG,kBAAkB;IACnB,YAAY;IACZ;GACF,CAAC;EACH,CAAC;CACH;CAEA,OAAO;AACT"}
|
package/dist/create-config.d.cts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ResolveLayoutProps, ResolveProps } from "./create-value.cjs";
|
|
2
|
-
import { BaseComponent, Show } from "./utils.cjs";
|
|
3
|
-
import { LayoutResourceKey, ResourceDefinition } from "./resource.cjs";
|
|
4
|
-
import { InPropsDefinition, InPropsObject, IncludedProps, InferredInProps, LayoutRenderProps } from "./props.cjs";
|
|
5
|
-
import { ComposableComponents, CreateLayoutComposable, MakeComposable } from "./composable.cjs";
|
|
6
|
-
import { JSX } from "react";
|
|
7
|
-
|
|
8
|
-
//#region src/create-config.d.ts
|
|
9
|
-
type LayoutProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, IncludeProps extends IncludedProps<InferredInProps<Resources, Options>> = {}, CustomProps extends InPropsObject = {}> = {
|
|
10
|
-
/**
|
|
11
|
-
* Props to include in the layout.
|
|
12
|
-
*/
|
|
13
|
-
include?: IncludeProps;
|
|
14
|
-
/**
|
|
15
|
-
* Custom props that the layout will receive.
|
|
16
|
-
*/
|
|
17
|
-
custom?: CustomProps;
|
|
18
|
-
};
|
|
19
|
-
type LayoutRenderContext<Resources extends ReadonlyArray<ResourceDefinition>, Composables extends ComposableComponents> = {
|
|
20
|
-
composables: LayoutRenderComposables<Composables>;
|
|
21
|
-
inProps: Record<string, unknown>;
|
|
22
|
-
resource: LayoutResourceKey<Resources>;
|
|
23
|
-
name: string;
|
|
24
|
-
};
|
|
25
|
-
type LayoutRenderComposables<Composables extends ComposableComponents> = [keyof Composables] extends [never] ? undefined : Composables;
|
|
26
|
-
type CreateViewMapOptions<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, IncludeProps extends IncludedProps<InferredInProps<Resources, Options>> = {}, CustomProps extends InPropsObject = {}, Composables extends ComposableComponents = {}> = {
|
|
27
|
-
/**
|
|
28
|
-
* An array of valid resource names to support.
|
|
29
|
-
*/
|
|
30
|
-
resources: Resources;
|
|
31
|
-
/**
|
|
32
|
-
* The options that are passed into the created resource layout.
|
|
33
|
-
*/
|
|
34
|
-
options: Options;
|
|
35
|
-
layout: {
|
|
36
|
-
/**
|
|
37
|
-
* The props to pass to the layout.
|
|
38
|
-
*/
|
|
39
|
-
props?: LayoutProps<Resources, Options, IncludeProps, CustomProps>;
|
|
40
|
-
/**
|
|
41
|
-
* Components used to compose the layout. Invoked per layout instance with
|
|
42
|
-
* a scoped `create` that resolves composable `name` callbacks using the
|
|
43
|
-
* layout's `resource` and `name`.
|
|
44
|
-
*/
|
|
45
|
-
composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => Composables;
|
|
46
|
-
/**
|
|
47
|
-
* The render function for the layout.
|
|
48
|
-
*/
|
|
49
|
-
render: (props: LayoutRenderProps<Resources, Options, IncludeProps, CustomProps>, context: LayoutRenderContext<Resources, Composables>) => JSX.Element;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
type ResourceLayoutComposition<Name extends string, Composables extends ComposableComponents> = [keyof Composables] extends [never] ? {} : {
|
|
53
|
-
makeComposable: MakeComposable<Composables, Name>;
|
|
54
|
-
};
|
|
55
|
-
type ResourceLayoutComponent<Name extends string, Props extends InPropsObject = {}, Composables extends ComposableComponents = {}> = ResourceLayoutComposition<Name, Composables> & BaseComponent<Name, ResolveProps<Props>> & {
|
|
56
|
-
(props: Show<ResolveProps<Props>>): JSX.Element;
|
|
57
|
-
};
|
|
58
|
-
type DefinedResourceLayoutOptions<Resources extends ReadonlyArray<ResourceDefinition>, InProps extends InPropsDefinition<Resources>, Name extends string, Resource extends LayoutResourceKey<Resources>, Props extends InPropsObject = {}> = ResolveLayoutProps<InferredInProps<Resources, InProps>> & {
|
|
59
|
-
name: Name;
|
|
60
|
-
resource: Resource;
|
|
61
|
-
props?: Props;
|
|
62
|
-
};
|
|
63
|
-
type DefinedResourceLayout<Resources extends ReadonlyArray<ResourceDefinition>, InProps extends InPropsDefinition<Resources>, IncludeProps extends IncludedProps<InferredInProps<Resources, InProps>> = {}, CustomProps extends InPropsObject = {}, Composables extends ComposableComponents = {}> = <Name extends string, Resource extends LayoutResourceKey<Resources>, Props extends InPropsObject = {}>(options: DefinedResourceLayoutOptions<Resources, InProps, Name, Resource, Props>) => ResourceLayoutComponent<Name, CustomProps, Composables>;
|
|
64
|
-
declare function defineResourceLayout<const Resources extends ReadonlyArray<ResourceDefinition>, InProps extends InPropsDefinition<Resources>, IncludeProps extends IncludedProps<InferredInProps<Resources, InProps>> = {}, CustomProps extends InPropsObject = {}, Composables extends ComposableComponents = {}>(options: CreateViewMapOptions<Resources, InProps, IncludeProps, CustomProps, Composables>): DefinedResourceLayout<Resources, InProps, IncludeProps, CustomProps, Composables>;
|
|
65
|
-
//#endregion
|
|
66
|
-
export { defineResourceLayout };
|
|
67
|
-
//# sourceMapp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|
2
|
-
import { BaseComponent, Show } from "./utils.mjs";
|
|
3
|
-
import { LayoutResourceKey, ResourceDefinition } from "./resource.mjs";
|
|
4
|
-
import { InPropsDefinition, InPropsObject, IncludedProps, InferredInProps, LayoutRenderProps } from "./props.mjs";
|
|
5
|
-
import { ComposableComponents, CreateLayoutComposable, MakeComposable } from "./composable.mjs";
|
|
6
|
-
import { JSX } from "react";
|
|
7
|
-
|
|
8
|
-
//#region src/create-config.d.ts
|
|
9
|
-
type LayoutProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, IncludeProps extends IncludedProps<InferredInProps<Resources, Options>> = {}, CustomProps extends InPropsObject = {}> = {
|
|
10
|
-
/**
|
|
11
|
-
* Props to include in the layout.
|
|
12
|
-
*/
|
|
13
|
-
include?: IncludeProps;
|
|
14
|
-
/**
|
|
15
|
-
* Custom props that the layout will receive.
|
|
16
|
-
*/
|
|
17
|
-
custom?: CustomProps;
|
|
18
|
-
};
|
|
19
|
-
type LayoutRenderContext<Resources extends ReadonlyArray<ResourceDefinition>, Composables extends ComposableComponents> = {
|
|
20
|
-
composables: LayoutRenderComposables<Composables>;
|
|
21
|
-
inProps: Record<string, unknown>;
|
|
22
|
-
resource: LayoutResourceKey<Resources>;
|
|
23
|
-
name: string;
|
|
24
|
-
};
|
|
25
|
-
type LayoutRenderComposables<Composables extends ComposableComponents> = [keyof Composables] extends [never] ? undefined : Composables;
|
|
26
|
-
type CreateViewMapOptions<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, IncludeProps extends IncludedProps<InferredInProps<Resources, Options>> = {}, CustomProps extends InPropsObject = {}, Composables extends ComposableComponents = {}> = {
|
|
27
|
-
/**
|
|
28
|
-
* An array of valid resource names to support.
|
|
29
|
-
*/
|
|
30
|
-
resources: Resources;
|
|
31
|
-
/**
|
|
32
|
-
* The options that are passed into the created resource layout.
|
|
33
|
-
*/
|
|
34
|
-
options: Options;
|
|
35
|
-
layout: {
|
|
36
|
-
/**
|
|
37
|
-
* The props to pass to the layout.
|
|
38
|
-
*/
|
|
39
|
-
props?: LayoutProps<Resources, Options, IncludeProps, CustomProps>;
|
|
40
|
-
/**
|
|
41
|
-
* Components used to compose the layout. Invoked per layout instance with
|
|
42
|
-
* a scoped `create` that resolves composable `name` callbacks using the
|
|
43
|
-
* layout's `resource` and `name`.
|
|
44
|
-
*/
|
|
45
|
-
composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => Composables;
|
|
46
|
-
/**
|
|
47
|
-
* The render function for the layout.
|
|
48
|
-
*/
|
|
49
|
-
render: (props: LayoutRenderProps<Resources, Options, IncludeProps, CustomProps>, context: LayoutRenderContext<Resources, Composables>) => JSX.Element;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
type ResourceLayoutComposition<Name extends string, Composables extends ComposableComponents> = [keyof Composables] extends [never] ? {} : {
|
|
53
|
-
makeComposable: MakeComposable<Composables, Name>;
|
|
54
|
-
};
|
|
55
|
-
type ResourceLayoutComponent<Name extends string, Props extends InPropsObject = {}, Composables extends ComposableComponents = {}> = ResourceLayoutComposition<Name, Composables> & BaseComponent<Name, ResolveProps<Props>> & {
|
|
56
|
-
(props: Show<ResolveProps<Props>>): JSX.Element;
|
|
57
|
-
};
|
|
58
|
-
type DefinedResourceLayoutOptions<Resources extends ReadonlyArray<ResourceDefinition>, InProps extends InPropsDefinition<Resources>, Name extends string, Resource extends LayoutResourceKey<Resources>, Props extends InPropsObject = {}> = ResolveLayoutProps<InferredInProps<Resources, InProps>> & {
|
|
59
|
-
name: Name;
|
|
60
|
-
resource: Resource;
|
|
61
|
-
props?: Props;
|
|
62
|
-
};
|
|
63
|
-
type DefinedResourceLayout<Resources extends ReadonlyArray<ResourceDefinition>, InProps extends InPropsDefinition<Resources>, IncludeProps extends IncludedProps<InferredInProps<Resources, InProps>> = {}, CustomProps extends InPropsObject = {}, Composables extends ComposableComponents = {}> = <Name extends string, Resource extends LayoutResourceKey<Resources>, Props extends InPropsObject = {}>(options: DefinedResourceLayoutOptions<Resources, InProps, Name, Resource, Props>) => ResourceLayoutComponent<Name, CustomProps, Composables>;
|
|
64
|
-
declare function defineResourceLayout<const Resources extends ReadonlyArray<ResourceDefinition>, InProps extends InPropsDefinition<Resources>, IncludeProps extends IncludedProps<InferredInProps<Resources, InProps>> = {}, CustomProps extends InPropsObject = {}, Composables extends ComposableComponents = {}>(options: CreateViewMapOptions<Resources, InProps, IncludeProps, CustomProps, Composables>): DefinedResourceLayout<Resources, InProps, IncludeProps, CustomProps, Composables>;
|
|
65
|
-
//#endregion
|
|
66
|
-
export { defineResourceLayout };
|
|
67
|
-
//# sourceMappingURL=create-config.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-config.d.mts","names":[],"sources":["../src/create-config.tsx"],"mappings":";;;;;;;;KAkCK,WAAA,mBACe,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,wBACb,aAAA,CAAc,eAAA,CAAgB,SAAA,EAAW,OAAA,6BAC1C,aAAA;;AAN2D;;EAW/E,OAAA,GAAU,YAAA;EARsB;;;EAYhC,MAAA,GAAS,WAAA;AAAA;AAAA,KAGN,mBAAA,mBACe,aAAA,CAAc,kBAAA,uBACZ,oBAAA;EAEpB,WAAA,EAAa,uBAAA,CAAwB,WAAA;EACrC,OAAA,EAAS,MAAA;EACT,QAAA,EAAU,iBAAA,CAAkB,SAAA;EAC5B,IAAA;AAAA;AAAA,KAEG,uBAAA,qBAA4C,oBAAA,WACxC,WAAA,gCAA2C,WAAA;AAAA,KAoD/C,oBAAA,mBACe,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,wBACb,aAAA,CAAc,eAAA,CAAgB,SAAA,EAAW,OAAA,6BAC1C,aAAA,2BACA,oBAAA;EAlFY;;;EAuFhC,SAAA,EAAW,SAAA;EArFX;;;EAyFA,OAAA,EAAS,OAAA;EACT,MAAA;IAzFA;;;IA6FE,KAAA,G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