@jfdevelops/react-layout 0.20.0 → 0.21.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/define-layout.cjs +173 -1
- package/dist/create-config/define-layout.cjs.map +1 -1
- package/dist/create-config/define-layout.d.cts +174 -18
- package/dist/create-config/define-layout.d.cts.map +1 -1
- package/dist/create-config/define-layout.d.mts +174 -18
- package/dist/create-config/define-layout.d.mts.map +1 -1
- package/dist/create-config/define-layout.mjs +174 -2
- package/dist/create-config/define-layout.mjs.map +1 -1
- package/dist/create-config/for-resources/create-component.d.mts +1 -1
- package/dist/create-config/for-resources/create-for-resources.cjs +1 -1
- package/dist/create-config/for-resources/create-for-resources.mjs +1 -1
- package/dist/create-config/index.d.cts +2 -1
- package/dist/create-config/index.d.mts +2 -1
- package/dist/create-config/shell-context.cjs +22 -0
- package/dist/create-config/shell-context.cjs.map +1 -0
- package/dist/create-config/shell-context.d.cts +18 -0
- package/dist/create-config/shell-context.d.cts.map +1 -0
- package/dist/create-config/shell-context.d.mts +18 -0
- package/dist/create-config/shell-context.d.mts.map +1 -0
- package/dist/create-config/shell-context.mjs +21 -0
- package/dist/create-config/shell-context.mjs.map +1 -0
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/resource.d.mts +1 -1
- package/package.json +1 -1
- package/skills/build-react-layouts/SKILL.md +4 -0
- package/skills/build-react-layouts/references/architecture.md +92 -0
|
@@ -7,7 +7,7 @@ import { CreateResourceLinksFn } from "./create-resource-links.cjs";
|
|
|
7
7
|
import { CreateLayoutForResource, CreateResourceLayoutOptions, CreateResourceLayoutOptionsBase } from "./for-resource.cjs";
|
|
8
8
|
import { CreateResourceLayoutForResourcesFn } from "./for-resources/scoped-layout.cjs";
|
|
9
9
|
import { ComposableComponents, ComposableResourceLayout, CreateLayoutComposable, MakeComposable, RequiredPresetLayoutProps } from "@jfdevelops/react-layout-composables";
|
|
10
|
-
import { JSX } from "react";
|
|
10
|
+
import { JSX, ReactNode } from "react";
|
|
11
11
|
import { ResolveLayoutProps, ResolveProps } from "@jfdevelops/react-layout-validator";
|
|
12
12
|
|
|
13
13
|
//#region src/create-config/define-layout.d.ts
|
|
@@ -114,6 +114,29 @@ type LayoutRenderResourcesAccessor<Resources extends ReadonlyArray<ResourceDefin
|
|
|
114
114
|
/** The resource this layout instance is rendering for. */readonly current: LayoutResourceKey<Resources>;
|
|
115
115
|
};
|
|
116
116
|
type LayoutRenderComposables<Composables extends ComposableComponents> = [keyof Composables] extends [never] ? undefined : Composables;
|
|
117
|
+
/**
|
|
118
|
+
* The `layout` block of a {@link defineResourceLayout} call: the props, the
|
|
119
|
+
* composable map, and the render for a per-resource page component.
|
|
120
|
+
*
|
|
121
|
+
* Extracted so {@link defineResourceLayout.withLayout} can reuse the exact same
|
|
122
|
+
* shape while making `render` optional (see {@link ShellLayoutDefinition}).
|
|
123
|
+
*/
|
|
124
|
+
type LayoutDefinition<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Composables extends ComposableComponents, IncludeProps extends LayoutIncludeProps<Resources, Options, Composables>, CustomProps extends InPropsObject> = {
|
|
125
|
+
/**
|
|
126
|
+
* The props to pass to the layout.
|
|
127
|
+
*/
|
|
128
|
+
props?: LayoutProps<Resources, Options, Composables, IncludeProps, CustomProps>;
|
|
129
|
+
/**
|
|
130
|
+
* Components used to compose the layout. Invoked per layout instance with
|
|
131
|
+
* a scoped `create` that resolves composable `name` callbacks using the
|
|
132
|
+
* layout's `resource` and `name`.
|
|
133
|
+
*/
|
|
134
|
+
composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => Composables;
|
|
135
|
+
/**
|
|
136
|
+
* The render function for the layout.
|
|
137
|
+
*/
|
|
138
|
+
render: (props: LayoutRenderProps<Resources, Options, Composables, IncludeProps, CustomProps>, context: LayoutRenderContext<Resources, Composables>) => JSX.Element;
|
|
139
|
+
};
|
|
117
140
|
type CreateViewMapOptions<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources> = {}, Composables extends ComposableComponents = {}, IncludeProps extends LayoutIncludeProps<Resources, Options, Composables> = {}, CustomProps extends InPropsObject = {}> = {
|
|
118
141
|
/**
|
|
119
142
|
* An array of valid resource names to support. Nested sub-resource slugs that
|
|
@@ -124,22 +147,7 @@ type CreateViewMapOptions<Resources extends ReadonlyArray<ResourceDefinition>, O
|
|
|
124
147
|
* The options that are passed into the created resource layout.
|
|
125
148
|
*/
|
|
126
149
|
options?: Options;
|
|
127
|
-
layout:
|
|
128
|
-
/**
|
|
129
|
-
* The props to pass to the layout.
|
|
130
|
-
*/
|
|
131
|
-
props?: LayoutProps<Resources, Options, Composables, IncludeProps, CustomProps>;
|
|
132
|
-
/**
|
|
133
|
-
* Components used to compose the layout. Invoked per layout instance with
|
|
134
|
-
* a scoped `create` that resolves composable `name` callbacks using the
|
|
135
|
-
* layout's `resource` and `name`.
|
|
136
|
-
*/
|
|
137
|
-
composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => Composables;
|
|
138
|
-
/**
|
|
139
|
-
* The render function for the layout.
|
|
140
|
-
*/
|
|
141
|
-
render: (props: LayoutRenderProps<Resources, Options, Composables, IncludeProps, CustomProps>, context: LayoutRenderContext<Resources, Composables>) => JSX.Element;
|
|
142
|
-
};
|
|
150
|
+
layout: LayoutDefinition<Resources, Options, Composables, IncludeProps, CustomProps>;
|
|
143
151
|
};
|
|
144
152
|
type ResourceLayoutComposition<Name extends string, Composables extends ComposableComponents> = [keyof Composables] extends [never] ? {} : {
|
|
145
153
|
makeComposable: MakeComposable<Composables, Name>;
|
|
@@ -216,8 +224,156 @@ type DefineResourceLayout = DefineResourceLayoutFn & {
|
|
|
216
224
|
* (or `defineResourceLayout.forResources`) without an `as const` assertion.
|
|
217
225
|
*/
|
|
218
226
|
defineResources: DefineResourcesFn;
|
|
227
|
+
/**
|
|
228
|
+
* Like {@link defineResourceLayout}, but also returns a `Shell` component.
|
|
229
|
+
*
|
|
230
|
+
* With plain `defineResourceLayout`, every page is wrapped in its own
|
|
231
|
+
* `createResourceLayout` component, so navigating between resources unmounts
|
|
232
|
+
* one page component and mounts another — the shared chrome the `render`
|
|
233
|
+
* produces (a sidebar, a header, subscriptions, observers) is rebuilt every
|
|
234
|
+
* time. `withLayout` splits that chrome into a `shell` that mounts once,
|
|
235
|
+
* above the router outlet, and stays mounted across navigation; pages mount
|
|
236
|
+
* and unmount inside it and report their resource up automatically.
|
|
237
|
+
*/
|
|
238
|
+
withLayout: DefineResourceLayoutWithLayoutFn;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Render context passed as the second argument to
|
|
242
|
+
* {@link ShellLayoutDefinition.render}.
|
|
243
|
+
*
|
|
244
|
+
* The same shape as a per-resource `render` context (`composables`,
|
|
245
|
+
* `resources`, `name`, `inProps`), with two differences that follow from the
|
|
246
|
+
* shell being mounted once above the router outlet rather than per page:
|
|
247
|
+
*
|
|
248
|
+
* - `resource` / `resources.current` are `LayoutResourceKey | undefined`. The
|
|
249
|
+
* shell outlives any single page, so the current resource is whatever the
|
|
250
|
+
* mounted page last reported (or the `resource` prop, or nothing yet).
|
|
251
|
+
* - `children` is the shell's content region. Render it where page content
|
|
252
|
+
* belongs; it is already wrapped so mounted pages report their resource back.
|
|
253
|
+
*/
|
|
254
|
+
type ShellRenderContext<Resources extends ReadonlyArray<ResourceDefinition>, ShellComposables extends ComposableComponents> = {
|
|
255
|
+
composables: LayoutRenderComposables<ShellComposables>;
|
|
256
|
+
inProps: Record<string, unknown>;
|
|
257
|
+
/**
|
|
258
|
+
* The resource currently rendered in the outlet, or `undefined` when no
|
|
259
|
+
* per-resource page is mounted and no `resource` prop was passed.
|
|
260
|
+
*/
|
|
261
|
+
resource: LayoutResourceKey<Resources> | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* Resources accessor for this definition. `current` follows `resource` above
|
|
264
|
+
* and may be `undefined`.
|
|
265
|
+
*/
|
|
266
|
+
resources: LayoutResourcesAccessor<Resources> & {
|
|
267
|
+
readonly current: LayoutResourceKey<Resources> | undefined;
|
|
268
|
+
};
|
|
269
|
+
name: string;
|
|
270
|
+
/**
|
|
271
|
+
* The shell's content region — typically a router `<Outlet />`. Render it
|
|
272
|
+
* where page content belongs.
|
|
273
|
+
*/
|
|
274
|
+
children: ReactNode;
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* The `shell` block of a {@link defineResourceLayout.withLayout} call: the
|
|
278
|
+
* chrome that mounts once and stays mounted while pages navigate inside it.
|
|
279
|
+
*
|
|
280
|
+
* Mirrors {@link LayoutDefinition} (`props`, `composables`, `render`) so the
|
|
281
|
+
* two blocks read the same, plus an optional `name`.
|
|
282
|
+
*/
|
|
283
|
+
type ShellLayoutDefinition<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, ShellComposables extends ComposableComponents, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables>, ShellCustomProps extends InPropsObject> = {
|
|
284
|
+
/**
|
|
285
|
+
* Stable name for the shell component (React DevTools) and the base for any
|
|
286
|
+
* resource-scoped composable names. Defaults to `'ResourceLayoutShell'`.
|
|
287
|
+
*/
|
|
288
|
+
name?: string;
|
|
289
|
+
props?: LayoutProps<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>;
|
|
290
|
+
composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => ShellComposables;
|
|
291
|
+
render: (props: LayoutRenderProps<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>, context: ShellRenderContext<Resources, ShellComposables>) => JSX.Element;
|
|
219
292
|
};
|
|
293
|
+
/**
|
|
294
|
+
* Props accepted by the `Shell` component from
|
|
295
|
+
* {@link defineResourceLayout.withLayout}.
|
|
296
|
+
*/
|
|
297
|
+
type ResourceLayoutShellProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, ShellComposables extends ComposableComponents, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables>, ShellCustomProps extends InPropsObject> = Show<ResolveProps<ShellCustomProps> & ResolvedIncludedComponentProps<MergedLayoutInProps<Resources, Options, ShellComposables>, ShellIncludeProps> & {
|
|
298
|
+
/**
|
|
299
|
+
* The resource the shell renders for. Overrides the value reported by the
|
|
300
|
+
* page mounted in `children`. Always available — pass it from tests,
|
|
301
|
+
* stories, or a route that renders non-library content but still wants
|
|
302
|
+
* the shell.
|
|
303
|
+
*/
|
|
304
|
+
resource?: LayoutResourceKey<Resources>; /** The shell's content region — typically a router `<Outlet />`. */
|
|
305
|
+
children: ReactNode;
|
|
306
|
+
}>;
|
|
307
|
+
/**
|
|
308
|
+
* The once-mounted application shell returned from
|
|
309
|
+
* {@link defineResourceLayout.withLayout}. Wrap the router outlet with it.
|
|
310
|
+
*/
|
|
311
|
+
type ResourceLayoutShellComponent<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, ShellComposables extends ComposableComponents = {}, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables> = {}, ShellCustomProps extends InPropsObject = {}> = BaseComponent<string, ResourceLayoutShellProps<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>> & {
|
|
312
|
+
(props: ResourceLayoutShellProps<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>): JSX.Element;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Options for {@link defineResourceLayout.withLayout}: everything
|
|
316
|
+
* {@link defineResourceLayout} accepts, plus a required `shell`, and with the
|
|
317
|
+
* per-resource `layout.render` made optional.
|
|
318
|
+
*/
|
|
319
|
+
type CreateResourceLayoutWithLayoutOptions<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources> = {}, Composables extends ComposableComponents = {}, IncludeProps extends LayoutIncludeProps<Resources, Options, Composables> = {}, CustomProps extends InPropsObject = {}, ShellComposables extends ComposableComponents = {}, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables> = {}, ShellCustomProps extends InPropsObject = {}> = {
|
|
320
|
+
/**
|
|
321
|
+
* An array of valid resource names to support. Nested sub-resource slugs that
|
|
322
|
+
* collide with config keys (`component`, `detail`, `new`, …) are reserved.
|
|
323
|
+
*/
|
|
324
|
+
resources: AssertUnreservedResources<Resources>;
|
|
325
|
+
/**
|
|
326
|
+
* The options that are passed into the created resource layout. Shared by the
|
|
327
|
+
* shell and the per-resource layout, so an `include` on either side can draw
|
|
328
|
+
* from the same definitions.
|
|
329
|
+
*/
|
|
330
|
+
options?: Options;
|
|
331
|
+
/**
|
|
332
|
+
* The once-mounted shell. The returned `Shell` wraps the router outlet and
|
|
333
|
+
* stays mounted across resource navigation, so its composables (a persistent
|
|
334
|
+
* sidebar, header, breadcrumb container, …) keep their state and DOM while
|
|
335
|
+
* pages mount and unmount inside it.
|
|
336
|
+
*/
|
|
337
|
+
shell: ShellLayoutDefinition<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>;
|
|
338
|
+
/**
|
|
339
|
+
* Per-resource content. Optional here: when the shell renders the whole
|
|
340
|
+
* chrome, a page is just a slot — omit `render` and the generated component
|
|
341
|
+
* renders its own `children` into the shell's outlet. Provide it to give a
|
|
342
|
+
* resource its own header, actions, or per-page structure.
|
|
343
|
+
*/
|
|
344
|
+
layout?: Omit<LayoutDefinition<Resources, Options, Composables, IncludeProps, CustomProps>, 'render'> & {
|
|
345
|
+
render?: LayoutDefinition<Resources, Options, Composables, IncludeProps, CustomProps>['render'];
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* {@link DefinedResourceLayout} plus the once-mounted `Shell`.
|
|
350
|
+
*/
|
|
351
|
+
type DefinedResourceLayoutWithShell<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Composables extends ComposableComponents = {}, IncludeProps extends LayoutIncludeProps<Resources, Options, Composables> = {}, CustomProps extends InPropsObject = {}, ShellComposables extends ComposableComponents = {}, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables> = {}, ShellCustomProps extends InPropsObject = {}> = DefinedResourceLayout<Resources, Options, Composables, IncludeProps, CustomProps> & {
|
|
352
|
+
/**
|
|
353
|
+
* The application shell. Mount it once, wrapping the router outlet:
|
|
354
|
+
*
|
|
355
|
+
* ```tsx
|
|
356
|
+
* function AdminRoute() {
|
|
357
|
+
* const resource = Route.useParams({ select: (p) => p.resource });
|
|
358
|
+
* return (
|
|
359
|
+
* <Shell resource={resource}>
|
|
360
|
+
* <Outlet />
|
|
361
|
+
* </Shell>
|
|
362
|
+
* );
|
|
363
|
+
* }
|
|
364
|
+
* ```
|
|
365
|
+
*
|
|
366
|
+
* Passing `resource` is optional: a page created by `createResourceLayout`
|
|
367
|
+
* reports its own resource to the shell automatically. Pass it for routes
|
|
368
|
+
* that render non-library content, or in tests and stories.
|
|
369
|
+
*/
|
|
370
|
+
Shell: ResourceLayoutShellComponent<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>;
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Signature of {@link defineResourceLayout.withLayout}.
|
|
374
|
+
*/
|
|
375
|
+
type DefineResourceLayoutWithLayoutFn = <const Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources> = {}, Composables extends ComposableComponents = {}, const IncludeProps extends LayoutIncludeProps<Resources, Options, Composables> = {}, CustomProps extends InPropsObject = {}, ShellComposables extends ComposableComponents = {}, const ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables> = {}, ShellCustomProps extends InPropsObject = {}>(options: CreateResourceLayoutWithLayoutOptions<Resources, Options, Composables, IncludeProps, CustomProps, ShellComposables, ShellIncludeProps, ShellCustomProps>) => DefinedResourceLayoutWithShell<Resources, Options, Composables, IncludeProps, CustomProps, ShellComposables, ShellIncludeProps, ShellCustomProps>;
|
|
220
376
|
declare const defineResourceLayout: DefineResourceLayout;
|
|
221
377
|
//#endregion
|
|
222
|
-
export { CreateResourceLayoutFn, CreateResourceLayoutMakeComposableOptions, DefineResourceLayout, DefineResourceLayoutFn, DefineResourceLayoutForResources, DefineResourceLayoutForResourcesFactory, DefineResourcesFn, LayoutIncludeProps, LayoutProps, LayoutPropsForResource, LayoutRenderResourcesAccessor, LayoutResourcesAccessor, ResourceLayoutComponent, ResourceSelection, defineResourceLayout };
|
|
378
|
+
export { CreateResourceLayoutFn, CreateResourceLayoutMakeComposableOptions, CreateResourceLayoutWithLayoutOptions, DefineResourceLayout, DefineResourceLayoutFn, DefineResourceLayoutForResources, DefineResourceLayoutForResourcesFactory, DefineResourceLayoutWithLayoutFn, DefineResourcesFn, DefinedResourceLayoutWithShell, LayoutIncludeProps, LayoutProps, LayoutPropsForResource, LayoutRenderResourcesAccessor, LayoutResourcesAccessor, ResourceLayoutComponent, ResourceLayoutShellComponent, ResourceLayoutShellProps, ResourceSelection, ShellLayoutDefinition, ShellRenderContext, defineResourceLayout };
|
|
223
379
|
//# sourceMappingURL=define-layout.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-layout.d.cts","names":[],"sources":["../../src/create-config/define-layout.tsx"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"define-layout.d.cts","names":[],"sources":["../../src/create-config/define-layout.tsx"],"mappings":";;;;;;;;;;;;;KAgFY,kBAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,IAClB,aAAA,CAAc,mBAAA,CAAoB,SAAA,EAAW,OAAA,EAAS,WAAA;AAAA,KAE9C,WAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,uBACC,kBAAA,CAAmB,SAAA,EAAW,OAAA,EAAS,WAAA,4BACxC,aAAA;;AAXtB;;EAgBE,OAAA,GAAU,kBAAA,CAAmB,SAAA,EAAW,OAAA,EAAS,WAAA,IAAe,YA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CACK,oBAAA,uCACO,kBAAA,CAC9B,SAAA,EACA,OAAA,EACA,gBAAA,iCAEuB,aAAA,OAEzB,OAAA,EAAS,qCAAA,CACP,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,WAAA,EACA,gBAAA,EACA,iBAAA,EACA,gBAAA,MAEC,8BAAA,CACH,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,WAAA,EACA,gBAAA,EACA,iBAAA,EACA,gBAAA;AAAA,cA2aW,oBAAA,EAAsB,oBAQlC"}
|
|
@@ -7,8 +7,8 @@ import { CreateResourceLinksFn } from "./create-resource-links.mjs";
|
|
|
7
7
|
import { CreateLayoutForResource, CreateResourceLayoutOptions, CreateResourceLayoutOptionsBase } from "./for-resource.mjs";
|
|
8
8
|
import { CreateResourceLayoutForResourcesFn } from "./for-resources/scoped-layout.mjs";
|
|
9
9
|
import { ComposableComponents, ComposableResourceLayout, CreateLayoutComposable, MakeComposable, RequiredPresetLayoutProps } from "@jfdevelops/react-layout-composables";
|
|
10
|
+
import { JSX, ReactNode } from "react";
|
|
10
11
|
import { ResolveLayoutProps, ResolveProps } from "@jfdevelops/react-layout-validator";
|
|
11
|
-
import { JSX } from "react";
|
|
12
12
|
|
|
13
13
|
//#region src/create-config/define-layout.d.ts
|
|
14
14
|
type LayoutIncludeProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Composables extends ComposableComponents> = IncludedProps<MergedLayoutInProps<Resources, Options, Composables>>;
|
|
@@ -114,6 +114,29 @@ type LayoutRenderResourcesAccessor<Resources extends ReadonlyArray<ResourceDefin
|
|
|
114
114
|
/** The resource this layout instance is rendering for. */readonly current: LayoutResourceKey<Resources>;
|
|
115
115
|
};
|
|
116
116
|
type LayoutRenderComposables<Composables extends ComposableComponents> = [keyof Composables] extends [never] ? undefined : Composables;
|
|
117
|
+
/**
|
|
118
|
+
* The `layout` block of a {@link defineResourceLayout} call: the props, the
|
|
119
|
+
* composable map, and the render for a per-resource page component.
|
|
120
|
+
*
|
|
121
|
+
* Extracted so {@link defineResourceLayout.withLayout} can reuse the exact same
|
|
122
|
+
* shape while making `render` optional (see {@link ShellLayoutDefinition}).
|
|
123
|
+
*/
|
|
124
|
+
type LayoutDefinition<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Composables extends ComposableComponents, IncludeProps extends LayoutIncludeProps<Resources, Options, Composables>, CustomProps extends InPropsObject> = {
|
|
125
|
+
/**
|
|
126
|
+
* The props to pass to the layout.
|
|
127
|
+
*/
|
|
128
|
+
props?: LayoutProps<Resources, Options, Composables, IncludeProps, CustomProps>;
|
|
129
|
+
/**
|
|
130
|
+
* Components used to compose the layout. Invoked per layout instance with
|
|
131
|
+
* a scoped `create` that resolves composable `name` callbacks using the
|
|
132
|
+
* layout's `resource` and `name`.
|
|
133
|
+
*/
|
|
134
|
+
composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => Composables;
|
|
135
|
+
/**
|
|
136
|
+
* The render function for the layout.
|
|
137
|
+
*/
|
|
138
|
+
render: (props: LayoutRenderProps<Resources, Options, Composables, IncludeProps, CustomProps>, context: LayoutRenderContext<Resources, Composables>) => JSX.Element;
|
|
139
|
+
};
|
|
117
140
|
type CreateViewMapOptions<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources> = {}, Composables extends ComposableComponents = {}, IncludeProps extends LayoutIncludeProps<Resources, Options, Composables> = {}, CustomProps extends InPropsObject = {}> = {
|
|
118
141
|
/**
|
|
119
142
|
* An array of valid resource names to support. Nested sub-resource slugs that
|
|
@@ -124,22 +147,7 @@ type CreateViewMapOptions<Resources extends ReadonlyArray<ResourceDefinition>, O
|
|
|
124
147
|
* The options that are passed into the created resource layout.
|
|
125
148
|
*/
|
|
126
149
|
options?: Options;
|
|
127
|
-
layout:
|
|
128
|
-
/**
|
|
129
|
-
* The props to pass to the layout.
|
|
130
|
-
*/
|
|
131
|
-
props?: LayoutProps<Resources, Options, Composables, IncludeProps, CustomProps>;
|
|
132
|
-
/**
|
|
133
|
-
* Components used to compose the layout. Invoked per layout instance with
|
|
134
|
-
* a scoped `create` that resolves composable `name` callbacks using the
|
|
135
|
-
* layout's `resource` and `name`.
|
|
136
|
-
*/
|
|
137
|
-
composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => Composables;
|
|
138
|
-
/**
|
|
139
|
-
* The render function for the layout.
|
|
140
|
-
*/
|
|
141
|
-
render: (props: LayoutRenderProps<Resources, Options, Composables, IncludeProps, CustomProps>, context: LayoutRenderContext<Resources, Composables>) => JSX.Element;
|
|
142
|
-
};
|
|
150
|
+
layout: LayoutDefinition<Resources, Options, Composables, IncludeProps, CustomProps>;
|
|
143
151
|
};
|
|
144
152
|
type ResourceLayoutComposition<Name extends string, Composables extends ComposableComponents> = [keyof Composables] extends [never] ? {} : {
|
|
145
153
|
makeComposable: MakeComposable<Composables, Name>;
|
|
@@ -216,8 +224,156 @@ type DefineResourceLayout = DefineResourceLayoutFn & {
|
|
|
216
224
|
* (or `defineResourceLayout.forResources`) without an `as const` assertion.
|
|
217
225
|
*/
|
|
218
226
|
defineResources: DefineResourcesFn;
|
|
227
|
+
/**
|
|
228
|
+
* Like {@link defineResourceLayout}, but also returns a `Shell` component.
|
|
229
|
+
*
|
|
230
|
+
* With plain `defineResourceLayout`, every page is wrapped in its own
|
|
231
|
+
* `createResourceLayout` component, so navigating between resources unmounts
|
|
232
|
+
* one page component and mounts another — the shared chrome the `render`
|
|
233
|
+
* produces (a sidebar, a header, subscriptions, observers) is rebuilt every
|
|
234
|
+
* time. `withLayout` splits that chrome into a `shell` that mounts once,
|
|
235
|
+
* above the router outlet, and stays mounted across navigation; pages mount
|
|
236
|
+
* and unmount inside it and report their resource up automatically.
|
|
237
|
+
*/
|
|
238
|
+
withLayout: DefineResourceLayoutWithLayoutFn;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Render context passed as the second argument to
|
|
242
|
+
* {@link ShellLayoutDefinition.render}.
|
|
243
|
+
*
|
|
244
|
+
* The same shape as a per-resource `render` context (`composables`,
|
|
245
|
+
* `resources`, `name`, `inProps`), with two differences that follow from the
|
|
246
|
+
* shell being mounted once above the router outlet rather than per page:
|
|
247
|
+
*
|
|
248
|
+
* - `resource` / `resources.current` are `LayoutResourceKey | undefined`. The
|
|
249
|
+
* shell outlives any single page, so the current resource is whatever the
|
|
250
|
+
* mounted page last reported (or the `resource` prop, or nothing yet).
|
|
251
|
+
* - `children` is the shell's content region. Render it where page content
|
|
252
|
+
* belongs; it is already wrapped so mounted pages report their resource back.
|
|
253
|
+
*/
|
|
254
|
+
type ShellRenderContext<Resources extends ReadonlyArray<ResourceDefinition>, ShellComposables extends ComposableComponents> = {
|
|
255
|
+
composables: LayoutRenderComposables<ShellComposables>;
|
|
256
|
+
inProps: Record<string, unknown>;
|
|
257
|
+
/**
|
|
258
|
+
* The resource currently rendered in the outlet, or `undefined` when no
|
|
259
|
+
* per-resource page is mounted and no `resource` prop was passed.
|
|
260
|
+
*/
|
|
261
|
+
resource: LayoutResourceKey<Resources> | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* Resources accessor for this definition. `current` follows `resource` above
|
|
264
|
+
* and may be `undefined`.
|
|
265
|
+
*/
|
|
266
|
+
resources: LayoutResourcesAccessor<Resources> & {
|
|
267
|
+
readonly current: LayoutResourceKey<Resources> | undefined;
|
|
268
|
+
};
|
|
269
|
+
name: string;
|
|
270
|
+
/**
|
|
271
|
+
* The shell's content region — typically a router `<Outlet />`. Render it
|
|
272
|
+
* where page content belongs.
|
|
273
|
+
*/
|
|
274
|
+
children: ReactNode;
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* The `shell` block of a {@link defineResourceLayout.withLayout} call: the
|
|
278
|
+
* chrome that mounts once and stays mounted while pages navigate inside it.
|
|
279
|
+
*
|
|
280
|
+
* Mirrors {@link LayoutDefinition} (`props`, `composables`, `render`) so the
|
|
281
|
+
* two blocks read the same, plus an optional `name`.
|
|
282
|
+
*/
|
|
283
|
+
type ShellLayoutDefinition<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, ShellComposables extends ComposableComponents, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables>, ShellCustomProps extends InPropsObject> = {
|
|
284
|
+
/**
|
|
285
|
+
* Stable name for the shell component (React DevTools) and the base for any
|
|
286
|
+
* resource-scoped composable names. Defaults to `'ResourceLayoutShell'`.
|
|
287
|
+
*/
|
|
288
|
+
name?: string;
|
|
289
|
+
props?: LayoutProps<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>;
|
|
290
|
+
composables?: (create: CreateLayoutComposable<LayoutResourceKey<Resources>>) => ShellComposables;
|
|
291
|
+
render: (props: LayoutRenderProps<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>, context: ShellRenderContext<Resources, ShellComposables>) => JSX.Element;
|
|
219
292
|
};
|
|
293
|
+
/**
|
|
294
|
+
* Props accepted by the `Shell` component from
|
|
295
|
+
* {@link defineResourceLayout.withLayout}.
|
|
296
|
+
*/
|
|
297
|
+
type ResourceLayoutShellProps<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, ShellComposables extends ComposableComponents, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables>, ShellCustomProps extends InPropsObject> = Show<ResolveProps<ShellCustomProps> & ResolvedIncludedComponentProps<MergedLayoutInProps<Resources, Options, ShellComposables>, ShellIncludeProps> & {
|
|
298
|
+
/**
|
|
299
|
+
* The resource the shell renders for. Overrides the value reported by the
|
|
300
|
+
* page mounted in `children`. Always available — pass it from tests,
|
|
301
|
+
* stories, or a route that renders non-library content but still wants
|
|
302
|
+
* the shell.
|
|
303
|
+
*/
|
|
304
|
+
resource?: LayoutResourceKey<Resources>; /** The shell's content region — typically a router `<Outlet />`. */
|
|
305
|
+
children: ReactNode;
|
|
306
|
+
}>;
|
|
307
|
+
/**
|
|
308
|
+
* The once-mounted application shell returned from
|
|
309
|
+
* {@link defineResourceLayout.withLayout}. Wrap the router outlet with it.
|
|
310
|
+
*/
|
|
311
|
+
type ResourceLayoutShellComponent<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, ShellComposables extends ComposableComponents = {}, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables> = {}, ShellCustomProps extends InPropsObject = {}> = BaseComponent<string, ResourceLayoutShellProps<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>> & {
|
|
312
|
+
(props: ResourceLayoutShellProps<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>): JSX.Element;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Options for {@link defineResourceLayout.withLayout}: everything
|
|
316
|
+
* {@link defineResourceLayout} accepts, plus a required `shell`, and with the
|
|
317
|
+
* per-resource `layout.render` made optional.
|
|
318
|
+
*/
|
|
319
|
+
type CreateResourceLayoutWithLayoutOptions<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources> = {}, Composables extends ComposableComponents = {}, IncludeProps extends LayoutIncludeProps<Resources, Options, Composables> = {}, CustomProps extends InPropsObject = {}, ShellComposables extends ComposableComponents = {}, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables> = {}, ShellCustomProps extends InPropsObject = {}> = {
|
|
320
|
+
/**
|
|
321
|
+
* An array of valid resource names to support. Nested sub-resource slugs that
|
|
322
|
+
* collide with config keys (`component`, `detail`, `new`, …) are reserved.
|
|
323
|
+
*/
|
|
324
|
+
resources: AssertUnreservedResources<Resources>;
|
|
325
|
+
/**
|
|
326
|
+
* The options that are passed into the created resource layout. Shared by the
|
|
327
|
+
* shell and the per-resource layout, so an `include` on either side can draw
|
|
328
|
+
* from the same definitions.
|
|
329
|
+
*/
|
|
330
|
+
options?: Options;
|
|
331
|
+
/**
|
|
332
|
+
* The once-mounted shell. The returned `Shell` wraps the router outlet and
|
|
333
|
+
* stays mounted across resource navigation, so its composables (a persistent
|
|
334
|
+
* sidebar, header, breadcrumb container, …) keep their state and DOM while
|
|
335
|
+
* pages mount and unmount inside it.
|
|
336
|
+
*/
|
|
337
|
+
shell: ShellLayoutDefinition<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>;
|
|
338
|
+
/**
|
|
339
|
+
* Per-resource content. Optional here: when the shell renders the whole
|
|
340
|
+
* chrome, a page is just a slot — omit `render` and the generated component
|
|
341
|
+
* renders its own `children` into the shell's outlet. Provide it to give a
|
|
342
|
+
* resource its own header, actions, or per-page structure.
|
|
343
|
+
*/
|
|
344
|
+
layout?: Omit<LayoutDefinition<Resources, Options, Composables, IncludeProps, CustomProps>, 'render'> & {
|
|
345
|
+
render?: LayoutDefinition<Resources, Options, Composables, IncludeProps, CustomProps>['render'];
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* {@link DefinedResourceLayout} plus the once-mounted `Shell`.
|
|
350
|
+
*/
|
|
351
|
+
type DefinedResourceLayoutWithShell<Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources>, Composables extends ComposableComponents = {}, IncludeProps extends LayoutIncludeProps<Resources, Options, Composables> = {}, CustomProps extends InPropsObject = {}, ShellComposables extends ComposableComponents = {}, ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables> = {}, ShellCustomProps extends InPropsObject = {}> = DefinedResourceLayout<Resources, Options, Composables, IncludeProps, CustomProps> & {
|
|
352
|
+
/**
|
|
353
|
+
* The application shell. Mount it once, wrapping the router outlet:
|
|
354
|
+
*
|
|
355
|
+
* ```tsx
|
|
356
|
+
* function AdminRoute() {
|
|
357
|
+
* const resource = Route.useParams({ select: (p) => p.resource });
|
|
358
|
+
* return (
|
|
359
|
+
* <Shell resource={resource}>
|
|
360
|
+
* <Outlet />
|
|
361
|
+
* </Shell>
|
|
362
|
+
* );
|
|
363
|
+
* }
|
|
364
|
+
* ```
|
|
365
|
+
*
|
|
366
|
+
* Passing `resource` is optional: a page created by `createResourceLayout`
|
|
367
|
+
* reports its own resource to the shell automatically. Pass it for routes
|
|
368
|
+
* that render non-library content, or in tests and stories.
|
|
369
|
+
*/
|
|
370
|
+
Shell: ResourceLayoutShellComponent<Resources, Options, ShellComposables, ShellIncludeProps, ShellCustomProps>;
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Signature of {@link defineResourceLayout.withLayout}.
|
|
374
|
+
*/
|
|
375
|
+
type DefineResourceLayoutWithLayoutFn = <const Resources extends ReadonlyArray<ResourceDefinition>, Options extends InPropsDefinition<Resources> = {}, Composables extends ComposableComponents = {}, const IncludeProps extends LayoutIncludeProps<Resources, Options, Composables> = {}, CustomProps extends InPropsObject = {}, ShellComposables extends ComposableComponents = {}, const ShellIncludeProps extends LayoutIncludeProps<Resources, Options, ShellComposables> = {}, ShellCustomProps extends InPropsObject = {}>(options: CreateResourceLayoutWithLayoutOptions<Resources, Options, Composables, IncludeProps, CustomProps, ShellComposables, ShellIncludeProps, ShellCustomProps>) => DefinedResourceLayoutWithShell<Resources, Options, Composables, IncludeProps, CustomProps, ShellComposables, ShellIncludeProps, ShellCustomProps>;
|
|
220
376
|
declare const defineResourceLayout: DefineResourceLayout;
|
|
221
377
|
//#endregion
|
|
222
|
-
export { CreateResourceLayoutFn, CreateResourceLayoutMakeComposableOptions, DefineResourceLayout, DefineResourceLayoutFn, DefineResourceLayoutForResources, DefineResourceLayoutForResourcesFactory, DefineResourcesFn, LayoutIncludeProps, LayoutProps, LayoutPropsForResource, LayoutRenderResourcesAccessor, LayoutResourcesAccessor, ResourceLayoutComponent, ResourceSelection, defineResourceLayout };
|
|
378
|
+
export { CreateResourceLayoutFn, CreateResourceLayoutMakeComposableOptions, CreateResourceLayoutWithLayoutOptions, DefineResourceLayout, DefineResourceLayoutFn, DefineResourceLayoutForResources, DefineResourceLayoutForResourcesFactory, DefineResourceLayoutWithLayoutFn, DefineResourcesFn, DefinedResourceLayoutWithShell, LayoutIncludeProps, LayoutProps, LayoutPropsForResource, LayoutRenderResourcesAccessor, LayoutResourcesAccessor, ResourceLayoutComponent, ResourceLayoutShellComponent, ResourceLayoutShellProps, ResourceSelection, ShellLayoutDefinition, ShellRenderContext, defineResourceLayout };
|
|
223
379
|
//# sourceMappingURL=define-layout.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-layout.d.mts","names":[],"sources":["../../src/create-config/define-layout.tsx"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"define-layout.d.mts","names":[],"sources":["../../src/create-config/define-layout.tsx"],"mappings":";;;;;;;;;;;;;KAgFY,kBAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,IAClB,aAAA,CAAc,mBAAA,CAAoB,SAAA,EAAW,OAAA,EAAS,WAAA;AAAA,KAE9C,WAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,uBACC,kBAAA,CAAmB,SAAA,EAAW,OAAA,EAAS,WAAA,4BACxC,aAAA;;AAXtB;;EAgBE,OAAA,GAAU,kBAAA,CAAmB,SAAA,EAAW,OAAA,EAAS,WAAA,IAAe,YAAA;EAfhC;;;EAmBhC,MAAA,GAAS,WAAA;AAAA;AAAA,KAGN,mBAAA,mBACe,aAAA,CAAc,kBAAA,uBACZ,oBAAA;EAEpB,WAAA,EAAa,uBAAA,CAAwB,WAAA;EACrC,OAAA,EAAS,MAAA;EAxBO;;;;EA6BhB,QAAA,EAAU,iBAAA,CAAkB,SAAA;EAhCV;;;;;;EAuClB,SAAA,EAAW,6BAAA,CAA8B,SAAA;EACzC,IAAA;AAAA;;;;;AArCmE;AAErE;KA4CK,sBAAA,oCAGD,UAAA,SAAmB,kBAAA,kBACJ,uBAAA,CAAwB,UAAA,IACrC,UAAA,GACA,uBAAA,CAAwB,UAAA,UAAoB,IAAA,GAC1C,UAAA;A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