@jfdevelops/react-layout 1.3.0 → 1.4.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/create-config/create-defined-resource-layout.cjs +1 -0
- package/dist/create-config/create-defined-resource-layout.cjs.map +1 -1
- package/dist/create-config/create-defined-resource-layout.d.cts.map +1 -1
- package/dist/create-config/create-defined-resource-layout.d.mts.map +1 -1
- package/dist/create-config/create-defined-resource-layout.mjs +2 -1
- package/dist/create-config/create-defined-resource-layout.mjs.map +1 -1
- package/dist/create-config/define-layout.cjs +35 -5
- package/dist/create-config/define-layout.cjs.map +1 -1
- package/dist/create-config/define-layout.d.cts +2 -2
- package/dist/create-config/define-layout.d.cts.map +1 -1
- package/dist/create-config/define-layout.d.mts +2 -2
- package/dist/create-config/define-layout.d.mts.map +1 -1
- package/dist/create-config/define-layout.mjs +36 -6
- package/dist/create-config/define-layout.mjs.map +1 -1
- package/dist/create-config/index.d.cts +2 -1
- package/dist/create-config/index.d.mts +2 -1
- package/dist/create-config/inspection.cjs +4 -2
- package/dist/create-config/inspection.cjs.map +1 -1
- package/dist/create-config/inspection.mjs +4 -2
- package/dist/create-config/inspection.mjs.map +1 -1
- package/dist/create-config/lazy-resource-layout.cjs +1 -1
- package/dist/create-config/lazy-resource-layout.mjs +1 -1
- package/dist/create-config/preview.cjs +62 -0
- package/dist/create-config/preview.cjs.map +1 -0
- package/dist/create-config/preview.d.cts +13 -0
- package/dist/create-config/preview.d.cts.map +1 -0
- package/dist/create-config/preview.d.mts +13 -0
- package/dist/create-config/preview.d.mts.map +1 -0
- package/dist/create-config/preview.mjs +61 -0
- package/dist/create-config/preview.mjs.map +1 -0
- package/dist/create-config/render-state.cjs +19 -3
- package/dist/create-config/render-state.cjs.map +1 -1
- package/dist/create-config/render-state.d.cts +1 -1
- package/dist/create-config/render-state.d.cts.map +1 -1
- package/dist/create-config/render-state.d.mts +1 -1
- package/dist/create-config/render-state.d.mts.map +1 -1
- package/dist/create-config/render-state.mjs +19 -3
- package/dist/create-config/render-state.mjs.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-state.d.cts","names":[],"sources":["../../src/create-config/render-state.ts"],"mappings":";;;;;;;;;cAsBa,yBAAA;AAAA,cAGA,qBAAA;AAAA,cAGA,wBAAA;AAAA,cAGA,oCAAA;AANb;AAAA,KAWY,wBAAA;EACV,WAAA,IAAe,MAAA,EAAQ,sBAAA,OAA6B,MAAA,UAAgB,oBAAA;EACpE,KAAA;IACE,OAAA,GAAU,MAAA;IACV,MAAA,GAAS,aAAA;EAAA;EAEX,MAAA,GAAS,KAAA,OAAY,OAAA,UAAiB,GAAA,CAAI,OAAA;EAC1C,KAAA;AAAA;AAZF;AAAA,KAgBY,mBAAA,oBAAuC,wBAAA;EAAA,UACvC,yBAAA,GAA4B,UAAA;AAAA;AAf9B;AAAA,KAmBE,eAAA,oBAAmC,wBAAA;EAAA,UACnC,qBAAA,SAA8B,OAAA,CAAQ,MAAA;EAAA,SACvC,UAAA,GAAa,UAAA;AAAA;;;;;KAOZ,eAAA;;KAQA,mBAAA,IAAuB,KAAA,OAAY,OAAA,UAAiB,GAAA,CAAI,OAAO;;;;;KAM/D,gCAAA,mBACQ,aAAA,CAAc,kBAAA,uBACZ,oBAAA,kBAGpB,MAAA,EAAQ,sBAAA,CAAuB,iBAAA,CAAkB,SAAA,IACjD,MAAA,EAAQ,MAAA,KACL,WAAA;;;;;KAMO,2BAAA,mBACQ,aAAA,CAAc,kBAAA,uBACZ,oBAAA,IAClB,gCAAA,CAAiC,SAAA,EAAW,WAAA;AAAA,KAE3C,wBAAA,qBAA6C,oBAAA,WAC1C,WAAA,gCAGJ,WAAA;;KAGQ,kBAAA,qBACU,oBAAA,oBACF,aAAA,CAAc,kBAAA,IAAsB,aAAA,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ErB,aAAA,SACnB,iBAAA,CACF,SAAA,EACA,OAAA,EACA,iBAAA,EACA,aAAA,EACA,YAAA;;KAkRU,uBAAA,mBACQ,aAAA,CAAc,kBAAA,gCACH,oBAAA,EAC7B,UAAA,EAAY,2BAAA,CAA4B,SAAA,EAAW,WAAA,MAChD,2BAAA,CAA4B,SAAA,EAAW,WAAA;AAr9B/B;AAAA,KAw9BD,0BAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA;EAElC,WAAA,EAAa,uBAAA,CAAwB,SAAA;EACrC,iBAAA,EAAmB,iBAAA,CAAkB,SAAA,EAAW,OAAA;AAAA;;KAItC,mCAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,KAChC,iCAAA,CAAkC,SAAA,EAAW,OAAA;;KAGrC,gCAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,KAChC,0BAAA,CAA2B,SAAA,EAAW,OAAA"}
|
|
@@ -149,7 +149,7 @@ type DefaultReferenceIncludes<Ref extends RenderStateReference, CustomProps> = O
|
|
|
149
149
|
passthrough: 'component';
|
|
150
150
|
} };
|
|
151
151
|
type ReferenceIncludes<Ref extends RenderStateReference, CustomProps, Include> = Include extends object ? Include : DefaultReferenceIncludes<Ref, CustomProps>;
|
|
152
|
-
type FromStateInProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Shared extends ComposableComponents, Ref extends RenderStateReference, Local extends ComposableComponents> =
|
|
152
|
+
type FromStateInProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Shared extends ComposableComponents, Ref extends RenderStateReference, Local extends ComposableComponents> = MergedLayoutInProps<Resources, Options, Shared & StateLocalComposables<ReferenceDefinition<Ref>> & Local> & StateCustomProps<ReferenceDefinition<Ref>> extends infer Props extends InPropsObject ? Props : {};
|
|
153
153
|
type SelectedReferenceSchemas<Ref extends RenderStateReference, Include> = Pick<ReferenceSchemas<Ref>, Extract<keyof Include, keyof ReferenceSchemas<Ref>>> extends infer Selected extends InPropsObject ? Selected : {};
|
|
154
154
|
type ReferenceCarriedProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Shared extends ComposableComponents, Ref extends RenderStateReference, Include> = Pick<FromStateInProps<Resources, Options, Shared, Ref, {}>, Extract<keyof Include, keyof FromStateInProps<Resources, Options, Shared, Ref, {}>>> extends infer Selected extends InPropsObject ? ResolveProps<Selected> : {};
|
|
155
155
|
type ReferenceRenderProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Shared extends ComposableComponents, Ref extends RenderStateReference> = RenderStateProps<Resources, Options, Shared & StateLocalComposables<ReferenceDefinition<Ref>>, StateIncludes<ReferenceDefinition<Ref>> extends infer Include extends IncludedProps<MergedLayoutInProps<Resources, Options, Shared & StateLocalComposables<ReferenceDefinition<Ref>>>> ? Include : {}, StateCustomProps<ReferenceDefinition<Ref>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-state.d.mts","names":[],"sources":["../../src/create-config/render-state.ts"],"mappings":";;;;;;;;;cAsBa,yBAAA;AAAA,cAGA,qBAAA;AAAA,cAGA,wBAAA;AAAA,cAGA,oCAAA;AANb;AAAA,KAWY,wBAAA;EACV,WAAA,IAAe,MAAA,EAAQ,sBAAA,OAA6B,MAAA,UAAgB,oBAAA;EACpE,KAAA;IACE,OAAA,GAAU,MAAA;IACV,MAAA,GAAS,aAAA;EAAA;EAEX,MAAA,GAAS,KAAA,OAAY,OAAA,UAAiB,GAAA,CAAI,OAAA;EAC1C,KAAA;AAAA;AAZF;AAAA,KAgBY,mBAAA,oBAAuC,wBAAA;EAAA,UACvC,yBAAA,GAA4B,UAAA;AAAA;AAf9B;AAAA,KAmBE,eAAA,oBAAmC,wBAAA;EAAA,UACnC,qBAAA,SAA8B,OAAA,CAAQ,MAAA;EAAA,SACvC,UAAA,G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A,mBAChB,iBAAA,CAAkB,SAAA,6BACR,oBAAA,6BACJ,aAAA,CACpB,mBAAA,CAAoB,SAAA,EAAW,OAAA,EAAS,iBAAA,8BAErB,aAAA;EAErB,KAAA;IAAU,OAAA,GAAU,aAAA;IAAe,MAAA,GAAS,YAAA;EAAA,GA7qBzB;EA+qBnB,WAAA,GAAc,2BAAA,CAA4B,SAAA,EAAW,iBAAA,GAtrBrD;EAwrBA,OAAA,EAAS,OAAA,EAxrBuB;EA0rBhC,SAAA,EAAW,SAAA;AAAA;;KAID,8BAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,6BACR,oBAAA,6BACJ,aAAA,CACpB,mBAAA,CAAoB,SAAA,EAAW,OAAA,EAAS,iBAAA,8BAErB,aAAA,SACnB,iBAAA,CACF,SAAA,EACA,OAAA,EACA,iBAAA,EACA,aAAA,EACA,YAAA;;KAkRU,uBAAA,mBACQ,aAAA,CAAc,kBAAA,gCACH,oBAAA,EAC7B,UAAA,EAAY,2BAAA,CAA4B,SAAA,EAAW,WAAA,MAChD,2BAAA,CAA4B,SAAA,EAAW,WAAA;AAr9B/B;AAAA,KAw9BD,0BAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA;EAElC,WAAA,EAAa,uBAAA,CAAwB,SAAA;EACrC,iBAAA,EAAmB,iBAAA,CAAkB,SAAA,EAAW,OAAA;AAAA;;KAItC,mCAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,KAChC,iCAAA,CAAkC,SAAA,EAAW,OAAA;;KAGrC,gCAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,KAChC,0BAAA,CAA2B,SAAA,EAAW,OAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LayoutConfigurationError } from "../errors/layout-configuration-error.mjs";
|
|
2
2
|
import { createStateComposable, withStateComposable } from "./state-composable.mjs";
|
|
3
3
|
import { collectComposablePresetEntries, composablePresetMetaKey } from "@jfdevelops/react-layout-composables";
|
|
4
|
+
import { getLayoutDebug, layoutDebug } from "@jfdevelops/react-layout-devtools-core";
|
|
4
5
|
|
|
5
6
|
//#region src/create-config/render-state.ts
|
|
6
7
|
const deferredRenderStateSymbol = Symbol("deferredRenderState");
|
|
@@ -30,7 +31,12 @@ function toFragment(definition) {
|
|
|
30
31
|
*/
|
|
31
32
|
function createRenderStateBuilder(_arguments) {
|
|
32
33
|
function createRenderState(input) {
|
|
33
|
-
|
|
34
|
+
const definition = normalizeDefinition(input);
|
|
35
|
+
const debug = getLayoutDebug(input);
|
|
36
|
+
return toFragment(debug ? {
|
|
37
|
+
...definition,
|
|
38
|
+
[layoutDebug]: debug
|
|
39
|
+
} : definition);
|
|
34
40
|
}
|
|
35
41
|
createRenderState.fromState = (input) => {
|
|
36
42
|
const entry = isLazyRenderState(input.ref) ? input.ref : Object.values(input.ref)[0];
|
|
@@ -61,6 +67,7 @@ function createRenderStateBuilder(_arguments) {
|
|
|
61
67
|
}]))
|
|
62
68
|
}).filter(([key]) => !(key in custom)));
|
|
63
69
|
return toFragment({
|
|
70
|
+
[layoutDebug]: getLayoutDebug(input),
|
|
64
71
|
state: input.state ?? "default",
|
|
65
72
|
props: {
|
|
66
73
|
custom,
|
|
@@ -104,7 +111,13 @@ function createRenderStateBuilder(_arguments) {
|
|
|
104
111
|
};
|
|
105
112
|
createRenderState.defer = (input) => {
|
|
106
113
|
const definition = normalizeDefinition(input);
|
|
107
|
-
const deferred = {
|
|
114
|
+
const deferred = {
|
|
115
|
+
[deferredRenderStateSymbol]: {
|
|
116
|
+
...definition,
|
|
117
|
+
[layoutDebug]: getLayoutDebug(input)
|
|
118
|
+
},
|
|
119
|
+
[layoutDebug]: getLayoutDebug(input)
|
|
120
|
+
};
|
|
108
121
|
const fragment = { [definition.state ?? "default"]: deferred };
|
|
109
122
|
Object.defineProperty(fragment, definedRenderStateSymbol, { value: definition });
|
|
110
123
|
return withStateComposable(fragment, {
|
|
@@ -113,7 +126,10 @@ function createRenderStateBuilder(_arguments) {
|
|
|
113
126
|
});
|
|
114
127
|
};
|
|
115
128
|
createRenderState.lazy = (load) => {
|
|
116
|
-
const lazyState = {
|
|
129
|
+
const lazyState = {
|
|
130
|
+
[lazyRenderStateSymbol]: load,
|
|
131
|
+
[layoutDebug]: getLayoutDebug(load)
|
|
132
|
+
};
|
|
117
133
|
return withStateComposable(lazyState, {
|
|
118
134
|
input: lazyState,
|
|
119
135
|
name: "lazy"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-state.mjs","names":[],"sources":["../../src/create-config/render-state.ts"],"sourcesContent":["import type { MergeContract } from './define-layout';\nimport type { JSX } from 'react';\nimport { collectComposablePresetEntries, composablePresetMetaKey, type MergePresetProps, type ComposablePresetMeta } from '@jfdevelops/react-layout-composables';\nimport { LayoutConfigurationError } from '../errors';\nimport { createStateComposable, withStateComposable, type StateComposable, type StateComposableHandle } from './state-composable';\nimport type { ResolveProps } from '@jfdevelops/react-layout-validator';\nimport type {\n ComposableComponents,\n CreateLayoutComposable,\n} from '@jfdevelops/react-layout-composables';\nimport type { InPropsObject } from '../props';\nimport type {\n IncludedProps,\n InPropsDefinition,\n LayoutRenderProps,\n MergedLayoutInProps,\n ResolvedIncludedComponentProps,\n ResolvedIncludedProps,\n} from '../props';\nimport type { LayoutResourceKey, ResourceDefinition } from '../resource';\nimport type { LayoutRenderResourcesAccessor } from './define-layout';\n\nexport const deferredRenderStateSymbol: unique symbol = Symbol(\n 'deferredRenderState',\n) as never;\nexport const lazyRenderStateSymbol: unique symbol = Symbol(\n 'lazyRenderState',\n) as never;\nexport const definedRenderStateSymbol: unique symbol = Symbol.for(\n '@jfdevelops/react-layout/render-state',\n) as never;\nexport const definedResourceLayoutComponentSymbol: unique symbol = Symbol.for(\n '@jfdevelops/react-layout/resource-layout-component',\n) as never;\n\n/** Runtime-compatible render-state shape used when inspecting lazy modules. */\nexport type AnyRenderStateDefinition = {\n composables?: (create: CreateLayoutComposable<any>, states: any) => ComposableComponents;\n props?: {\n include?: Record<string, unknown>;\n custom?: InPropsObject;\n };\n render: (props: any, context: any) => JSX.Element;\n state?: string;\n};\n\n/** An inline state whose first render is scheduled through `React.lazy`. */\nexport type DeferredRenderState<Definition extends AnyRenderStateDefinition> = {\n readonly [deferredRenderStateSymbol]: Definition;\n};\n\n/** A state definition supplied by a separately imported module. */\nexport type LazyRenderState<Definition extends AnyRenderStateDefinition> = {\n readonly [lazyRenderStateSymbol]: () => Promise<Record<string, unknown>>;\n readonly definition?: Definition;\n};\n\n/**\n * State names accepted by `createRenderState`. Built-in states are suggested by\n * autocomplete while any other string still creates a custom compound state.\n */\nexport type RenderStateName =\n | 'default'\n | 'Loading'\n | 'Error'\n | 'NotFound'\n | (string & {});\n\n/** Callback shorthand for a render state with no local configuration. */\nexport type RenderStateCallback = (props: any, context: any) => JSX.Element;\n\n/**\n * Defines state-local composable components with a `create` helper narrowed to\n * the resources bound to the surrounding builder.\n */\nexport type RenderStateComposablesDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Composables extends ComposableComponents,\n States = {},\n> = (\n create: CreateLayoutComposable<LayoutResourceKey<Resources>>,\n states: States,\n) => Composables;\n\n/**\n * Defines reusable layout-level composables while preserving their inferred\n * names, props, and bound resource union.\n */\nexport type LayoutComposablesDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Composables extends ComposableComponents,\n> = RenderStateComposablesDefinition<Resources, Composables>;\n\ntype BuilderRenderComposables<Composables extends ComposableComponents> = [\n keyof Composables,\n] extends [never]\n ? undefined\n : Composables;\n\n/** Values available as the second argument of a created state's `render`. */\nexport type RenderStateContext<\n Composables extends ComposableComponents,\n Resources extends ReadonlyArray<ResourceDefinition> = ReadonlyArray<ResourceDefinition>,\n> = {\n resources: LayoutRenderResourcesAccessor<Resources>;\n composables: BuilderRenderComposables<Composables>;\n retry?: () => void;\n};\n\n/**\n * Resolves one state's custom props and explicitly included option/composable\n * props to the values received by its render callback.\n */\nexport type RenderStateProps<\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> = LayoutRenderProps<\n Resources,\n Options,\n Composables,\n IncludeProps,\n CustomProps\n>;\n\ntype TypedRenderStateDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n State extends string,\n CustomProps extends InPropsObject,\n SharedComposables extends ComposableComponents,\n StateComposables extends ComposableComponents,\n IncludeProps extends IncludedProps<\n MergedLayoutInProps<\n Resources,\n Options,\n SharedComposables & StateComposables\n >\n >,\n SharedInclude extends IncludedProps<MergedLayoutInProps<Resources, Options, SharedComposables>> = {},\n SharedCustom extends InPropsObject = {},\n> = {\n composables?: RenderStateComposablesDefinition<Resources, StateComposables>;\n props?: {\n include?: IncludeProps;\n custom?: CustomProps;\n };\n render: (\n props: RenderStateProps<\n Resources,\n Options,\n SharedComposables & StateComposables,\n MergeContract<SharedInclude, IncludeProps>,\n MergeContract<SharedCustom, CustomProps>\n >,\n context: RenderStateContext<SharedComposables & StateComposables, Resources>,\n ) => JSX.Element;\n state: State;\n};\n\n/**\n * Callback shorthand for a created state, typed with the bound resources,\n * options, and shared composables.\n */\nexport type TypedRenderStateCallback<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents,\n SharedInclude extends IncludedProps<MergedLayoutInProps<Resources, Options, SharedComposables>> = {},\n SharedCustom extends InPropsObject = {},\n> = (\n props: RenderStateProps<Resources, Options, SharedComposables, SharedInclude, SharedCustom>,\n context: RenderStateContext<SharedComposables, Resources>,\n) => JSX.Element;\n\ntype NormalizeRenderStateDefinition<Input> =\n Input extends LazyRenderState<infer Definition>\n ? Definition\n : Input extends DeferredRenderState<infer Definition>\n ? Definition\n : Input extends RenderStateCallback\n ? { render: Input; state: 'default' }\n : Input extends AnyRenderStateDefinition\n ? Input\n : never;\n\ntype StateName<Definition> = Definition extends DeferredRenderState<\n infer DeferredDefinition\n>\n ? StateName<DeferredDefinition>\n : Definition extends { state?: infer State extends string }\n ? State\n : 'default';\n\n/**\n * A spreadable state entry keyed by its literal state name. Spreading this into\n * `layout.render` is what creates compound members such as `Users.Loading`.\n */\nexport type RenderStateFragment<Definition, CallProps extends object = ResolveProps<StateCustomProps<Definition>>> = {\n [State in StateName<NormalizeRenderStateDefinition<Definition>>]: Definition;\n} & {\n readonly [definedRenderStateSymbol]: NormalizeRenderStateDefinition<Definition>;\n} & StateComposableHandle<CallProps>;\n\ntype StateCustomProps<Input> = NormalizeStateInput<Input> extends {\n props?: { custom?: infer Props extends InPropsObject };\n} ? Props : {};\n\ntype StateIncludes<Input> = NormalizeStateInput<Input> extends {\n props?: { include?: infer Includes };\n} ? Includes : {};\n\ntype NormalizeStateInput<Input> = Input extends DeferredRenderState<infer Definition>\n ? Definition\n : Input extends LazyRenderState<infer Definition> ? Definition : Input;\n\ntype StateLocalComposables<Input> = NormalizeStateInput<Input> extends {\n composables?: (...args: any[]) => infer Components extends ComposableComponents;\n} ? Components : {};\n\n/**\n * A composables callback cannot infer its own return value into its arguments.\n * Preserve the declared call-site contract for props supplied by local presets,\n * even when their value types are not yet available in the callback context.\n */\ntype UnresolvedStateComponentProps<Props, Includes> = {\n [Key in Exclude<keyof Includes, keyof Props> as Includes[Key] extends {\n visibility: 'required'; passthrough: 'component';\n } ? Key : never]: unknown;\n} & {\n [Key in Exclude<keyof Includes, keyof Props> as Includes[Key] extends\n | 'optional'\n | { visibility: 'optional'; passthrough: 'component' }\n ? Key : never]?: unknown;\n};\n\ntype StateComponentProps<Props extends InPropsObject, Includes> =\n ResolvedIncludedComponentProps<Props,\n Pick<Includes, Extract<keyof Includes, keyof Props>> extends infer Known extends IncludedProps<Props>\n ? Known : {}\n > & UnresolvedStateComponentProps<Props, Includes>;\n\n/** Call-site props of a referenced state; creation-time options stay bound. */\nexport type RenderStateCallProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents,\n Input,\n> = ResolveProps<StateCustomProps<Input>> & StateComponentProps<\n MergedLayoutInProps<Resources, Options, Composables & StateLocalComposables<Input>>,\n StateIncludes<Input>\n>;\n\n/** Typed references to all the states declared in an inline render map. */\nexport type RenderStateReferences<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents,\n States,\n> = {\n readonly [State in keyof States & string]: StateComposable<\n RenderStateCallProps<Resources, Options, Composables, States[State]>\n >;\n};\n\ntype BoundRenderStateFragment<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents,\n Definition,\n> = RenderStateFragment<Definition, RenderStateCallProps<\n Resources, Options, Composables, Definition\n>>;\n\ntype DefinedRenderStateFromModule<Module> = Extract<\n Module[keyof Module],\n { readonly [definedRenderStateSymbol]: AnyRenderStateDefinition }\n>[typeof definedRenderStateSymbol];\n\n/** Wraps a state definition in the deferred marker when `Deferred` is `true`. */\ntype RenderStateEntry<Definition, Deferred extends boolean> = Deferred extends true\n ? DeferredRenderState<NormalizeRenderStateDefinition<Definition>>\n : Definition;\n\n/**\n * Overloads shared by `createRenderState` and `createRenderState.defer`. Each\n * accepts a full definition, a definition without `state`, or a render\n * callback; `Deferred` decides whether the returned entry is deferred.\n */\nexport interface RenderStateOverloads<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents,\n Deferred extends boolean,\n SharedInclude extends IncludedProps<MergedLayoutInProps<Resources, Options, SharedComposables>> = {},\n SharedCustom extends InPropsObject = {},\n> {\n <\n const State extends RenderStateName,\n const CustomProps extends InPropsObject = {},\n const StateComposables extends ComposableComponents = {},\n const IncludeProps extends IncludedProps<\n MergedLayoutInProps<\n Resources,\n Options,\n SharedComposables & StateComposables\n >\n > = {},\n >(\n definition: TypedRenderStateDefinition<\n Resources,\n Options,\n State,\n CustomProps,\n SharedComposables,\n StateComposables,\n IncludeProps,\n SharedInclude,\n SharedCustom\n >,\n ): BoundRenderStateFragment<Resources, Options, SharedComposables,\n RenderStateEntry<\n TypedRenderStateDefinition<\n Resources,\n Options,\n State,\n CustomProps,\n SharedComposables,\n StateComposables,\n IncludeProps,\n SharedInclude,\n SharedCustom\n >,\n Deferred\n >\n >;\n <\n const CustomProps extends InPropsObject = {},\n const StateComposables extends ComposableComponents = {},\n const IncludeProps extends IncludedProps<\n MergedLayoutInProps<\n Resources,\n Options,\n SharedComposables & StateComposables\n >\n > = {},\n >(\n definition: Omit<\n TypedRenderStateDefinition<\n Resources,\n Options,\n 'default',\n CustomProps,\n SharedComposables,\n StateComposables,\n IncludeProps,\n SharedInclude,\n SharedCustom\n >,\n 'state'\n >,\n ): BoundRenderStateFragment<Resources, Options, SharedComposables,\n RenderStateEntry<\n TypedRenderStateDefinition<\n Resources,\n Options,\n 'default',\n CustomProps,\n SharedComposables,\n StateComposables,\n IncludeProps,\n SharedInclude,\n SharedCustom\n >,\n Deferred\n >\n >;\n (\n render: TypedRenderStateCallback<Resources, Options, SharedComposables, SharedInclude, SharedCustom>,\n ): BoundRenderStateFragment<Resources, Options, SharedComposables,\n RenderStateEntry<\n TypedRenderStateCallback<Resources, Options, SharedComposables, SharedInclude, SharedCustom>,\n Deferred\n >\n >;\n}\n\ntype RenderStateReference = (\n | { readonly [definedRenderStateSymbol]: AnyRenderStateDefinition }\n | LazyRenderState<AnyRenderStateDefinition>\n) & StateComposableHandle<any>;\n\ntype ReferenceDefinition<Ref extends RenderStateReference> =\n Ref extends LazyRenderState<infer Definition> ? Definition\n : Ref extends { readonly [definedRenderStateSymbol]: infer Definition extends AnyRenderStateDefinition }\n ? Definition : never;\n\ntype FromStateEntry<Ref extends RenderStateReference, Definition extends AnyRenderStateDefinition> =\n Ref extends LazyRenderState<AnyRenderStateDefinition> ? LazyRenderState<Definition>\n : Extract<Ref[Exclude<keyof Ref, 'asComposable' | typeof definedRenderStateSymbol>], LazyRenderState<AnyRenderStateDefinition>> extends never\n ? Definition : LazyRenderState<Definition>;\ntype ReferenceSchemas<Ref extends RenderStateReference> =\n StateCustomProps<ReferenceDefinition<Ref>> & MergePresetProps<StateLocalComposables<ReferenceDefinition<Ref>>>;\n\ntype DefaultReferenceIncludes<Ref extends RenderStateReference, CustomProps> =\n Omit<StateIncludes<ReferenceDefinition<Ref>>, keyof CustomProps | keyof StateCustomProps<ReferenceDefinition<Ref>>> & {\n [Key in Exclude<keyof StateCustomProps<ReferenceDefinition<Ref>>, keyof CustomProps>]: {\n visibility: StateCustomProps<ReferenceDefinition<Ref>>[Key] extends { visibility: infer Visibility }\n ? Visibility : 'required';\n passthrough: 'component';\n };\n };\n\ntype ReferenceIncludes<Ref extends RenderStateReference, CustomProps, Include> =\n Include extends object ? Include : DefaultReferenceIncludes<Ref, CustomProps>;\n\ntype FromStateInProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n Local extends ComposableComponents,\n> = (MergedLayoutInProps<Resources, Options, Shared & StateLocalComposables<ReferenceDefinition<Ref>> & Local> &\n StateCustomProps<ReferenceDefinition<Ref>>) extends infer Props extends InPropsObject ? Props : {};\n\ntype SelectedReferenceSchemas<Ref extends RenderStateReference, Include> =\n Pick<ReferenceSchemas<Ref>, Extract<keyof Include, keyof ReferenceSchemas<Ref>>> extends infer Selected extends InPropsObject\n ? Selected : {};\n\ntype ReferenceCarriedProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n Include,\n> = Pick<FromStateInProps<Resources, Options, Shared, Ref, {}>,\n Extract<keyof Include, keyof FromStateInProps<Resources, Options, Shared, Ref, {}>>\n> extends infer Selected extends InPropsObject ? ResolveProps<Selected> : {};\n\ntype ReferenceRenderProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n> = RenderStateProps<Resources, Options, Shared & StateLocalComposables<ReferenceDefinition<Ref>>,\n StateIncludes<ReferenceDefinition<Ref>> extends infer Include extends IncludedProps<MergedLayoutInProps<Resources, Options, Shared & StateLocalComposables<ReferenceDefinition<Ref>>>> ? Include : {},\n StateCustomProps<ReferenceDefinition<Ref>>>;\n\ntype FromStateComposables<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n Local extends ComposableComponents,\n Include,\n> = Local & {\n Ref: StateComposable<\n ReferenceRenderProps<Resources, Options, Shared, Ref>,\n Extract<keyof ReferenceCarriedProps<Resources, Options, Shared, Ref, Include>, keyof ReferenceRenderProps<Resources, Options, Shared, Ref>>\n > & { [composablePresetMetaKey]: ComposablePresetMeta<SelectedReferenceSchemas<Ref, Include>> };\n};\n\ntype FromStateDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n State extends string,\n CustomProps extends InPropsObject,\n Local extends ComposableComponents,\n Include,\n> = {\n state: State;\n props?: { custom?: CustomProps; include?: ReferenceIncludes<Ref, CustomProps, Include> };\n composables: RenderStateComposablesDefinition<Resources,\n FromStateComposables<Resources, Options, Shared, Ref, Local, ReferenceIncludes<Ref, CustomProps, Include>>>;\n render: (\n props: ResolveProps<CustomProps> & ResolvedIncludedProps<FromStateInProps<Resources, Options, Shared, Ref, Local>,\n ReferenceIncludes<Ref, CustomProps, Include> extends infer Selected extends IncludedProps<FromStateInProps<Resources, Options, Shared, Ref, Local>> ? Selected : {}>,\n context: RenderStateContext<Shared & FromStateComposables<Resources, Options, Shared, Ref, Local, ReferenceIncludes<Ref, CustomProps, Include>>, Resources>,\n ) => JSX.Element;\n};\n\n/** Creates a state with inherited props and a composable reference to its source. */\nexport type CreateRenderStateFromState<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n> = <\n const Ref extends RenderStateReference,\n const State extends RenderStateName = 'default',\n const CustomProps extends InPropsObject = {},\n const Local extends ComposableComponents = {},\n const Include extends IncludedProps<FromStateInProps<Resources, Options, Shared, Ref, Local>> | undefined = undefined,\n>(definition: {\n ref: Ref;\n /** Defer Ref rendering through React.lazy. Defaults to false. */\n lazy?: boolean;\n state?: State;\n props?: {\n custom?: CustomProps;\n include?: Include & Record<Exclude<keyof Include, keyof FromStateInProps<Resources, Options, Shared, Ref, Local>>, never>;\n };\n composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>, states: {}) => Local & { Ref?: never };\n render: FromStateDefinition<Resources, Options, Shared, Ref, State, CustomProps, Local, Include>['render'];\n}) => BoundRenderStateFragment<Resources, Options, Shared,\n FromStateEntry<Ref, FromStateDefinition<Resources, Options, Shared, Ref, State, CustomProps, Local, Include>>>;\n\n/**\n * Creates independently typed render-state fragments.\n *\n * - Calling it directly creates an eager state.\n * - `.defer(...)` schedules an inline definition through `React.lazy`, but\n * does not create a separate JavaScript chunk.\n * - `.lazy(() => import(...))` imports a complete named state definition as a\n * separate chunk.\n * - `.fromState({ ref, ... })` inherits a state's props and exposes it as `Ref`.\n */\nexport interface CreateRenderState<\n Resources extends ReadonlyArray<ResourceDefinition> = ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources> = {},\n SharedComposables extends ComposableComponents = {},\n SharedInclude extends IncludedProps<MergedLayoutInProps<Resources, Options, SharedComposables>> = {},\n SharedCustom extends InPropsObject = {},\n> extends RenderStateOverloads<Resources, Options, SharedComposables, false, SharedInclude, SharedCustom> {\n fromState: CreateRenderStateFromState<Resources, Options, SharedComposables>;\n defer: RenderStateOverloads<Resources, Options, SharedComposables, true, SharedInclude, SharedCustom>;\n lazy<Module extends Record<string, unknown>>(\n load: () => Promise<Module>,\n ): LazyRenderState<DefinedRenderStateFromModule<Module>> & StateComposableHandle<\n RenderStateCallProps<Resources, Options, SharedComposables, DefinedRenderStateFromModule<Module>>\n >;\n}\n\nfunction normalizeDefinition(\n input: AnyRenderStateDefinition | RenderStateCallback,\n): AnyRenderStateDefinition {\n return typeof input === 'function'\n ? { render: input, state: 'default' }\n : input;\n}\n\nfunction toFragment<Definition extends AnyRenderStateDefinition>(\n definition: Definition,\n) {\n const fragment = {\n [definition.state ?? 'default']: definition,\n } as RenderStateFragment<Definition>;\n\n Object.defineProperty(fragment, definedRenderStateSymbol, {\n enumerable: false,\n value: definition,\n });\n\n return withStateComposable(fragment, { input: definition, name: definition.state ?? 'default' });\n}\n\n/** Inputs used internally to bind resource and option types to a state builder. */\nexport type CreateRenderStateBuilderArguments<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents = {},\n SharedInclude extends IncludedProps<MergedLayoutInProps<Resources, Options, SharedComposables>> = {},\n SharedCustom extends InPropsObject = {},\n> = {\n props?: { include?: SharedInclude; custom?: SharedCustom };\n /** Shared composables whose components and preset props every state can use. */\n composables?: LayoutComposablesDefinition<Resources, SharedComposables>;\n /** Option props that individual states can expose through `props.include`. */\n options: Options;\n /** Resources used to constrain composable names and resource-specific props. */\n resources: Resources;\n};\n\n/** The state factory produced for a particular resource and option definition. */\nexport type CreateRenderStateBuilderResult<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents = {},\n SharedInclude extends IncludedProps<MergedLayoutInProps<Resources, Options, SharedComposables>> = {},\n SharedCustom extends InPropsObject = {},\n> = CreateRenderState<Resources, Options, SharedComposables, SharedInclude, SharedCustom>;\n\n/**\n * Creates a state factory whose `props.include` keys are constrained by the\n * supplied resources and options.\n */\nexport function createRenderStateBuilder<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents = {},\n SharedInclude extends IncludedProps<MergedLayoutInProps<Resources, Options, SharedComposables>> = {},\n SharedCustom extends InPropsObject = {},\n>(\n _arguments: CreateRenderStateBuilderArguments<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n >,\n): CreateRenderStateBuilderResult<Resources, Options, SharedComposables, SharedInclude, SharedCustom> {\n function createRenderState(\n input: AnyRenderStateDefinition | RenderStateCallback,\n ) {\n return toFragment(normalizeDefinition(input));\n }\n\n createRenderState.fromState = (input: {\n ref: RenderStateReference;\n lazy?: boolean;\n state?: string;\n props?: AnyRenderStateDefinition['props'];\n composables?: AnyRenderStateDefinition['composables'];\n render: AnyRenderStateDefinition['render'];\n }): object => {\n const entry = isLazyRenderState(input.ref) ? input.ref : Object.values(input.ref)[0];\n if (isLazyRenderState(entry)) {\n const lazyState = {\n [lazyRenderStateSymbol]: async () => {\n const source = await findDefinedRenderState(await entry[lazyRenderStateSymbol]());\n return { Derived: createRenderState.fromState({ ...input, ref: toFragment(source) }) };\n },\n };\n const name = input.state ?? 'default';\n const fragment = { [name]: lazyState };\n Object.defineProperty(fragment, definedRenderStateSymbol, { value: lazyState });\n return withStateComposable(fragment, { input: lazyState, name });\n }\n const source = isDeferredRenderState(entry)\n ? entry[deferredRenderStateSymbol]\n : definedRenderStateSymbol in input.ref ? input.ref[definedRenderStateSymbol] : undefined;\n if (!source || typeof source.render !== 'function') {\n throw new LayoutConfigurationError('fromState requires a created render state');\n }\n const custom = input.props?.custom ?? {};\n const includes = input.props?.include ?? Object.fromEntries(\n Object.entries({\n ...source.props?.include,\n ...Object.fromEntries(Object.entries(source.props?.custom ?? {}).map(([key, prop]) => [\n key, { visibility: prop.visibility, passthrough: 'component' },\n ])),\n }).filter(([key]) => !(key in custom)),\n );\n return toFragment({\n state: input.state ?? 'default',\n props: { custom, include: includes },\n composables: (create, states) => {\n const inherited = source.composables?.(create, states) ?? {};\n const local = input.composables?.(create, states) ?? {};\n if (Object.prototype.hasOwnProperty.call(local, 'Ref')) {\n throw new LayoutConfigurationError('Composable name \"Ref\" is reserved by fromState');\n }\n const schemas = Object.assign({},\n ...collectComposablePresetEntries(inherited).map(({ props }) => props),\n source.props?.custom,\n ) as InPropsObject;\n const selected = Object.fromEntries(Object.entries(schemas).filter(([key]) => key in includes));\n const referenceSource = {\n ...source,\n props: {\n ...source.props,\n include: Object.fromEntries(Object.entries(source.props?.include ?? {}).map(([key, behavior]) => [\n key, {\n visibility: behavior === 'optional' || (typeof behavior === 'object' && behavior !== null && 'visibility' in behavior && behavior.visibility === 'optional')\n ? 'optional' : 'required',\n passthrough: 'component',\n },\n ])),\n },\n };\n const Ref = createStateComposable({\n input: input.lazy || isDeferredRenderState(entry) ? { [deferredRenderStateSymbol]: referenceSource } : referenceSource,\n name: source.state ?? 'default',\n fallbackStateName: input.state,\n }, {\n props: { include: Object.fromEntries(Object.keys(includes).map((key) => [key, true as const])) },\n normalizeIncludedKeys: true,\n });\n Object.defineProperty(Ref, composablePresetMetaKey, {\n value: { key: 'Ref', props: selected },\n });\n return { ...local, Ref };\n },\n render: input.render,\n });\n };\n\n createRenderState.defer = (\n input: AnyRenderStateDefinition | RenderStateCallback,\n ) => {\n const definition = normalizeDefinition(input);\n\n const deferred = { [deferredRenderStateSymbol]: definition };\n const fragment = { [definition.state ?? 'default']: deferred };\n Object.defineProperty(fragment, definedRenderStateSymbol, { value: definition });\n return withStateComposable(fragment, {\n input: deferred, name: definition.state ?? 'default',\n });\n };\n createRenderState.lazy = (\n load: () => Promise<Record<string, unknown>>,\n ) => {\n const lazyState = { [lazyRenderStateSymbol]: load };\n return withStateComposable(lazyState, { input: lazyState, name: 'lazy' });\n };\n\n return createRenderState as unknown as CreateRenderStateBuilderResult<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n >;\n}\n\n/** Type guard for states created with `createRenderState.defer(...)`. */\nexport function isDeferredRenderState(\n value: unknown,\n): value is DeferredRenderState<AnyRenderStateDefinition> {\n return (\n typeof value === 'object' &&\n value !== null &&\n deferredRenderStateSymbol in value\n );\n}\n\n/** Type guard for states created with `createRenderState.lazy(...)`. */\nexport function isLazyRenderState(\n value: unknown,\n): value is LazyRenderState<AnyRenderStateDefinition> {\n return (\n typeof value === 'object' && value !== null && lazyRenderStateSymbol in value\n );\n}\n\n/**\n * Resolves the single state exported by a lazy module, including derived lazy\n * states. Throws when a module exports none or more than one.\n */\nexport async function findDefinedRenderState(\n module: Record<string, unknown>,\n): Promise<AnyRenderStateDefinition> {\n const definitions = Object.values(module).filter(\n (value) =>\n typeof value === 'object' && value !== null && definedRenderStateSymbol in value,\n ) as Array<Record<typeof definedRenderStateSymbol, AnyRenderStateDefinition>>;\n\n if (definitions.length !== 1) {\n throw new Error(\n `A lazy render-state module must export exactly one defined render state; received ${definitions.length}.`,\n );\n }\n\n const definition = definitions[0][definedRenderStateSymbol];\n return isLazyRenderState(definition)\n ? findDefinedRenderState(await definition[lazyRenderStateSymbol]())\n : definition;\n}\n\n/** Identity helper that contextually types a reusable composables callback. */\nexport type DefineLayoutComposables<\n Resources extends ReadonlyArray<ResourceDefinition>,\n> = <const Composables extends ComposableComponents>(\n definition: LayoutComposablesDefinition<Resources, Composables>,\n) => LayoutComposablesDefinition<Resources, Composables>;\n\n/** Public cross-file building blocks returned by a defined layout builder. */\nexport type CreateLayoutBuildingBlocks<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n> = {\n composables: DefineLayoutComposables<Resources>;\n createRenderState: CreateRenderState<Resources, Options>;\n};\n\n/** Resource and option bindings used to create layout building blocks. */\nexport type CreateLayoutBuildingBlocksArguments<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n> = CreateRenderStateBuilderArguments<Resources, Options>;\n\n/** Layout helpers produced for the supplied resource and option bindings. */\nexport type CreateLayoutBuildingBlocksResult<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n> = CreateLayoutBuildingBlocks<Resources, Options>;\n\n/**\n * Creates the reusable `composables` and `createRenderState` helpers without\n * introducing an identity wrapper around the layout object itself.\n */\nexport function createLayoutBuildingBlocks<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n>(\n arguments_: CreateLayoutBuildingBlocksArguments<Resources, Options>,\n): CreateLayoutBuildingBlocksResult<Resources, Options> {\n function composables<const Composables extends ComposableComponents>(\n definition: LayoutComposablesDefinition<Resources, Composables>,\n ): LayoutComposablesDefinition<Resources, Composables> {\n return definition;\n }\n\n return {\n composables,\n createRenderState: createRenderStateBuilder(arguments_),\n };\n}\n\n/** Preserves a bound resource tuple for consumers that need to re-export it. */\nexport type BoundResources<\n Resources extends ReadonlyArray<ResourceDefinition>,\n> = Resources;\n"],"mappings":";;;;;AAsBA,MAAa,4BAA2C,OACtD,qBACF;AACA,MAAa,wBAAuC,OAClD,iBACF;AACA,MAAa,2BAA0C,OAAO,IAC5D,uCACF;AACA,MAAa,uCAAsD,OAAO,IACxE,oDACF;AAyfA,SAAS,oBACP,OAC0B;CAC1B,OAAO,OAAO,UAAU,aACpB;EAAE,QAAQ;EAAO,OAAO;CAAU,IAClC;AACN;AAEA,SAAS,WACP,YACA;CACA,MAAM,WAAW,GACd,WAAW,SAAS,YAAY,WACnC;CAEA,OAAO,eAAe,UAAU,0BAA0B;EACxD,YAAY;EACZ,OAAO;CACT,CAAC;CAED,OAAO,oBAAoB,UAAU;EAAE,OAAO;EAAY,MAAM,WAAW,SAAS;CAAU,CAAC;AACjG;;;;;AAgCA,SAAgB,yBAOd,YAOoG;CACpG,SAAS,kBACP,OACA;EACA,OAAO,WAAW,oBAAoB,KAAK,CAAC;CAC9C;CAEA,kBAAkB,aAAa,UAOjB;EACZ,MAAM,QAAQ,kBAAkB,MAAM,GAAG,IA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AC;EAC/E,OAAO,oBAAoB,UAAU;GACnC,OAAO;GAAU,MAAM,WAAW,SAAS;EAC7C,CAAC;CACH;CACA,kBAAkB,QAChB,SACG;EACH,MAAM,YAAY,GAAG,wBAAwB,KAAK;EAClD,OAAO,oBAAoB,WAAW;GAAE,OAAO;GAAW,MAAM;EAAO,CAAC;CAC1E;CAEA,OAAO;AAOT;;AAGA,SAAgB,sBACd,OACwD;CACxD,OACE,OAAO,UAAU,YACjB,UAAU,QACV,6BAA6B;AAEjC;;AAGA,SAAgB,kBACd,OACoD;CACpD,OACE,OAAO,UAAU,YAAY,UAAU,QAAQ,yBAAyB;AAE5E;;;;;AAMA,eAAsB,uBACpB,QACmC;CACnC,MAAM,cAAc,OAAO,OAAO,MAAM,EAAE,QACvC,UACC,OAAO,UAAU,YAAY,UAAU,QAAQ,4BAA4B,KAC/E;CAEA,IAAI,YAAY,WAAW,GACzB,MAAM,IAAI,MACR,qFAAqF,YAAY,OAAO,EAC1G;CAGF,MAAM,aAAa,YAAY,GAAG;CAClC,OAAO,kBAAkB,UAAU,IAC/B,uBAAuB,MAAM,WAAW,uBAAuB,CAAC,IAChE;AACN"}
|
|
1
|
+
{"version":3,"file":"render-state.mjs","names":[],"sources":["../../src/create-config/render-state.ts"],"sourcesContent":["import {\n getLayoutDebug,\n layoutDebug,\n} from '@jfdevelops/react-layout-devtools-core';\nimport type { MergeContract } from './define-layout';\nimport type { JSX } from 'react';\nimport {\n collectComposablePresetEntries,\n composablePresetMetaKey,\n type MergePresetProps,\n type ComposablePresetMeta,\n} from '@jfdevelops/react-layout-composables';\nimport { LayoutConfigurationError } from '../errors';\nimport {\n createStateComposable,\n withStateComposable,\n type StateComposable,\n type StateComposableHandle,\n} from './state-composable';\nimport type { ResolveProps } from '@jfdevelops/react-layout-validator';\nimport type {\n ComposableComponents,\n CreateLayoutComposable,\n} from '@jfdevelops/react-layout-composables';\nimport type { InPropsObject } from '../props';\nimport type {\n IncludedProps,\n InPropsDefinition,\n LayoutRenderProps,\n MergedLayoutInProps,\n ResolvedIncludedComponentProps,\n ResolvedIncludedProps,\n} from '../props';\nimport type { LayoutResourceKey, ResourceDefinition } from '../resource';\nimport type { LayoutRenderResourcesAccessor } from './define-layout';\n\nexport const deferredRenderStateSymbol: unique symbol = Symbol(\n 'deferredRenderState'\n);\n\nexport const lazyRenderStateSymbol: unique symbol = Symbol(\n 'lazyRenderState'\n);\n\nexport const definedRenderStateSymbol: unique symbol = Symbol.for(\n '@jfdevelops/react-layout/render-state'\n);\n\nexport const definedResourceLayoutComponentSymbol: unique symbol = Symbol.for(\n '@jfdevelops/react-layout/resource-layout-component'\n);\n\n/** Runtime-compatible render-state shape used when inspecting lazy modules. */\nexport type AnyRenderStateDefinition = {\n composables?: (\n create: CreateLayoutComposable<any>,\n states: any\n ) => ComposableComponents;\n props?: {\n include?: Record<string, unknown>;\n custom?: InPropsObject;\n };\n render: (props: any, context: any) => JSX.Element;\n state?: string;\n};\n\n/** An inline state whose first render is scheduled through `React.lazy`. */\nexport type DeferredRenderState<Definition extends AnyRenderStateDefinition> = {\n readonly [deferredRenderStateSymbol]: Definition;\n};\n\n/** A state definition supplied by a separately imported module. */\nexport type LazyRenderState<Definition extends AnyRenderStateDefinition> = {\n readonly [lazyRenderStateSymbol]: () => Promise<Record<string, unknown>>;\n readonly definition?: Definition;\n};\n\n/**\n * State names accepted by `createRenderState`. Built-in states are suggested by\n * autocomplete while any other string still creates a custom compound state.\n */\nexport type RenderStateName =\n | 'default'\n | 'Loading'\n | 'Error'\n | 'NotFound'\n | (string & {});\n\n/** Callback shorthand for a render state with no local configuration. */\nexport type RenderStateCallback = (props: any, context: any) => JSX.Element;\n\n/**\n * Defines state-local composable components with a `create` helper narrowed to\n * the resources bound to the surrounding builder.\n */\nexport type RenderStateComposablesDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Composables extends ComposableComponents,\n States = {}\n> = (\n create: CreateLayoutComposable<LayoutResourceKey<Resources>>,\n states: States\n) => Composables;\n\n/**\n * Defines reusable layout-level composables while preserving their inferred\n * names, props, and bound resource union.\n */\nexport type LayoutComposablesDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Composables extends ComposableComponents\n> = RenderStateComposablesDefinition<Resources, Composables>;\n\ntype BuilderRenderComposables<Composables extends ComposableComponents> = [\n keyof Composables\n] extends [never]\n ? undefined\n : Composables;\n\n/** Values available as the second argument of a created state's `render`. */\nexport type RenderStateContext<\n Composables extends ComposableComponents,\n Resources extends ReadonlyArray<ResourceDefinition> = ReadonlyArray<ResourceDefinition>\n> = {\n resources: LayoutRenderResourcesAccessor<Resources>;\n composables: BuilderRenderComposables<Composables>;\n retry?: () => void;\n};\n\n/**\n * Resolves one state's custom props and explicitly included option/composable\n * props to the values received by its render callback.\n */\nexport type RenderStateProps<\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> = LayoutRenderProps<\n Resources,\n Options,\n Composables,\n IncludeProps,\n CustomProps\n>;\n\ntype TypedRenderStateDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n State extends string,\n CustomProps extends InPropsObject,\n SharedComposables extends ComposableComponents,\n StateComposables extends ComposableComponents,\n IncludeProps extends IncludedProps<\n MergedLayoutInProps<\n Resources,\n Options,\n SharedComposables & StateComposables\n >\n >,\n SharedInclude extends IncludedProps<\n MergedLayoutInProps<Resources, Options, SharedComposables>\n > = {},\n SharedCustom extends InPropsObject = {}\n> = {\n composables?: RenderStateComposablesDefinition<Resources, StateComposables>;\n props?: {\n include?: IncludeProps;\n custom?: CustomProps;\n };\n render: (\n props: RenderStateProps<\n Resources,\n Options,\n SharedComposables & StateComposables,\n MergeContract<SharedInclude, IncludeProps>,\n MergeContract<SharedCustom, CustomProps>\n >,\n context: RenderStateContext<SharedComposables & StateComposables, Resources>\n ) => JSX.Element;\n state: State;\n};\n\n/**\n * Callback shorthand for a created state, typed with the bound resources,\n * options, and shared composables.\n */\nexport type TypedRenderStateCallback<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents,\n SharedInclude extends IncludedProps<\n MergedLayoutInProps<Resources, Options, SharedComposables>\n > = {},\n SharedCustom extends InPropsObject = {}\n> = (\n props: RenderStateProps<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n >,\n context: RenderStateContext<SharedComposables, Resources>\n) => JSX.Element;\n\ntype NormalizeRenderStateDefinition<Input> = Input extends LazyRenderState<\n infer Definition\n>\n ? Definition\n : Input extends DeferredRenderState<infer Definition>\n ? Definition\n : Input extends RenderStateCallback\n ? { render: Input; state: 'default' }\n : Input extends AnyRenderStateDefinition\n ? Input\n : never;\n\ntype StateName<Definition> = Definition extends DeferredRenderState<\n infer DeferredDefinition\n>\n ? StateName<DeferredDefinition>\n : Definition extends { state?: infer State extends string }\n ? State\n : 'default';\n\n/**\n * A spreadable state entry keyed by its literal state name. Spreading this into\n * `layout.render` is what creates compound members such as `Users.Loading`.\n */\nexport type RenderStateFragment<\n Definition,\n CallProps extends object = ResolveProps<StateCustomProps<Definition>>\n> = {\n [State in StateName<NormalizeRenderStateDefinition<Definition>>]: Definition;\n} & {\n readonly [definedRenderStateSymbol]: NormalizeRenderStateDefinition<Definition>;\n} & StateComposableHandle<CallProps>;\n\ntype StateCustomProps<Input> = NormalizeStateInput<Input> extends {\n props?: { custom?: infer Props extends InPropsObject };\n}\n ? Props\n : {};\n\ntype StateIncludes<Input> = NormalizeStateInput<Input> extends {\n props?: { include?: infer Includes };\n}\n ? Includes\n : {};\n\ntype NormalizeStateInput<Input> = Input extends DeferredRenderState<\n infer Definition\n>\n ? Definition\n : Input extends LazyRenderState<infer Definition>\n ? Definition\n : Input;\n\ntype StateLocalComposables<Input> = NormalizeStateInput<Input> extends {\n composables?: (\n ...args: any[]\n ) => infer Components extends ComposableComponents;\n}\n ? Components\n : {};\n\n/**\n * A composables callback cannot infer its own return value into its arguments.\n * Preserve the declared call-site contract for props supplied by local presets,\n * even when their value types are not yet available in the callback context.\n */\ntype UnresolvedStateComponentProps<Props, Includes> = {\n [Key in Exclude<keyof Includes, keyof Props> as Includes[Key] extends {\n visibility: 'required';\n passthrough: 'component';\n }\n ? Key\n : never]: unknown;\n} & {\n [Key in Exclude<keyof Includes, keyof Props> as Includes[Key] extends\n | 'optional'\n | { visibility: 'optional'; passthrough: 'component' }\n ? Key\n : never]?: unknown;\n};\n\ntype StateComponentProps<\n Props extends InPropsObject,\n Includes\n> = ResolvedIncludedComponentProps<\n Props,\n Pick<\n Includes,\n Extract<keyof Includes, keyof Props>\n > extends infer Known extends IncludedProps<Props>\n ? Known\n : {}\n> &\n UnresolvedStateComponentProps<Props, Includes>;\n\n/** Call-site props of a referenced state; creation-time options stay bound. */\nexport type RenderStateCallProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents,\n Input\n> = ResolveProps<StateCustomProps<Input>> &\n StateComponentProps<\n MergedLayoutInProps<\n Resources,\n Options,\n Composables & StateLocalComposables<Input>\n >,\n StateIncludes<Input>\n >;\n\n/** Typed references to all the states declared in an inline render map. */\nexport type RenderStateReferences<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents,\n States\n> = {\n readonly [State in keyof States & string]: StateComposable<\n RenderStateCallProps<Resources, Options, Composables, States[State]>\n >;\n};\n\ntype BoundRenderStateFragment<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Composables extends ComposableComponents,\n Definition\n> = RenderStateFragment<\n Definition,\n RenderStateCallProps<Resources, Options, Composables, Definition>\n>;\n\ntype DefinedRenderStateFromModule<Module> = Extract<\n Module[keyof Module],\n { readonly [definedRenderStateSymbol]: AnyRenderStateDefinition }\n>[typeof definedRenderStateSymbol];\n\n/** Wraps a state definition in the deferred marker when `Deferred` is `true`. */\ntype RenderStateEntry<\n Definition,\n Deferred extends boolean\n> = Deferred extends true\n ? DeferredRenderState<NormalizeRenderStateDefinition<Definition>>\n : Definition;\n\n/**\n * Overloads shared by `createRenderState` and `createRenderState.defer`. Each\n * accepts a full definition, a definition without `state`, or a render\n * callback; `Deferred` decides whether the returned entry is deferred.\n */\nexport interface RenderStateOverloads<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents,\n Deferred extends boolean,\n SharedInclude extends IncludedProps<\n MergedLayoutInProps<Resources, Options, SharedComposables>\n > = {},\n SharedCustom extends InPropsObject = {}\n> {\n <\n const State extends RenderStateName,\n const CustomProps extends InPropsObject = {},\n const StateComposables extends ComposableComponents = {},\n const IncludeProps extends IncludedProps<\n MergedLayoutInProps<\n Resources,\n Options,\n SharedComposables & StateComposables\n >\n > = {}\n >(\n definition: TypedRenderStateDefinition<\n Resources,\n Options,\n State,\n CustomProps,\n SharedComposables,\n StateComposables,\n IncludeProps,\n SharedInclude,\n SharedCustom\n >\n ): BoundRenderStateFragment<\n Resources,\n Options,\n SharedComposables,\n RenderStateEntry<\n TypedRenderStateDefinition<\n Resources,\n Options,\n State,\n CustomProps,\n SharedComposables,\n StateComposables,\n IncludeProps,\n SharedInclude,\n SharedCustom\n >,\n Deferred\n >\n >;\n <\n const CustomProps extends InPropsObject = {},\n const StateComposables extends ComposableComponents = {},\n const IncludeProps extends IncludedProps<\n MergedLayoutInProps<\n Resources,\n Options,\n SharedComposables & StateComposables\n >\n > = {}\n >(\n definition: Omit<\n TypedRenderStateDefinition<\n Resources,\n Options,\n 'default',\n CustomProps,\n SharedComposables,\n StateComposables,\n IncludeProps,\n SharedInclude,\n SharedCustom\n >,\n 'state'\n >\n ): BoundRenderStateFragment<\n Resources,\n Options,\n SharedComposables,\n RenderStateEntry<\n TypedRenderStateDefinition<\n Resources,\n Options,\n 'default',\n CustomProps,\n SharedComposables,\n StateComposables,\n IncludeProps,\n SharedInclude,\n SharedCustom\n >,\n Deferred\n >\n >;\n (\n render: TypedRenderStateCallback<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n >\n ): BoundRenderStateFragment<\n Resources,\n Options,\n SharedComposables,\n RenderStateEntry<\n TypedRenderStateCallback<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n >,\n Deferred\n >\n >;\n}\n\ntype RenderStateReference = (\n | { readonly [definedRenderStateSymbol]: AnyRenderStateDefinition }\n | LazyRenderState<AnyRenderStateDefinition>\n) &\n StateComposableHandle<any>;\n\ntype ReferenceDefinition<Ref extends RenderStateReference> =\n Ref extends LazyRenderState<infer Definition>\n ? Definition\n : Ref extends {\n readonly [definedRenderStateSymbol]: infer Definition extends AnyRenderStateDefinition;\n }\n ? Definition\n : never;\n\ntype FromStateEntry<\n Ref extends RenderStateReference,\n Definition extends AnyRenderStateDefinition\n> = Ref extends LazyRenderState<AnyRenderStateDefinition>\n ? LazyRenderState<Definition>\n : Extract<\n Ref[Exclude<keyof Ref, 'asComposable' | typeof definedRenderStateSymbol>],\n LazyRenderState<AnyRenderStateDefinition>\n > extends never\n ? Definition\n : LazyRenderState<Definition>;\n\ntype ReferenceSchemas<Ref extends RenderStateReference> = StateCustomProps<\n ReferenceDefinition<Ref>\n> &\n MergePresetProps<StateLocalComposables<ReferenceDefinition<Ref>>>;\n\ntype DefaultReferenceIncludes<\n Ref extends RenderStateReference,\n CustomProps\n> = Omit<\n StateIncludes<ReferenceDefinition<Ref>>,\n keyof CustomProps | keyof StateCustomProps<ReferenceDefinition<Ref>>\n> & {\n [Key in Exclude<\n keyof StateCustomProps<ReferenceDefinition<Ref>>,\n keyof CustomProps\n >]: {\n visibility: StateCustomProps<ReferenceDefinition<Ref>>[Key] extends {\n visibility: infer Visibility;\n }\n ? Visibility\n : 'required';\n passthrough: 'component';\n };\n};\n\ntype ReferenceIncludes<\n Ref extends RenderStateReference,\n CustomProps,\n Include\n> = Include extends object\n ? Include\n : DefaultReferenceIncludes<Ref, CustomProps>;\n\ntype FromStateInProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n Local extends ComposableComponents\n> = MergedLayoutInProps<\n Resources,\n Options,\n Shared & StateLocalComposables<ReferenceDefinition<Ref>> & Local\n> &\n StateCustomProps<\n ReferenceDefinition<Ref>\n > extends infer Props extends InPropsObject\n ? Props\n : {};\n\ntype SelectedReferenceSchemas<Ref extends RenderStateReference, Include> = Pick<\n ReferenceSchemas<Ref>,\n Extract<keyof Include, keyof ReferenceSchemas<Ref>>\n> extends infer Selected extends InPropsObject\n ? Selected\n : {};\n\ntype ReferenceCarriedProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n Include\n> = Pick<\n FromStateInProps<Resources, Options, Shared, Ref, {}>,\n Extract<\n keyof Include,\n keyof FromStateInProps<Resources, Options, Shared, Ref, {}>\n >\n> extends infer Selected extends InPropsObject\n ? ResolveProps<Selected>\n : {};\n\ntype ReferenceRenderProps<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference\n> = RenderStateProps<\n Resources,\n Options,\n Shared & StateLocalComposables<ReferenceDefinition<Ref>>,\n StateIncludes<\n ReferenceDefinition<Ref>\n > extends infer Include extends IncludedProps<\n MergedLayoutInProps<\n Resources,\n Options,\n Shared & StateLocalComposables<ReferenceDefinition<Ref>>\n >\n >\n ? Include\n : {},\n StateCustomProps<ReferenceDefinition<Ref>>\n>;\n\ntype FromStateComposables<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n Local extends ComposableComponents,\n Include\n> = Local & {\n Ref: StateComposable<\n ReferenceRenderProps<Resources, Options, Shared, Ref>,\n Extract<\n keyof ReferenceCarriedProps<Resources, Options, Shared, Ref, Include>,\n keyof ReferenceRenderProps<Resources, Options, Shared, Ref>\n >\n > & {\n [composablePresetMetaKey]: ComposablePresetMeta<\n SelectedReferenceSchemas<Ref, Include>\n >;\n };\n};\n\ntype FromStateDefinition<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents,\n Ref extends RenderStateReference,\n State extends string,\n CustomProps extends InPropsObject,\n Local extends ComposableComponents,\n Include\n> = {\n state: State;\n props?: {\n custom?: CustomProps;\n include?: ReferenceIncludes<Ref, CustomProps, Include>;\n };\n composables: RenderStateComposablesDefinition<\n Resources,\n FromStateComposables<\n Resources,\n Options,\n Shared,\n Ref,\n Local,\n ReferenceIncludes<Ref, CustomProps, Include>\n >\n >;\n render: (\n props: ResolveProps<CustomProps> &\n ResolvedIncludedProps<\n FromStateInProps<Resources, Options, Shared, Ref, Local>,\n ReferenceIncludes<\n Ref,\n CustomProps,\n Include\n > extends infer Selected extends IncludedProps<\n FromStateInProps<Resources, Options, Shared, Ref, Local>\n >\n ? Selected\n : {}\n >,\n context: RenderStateContext<\n Shared &\n FromStateComposables<\n Resources,\n Options,\n Shared,\n Ref,\n Local,\n ReferenceIncludes<Ref, CustomProps, Include>\n >,\n Resources\n >\n ) => JSX.Element;\n};\n\n/** Creates a state with inherited props and a composable reference to its source. */\nexport type CreateRenderStateFromState<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n Shared extends ComposableComponents\n> = <\n const Ref extends RenderStateReference,\n const State extends RenderStateName = 'default',\n const CustomProps extends InPropsObject = {},\n const Local extends ComposableComponents = {},\n const Include extends\n | IncludedProps<FromStateInProps<Resources, Options, Shared, Ref, Local>>\n | undefined = undefined\n>(definition: {\n ref: Ref;\n /** Defer Ref rendering through React.lazy. Defaults to false. */\n lazy?: boolean;\n state?: State;\n props?: {\n custom?: CustomProps;\n include?: Include &\n Record<\n Exclude<\n keyof Include,\n keyof FromStateInProps<Resources, Options, Shared, Ref, Local>\n >,\n never\n >;\n };\n composables?: (\n create: CreateLayoutComposable<LayoutResourceKey<Resources>>,\n states: {}\n ) => Local & { Ref?: never };\n render: FromStateDefinition<\n Resources,\n Options,\n Shared,\n Ref,\n State,\n CustomProps,\n Local,\n Include\n >['render'];\n}) => BoundRenderStateFragment<\n Resources,\n Options,\n Shared,\n FromStateEntry<\n Ref,\n FromStateDefinition<\n Resources,\n Options,\n Shared,\n Ref,\n State,\n CustomProps,\n Local,\n Include\n >\n >\n>;\n\n/**\n * Creates independently typed render-state fragments.\n *\n * - Calling it directly creates an eager state.\n * - `.defer(...)` schedules an inline definition through `React.lazy`, but\n * does not create a separate JavaScript chunk.\n * - `.lazy(() => import(...))` imports a complete named state definition as a\n * separate chunk.\n * - `.fromState({ ref, ... })` inherits a state's props and exposes it as `Ref`.\n */\nexport interface CreateRenderState<\n Resources extends ReadonlyArray<ResourceDefinition> = ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources> = {},\n SharedComposables extends ComposableComponents = {},\n SharedInclude extends IncludedProps<\n MergedLayoutInProps<Resources, Options, SharedComposables>\n > = {},\n SharedCustom extends InPropsObject = {}\n> extends RenderStateOverloads<\n Resources,\n Options,\n SharedComposables,\n false,\n SharedInclude,\n SharedCustom\n > {\n fromState: CreateRenderStateFromState<Resources, Options, SharedComposables>;\n defer: RenderStateOverloads<\n Resources,\n Options,\n SharedComposables,\n true,\n SharedInclude,\n SharedCustom\n >;\n lazy<Module extends Record<string, unknown>>(\n load: () => Promise<Module>\n ): LazyRenderState<DefinedRenderStateFromModule<Module>> &\n StateComposableHandle<\n RenderStateCallProps<\n Resources,\n Options,\n SharedComposables,\n DefinedRenderStateFromModule<Module>\n >\n >;\n}\n\nfunction normalizeDefinition(\n input: AnyRenderStateDefinition | RenderStateCallback\n): AnyRenderStateDefinition {\n return typeof input === 'function'\n ? { render: input, state: 'default' }\n : input;\n}\n\nfunction toFragment<Definition extends AnyRenderStateDefinition>(\n definition: Definition\n) {\n const fragment = {\n [definition.state ?? 'default']: definition,\n } as RenderStateFragment<Definition>;\n\n Object.defineProperty(fragment, definedRenderStateSymbol, {\n enumerable: false,\n value: definition,\n });\n\n return withStateComposable(fragment, {\n input: definition,\n name: definition.state ?? 'default',\n });\n}\n\n/** Inputs used internally to bind resource and option types to a state builder. */\nexport type CreateRenderStateBuilderArguments<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents = {},\n SharedInclude extends IncludedProps<\n MergedLayoutInProps<Resources, Options, SharedComposables>\n > = {},\n SharedCustom extends InPropsObject = {}\n> = {\n props?: { include?: SharedInclude; custom?: SharedCustom };\n /** Shared composables whose components and preset props every state can use. */\n composables?: LayoutComposablesDefinition<Resources, SharedComposables>;\n /** Option props that individual states can expose through `props.include`. */\n options: Options;\n /** Resources used to constrain composable names and resource-specific props. */\n resources: Resources;\n};\n\n/** The state factory produced for a particular resource and option definition. */\nexport type CreateRenderStateBuilderResult<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents = {},\n SharedInclude extends IncludedProps<\n MergedLayoutInProps<Resources, Options, SharedComposables>\n > = {},\n SharedCustom extends InPropsObject = {}\n> = CreateRenderState<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n>;\n\n/**\n * Creates a state factory whose `props.include` keys are constrained by the\n * supplied resources and options.\n */\nexport function createRenderStateBuilder<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>,\n SharedComposables extends ComposableComponents = {},\n SharedInclude extends IncludedProps<\n MergedLayoutInProps<Resources, Options, SharedComposables>\n > = {},\n SharedCustom extends InPropsObject = {}\n>(\n _arguments: CreateRenderStateBuilderArguments<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n >\n): CreateRenderStateBuilderResult<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n> {\n function createRenderState(\n input: AnyRenderStateDefinition | RenderStateCallback\n ) {\n const definition = normalizeDefinition(input);\n const debug = getLayoutDebug(input);\n\n return toFragment(\n debug ? { ...definition, [layoutDebug]: debug } : definition\n );\n }\n\n createRenderState.fromState = (input: {\n ref: RenderStateReference;\n lazy?: boolean;\n state?: string;\n props?: AnyRenderStateDefinition['props'];\n composables?: AnyRenderStateDefinition['composables'];\n render: AnyRenderStateDefinition['render'];\n }): object => {\n const entry = isLazyRenderState(input.ref)\n ? input.ref\n : Object.values(input.ref)[0];\n\n if (isLazyRenderState(entry)) {\n const lazyState = {\n [lazyRenderStateSymbol]: async () => {\n const source = await findDefinedRenderState(\n await entry[lazyRenderStateSymbol]()\n );\n\n return {\n Derived: createRenderState.fromState({\n ...input,\n ref: toFragment(source),\n }),\n };\n },\n };\n const name = input.state ?? 'default';\n const fragment = { [name]: lazyState };\n\n Object.defineProperty(fragment, definedRenderStateSymbol, {\n value: lazyState,\n });\n\n return withStateComposable(fragment, { input: lazyState, name });\n }\n\n const source = isDeferredRenderState(entry)\n ? entry[deferredRenderStateSymbol]\n : definedRenderStateSymbol in input.ref\n ? input.ref[definedRenderStateSymbol]\n : undefined;\n\n if (!source || typeof source.render !== 'function') {\n throw new LayoutConfigurationError(\n 'fromState requires a created render state'\n );\n }\n\n const custom = input.props?.custom ?? {};\n const includes =\n input.props?.include ??\n Object.fromEntries(\n Object.entries({\n ...source.props?.include,\n ...Object.fromEntries(\n Object.entries(source.props?.custom ?? {}).map(([key, prop]) => [\n key,\n { visibility: prop.visibility, passthrough: 'component' },\n ])\n ),\n }).filter(([key]) => !(key in custom))\n );\n\n return toFragment({\n [layoutDebug]: getLayoutDebug(input),\n state: input.state ?? 'default',\n props: { custom, include: includes },\n composables: (create, states) => {\n const inherited = source.composables?.(create, states) ?? {};\n const local = input.composables?.(create, states) ?? {};\n\n if (Object.prototype.hasOwnProperty.call(local, 'Ref')) {\n throw new LayoutConfigurationError(\n 'Composable name \"Ref\" is reserved by fromState'\n );\n }\n\n const schemas = Object.assign(\n {},\n ...collectComposablePresetEntries(inherited).map(\n ({ props }) => props\n ),\n source.props?.custom\n ) as InPropsObject;\n const selected = Object.fromEntries(\n Object.entries(schemas).filter(([key]) => key in includes)\n );\n const referenceSource = {\n ...source,\n props: {\n ...source.props,\n include: Object.fromEntries(\n Object.entries(source.props?.include ?? {}).map(\n ([key, behavior]) => [\n key,\n {\n visibility:\n behavior === 'optional' ||\n (typeof behavior === 'object' &&\n behavior !== null &&\n 'visibility' in behavior &&\n behavior.visibility === 'optional')\n ? 'optional'\n : 'required',\n passthrough: 'component',\n },\n ]\n )\n ),\n },\n };\n const Ref = createStateComposable(\n {\n input:\n input.lazy || isDeferredRenderState(entry)\n ? { [deferredRenderStateSymbol]: referenceSource }\n : referenceSource,\n name: source.state ?? 'default',\n fallbackStateName: input.state,\n },\n {\n props: {\n include: Object.fromEntries(\n Object.keys(includes).map((key) => [key, true as const])\n ),\n },\n normalizeIncludedKeys: true,\n }\n );\n\n Object.defineProperty(Ref, composablePresetMetaKey, {\n value: { key: 'Ref', props: selected },\n });\n\n return { ...local, Ref };\n },\n render: input.render,\n });\n };\n\n createRenderState.defer = (\n input: AnyRenderStateDefinition | RenderStateCallback\n ) => {\n const definition = normalizeDefinition(input);\n\n const deferred = {\n [deferredRenderStateSymbol]: {\n ...definition,\n [layoutDebug]: getLayoutDebug(input),\n },\n [layoutDebug]: getLayoutDebug(input),\n };\n const fragment = { [definition.state ?? 'default']: deferred };\n\n Object.defineProperty(fragment, definedRenderStateSymbol, {\n value: definition,\n });\n\n return withStateComposable(fragment, {\n input: deferred,\n name: definition.state ?? 'default',\n });\n };\n\n createRenderState.lazy = (load: () => Promise<Record<string, unknown>>) => {\n const lazyState = {\n [lazyRenderStateSymbol]: load,\n [layoutDebug]: getLayoutDebug(load),\n };\n\n return withStateComposable(lazyState, { input: lazyState, name: 'lazy' });\n };\n\n return createRenderState as unknown as CreateRenderStateBuilderResult<\n Resources,\n Options,\n SharedComposables,\n SharedInclude,\n SharedCustom\n >;\n}\n\n/** Type guard for states created with `createRenderState.defer(...)`. */\nexport function isDeferredRenderState(\n value: unknown\n): value is DeferredRenderState<AnyRenderStateDefinition> {\n return (\n typeof value === 'object' &&\n value !== null &&\n deferredRenderStateSymbol in value\n );\n}\n\n/** Type guard for states created with `createRenderState.lazy(...)`. */\nexport function isLazyRenderState(\n value: unknown\n): value is LazyRenderState<AnyRenderStateDefinition> {\n return (\n typeof value === 'object' &&\n value !== null &&\n lazyRenderStateSymbol in value\n );\n}\n\n/**\n * Resolves the single state exported by a lazy module, including derived lazy\n * states. Throws when a module exports none or more than one.\n */\nexport async function findDefinedRenderState(\n module: Record<string, unknown>\n): Promise<AnyRenderStateDefinition> {\n const definitions = Object.values(module).filter(\n (value) =>\n typeof value === 'object' &&\n value !== null &&\n definedRenderStateSymbol in value\n ) as Array<Record<typeof definedRenderStateSymbol, AnyRenderStateDefinition>>;\n\n if (definitions.length !== 1) {\n throw new Error(\n `A lazy render-state module must export exactly one defined render state; received ${definitions.length}.`\n );\n }\n\n const definition = definitions[0][definedRenderStateSymbol];\n\n return isLazyRenderState(definition)\n ? findDefinedRenderState(await definition[lazyRenderStateSymbol]())\n : definition;\n}\n\n/** Identity helper that contextually types a reusable composables callback. */\nexport type DefineLayoutComposables<\n Resources extends ReadonlyArray<ResourceDefinition>\n> = <const Composables extends ComposableComponents>(\n definition: LayoutComposablesDefinition<Resources, Composables>\n) => LayoutComposablesDefinition<Resources, Composables>;\n\n/** Public cross-file building blocks returned by a defined layout builder. */\nexport type CreateLayoutBuildingBlocks<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>\n> = {\n composables: DefineLayoutComposables<Resources>;\n createRenderState: CreateRenderState<Resources, Options>;\n};\n\n/** Resource and option bindings used to create layout building blocks. */\nexport type CreateLayoutBuildingBlocksArguments<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>\n> = CreateRenderStateBuilderArguments<Resources, Options>;\n\n/** Layout helpers produced for the supplied resource and option bindings. */\nexport type CreateLayoutBuildingBlocksResult<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>\n> = CreateLayoutBuildingBlocks<Resources, Options>;\n\n/**\n * Creates the reusable `composables` and `createRenderState` helpers without\n * introducing an identity wrapper around the layout object itself.\n */\nexport function createLayoutBuildingBlocks<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Options extends InPropsDefinition<Resources>\n>(\n arguments_: CreateLayoutBuildingBlocksArguments<Resources, Options>\n): CreateLayoutBuildingBlocksResult<Resources, Options> {\n function composables<const Composables extends ComposableComponents>(\n definition: LayoutComposablesDefinition<Resources, Composables>\n ): LayoutComposablesDefinition<Resources, Composables> {\n return definition;\n }\n\n return {\n composables,\n createRenderState: createRenderStateBuilder(arguments_),\n };\n}\n\n/** Preserves a bound resource tuple for consumers that need to re-export it. */\nexport type BoundResources<\n Resources extends ReadonlyArray<ResourceDefinition>\n> = Resources;\n"],"mappings":";;;;;;AAoCA,MAAa,4BAA2C,OACtD,qBACF;AAEA,MAAa,wBAAuC,OAClD,iBACF;AAEA,MAAa,2BAA0C,OAAO,IAC5D,uCACF;AAEA,MAAa,uCAAsD,OAAO,IACxE,oDACF;AAouBA,SAAS,oBACP,OAC0B;CAC1B,OAAO,OAAO,UAAU,aACpB;EAAE,QAAQ;EAAO,OAAO;CAAU,IAClC;AACN;AAEA,SAAS,WACP,YACA;CACA,MAAM,WAAW,GACd,WAAW,SAAS,YAAY,WACnC;CAEA,OAAO,eAAe,UAAU,0BAA0B;EACxD,YAAY;EACZ,OAAO;CACT,CAAC;CAED,OAAO,oBAAoB,UAAU;EACnC,OAAO;EACP,MAAM,WAAW,SAAS;CAC5B,CAAC;AACH;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,MAAM;EAChB,CAAC;CACH;CAEA,kBAAkB,SAChB,UACG;EACH,MAAM,aAAa,oBAAoB,KAAK;EAE5C,MAAM,WAAW;IACd,4BAA4B;IAC3B,GAAG;KACF,cAAc,eAAe,KAAK;GACrC;IACC,cAAc,eAAe,KAAK;EACrC;EACA,MAAM,WAAW,GAAG,WAAW,SAAS,YAAY,SAAS;EAE7D,OAAO,eAAe,UAAU,0BAA0B,EACxD,OAAO,WACT,CAAC;EAED,OAAO,oBAAoB,UAAU;GACnC,OAAO;GACP,MAAM,WAAW,SAAS;EAC5B,CAAC;CACH;CAEA,kBAAkB,QAAQ,SAAiD;EACzE,MAAM,YAAY;IACf,wBAAwB;IACxB,cAAc,eAAe,IAAI;EACpC;EAEA,OAAO,oBAAoB,WAAW;GAAE,OAAO;GAAW,MAAM;EAAO,CAAC;CAC1E;CAEA,OAAO;AAOT;;AAGA,SAAgB,sBACd,OACwD;CACxD,OACE,OAAO,UAAU,YACjB,UAAU,QACV,6BAA6B;AAEjC;;AAGA,SAAgB,kBACd,OACoD;CACpD,OACE,OAAO,UAAU,YACjB,UAAU,QACV,yBAAyB;AAE7B;;;;;AAMA,eAAsB,uBACpB,QACmC;CACnC,MAAM,cAAc,OAAO,OAAO,MAAM,EAAE,QACvC,UACC,OAAO,UAAU,YACjB,UAAU,QACV,4BAA4B,KAChC;CAEA,IAAI,YAAY,WAAW,GACzB,MAAM,IAAI,MACR,qFAAqF,YAAY,OAAO,EAC1G;CAGF,MAAM,aAAa,YAAY,GAAG;CAElC,OAAO,kBAAkB,UAAU,IAC/B,uBAAuB,MAAM,WAAW,uBAAuB,CAAC,IAChE;AACN"}
|
package/dist/index.cjs
CHANGED
|
@@ -9,6 +9,7 @@ const require_missing_path_variable = require('./errors/missing-path-variable.cj
|
|
|
9
9
|
const require_missing_resource_provider = require('./errors/missing-resource-provider.cjs');
|
|
10
10
|
const require_layout_configuration_error = require('./errors/layout-configuration-error.cjs');
|
|
11
11
|
const require_resource_state_error = require('./errors/resource-state-error.cjs');
|
|
12
|
+
const require_preview = require('./create-config/preview.cjs');
|
|
12
13
|
const require_resource = require('./resource.cjs');
|
|
13
14
|
const require_utils = require('./utils.cjs');
|
|
14
15
|
const require_define_layout = require('./create-config/define-layout.cjs');
|
|
@@ -78,6 +79,7 @@ Object.defineProperty(exports, 'defineComposableComponent', {
|
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
exports.defineLayoutName = require_layout_name.defineLayoutName;
|
|
82
|
+
exports.defineLayoutPreview = require_preview.defineLayoutPreview;
|
|
81
83
|
exports.defineResourceLayout = require_define_layout.defineResourceLayout;
|
|
82
84
|
Object.defineProperty(exports, 'isPropDefinitionShape', {
|
|
83
85
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -14,6 +14,7 @@ import { ContextualInlineRenderState, ContextualInlineRenderStates, CreateResour
|
|
|
14
14
|
import { LazyResourceErrorComponent, LazyResourceLayoutComponent, LazyResourceLayoutOptions, LazyResourceLoadingComponent, LazyResourceStates } from "./create-config/lazy-resource-layout.cjs";
|
|
15
15
|
import { BoundDefineResourceLayout, CreateDefinedResourceLayoutOptions, CreateDefinedResourceLayoutResult, DefineLazyDefaults, DefinedResourceLayoutInput, NonEmptyResources, createDefinedResourceLayout } from "./create-config/create-defined-resource-layout.cjs";
|
|
16
16
|
import { ResourceLayoutShellPublisher } from "./create-config/shell-context.cjs";
|
|
17
|
+
import { LayoutPreviewProps, defineLayoutPreview } from "./create-config/preview.cjs";
|
|
17
18
|
import { ReactLayoutError } from "./errors/react-layout-error.cjs";
|
|
18
19
|
import { InvalidConfigContext, InvalidConfigError } from "./errors/invalid-config.cjs";
|
|
19
20
|
import { InvalidPathContext, InvalidPathError } from "./errors/invalid-path.cjs";
|
|
@@ -26,4 +27,4 @@ import { LayoutConfigurationError, LayoutConfigurationErrorContext } from "./err
|
|
|
26
27
|
import { ResourceModuleLoadError, ResourceRenderError, ResourceStateError } from "./errors/resource-state-error.cjs";
|
|
27
28
|
import { AnyComposableComponent, ComposableComponent, ComposableComponentCallable, ComposableComponents, ComposableNameContext, ComposablePresetComponent, ComposablePresetComponentCallProps, ComposablePresetMeta, ComposablePresetProps, ComposableResourceLayout, CreateLayoutComposable, DefinedComposableComponentRecord, LayoutComposablePresetProvider, LayoutComposablesFactory, MakeComposable, MakeComposableOptions, MergePresetProps, PresetPropsFromComposable, RequiredPresetLayoutProps, RequiredPresetRenderProps, ResolveLayoutComposables, collectComposablePresetEntries, createComposableComponent, createLayoutComposableFactory, defineComposableComponent, makeComposable, resolveComposablePresetProps, resolveLayoutComposables } from "@jfdevelops/react-layout-composables";
|
|
28
29
|
import { AnyBuiltPropDefinition, ExtractDefinitionValue, PropError, PropErrorOptions, ResolveLayoutProps, ResolveLayoutPropsAsDefined, ResolveProps, ResolvedBuiltPropShape, createPrimitivePropBuilder, createProp, isPropDefinitionShape, resolvePropDefinitionValues, validateProps } from "@jfdevelops/react-layout-validator";
|
|
29
|
-
export { type AnyBuiltPropDefinition, type AnyComposableComponent, type AnyRenderStateDefinition, type AsStateComposable, type BaseComponent, type BoundDefineResourceLayout, type ComponentTypes, type ComposableComponent, type ComposableComponentCallable, type ComposableComponents, type ComposableNameContext, type ComposablePresetComponent, type ComposablePresetComponentCallProps, type ComposablePresetMeta, type ComposablePresetProps, type ComposableResourceLayout, type ContextualInlineRenderState, type ContextualInlineRenderStates, type CreateDefinedResourceLayoutOptions, type CreateDefinedResourceLayoutResult, type CreateGetComponentForPath, type CreateLayoutBuildingBlocks, type CreateLayoutBuildingBlocksArguments, type CreateLayoutBuildingBlocksResult, type CreateLayoutComposable, type CreateRenderState, type CreateRenderStateBuilderArguments, type CreateRenderStateBuilderResult, type CreateRenderStateFromState, type CreateResourceConfigFn, type CreateResourceConfigForResource, type CreateResourceLayoutWithLayoutOptions, type CreateResourceMap, type CreateResourceMapFn, type CreateViewMapBuiltInRenderStatesOptions, type CreateViewMapFunctionRenderOptions, type CreateViewMapInlineRenderStatesOptions, type CreateViewMapRenderStatesOptions, type CreatedResourceConfig, type DeferredRenderState, type DefineLayoutComposables, type DefineLazyDefaults, type DefineResourceLayoutWithLayoutFn, type DefineResourcesFn, type DefinedComposableComponentRecord, type DefinedResourceLayoutInput, type DefinedResourceLayoutWithShell, type ExtractDefinitionValue, type ForPaths, type ForPathsRenderContext, type GetComponentForPath, type InPropsDefinition, type InPropsFunction, type InPropsObject, type InPropsOptions, type IncludedComponentPropDefinitions, type IncludedPropBehavior, type IncludedProps, type InferredInProps, type InvalidComponentContext, InvalidComponentError, type InvalidConfigContext, InvalidConfigError, type InvalidPathContext, InvalidPathError, type InvalidResourceContext, InvalidResourceError, type InvalidSubResourceContext, InvalidSubResourceError, type IsSubResourceKey, LayoutComposablePresetProvider, type LayoutComposablesDefinition, type LayoutComposablesFactory, LayoutConfigurationError, type LayoutConfigurationErrorContext, type LayoutNameContext, type LayoutNameInput, type LayoutNameParts, type LayoutNameResolver, type LayoutRenderProps, type LayoutRenderResourcesAccessor, type LayoutResourceKey, type LayoutResourcesAccessor, type LazyRenderState, type LazyResourceErrorComponent, type LazyResourceLayoutComponent, type LazyResourceLayoutOptions, type LazyResourceLoadingComponent, type LazyResourceStates, type MakeComposable, type MakeComposableOptions, type MergeIntersection, type MergePresetProps, type MergedLayoutInProps, type MissingPathVariableContext, MissingPathVariableError, MissingResourceProviderError, type NonEmptyResources, type NormalizeResource, type NormalizeResources, type NormalizedResourceDefinition, type NormalizedResourceDefinitions, type ParameterizedResourcePath, type PathVariables, type PresetPropsFromComposable, PropError, type PropErrorOptions, type PropsContextRender, type PropsRenderDefinition, ReactLayoutError, type RenderStateCallProps, type RenderStateCallback, type RenderStateComposablesDefinition, type RenderStateContext, type RenderStateFragment, type RenderStateName, type RenderStateOverloads, type RenderStateProps, type RenderStateReferences, type RenderedPathComponent, type RenderedPathComponentHOF, type RequiredPresetLayoutProps, type RequiredPresetRenderProps, type ResolveLayoutComposables, type ResolveLayoutProps, type ResolveLayoutPropsAsDefined, type ResolveProps, type ResolvedBuiltPropShape, type ResolvedIncludedComponentProps, type ResolvedIncludedConfigProps, type ResolvedIncludedProps, type ResolvedIncludedPropsAsDefined, type ResolvedLayoutName, type ResolvedPathValue, type ResourceConfigFragment, type ResourceDefinition, type ResourceDefinitionValue, type ResourceEnum, type ResourceLayoutComponentProps, type ResourceLayoutProvider, type ResourceLayoutProviderProps, type ResourceLayoutShellComponent, type ResourceLayoutShellProps, type ResourceLayoutShellPublisher, ResourceModuleLoadError, type ResourcePath, ResourceRenderError, type ResourceSelection, type ResourceStateError, type ResourceTree, type ShellLayoutDefinition, type ShellRenderContext, type Show, type StateComposable, type StateComposableOptions, type TargetPathBuilder, type TypedBuiltInRenderStates, type TypedInlineRenderState, type TypedRenderStateCallback, type UnionToIntersection, collectComposablePresetEntries, createComposableComponent, createDefinedResourceLayout, createLayoutComposableFactory, createPrimitivePropBuilder, createProp, defineComposableComponent, defineLayoutName, defineResourceLayout, isPropDefinitionShape, makeComposable, normalizeResource, normalizeResourceDefinitions, normalizeResources, pick, resolveComposablePresetProps, resolveLayoutComposables, resolvePropDefinitionValues, toResourceEnum, validateProps };
|
|
30
|
+
export { type AnyBuiltPropDefinition, type AnyComposableComponent, type AnyRenderStateDefinition, type AsStateComposable, type BaseComponent, type BoundDefineResourceLayout, type ComponentTypes, type ComposableComponent, type ComposableComponentCallable, type ComposableComponents, type ComposableNameContext, type ComposablePresetComponent, type ComposablePresetComponentCallProps, type ComposablePresetMeta, type ComposablePresetProps, type ComposableResourceLayout, type ContextualInlineRenderState, type ContextualInlineRenderStates, type CreateDefinedResourceLayoutOptions, type CreateDefinedResourceLayoutResult, type CreateGetComponentForPath, type CreateLayoutBuildingBlocks, type CreateLayoutBuildingBlocksArguments, type CreateLayoutBuildingBlocksResult, type CreateLayoutComposable, type CreateRenderState, type CreateRenderStateBuilderArguments, type CreateRenderStateBuilderResult, type CreateRenderStateFromState, type CreateResourceConfigFn, type CreateResourceConfigForResource, type CreateResourceLayoutWithLayoutOptions, type CreateResourceMap, type CreateResourceMapFn, type CreateViewMapBuiltInRenderStatesOptions, type CreateViewMapFunctionRenderOptions, type CreateViewMapInlineRenderStatesOptions, type CreateViewMapRenderStatesOptions, type CreatedResourceConfig, type DeferredRenderState, type DefineLayoutComposables, type DefineLazyDefaults, type DefineResourceLayoutWithLayoutFn, type DefineResourcesFn, type DefinedComposableComponentRecord, type DefinedResourceLayoutInput, type DefinedResourceLayoutWithShell, type ExtractDefinitionValue, type ForPaths, type ForPathsRenderContext, type GetComponentForPath, type InPropsDefinition, type InPropsFunction, type InPropsObject, type InPropsOptions, type IncludedComponentPropDefinitions, type IncludedPropBehavior, type IncludedProps, type InferredInProps, type InvalidComponentContext, InvalidComponentError, type InvalidConfigContext, InvalidConfigError, type InvalidPathContext, InvalidPathError, type InvalidResourceContext, InvalidResourceError, type InvalidSubResourceContext, InvalidSubResourceError, type IsSubResourceKey, LayoutComposablePresetProvider, type LayoutComposablesDefinition, type LayoutComposablesFactory, LayoutConfigurationError, type LayoutConfigurationErrorContext, type LayoutNameContext, type LayoutNameInput, type LayoutNameParts, type LayoutNameResolver, type LayoutPreviewProps, type LayoutRenderProps, type LayoutRenderResourcesAccessor, type LayoutResourceKey, type LayoutResourcesAccessor, type LazyRenderState, type LazyResourceErrorComponent, type LazyResourceLayoutComponent, type LazyResourceLayoutOptions, type LazyResourceLoadingComponent, type LazyResourceStates, type MakeComposable, type MakeComposableOptions, type MergeIntersection, type MergePresetProps, type MergedLayoutInProps, type MissingPathVariableContext, MissingPathVariableError, MissingResourceProviderError, type NonEmptyResources, type NormalizeResource, type NormalizeResources, type NormalizedResourceDefinition, type NormalizedResourceDefinitions, type ParameterizedResourcePath, type PathVariables, type PresetPropsFromComposable, PropError, type PropErrorOptions, type PropsContextRender, type PropsRenderDefinition, ReactLayoutError, type RenderStateCallProps, type RenderStateCallback, type RenderStateComposablesDefinition, type RenderStateContext, type RenderStateFragment, type RenderStateName, type RenderStateOverloads, type RenderStateProps, type RenderStateReferences, type RenderedPathComponent, type RenderedPathComponentHOF, type RequiredPresetLayoutProps, type RequiredPresetRenderProps, type ResolveLayoutComposables, type ResolveLayoutProps, type ResolveLayoutPropsAsDefined, type ResolveProps, type ResolvedBuiltPropShape, type ResolvedIncludedComponentProps, type ResolvedIncludedConfigProps, type ResolvedIncludedProps, type ResolvedIncludedPropsAsDefined, type ResolvedLayoutName, type ResolvedPathValue, type ResourceConfigFragment, type ResourceDefinition, type ResourceDefinitionValue, type ResourceEnum, type ResourceLayoutComponentProps, type ResourceLayoutProvider, type ResourceLayoutProviderProps, type ResourceLayoutShellComponent, type ResourceLayoutShellProps, type ResourceLayoutShellPublisher, ResourceModuleLoadError, type ResourcePath, ResourceRenderError, type ResourceSelection, type ResourceStateError, type ResourceTree, type ShellLayoutDefinition, type ShellRenderContext, type Show, type StateComposable, type StateComposableOptions, type TargetPathBuilder, type TypedBuiltInRenderStates, type TypedInlineRenderState, type TypedRenderStateCallback, type UnionToIntersection, collectComposablePresetEntries, createComposableComponent, createDefinedResourceLayout, createLayoutComposableFactory, createPrimitivePropBuilder, createProp, defineComposableComponent, defineLayoutName, defineLayoutPreview, defineResourceLayout, isPropDefinitionShape, makeComposable, normalizeResource, normalizeResourceDefinitions, normalizeResources, pick, resolveComposablePresetProps, resolveLayoutComposables, resolvePropDefinitionValues, toResourceEnum, validateProps };
|
package/dist/index.d.mts
CHANGED
|
@@ -14,6 +14,7 @@ import { ContextualInlineRenderState, ContextualInlineRenderStates, CreateResour
|
|
|
14
14
|
import { LazyResourceErrorComponent, LazyResourceLayoutComponent, LazyResourceLayoutOptions, LazyResourceLoadingComponent, LazyResourceStates } from "./create-config/lazy-resource-layout.mjs";
|
|
15
15
|
import { BoundDefineResourceLayout, CreateDefinedResourceLayoutOptions, CreateDefinedResourceLayoutResult, DefineLazyDefaults, DefinedResourceLayoutInput, NonEmptyResources, createDefinedResourceLayout } from "./create-config/create-defined-resource-layout.mjs";
|
|
16
16
|
import { ResourceLayoutShellPublisher } from "./create-config/shell-context.mjs";
|
|
17
|
+
import { LayoutPreviewProps, defineLayoutPreview } from "./create-config/preview.mjs";
|
|
17
18
|
import { ReactLayoutError } from "./errors/react-layout-error.mjs";
|
|
18
19
|
import { InvalidConfigContext, InvalidConfigError } from "./errors/invalid-config.mjs";
|
|
19
20
|
import { InvalidPathContext, InvalidPathError } from "./errors/invalid-path.mjs";
|
|
@@ -26,4 +27,4 @@ import { LayoutConfigurationError, LayoutConfigurationErrorContext } from "./err
|
|
|
26
27
|
import { ResourceModuleLoadError, ResourceRenderError, ResourceStateError } from "./errors/resource-state-error.mjs";
|
|
27
28
|
import { AnyComposableComponent, ComposableComponent, ComposableComponentCallable, ComposableComponents, ComposableNameContext, ComposablePresetComponent, ComposablePresetComponentCallProps, ComposablePresetMeta, ComposablePresetProps, ComposableResourceLayout, CreateLayoutComposable, DefinedComposableComponentRecord, LayoutComposablePresetProvider, LayoutComposablesFactory, MakeComposable, MakeComposableOptions, MergePresetProps, PresetPropsFromComposable, RequiredPresetLayoutProps, RequiredPresetRenderProps, ResolveLayoutComposables, collectComposablePresetEntries, createComposableComponent, createLayoutComposableFactory, defineComposableComponent, makeComposable, resolveComposablePresetProps, resolveLayoutComposables } from "@jfdevelops/react-layout-composables";
|
|
28
29
|
import { AnyBuiltPropDefinition, ExtractDefinitionValue, PropError, PropErrorOptions, ResolveLayoutProps, ResolveLayoutPropsAsDefined, ResolveProps, ResolvedBuiltPropShape, createPrimitivePropBuilder, createProp, isPropDefinitionShape, resolvePropDefinitionValues, validateProps } from "@jfdevelops/react-layout-validator";
|
|
29
|
-
export { type AnyBuiltPropDefinition, type AnyComposableComponent, type AnyRenderStateDefinition, type AsStateComposable, type BaseComponent, type BoundDefineResourceLayout, type ComponentTypes, type ComposableComponent, type ComposableComponentCallable, type ComposableComponents, type ComposableNameContext, type ComposablePresetComponent, type ComposablePresetComponentCallProps, type ComposablePresetMeta, type ComposablePresetProps, type ComposableResourceLayout, type ContextualInlineRenderState, type ContextualInlineRenderStates, type CreateDefinedResourceLayoutOptions, type CreateDefinedResourceLayoutResult, type CreateGetComponentForPath, type CreateLayoutBuildingBlocks, type CreateLayoutBuildingBlocksArguments, type CreateLayoutBuildingBlocksResult, type CreateLayoutComposable, type CreateRenderState, type CreateRenderStateBuilderArguments, type CreateRenderStateBuilderResult, type CreateRenderStateFromState, type CreateResourceConfigFn, type CreateResourceConfigForResource, type CreateResourceLayoutWithLayoutOptions, type CreateResourceMap, type CreateResourceMapFn, type CreateViewMapBuiltInRenderStatesOptions, type CreateViewMapFunctionRenderOptions, type CreateViewMapInlineRenderStatesOptions, type CreateViewMapRenderStatesOptions, type CreatedResourceConfig, type DeferredRenderState, type DefineLayoutComposables, type DefineLazyDefaults, type DefineResourceLayoutWithLayoutFn, type DefineResourcesFn, type DefinedComposableComponentRecord, type DefinedResourceLayoutInput, type DefinedResourceLayoutWithShell, type ExtractDefinitionValue, type ForPaths, type ForPathsRenderContext, type GetComponentForPath, type InPropsDefinition, type InPropsFunction, type InPropsObject, type InPropsOptions, type IncludedComponentPropDefinitions, type IncludedPropBehavior, type IncludedProps, type InferredInProps, type InvalidComponentContext, InvalidComponentError, type InvalidConfigContext, InvalidConfigError, type InvalidPathContext, InvalidPathError, type InvalidResourceContext, InvalidResourceError, type InvalidSubResourceContext, InvalidSubResourceError, type IsSubResourceKey, LayoutComposablePresetProvider, type LayoutComposablesDefinition, type LayoutComposablesFactory, LayoutConfigurationError, type LayoutConfigurationErrorContext, type LayoutNameContext, type LayoutNameInput, type LayoutNameParts, type LayoutNameResolver, type LayoutRenderProps, type LayoutRenderResourcesAccessor, type LayoutResourceKey, type LayoutResourcesAccessor, type LazyRenderState, type LazyResourceErrorComponent, type LazyResourceLayoutComponent, type LazyResourceLayoutOptions, type LazyResourceLoadingComponent, type LazyResourceStates, type MakeComposable, type MakeComposableOptions, type MergeIntersection, type MergePresetProps, type MergedLayoutInProps, type MissingPathVariableContext, MissingPathVariableError, MissingResourceProviderError, type NonEmptyResources, type NormalizeResource, type NormalizeResources, type NormalizedResourceDefinition, type NormalizedResourceDefinitions, type ParameterizedResourcePath, type PathVariables, type PresetPropsFromComposable, PropError, type PropErrorOptions, type PropsContextRender, type PropsRenderDefinition, ReactLayoutError, type RenderStateCallProps, type RenderStateCallback, type RenderStateComposablesDefinition, type RenderStateContext, type RenderStateFragment, type RenderStateName, type RenderStateOverloads, type RenderStateProps, type RenderStateReferences, type RenderedPathComponent, type RenderedPathComponentHOF, type RequiredPresetLayoutProps, type RequiredPresetRenderProps, type ResolveLayoutComposables, type ResolveLayoutProps, type ResolveLayoutPropsAsDefined, type ResolveProps, type ResolvedBuiltPropShape, type ResolvedIncludedComponentProps, type ResolvedIncludedConfigProps, type ResolvedIncludedProps, type ResolvedIncludedPropsAsDefined, type ResolvedLayoutName, type ResolvedPathValue, type ResourceConfigFragment, type ResourceDefinition, type ResourceDefinitionValue, type ResourceEnum, type ResourceLayoutComponentProps, type ResourceLayoutProvider, type ResourceLayoutProviderProps, type ResourceLayoutShellComponent, type ResourceLayoutShellProps, type ResourceLayoutShellPublisher, ResourceModuleLoadError, type ResourcePath, ResourceRenderError, type ResourceSelection, type ResourceStateError, type ResourceTree, type ShellLayoutDefinition, type ShellRenderContext, type Show, type StateComposable, type StateComposableOptions, type TargetPathBuilder, type TypedBuiltInRenderStates, type TypedInlineRenderState, type TypedRenderStateCallback, type UnionToIntersection, collectComposablePresetEntries, createComposableComponent, createDefinedResourceLayout, createLayoutComposableFactory, createPrimitivePropBuilder, createProp, defineComposableComponent, defineLayoutName, defineResourceLayout, isPropDefinitionShape, makeComposable, normalizeResource, normalizeResourceDefinitions, normalizeResources, pick, resolveComposablePresetProps, resolveLayoutComposables, resolvePropDefinitionValues, toResourceEnum, validateProps };
|
|
30
|
+
export { type AnyBuiltPropDefinition, type AnyComposableComponent, type AnyRenderStateDefinition, type AsStateComposable, type BaseComponent, type BoundDefineResourceLayout, type ComponentTypes, type ComposableComponent, type ComposableComponentCallable, type ComposableComponents, type ComposableNameContext, type ComposablePresetComponent, type ComposablePresetComponentCallProps, type ComposablePresetMeta, type ComposablePresetProps, type ComposableResourceLayout, type ContextualInlineRenderState, type ContextualInlineRenderStates, type CreateDefinedResourceLayoutOptions, type CreateDefinedResourceLayoutResult, type CreateGetComponentForPath, type CreateLayoutBuildingBlocks, type CreateLayoutBuildingBlocksArguments, type CreateLayoutBuildingBlocksResult, type CreateLayoutComposable, type CreateRenderState, type CreateRenderStateBuilderArguments, type CreateRenderStateBuilderResult, type CreateRenderStateFromState, type CreateResourceConfigFn, type CreateResourceConfigForResource, type CreateResourceLayoutWithLayoutOptions, type CreateResourceMap, type CreateResourceMapFn, type CreateViewMapBuiltInRenderStatesOptions, type CreateViewMapFunctionRenderOptions, type CreateViewMapInlineRenderStatesOptions, type CreateViewMapRenderStatesOptions, type CreatedResourceConfig, type DeferredRenderState, type DefineLayoutComposables, type DefineLazyDefaults, type DefineResourceLayoutWithLayoutFn, type DefineResourcesFn, type DefinedComposableComponentRecord, type DefinedResourceLayoutInput, type DefinedResourceLayoutWithShell, type ExtractDefinitionValue, type ForPaths, type ForPathsRenderContext, type GetComponentForPath, type InPropsDefinition, type InPropsFunction, type InPropsObject, type InPropsOptions, type IncludedComponentPropDefinitions, type IncludedPropBehavior, type IncludedProps, type InferredInProps, type InvalidComponentContext, InvalidComponentError, type InvalidConfigContext, InvalidConfigError, type InvalidPathContext, InvalidPathError, type InvalidResourceContext, InvalidResourceError, type InvalidSubResourceContext, InvalidSubResourceError, type IsSubResourceKey, LayoutComposablePresetProvider, type LayoutComposablesDefinition, type LayoutComposablesFactory, LayoutConfigurationError, type LayoutConfigurationErrorContext, type LayoutNameContext, type LayoutNameInput, type LayoutNameParts, type LayoutNameResolver, type LayoutPreviewProps, type LayoutRenderProps, type LayoutRenderResourcesAccessor, type LayoutResourceKey, type LayoutResourcesAccessor, type LazyRenderState, type LazyResourceErrorComponent, type LazyResourceLayoutComponent, type LazyResourceLayoutOptions, type LazyResourceLoadingComponent, type LazyResourceStates, type MakeComposable, type MakeComposableOptions, type MergeIntersection, type MergePresetProps, type MergedLayoutInProps, type MissingPathVariableContext, MissingPathVariableError, MissingResourceProviderError, type NonEmptyResources, type NormalizeResource, type NormalizeResources, type NormalizedResourceDefinition, type NormalizedResourceDefinitions, type ParameterizedResourcePath, type PathVariables, type PresetPropsFromComposable, PropError, type PropErrorOptions, type PropsContextRender, type PropsRenderDefinition, ReactLayoutError, type RenderStateCallProps, type RenderStateCallback, type RenderStateComposablesDefinition, type RenderStateContext, type RenderStateFragment, type RenderStateName, type RenderStateOverloads, type RenderStateProps, type RenderStateReferences, type RenderedPathComponent, type RenderedPathComponentHOF, type RequiredPresetLayoutProps, type RequiredPresetRenderProps, type ResolveLayoutComposables, type ResolveLayoutProps, type ResolveLayoutPropsAsDefined, type ResolveProps, type ResolvedBuiltPropShape, type ResolvedIncludedComponentProps, type ResolvedIncludedConfigProps, type ResolvedIncludedProps, type ResolvedIncludedPropsAsDefined, type ResolvedLayoutName, type ResolvedPathValue, type ResourceConfigFragment, type ResourceDefinition, type ResourceDefinitionValue, type ResourceEnum, type ResourceLayoutComponentProps, type ResourceLayoutProvider, type ResourceLayoutProviderProps, type ResourceLayoutShellComponent, type ResourceLayoutShellProps, type ResourceLayoutShellPublisher, ResourceModuleLoadError, type ResourcePath, ResourceRenderError, type ResourceSelection, type ResourceStateError, type ResourceTree, type ShellLayoutDefinition, type ShellRenderContext, type Show, type StateComposable, type StateComposableOptions, type TargetPathBuilder, type TypedBuiltInRenderStates, type TypedInlineRenderState, type TypedRenderStateCallback, type UnionToIntersection, collectComposablePresetEntries, createComposableComponent, createDefinedResourceLayout, createLayoutComposableFactory, createPrimitivePropBuilder, createProp, defineComposableComponent, defineLayoutName, defineLayoutPreview, defineResourceLayout, isPropDefinitionShape, makeComposable, normalizeResource, normalizeResourceDefinitions, normalizeResources, pick, resolveComposablePresetProps, resolveLayoutComposables, resolvePropDefinitionValues, toResourceEnum, validateProps };
|
package/dist/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import { MissingPathVariableError } from "./errors/missing-path-variable.mjs";
|
|
|
8
8
|
import { MissingResourceProviderError } from "./errors/missing-resource-provider.mjs";
|
|
9
9
|
import { LayoutConfigurationError } from "./errors/layout-configuration-error.mjs";
|
|
10
10
|
import { ResourceModuleLoadError, ResourceRenderError } from "./errors/resource-state-error.mjs";
|
|
11
|
+
import { defineLayoutPreview } from "./create-config/preview.mjs";
|
|
11
12
|
import { normalizeResource, normalizeResourceDefinitions, normalizeResources, toResourceEnum } from "./resource.mjs";
|
|
12
13
|
import { pick } from "./utils.mjs";
|
|
13
14
|
import { defineResourceLayout } from "./create-config/define-layout.mjs";
|
|
@@ -16,4 +17,4 @@ import { defineLayoutName } from "./create-config/layout-name.mjs";
|
|
|
16
17
|
import { LayoutComposablePresetProvider, collectComposablePresetEntries, createComposableComponent, createLayoutComposableFactory, defineComposableComponent, makeComposable, resolveComposablePresetProps, resolveLayoutComposables } from "@jfdevelops/react-layout-composables";
|
|
17
18
|
import { PropError, createPrimitivePropBuilder, createProp, isPropDefinitionShape, resolvePropDefinitionValues, validateProps } from "@jfdevelops/react-layout-validator";
|
|
18
19
|
|
|
19
|
-
export { InvalidComponentError, InvalidConfigError, InvalidPathError, InvalidResourceError, InvalidSubResourceError, LayoutComposablePresetProvider, LayoutConfigurationError, MissingPathVariableError, MissingResourceProviderError, PropError, ReactLayoutError, ResourceModuleLoadError, ResourceRenderError, collectComposablePresetEntries, createComposableComponent, createDefinedResourceLayout, createLayoutComposableFactory, createPrimitivePropBuilder, createProp, defineComposableComponent, defineLayoutName, defineResourceLayout, isPropDefinitionShape, makeComposable, normalizeResource, normalizeResourceDefinitions, normalizeResources, pick, resolveComposablePresetProps, resolveLayoutComposables, resolvePropDefinitionValues, toResourceEnum, validateProps };
|
|
20
|
+
export { InvalidComponentError, InvalidConfigError, InvalidPathError, InvalidResourceError, InvalidSubResourceError, LayoutComposablePresetProvider, LayoutConfigurationError, MissingPathVariableError, MissingResourceProviderError, PropError, ReactLayoutError, ResourceModuleLoadError, ResourceRenderError, collectComposablePresetEntries, createComposableComponent, createDefinedResourceLayout, createLayoutComposableFactory, createPrimitivePropBuilder, createProp, defineComposableComponent, defineLayoutName, defineLayoutPreview, defineResourceLayout, isPropDefinitionShape, makeComposable, normalizeResource, normalizeResourceDefinitions, normalizeResources, pick, resolveComposablePresetProps, resolveLayoutComposables, resolvePropDefinitionValues, toResourceEnum, validateProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jfdevelops/react-layout",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A React library for creating layout components.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@jfdevelops/create-error": "0.2.0",
|
|
31
31
|
"arktype": "2.2.8",
|
|
32
|
-
"@jfdevelops/react-layout-composables": "0.
|
|
33
|
-
"@jfdevelops/react-layout-
|
|
34
|
-
"@jfdevelops/react-layout-
|
|
32
|
+
"@jfdevelops/react-layout-composables": "0.3.0",
|
|
33
|
+
"@jfdevelops/react-layout-devtools-core": "0.2.0",
|
|
34
|
+
"@jfdevelops/react-layout-validator": "0.3.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": ">=18",
|