@jfdevelops/react-layout 1.4.1 → 1.5.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 (31) hide show
  1. package/dist/create-config/create-defined-resource-layout.cjs.map +1 -1
  2. package/dist/create-config/create-defined-resource-layout.d.cts +1 -1
  3. package/dist/create-config/create-defined-resource-layout.d.cts.map +1 -1
  4. package/dist/create-config/create-defined-resource-layout.d.mts +1 -1
  5. package/dist/create-config/create-defined-resource-layout.d.mts.map +1 -1
  6. package/dist/create-config/create-defined-resource-layout.mjs.map +1 -1
  7. package/dist/create-config/define-layout.cjs +4 -7
  8. package/dist/create-config/define-layout.cjs.map +1 -1
  9. package/dist/create-config/define-layout.d.cts +4 -4
  10. package/dist/create-config/define-layout.d.cts.map +1 -1
  11. package/dist/create-config/define-layout.d.mts +4 -4
  12. package/dist/create-config/define-layout.d.mts.map +1 -1
  13. package/dist/create-config/define-layout.mjs +1 -4
  14. package/dist/create-config/define-layout.mjs.map +1 -1
  15. package/dist/create-config/render-state.cjs +2 -1
  16. package/dist/create-config/render-state.cjs.map +1 -1
  17. package/dist/create-config/render-state.d.cts +3 -3
  18. package/dist/create-config/render-state.d.cts.map +1 -1
  19. package/dist/create-config/render-state.d.mts +3 -3
  20. package/dist/create-config/render-state.d.mts.map +1 -1
  21. package/dist/create-config/render-state.mjs +2 -1
  22. package/dist/create-config/render-state.mjs.map +1 -1
  23. package/dist/props.cjs +16 -0
  24. package/dist/props.cjs.map +1 -0
  25. package/dist/props.d.cts +73 -8
  26. package/dist/props.d.cts.map +1 -1
  27. package/dist/props.d.mts +73 -8
  28. package/dist/props.d.mts.map +1 -1
  29. package/dist/props.mjs +15 -0
  30. package/dist/props.mjs.map +1 -0
  31. package/package.json +5 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.cjs","names":[],"sources":["../src/props.ts"],"sourcesContent":["import type {\n ComposableComponents,\n MergePresetProps,\n} from '@jfdevelops/react-layout-composables';\nimport type { InPropsObject } from '@jfdevelops/react-layout-composables';\nimport {\n EnumWrappedProp,\n LiteralWrappedProp,\n ResolveLayoutProps,\n ResolveLayoutPropsAsDefined,\n ResolveProps,\n} from '@jfdevelops/react-layout-validator';\nimport { ResourceDefinition, ResourceEnum } from './resource';\nimport { Show } from './utils';\n\nexport type { InPropsObject };\n\n/**\n * Two-argument `render(props, context)` used by createComponent and scoped\n * resource components. `Context` is sibling components (scoped) or the\n * resource render context (top-level).\n */\nexport type PropsContextRender<RenderProps, Context, Result = unknown> = (\n props: RenderProps,\n context: Context\n) => Result;\n\n/**\n * Shared `{ props?, render }` shape used by createComponent, scoped\n * components, and anywhere else a value declares props and a two-arg render.\n *\n * @typeParam Props - Declared on the entry (`props`). Often an\n * {@link InPropsObject}, or a layout include/custom bag.\n * @typeParam RenderProps - First argument to `render` (defaults to\n * {@link ResolveProps}<Props> when Props is an {@link InPropsObject})\n * @typeParam Result - `render` return type\n * @typeParam Context - Second argument to `render`\n */\nexport interface PropsRenderDefinition<\n Props = InPropsObject,\n RenderProps = Props extends InPropsObject ? ResolveProps<Props> : unknown,\n Result = unknown,\n Context = unknown\n> {\n props?: Props;\n render: PropsContextRender<RenderProps, Context, Result>;\n}\n\nexport type InPropsOptions<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Name extends string\n> = {\n name: LiteralWrappedProp<Name, 'string', 'required'>;\n resource: EnumWrappedProp<ResourceEnum<Resources>, 'string', 'required'>;\n};\nexport type InPropsFunction<\n Resources extends ReadonlyArray<ResourceDefinition>\n> = <Name extends string>(\n props: Show<InPropsOptions<Resources, Name>>\n) => InPropsObject;\nexport type InPropsDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>\n> = InPropsObject | InPropsFunction<Resources>;\nexport type InferredInProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>\n> = Options extends InPropsFunction<Resources> ? ReturnType<Options> : Options;\nexport type MergedLayoutInProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents\n> = InferredInProps<Resources, Options> extends InPropsObject\n ? InferredInProps<Resources, Options> & MergePresetProps<Composables>\n : never;\nexport type RequiredVariant = true | 'required';\n/**\n * @typeParam RequiredVariant How the required props are selected. In application code,\n * it will always be `true`, but internally we need to support `'required'` as well.\n */\ntype PropsType<Variant extends RequiredVariant = true> = Variant | 'optional';\ntype InternalPropsType = PropsType<'required'>;\ntype IncludedPropSource = 'component' | 'config';\ntype IncludedPropRequirement =\n | {\n /**\n * Whether the prop must be supplied. When both names are present,\n * `required` takes precedence over the deprecated `visibility` setting.\n */\n required: boolean;\n }\n | {\n /**\n * Whether the prop must be supplied (`'required'`) or may be omitted\n * (`'optional'`). The `required` setting takes precedence when both are present.\n *\n * @deprecated Use `required: true` instead of `visibility: 'required'`, or\n * `required: false` instead of `visibility: 'optional'`.\n * This property will be removed in the next major version.\n */\n visibility: 'optional' | 'required';\n };\ntype IncludedPropSupply =\n | {\n /**\n * Where the prop is supplied: at component render time (`'component'`)\n * or through layout creation options (`'config'`). Optional component props\n * also accept configuration-time defaults. This setting takes precedence\n * over the deprecated `passthrough` setting.\n */\n suppliedVia: IncludedPropSource;\n }\n | {\n /**\n * Where the prop is supplied: at component render time (`'component'`)\n * or through layout creation options (`'config'`). Optional component props\n * also accept configuration-time defaults. The `suppliedVia` setting takes\n * precedence when both names are present.\n *\n * @deprecated Use `suppliedVia: 'component'` instead of\n * `passthrough: 'component'`, or `suppliedVia: 'config'` instead of\n * `passthrough: 'config'`. This property will be removed in the next major version.\n */\n passthrough: IncludedPropSource;\n };\n\n/**\n * Controls where an included layout prop is supplied and whether it is required there.\n */\nexport type IncludedPropBehavior = IncludedPropRequirement & IncludedPropSupply;\n\ntype IncludedPropType = PropsType | IncludedPropBehavior;\n/**\n * A map of props to include in the layout.\n */\nexport type IncludedProps<T extends object> = {\n [K in keyof T & string]?: IncludedPropType;\n};\n\ntype PropsKeys<Props extends InPropsObject, T> = T & keyof Props;\nexport type IncludedPropVisibility<Value> = Value extends { required: boolean }\n ? Value['required'] extends true\n ? 'required'\n : 'optional'\n : Value extends { visibility: 'required' | 'optional' }\n ? Value['visibility']\n : Value extends true | 'required'\n ? 'required'\n : Value extends 'optional'\n ? 'optional'\n : never;\nexport type IncludedPropSupplySource<Value> = Value extends {\n suppliedVia: IncludedPropSource;\n}\n ? Value['suppliedVia']\n : Value extends { passthrough: IncludedPropSource }\n ? Value['passthrough']\n : never;\n/**\n * Canonical shape used internally for either spelling of an include behavior.\n */\nexport type NormalizedIncludedPropBehavior<Value> = Value extends\n | { required: boolean }\n | { suppliedVia: IncludedPropSource }\n ? {\n visibility: IncludedPropVisibility<Value>;\n passthrough: IncludedPropSupplySource<Value>;\n }\n : Value;\n\nexport type IncludedPropPassthrough<Value> = Value extends\n | { required: boolean }\n | { suppliedVia: IncludedPropSource }\n ? IncludedPropSupplySource<Value> extends 'component'\n ? IncludedPropVisibility<Value> extends 'optional'\n ? 'component' | 'config'\n : 'component'\n : IncludedPropSupplySource<Value>\n : Value extends {\n visibility: 'required' | 'optional';\n passthrough: IncludedPropSource;\n }\n ? Value['passthrough'] extends 'component'\n ? Value['visibility'] extends 'optional'\n ? 'component' | 'config'\n : 'component'\n : Value['passthrough']\n : Value extends true | 'required'\n ? 'config'\n : Value extends 'optional'\n ? 'component' | 'config'\n : never;\n\ntype GetPropsKey<\n IncludeProps extends object,\n Visibility extends InternalPropsType,\n Passthrough extends IncludedPropSource | 'render' = 'render'\n> = {\n [Key in keyof IncludeProps]: IncludedPropVisibility<\n IncludeProps[Key]\n > extends Visibility\n ? Passthrough extends 'render'\n ? Key\n : Passthrough extends IncludedPropPassthrough<IncludeProps[Key]>\n ? Key\n : never\n : never;\n}[keyof IncludeProps];\ntype SelectedIncludedProps<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>,\n Visibility extends InternalPropsType,\n Passthrough extends IncludedPropSource | 'render' = 'render'\n> = Pick<\n Props,\n PropsKeys<Props, GetPropsKey<IncludeProps, Visibility, Passthrough>>\n>;\n\ntype OptionalPropDefinition<Definition> = Definition extends {\n optional(): infer OptionalDefinition;\n}\n ? OptionalDefinition\n : Definition;\n\n/** Raw validator definitions accepted by a generated component call. */\nexport type IncludedComponentPropDefinitions<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = SelectedIncludedProps<Props, IncludeProps, 'required', 'component'> & {\n [Key in keyof SelectedIncludedProps<\n Props,\n IncludeProps,\n 'optional',\n 'component'\n >]: OptionalPropDefinition<\n SelectedIncludedProps<Props, IncludeProps, 'optional', 'component'>[Key]\n >;\n};\n\nexport type ResolvedIncludedProps<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = ResolveLayoutProps<SelectedIncludedProps<Props, IncludeProps, 'required'>> &\n Partial<\n ResolveLayoutProps<SelectedIncludedProps<Props, IncludeProps, 'optional'>>\n >;\n\nexport type ResolvedIncludedConfigProps<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = ResolveLayoutProps<\n SelectedIncludedProps<Props, IncludeProps, 'required', 'config'>\n> &\n Partial<\n ResolveLayoutProps<\n SelectedIncludedProps<Props, IncludeProps, 'optional', 'config'>\n >\n >;\n\nexport type ResolvedIncludedComponentProps<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = ResolveLayoutProps<\n SelectedIncludedProps<Props, IncludeProps, 'required', 'component'>\n> &\n Partial<\n ResolveLayoutProps<\n SelectedIncludedProps<Props, IncludeProps, 'optional', 'component'>\n >\n >;\n\n/**\n * Like {@link ResolvedIncludedProps}, but keeps included prop keys exactly as\n * declared (no `JSX.Element` capitalization).\n */\nexport type ResolvedIncludedPropsAsDefined<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = ResolveLayoutPropsAsDefined<\n SelectedIncludedProps<Props, IncludeProps, 'required'>\n> &\n Partial<\n ResolveLayoutPropsAsDefined<\n SelectedIncludedProps<Props, IncludeProps, 'optional'>\n >\n >;\nexport type LayoutRenderProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents = {},\n IncludeProps extends IncludedProps<\n MergedLayoutInProps<Resources, Options, Composables>\n > = {},\n CustomProps extends InPropsObject = {}\n> = Show<\n ResolveProps<CustomProps> &\n ResolvedIncludedProps<\n MergedLayoutInProps<Resources, Options, Composables>,\n IncludeProps\n >\n>;\n\nexport function getIncludedPropBehavior(value: unknown): {\n visibility: 'required' | 'optional';\n passthrough: 'component' | 'config';\n} | null {\n if (value === null || typeof value !== 'object') {\n return null;\n }\n\n const required =\n 'required' in value && typeof value.required === 'boolean'\n ? value.required\n : 'visibility' in value\n ? value.visibility === 'required'\n : undefined;\n const suppliedVia =\n 'suppliedVia' in value\n ? value.suppliedVia\n : 'passthrough' in value\n ? value.passthrough\n : undefined;\n\n if (\n required === undefined ||\n (suppliedVia !== 'component' && suppliedVia !== 'config')\n ) {\n return null;\n }\n\n return {\n visibility: required ? 'required' : 'optional',\n passthrough: suppliedVia,\n };\n}\n"],"mappings":";;AA6SA,SAAgB,wBAAwB,OAG/B;CACP,IAAI,UAAU,QAAQ,OAAO,UAAU,UACrC,OAAO;CAGT,MAAM,WACJ,cAAc,SAAS,OAAO,MAAM,aAAa,YAC7C,MAAM,WACN,gBAAgB,QAChB,MAAM,eAAe,aACrB;CACN,MAAM,cACJ,iBAAiB,QACb,MAAM,cACN,iBAAiB,QACjB,MAAM,cACN;CAEN,IACE,aAAa,UACZ,gBAAgB,eAAe,gBAAgB,UAEhD,OAAO;CAGT,OAAO;EACL,YAAY,WAAW,aAAa;EACpC,aAAa;CACf;AACF"}
package/dist/props.d.cts CHANGED
@@ -40,21 +40,86 @@ type RequiredVariant = true | 'required';
40
40
  */
41
41
  type PropsType<Variant extends RequiredVariant = true> = Variant | 'optional';
42
42
  type InternalPropsType = PropsType<'required'>;
43
- /** Controls where an included layout prop is supplied and whether it is required there. */
44
- type IncludedPropBehavior = {
43
+ type IncludedPropSource = 'component' | 'config';
44
+ type IncludedPropRequirement = {
45
+ /**
46
+ * Whether the prop must be supplied. When both names are present,
47
+ * `required` takes precedence over the deprecated `visibility` setting.
48
+ */
49
+ required: boolean;
50
+ } | {
51
+ /**
52
+ * Whether the prop must be supplied (`'required'`) or may be omitted
53
+ * (`'optional'`). The `required` setting takes precedence when both are present.
54
+ *
55
+ * @deprecated Use `required: true` instead of `visibility: 'required'`, or
56
+ * `required: false` instead of `visibility: 'optional'`.
57
+ * This property will be removed in the next major version.
58
+ */
45
59
  visibility: 'optional' | 'required';
46
- passthrough: 'component' | 'config';
47
60
  };
61
+ type IncludedPropSupply = {
62
+ /**
63
+ * Where the prop is supplied: at component render time (`'component'`)
64
+ * or through layout creation options (`'config'`). Optional component props
65
+ * also accept configuration-time defaults. This setting takes precedence
66
+ * over the deprecated `passthrough` setting.
67
+ */
68
+ suppliedVia: IncludedPropSource;
69
+ } | {
70
+ /**
71
+ * Where the prop is supplied: at component render time (`'component'`)
72
+ * or through layout creation options (`'config'`). Optional component props
73
+ * also accept configuration-time defaults. The `suppliedVia` setting takes
74
+ * precedence when both names are present.
75
+ *
76
+ * @deprecated Use `suppliedVia: 'component'` instead of
77
+ * `passthrough: 'component'`, or `suppliedVia: 'config'` instead of
78
+ * `passthrough: 'config'`. This property will be removed in the next major version.
79
+ */
80
+ passthrough: IncludedPropSource;
81
+ };
82
+ /**
83
+ * Controls where an included layout prop is supplied and whether it is required there.
84
+ */
85
+ type IncludedPropBehavior = IncludedPropRequirement & IncludedPropSupply;
48
86
  type IncludedPropType = PropsType | IncludedPropBehavior;
49
87
  /**
50
88
  * A map of props to include in the layout.
51
89
  */
52
90
  type IncludedProps<T extends object> = { [K in keyof T & string]?: IncludedPropType };
53
91
  type PropsKeys<Props extends InPropsObject, T> = T & keyof Props;
54
- type IncludedPropVisibility<Value> = Value extends IncludedPropBehavior ? Value['visibility'] : Value extends true | 'required' ? 'required' : Value extends 'optional' ? 'optional' : never;
55
- type IncludedPropPassthrough<Value> = Value extends IncludedPropBehavior ? Value['passthrough'] extends 'component' ? Value['visibility'] extends 'optional' ? 'component' | 'config' : 'component' : Value['passthrough'] : Value extends true | 'required' ? 'config' : Value extends 'optional' ? 'component' | 'config' : never;
56
- type GetPropsKey<IncludeProps extends object, Visibility extends InternalPropsType, Passthrough extends IncludedPropBehavior['passthrough'] | 'render' = 'render'> = { [Key in keyof IncludeProps]: IncludedPropVisibility<IncludeProps[Key]> extends Visibility ? Passthrough extends 'render' ? Key : Passthrough extends IncludedPropPassthrough<IncludeProps[Key]> ? Key : never : never }[keyof IncludeProps];
57
- type SelectedIncludedProps<Props extends InPropsObject, IncludeProps extends IncludedProps<Props>, Visibility extends InternalPropsType, Passthrough extends IncludedPropBehavior['passthrough'] | 'render' = 'render'> = Pick<Props, PropsKeys<Props, GetPropsKey<IncludeProps, Visibility, Passthrough>>>;
92
+ type IncludedPropVisibility<Value> = Value extends {
93
+ required: boolean;
94
+ } ? Value['required'] extends true ? 'required' : 'optional' : Value extends {
95
+ visibility: 'required' | 'optional';
96
+ } ? Value['visibility'] : Value extends true | 'required' ? 'required' : Value extends 'optional' ? 'optional' : never;
97
+ type IncludedPropSupplySource<Value> = Value extends {
98
+ suppliedVia: IncludedPropSource;
99
+ } ? Value['suppliedVia'] : Value extends {
100
+ passthrough: IncludedPropSource;
101
+ } ? Value['passthrough'] : never;
102
+ /**
103
+ * Canonical shape used internally for either spelling of an include behavior.
104
+ */
105
+ type NormalizedIncludedPropBehavior<Value> = Value extends {
106
+ required: boolean;
107
+ } | {
108
+ suppliedVia: IncludedPropSource;
109
+ } ? {
110
+ visibility: IncludedPropVisibility<Value>;
111
+ passthrough: IncludedPropSupplySource<Value>;
112
+ } : Value;
113
+ type IncludedPropPassthrough<Value> = Value extends {
114
+ required: boolean;
115
+ } | {
116
+ suppliedVia: IncludedPropSource;
117
+ } ? IncludedPropSupplySource<Value> extends 'component' ? IncludedPropVisibility<Value> extends 'optional' ? 'component' | 'config' : 'component' : IncludedPropSupplySource<Value> : Value extends {
118
+ visibility: 'required' | 'optional';
119
+ passthrough: IncludedPropSource;
120
+ } ? Value['passthrough'] extends 'component' ? Value['visibility'] extends 'optional' ? 'component' | 'config' : 'component' : Value['passthrough'] : Value extends true | 'required' ? 'config' : Value extends 'optional' ? 'component' | 'config' : never;
121
+ type GetPropsKey<IncludeProps extends object, Visibility extends InternalPropsType, Passthrough extends IncludedPropSource | 'render' = 'render'> = { [Key in keyof IncludeProps]: IncludedPropVisibility<IncludeProps[Key]> extends Visibility ? Passthrough extends 'render' ? Key : Passthrough extends IncludedPropPassthrough<IncludeProps[Key]> ? Key : never : never }[keyof IncludeProps];
122
+ type SelectedIncludedProps<Props extends InPropsObject, IncludeProps extends IncludedProps<Props>, Visibility extends InternalPropsType, Passthrough extends IncludedPropSource | 'render' = 'render'> = Pick<Props, PropsKeys<Props, GetPropsKey<IncludeProps, Visibility, Passthrough>>>;
58
123
  type OptionalPropDefinition<Definition> = Definition extends {
59
124
  optional(): infer OptionalDefinition;
60
125
  } ? OptionalDefinition : Definition;
@@ -70,5 +135,5 @@ type ResolvedIncludedComponentProps<Props extends InPropsObject, IncludeProps ex
70
135
  type ResolvedIncludedPropsAsDefined<Props extends InPropsObject, IncludeProps extends IncludedProps<Props>> = ResolveLayoutPropsAsDefined<SelectedIncludedProps<Props, IncludeProps, 'required'>> & Partial<ResolveLayoutPropsAsDefined<SelectedIncludedProps<Props, IncludeProps, 'optional'>>>;
71
136
  type LayoutRenderProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Composables extends ComposableComponents = {}, IncludeProps extends IncludedProps<MergedLayoutInProps<Resources, Options, Composables>> = {}, CustomProps extends InPropsObject = {}> = Show<ResolveProps<CustomProps> & ResolvedIncludedProps<MergedLayoutInProps<Resources, Options, Composables>, IncludeProps>>;
72
137
  //#endregion
73
- export { InPropsDefinition, InPropsFunction, type InPropsObject, InPropsOptions, IncludedComponentPropDefinitions, IncludedPropBehavior, IncludedProps, InferredInProps, LayoutRenderProps, MergedLayoutInProps, PropsContextRender, PropsRenderDefinition, ResolvedIncludedComponentProps, ResolvedIncludedConfigProps, ResolvedIncludedProps, ResolvedIncludedPropsAsDefined };
138
+ export { InPropsDefinition, InPropsFunction, type InPropsObject, InPropsOptions, IncludedComponentPropDefinitions, IncludedPropBehavior, IncludedProps, InferredInProps, LayoutRenderProps, MergedLayoutInProps, NormalizedIncludedPropBehavior, PropsContextRender, PropsRenderDefinition, ResolvedIncludedComponentProps, ResolvedIncludedConfigProps, ResolvedIncludedProps, ResolvedIncludedPropsAsDefined };
74
139
  //# sourceMappingURL=props.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.cts","names":[],"sources":["../src/props.ts"],"mappings":";;;;;;AAsBA;;;;;AAAA,KAAY,kBAAA,4CACV,KAAA,EAAO,WAAA,EACP,OAAA,EAAS,OAAA,KACN,MAAA;;;;;;;;;;;;UAaY,qBAAA,SACP,aAAA,iBACM,KAAA,SAAc,aAAA,GAAgB,YAAA,CAAa,KAAA;EAIzD,KAAA,GAAQ,KAAA;EACR,MAAA,EAAQ,kBAAA,CAAmB,WAAA,EAAa,OAAA,EAAS,MAAA;AAAA;AAAA,KAGvC,cAAA,mBACQ,aAAA,CAAc,kBAAA;EAGhC,IAAA,EAAM,kBAAA,CAAmB,IAAA;EACzB,QAAA,EAAU,eAAA,CAAgB,YAAA,CAAa,SAAA;AAAA;AAAA,KAE7B,eAAA,mBACQ,aAAA,CAAc,kBAAA,2BAEhC,KAAA,EAAO,IAAA,CAAK,cAAA,CAAe,SAAA,EAAW,IAAA,OACnC,aAAA;AAAA,KACO,iBAAA,mBACQ,aAAA,CAAc,kBAAA,KAC9B,aAAA,GAAgB,eAAA,CAAgB,SAAA;AAAA,KACxB,eAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,KAChC,OAAA,SAAgB,eAAA,CAAgB,SAAA,IAA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ACX,qBAAA,CACE,mBAAA,CAAoB,SAAA,EAAW,OAAA,EAAS,WAAA,GACxC,YAAA"}
package/dist/props.d.mts CHANGED
@@ -40,21 +40,86 @@ type RequiredVariant = true | 'required';
40
40
  */
41
41
  type PropsType<Variant extends RequiredVariant = true> = Variant | 'optional';
42
42
  type InternalPropsType = PropsType<'required'>;
43
- /** Controls where an included layout prop is supplied and whether it is required there. */
44
- type IncludedPropBehavior = {
43
+ type IncludedPropSource = 'component' | 'config';
44
+ type IncludedPropRequirement = {
45
+ /**
46
+ * Whether the prop must be supplied. When both names are present,
47
+ * `required` takes precedence over the deprecated `visibility` setting.
48
+ */
49
+ required: boolean;
50
+ } | {
51
+ /**
52
+ * Whether the prop must be supplied (`'required'`) or may be omitted
53
+ * (`'optional'`). The `required` setting takes precedence when both are present.
54
+ *
55
+ * @deprecated Use `required: true` instead of `visibility: 'required'`, or
56
+ * `required: false` instead of `visibility: 'optional'`.
57
+ * This property will be removed in the next major version.
58
+ */
45
59
  visibility: 'optional' | 'required';
46
- passthrough: 'component' | 'config';
47
60
  };
61
+ type IncludedPropSupply = {
62
+ /**
63
+ * Where the prop is supplied: at component render time (`'component'`)
64
+ * or through layout creation options (`'config'`). Optional component props
65
+ * also accept configuration-time defaults. This setting takes precedence
66
+ * over the deprecated `passthrough` setting.
67
+ */
68
+ suppliedVia: IncludedPropSource;
69
+ } | {
70
+ /**
71
+ * Where the prop is supplied: at component render time (`'component'`)
72
+ * or through layout creation options (`'config'`). Optional component props
73
+ * also accept configuration-time defaults. The `suppliedVia` setting takes
74
+ * precedence when both names are present.
75
+ *
76
+ * @deprecated Use `suppliedVia: 'component'` instead of
77
+ * `passthrough: 'component'`, or `suppliedVia: 'config'` instead of
78
+ * `passthrough: 'config'`. This property will be removed in the next major version.
79
+ */
80
+ passthrough: IncludedPropSource;
81
+ };
82
+ /**
83
+ * Controls where an included layout prop is supplied and whether it is required there.
84
+ */
85
+ type IncludedPropBehavior = IncludedPropRequirement & IncludedPropSupply;
48
86
  type IncludedPropType = PropsType | IncludedPropBehavior;
49
87
  /**
50
88
  * A map of props to include in the layout.
51
89
  */
52
90
  type IncludedProps<T extends object> = { [K in keyof T & string]?: IncludedPropType };
53
91
  type PropsKeys<Props extends InPropsObject, T> = T & keyof Props;
54
- type IncludedPropVisibility<Value> = Value extends IncludedPropBehavior ? Value['visibility'] : Value extends true | 'required' ? 'required' : Value extends 'optional' ? 'optional' : never;
55
- type IncludedPropPassthrough<Value> = Value extends IncludedPropBehavior ? Value['passthrough'] extends 'component' ? Value['visibility'] extends 'optional' ? 'component' | 'config' : 'component' : Value['passthrough'] : Value extends true | 'required' ? 'config' : Value extends 'optional' ? 'component' | 'config' : never;
56
- type GetPropsKey<IncludeProps extends object, Visibility extends InternalPropsType, Passthrough extends IncludedPropBehavior['passthrough'] | 'render' = 'render'> = { [Key in keyof IncludeProps]: IncludedPropVisibility<IncludeProps[Key]> extends Visibility ? Passthrough extends 'render' ? Key : Passthrough extends IncludedPropPassthrough<IncludeProps[Key]> ? Key : never : never }[keyof IncludeProps];
57
- type SelectedIncludedProps<Props extends InPropsObject, IncludeProps extends IncludedProps<Props>, Visibility extends InternalPropsType, Passthrough extends IncludedPropBehavior['passthrough'] | 'render' = 'render'> = Pick<Props, PropsKeys<Props, GetPropsKey<IncludeProps, Visibility, Passthrough>>>;
92
+ type IncludedPropVisibility<Value> = Value extends {
93
+ required: boolean;
94
+ } ? Value['required'] extends true ? 'required' : 'optional' : Value extends {
95
+ visibility: 'required' | 'optional';
96
+ } ? Value['visibility'] : Value extends true | 'required' ? 'required' : Value extends 'optional' ? 'optional' : never;
97
+ type IncludedPropSupplySource<Value> = Value extends {
98
+ suppliedVia: IncludedPropSource;
99
+ } ? Value['suppliedVia'] : Value extends {
100
+ passthrough: IncludedPropSource;
101
+ } ? Value['passthrough'] : never;
102
+ /**
103
+ * Canonical shape used internally for either spelling of an include behavior.
104
+ */
105
+ type NormalizedIncludedPropBehavior<Value> = Value extends {
106
+ required: boolean;
107
+ } | {
108
+ suppliedVia: IncludedPropSource;
109
+ } ? {
110
+ visibility: IncludedPropVisibility<Value>;
111
+ passthrough: IncludedPropSupplySource<Value>;
112
+ } : Value;
113
+ type IncludedPropPassthrough<Value> = Value extends {
114
+ required: boolean;
115
+ } | {
116
+ suppliedVia: IncludedPropSource;
117
+ } ? IncludedPropSupplySource<Value> extends 'component' ? IncludedPropVisibility<Value> extends 'optional' ? 'component' | 'config' : 'component' : IncludedPropSupplySource<Value> : Value extends {
118
+ visibility: 'required' | 'optional';
119
+ passthrough: IncludedPropSource;
120
+ } ? Value['passthrough'] extends 'component' ? Value['visibility'] extends 'optional' ? 'component' | 'config' : 'component' : Value['passthrough'] : Value extends true | 'required' ? 'config' : Value extends 'optional' ? 'component' | 'config' : never;
121
+ type GetPropsKey<IncludeProps extends object, Visibility extends InternalPropsType, Passthrough extends IncludedPropSource | 'render' = 'render'> = { [Key in keyof IncludeProps]: IncludedPropVisibility<IncludeProps[Key]> extends Visibility ? Passthrough extends 'render' ? Key : Passthrough extends IncludedPropPassthrough<IncludeProps[Key]> ? Key : never : never }[keyof IncludeProps];
122
+ type SelectedIncludedProps<Props extends InPropsObject, IncludeProps extends IncludedProps<Props>, Visibility extends InternalPropsType, Passthrough extends IncludedPropSource | 'render' = 'render'> = Pick<Props, PropsKeys<Props, GetPropsKey<IncludeProps, Visibility, Passthrough>>>;
58
123
  type OptionalPropDefinition<Definition> = Definition extends {
59
124
  optional(): infer OptionalDefinition;
60
125
  } ? OptionalDefinition : Definition;
@@ -70,5 +135,5 @@ type ResolvedIncludedComponentProps<Props extends InPropsObject, IncludeProps ex
70
135
  type ResolvedIncludedPropsAsDefined<Props extends InPropsObject, IncludeProps extends IncludedProps<Props>> = ResolveLayoutPropsAsDefined<SelectedIncludedProps<Props, IncludeProps, 'required'>> & Partial<ResolveLayoutPropsAsDefined<SelectedIncludedProps<Props, IncludeProps, 'optional'>>>;
71
136
  type LayoutRenderProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Composables extends ComposableComponents = {}, IncludeProps extends IncludedProps<MergedLayoutInProps<Resources, Options, Composables>> = {}, CustomProps extends InPropsObject = {}> = Show<ResolveProps<CustomProps> & ResolvedIncludedProps<MergedLayoutInProps<Resources, Options, Composables>, IncludeProps>>;
72
137
  //#endregion
73
- export { InPropsDefinition, InPropsFunction, type InPropsObject, InPropsOptions, IncludedComponentPropDefinitions, IncludedPropBehavior, IncludedProps, InferredInProps, LayoutRenderProps, MergedLayoutInProps, PropsContextRender, PropsRenderDefinition, ResolvedIncludedComponentProps, ResolvedIncludedConfigProps, ResolvedIncludedProps, ResolvedIncludedPropsAsDefined };
138
+ export { InPropsDefinition, InPropsFunction, type InPropsObject, InPropsOptions, IncludedComponentPropDefinitions, IncludedPropBehavior, IncludedProps, InferredInProps, LayoutRenderProps, MergedLayoutInProps, NormalizedIncludedPropBehavior, PropsContextRender, PropsRenderDefinition, ResolvedIncludedComponentProps, ResolvedIncludedConfigProps, ResolvedIncludedProps, ResolvedIncludedPropsAsDefined };
74
139
  //# sourceMappingURL=props.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.mts","names":[],"sources":["../src/props.ts"],"mappings":";;;;;;AAsBA;;;;;AAAA,KAAY,kBAAA,4CACV,KAAA,EAAO,WAAA,EACP,OAAA,EAAS,OAAA,KACN,MAAA;;;;;;;;;;;;UAaY,qBAAA,SACP,aAAA,iBACM,KAAA,SAAc,aAAA,GAAgB,YAAA,CAAa,KAAA;EAIzD,KAAA,GAAQ,KAAA;EACR,MAAA,EAAQ,kBAAA,CAAmB,WAAA,EAAa,OAAA,EAAS,MAAA;AAAA;AAAA,KAGvC,cAAA,mBACQ,aAAA,CAAc,kBAAA;EAGhC,IAAA,EAAM,kBAAA,CAAmB,IAAA;EACzB,QAAA,EAAU,eAAA,CAAgB,YAAA,CAAa,SAAA;AAAA;AAAA,KAE7B,eAAA,mBACQ,aAAA,CAAc,kBAAA,2BAEhC,KAAA,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B,OAAA,CACE,2BAAA,CACE,qBAAA,CAAsB,KAAA,EAAO,YAAA;AAAA,KAGvB,iBAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,4BACC,aAAA,CACnB,mBAAA,CAAoB,SAAA,EAAW,OAAA,EAAS,WAAA,6BAEtB,aAAA,SAClB,IAAA,CACF,YAAA,CAAa,WAAA,IACX,qBAAA,CACE,mBAAA,CAAoB,SAAA,EAAW,OAAA,EAAS,WAAA,GACxC,YAAA"}
package/dist/props.mjs ADDED
@@ -0,0 +1,15 @@
1
+ //#region src/props.ts
2
+ function getIncludedPropBehavior(value) {
3
+ if (value === null || typeof value !== "object") return null;
4
+ const required = "required" in value && typeof value.required === "boolean" ? value.required : "visibility" in value ? value.visibility === "required" : void 0;
5
+ const suppliedVia = "suppliedVia" in value ? value.suppliedVia : "passthrough" in value ? value.passthrough : void 0;
6
+ if (required === void 0 || suppliedVia !== "component" && suppliedVia !== "config") return null;
7
+ return {
8
+ visibility: required ? "required" : "optional",
9
+ passthrough: suppliedVia
10
+ };
11
+ }
12
+
13
+ //#endregion
14
+ export { getIncludedPropBehavior };
15
+ //# sourceMappingURL=props.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.mjs","names":[],"sources":["../src/props.ts"],"sourcesContent":["import type {\n ComposableComponents,\n MergePresetProps,\n} from '@jfdevelops/react-layout-composables';\nimport type { InPropsObject } from '@jfdevelops/react-layout-composables';\nimport {\n EnumWrappedProp,\n LiteralWrappedProp,\n ResolveLayoutProps,\n ResolveLayoutPropsAsDefined,\n ResolveProps,\n} from '@jfdevelops/react-layout-validator';\nimport { ResourceDefinition, ResourceEnum } from './resource';\nimport { Show } from './utils';\n\nexport type { InPropsObject };\n\n/**\n * Two-argument `render(props, context)` used by createComponent and scoped\n * resource components. `Context` is sibling components (scoped) or the\n * resource render context (top-level).\n */\nexport type PropsContextRender<RenderProps, Context, Result = unknown> = (\n props: RenderProps,\n context: Context\n) => Result;\n\n/**\n * Shared `{ props?, render }` shape used by createComponent, scoped\n * components, and anywhere else a value declares props and a two-arg render.\n *\n * @typeParam Props - Declared on the entry (`props`). Often an\n * {@link InPropsObject}, or a layout include/custom bag.\n * @typeParam RenderProps - First argument to `render` (defaults to\n * {@link ResolveProps}<Props> when Props is an {@link InPropsObject})\n * @typeParam Result - `render` return type\n * @typeParam Context - Second argument to `render`\n */\nexport interface PropsRenderDefinition<\n Props = InPropsObject,\n RenderProps = Props extends InPropsObject ? ResolveProps<Props> : unknown,\n Result = unknown,\n Context = unknown\n> {\n props?: Props;\n render: PropsContextRender<RenderProps, Context, Result>;\n}\n\nexport type InPropsOptions<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Name extends string\n> = {\n name: LiteralWrappedProp<Name, 'string', 'required'>;\n resource: EnumWrappedProp<ResourceEnum<Resources>, 'string', 'required'>;\n};\nexport type InPropsFunction<\n Resources extends ReadonlyArray<ResourceDefinition>\n> = <Name extends string>(\n props: Show<InPropsOptions<Resources, Name>>\n) => InPropsObject;\nexport type InPropsDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>\n> = InPropsObject | InPropsFunction<Resources>;\nexport type InferredInProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>\n> = Options extends InPropsFunction<Resources> ? ReturnType<Options> : Options;\nexport type MergedLayoutInProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents\n> = InferredInProps<Resources, Options> extends InPropsObject\n ? InferredInProps<Resources, Options> & MergePresetProps<Composables>\n : never;\nexport type RequiredVariant = true | 'required';\n/**\n * @typeParam RequiredVariant How the required props are selected. In application code,\n * it will always be `true`, but internally we need to support `'required'` as well.\n */\ntype PropsType<Variant extends RequiredVariant = true> = Variant | 'optional';\ntype InternalPropsType = PropsType<'required'>;\ntype IncludedPropSource = 'component' | 'config';\ntype IncludedPropRequirement =\n | {\n /**\n * Whether the prop must be supplied. When both names are present,\n * `required` takes precedence over the deprecated `visibility` setting.\n */\n required: boolean;\n }\n | {\n /**\n * Whether the prop must be supplied (`'required'`) or may be omitted\n * (`'optional'`). The `required` setting takes precedence when both are present.\n *\n * @deprecated Use `required: true` instead of `visibility: 'required'`, or\n * `required: false` instead of `visibility: 'optional'`.\n * This property will be removed in the next major version.\n */\n visibility: 'optional' | 'required';\n };\ntype IncludedPropSupply =\n | {\n /**\n * Where the prop is supplied: at component render time (`'component'`)\n * or through layout creation options (`'config'`). Optional component props\n * also accept configuration-time defaults. This setting takes precedence\n * over the deprecated `passthrough` setting.\n */\n suppliedVia: IncludedPropSource;\n }\n | {\n /**\n * Where the prop is supplied: at component render time (`'component'`)\n * or through layout creation options (`'config'`). Optional component props\n * also accept configuration-time defaults. The `suppliedVia` setting takes\n * precedence when both names are present.\n *\n * @deprecated Use `suppliedVia: 'component'` instead of\n * `passthrough: 'component'`, or `suppliedVia: 'config'` instead of\n * `passthrough: 'config'`. This property will be removed in the next major version.\n */\n passthrough: IncludedPropSource;\n };\n\n/**\n * Controls where an included layout prop is supplied and whether it is required there.\n */\nexport type IncludedPropBehavior = IncludedPropRequirement & IncludedPropSupply;\n\ntype IncludedPropType = PropsType | IncludedPropBehavior;\n/**\n * A map of props to include in the layout.\n */\nexport type IncludedProps<T extends object> = {\n [K in keyof T & string]?: IncludedPropType;\n};\n\ntype PropsKeys<Props extends InPropsObject, T> = T & keyof Props;\nexport type IncludedPropVisibility<Value> = Value extends { required: boolean }\n ? Value['required'] extends true\n ? 'required'\n : 'optional'\n : Value extends { visibility: 'required' | 'optional' }\n ? Value['visibility']\n : Value extends true | 'required'\n ? 'required'\n : Value extends 'optional'\n ? 'optional'\n : never;\nexport type IncludedPropSupplySource<Value> = Value extends {\n suppliedVia: IncludedPropSource;\n}\n ? Value['suppliedVia']\n : Value extends { passthrough: IncludedPropSource }\n ? Value['passthrough']\n : never;\n/**\n * Canonical shape used internally for either spelling of an include behavior.\n */\nexport type NormalizedIncludedPropBehavior<Value> = Value extends\n | { required: boolean }\n | { suppliedVia: IncludedPropSource }\n ? {\n visibility: IncludedPropVisibility<Value>;\n passthrough: IncludedPropSupplySource<Value>;\n }\n : Value;\n\nexport type IncludedPropPassthrough<Value> = Value extends\n | { required: boolean }\n | { suppliedVia: IncludedPropSource }\n ? IncludedPropSupplySource<Value> extends 'component'\n ? IncludedPropVisibility<Value> extends 'optional'\n ? 'component' | 'config'\n : 'component'\n : IncludedPropSupplySource<Value>\n : Value extends {\n visibility: 'required' | 'optional';\n passthrough: IncludedPropSource;\n }\n ? Value['passthrough'] extends 'component'\n ? Value['visibility'] extends 'optional'\n ? 'component' | 'config'\n : 'component'\n : Value['passthrough']\n : Value extends true | 'required'\n ? 'config'\n : Value extends 'optional'\n ? 'component' | 'config'\n : never;\n\ntype GetPropsKey<\n IncludeProps extends object,\n Visibility extends InternalPropsType,\n Passthrough extends IncludedPropSource | 'render' = 'render'\n> = {\n [Key in keyof IncludeProps]: IncludedPropVisibility<\n IncludeProps[Key]\n > extends Visibility\n ? Passthrough extends 'render'\n ? Key\n : Passthrough extends IncludedPropPassthrough<IncludeProps[Key]>\n ? Key\n : never\n : never;\n}[keyof IncludeProps];\ntype SelectedIncludedProps<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>,\n Visibility extends InternalPropsType,\n Passthrough extends IncludedPropSource | 'render' = 'render'\n> = Pick<\n Props,\n PropsKeys<Props, GetPropsKey<IncludeProps, Visibility, Passthrough>>\n>;\n\ntype OptionalPropDefinition<Definition> = Definition extends {\n optional(): infer OptionalDefinition;\n}\n ? OptionalDefinition\n : Definition;\n\n/** Raw validator definitions accepted by a generated component call. */\nexport type IncludedComponentPropDefinitions<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = SelectedIncludedProps<Props, IncludeProps, 'required', 'component'> & {\n [Key in keyof SelectedIncludedProps<\n Props,\n IncludeProps,\n 'optional',\n 'component'\n >]: OptionalPropDefinition<\n SelectedIncludedProps<Props, IncludeProps, 'optional', 'component'>[Key]\n >;\n};\n\nexport type ResolvedIncludedProps<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = ResolveLayoutProps<SelectedIncludedProps<Props, IncludeProps, 'required'>> &\n Partial<\n ResolveLayoutProps<SelectedIncludedProps<Props, IncludeProps, 'optional'>>\n >;\n\nexport type ResolvedIncludedConfigProps<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = ResolveLayoutProps<\n SelectedIncludedProps<Props, IncludeProps, 'required', 'config'>\n> &\n Partial<\n ResolveLayoutProps<\n SelectedIncludedProps<Props, IncludeProps, 'optional', 'config'>\n >\n >;\n\nexport type ResolvedIncludedComponentProps<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = ResolveLayoutProps<\n SelectedIncludedProps<Props, IncludeProps, 'required', 'component'>\n> &\n Partial<\n ResolveLayoutProps<\n SelectedIncludedProps<Props, IncludeProps, 'optional', 'component'>\n >\n >;\n\n/**\n * Like {@link ResolvedIncludedProps}, but keeps included prop keys exactly as\n * declared (no `JSX.Element` capitalization).\n */\nexport type ResolvedIncludedPropsAsDefined<\n Props extends InPropsObject,\n IncludeProps extends IncludedProps<Props>\n> = ResolveLayoutPropsAsDefined<\n SelectedIncludedProps<Props, IncludeProps, 'required'>\n> &\n Partial<\n ResolveLayoutPropsAsDefined<\n SelectedIncludedProps<Props, IncludeProps, 'optional'>\n >\n >;\nexport type LayoutRenderProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents = {},\n IncludeProps extends IncludedProps<\n MergedLayoutInProps<Resources, Options, Composables>\n > = {},\n CustomProps extends InPropsObject = {}\n> = Show<\n ResolveProps<CustomProps> &\n ResolvedIncludedProps<\n MergedLayoutInProps<Resources, Options, Composables>,\n IncludeProps\n >\n>;\n\nexport function getIncludedPropBehavior(value: unknown): {\n visibility: 'required' | 'optional';\n passthrough: 'component' | 'config';\n} | null {\n if (value === null || typeof value !== 'object') {\n return null;\n }\n\n const required =\n 'required' in value && typeof value.required === 'boolean'\n ? value.required\n : 'visibility' in value\n ? value.visibility === 'required'\n : undefined;\n const suppliedVia =\n 'suppliedVia' in value\n ? value.suppliedVia\n : 'passthrough' in value\n ? value.passthrough\n : undefined;\n\n if (\n required === undefined ||\n (suppliedVia !== 'component' && suppliedVia !== 'config')\n ) {\n return null;\n }\n\n return {\n visibility: required ? 'required' : 'optional',\n passthrough: suppliedVia,\n };\n}\n"],"mappings":";AA6SA,SAAgB,wBAAwB,OAG/B;CACP,IAAI,UAAU,QAAQ,OAAO,UAAU,UACrC,OAAO;CAGT,MAAM,WACJ,cAAc,SAAS,OAAO,MAAM,aAAa,YAC7C,MAAM,WACN,gBAAgB,QAChB,MAAM,eAAe,aACrB;CACN,MAAM,cACJ,iBAAiB,QACb,MAAM,cACN,iBAAiB,QACjB,MAAM,cACN;CAEN,IACE,aAAa,UACZ,gBAAgB,eAAe,gBAAgB,UAEhD,OAAO;CAGT,OAAO;EACL,YAAY,WAAW,aAAa;EACpC,aAAa;CACf;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jfdevelops/react-layout",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "A React library for creating layout components.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,8 +29,8 @@
29
29
  "dependencies": {
30
30
  "@jfdevelops/create-error": "0.2.0",
31
31
  "arktype": "2.2.8",
32
- "@jfdevelops/react-layout-validator": "0.3.0",
33
- "@jfdevelops/react-layout-composables": "0.3.0",
32
+ "@jfdevelops/react-layout-composables": "0.3.1",
33
+ "@jfdevelops/react-layout-validator": "0.3.1",
34
34
  "@jfdevelops/react-layout-devtools-core": "0.2.0"
35
35
  },
36
36
  "peerDependencies": {
@@ -57,7 +57,8 @@
57
57
  "typescript": "6.0.3",
58
58
  "unrun": "0.3.0",
59
59
  "vite": "8.0.10",
60
- "vitest": "4.1.5"
60
+ "vitest": "4.1.5",
61
+ "@jfdevelops/react-layout-composable-breadcrumb": "0.2.10"
61
62
  },
62
63
  "scripts": {
63
64
  "dev": "portless react-layout vite",