@uniformdev/next-app-router 20.75.1-alpha.16 → 20.76.1-alpha.3
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/{UniformComposition-BWxMuY7i.d.ts → UniformComposition-Ck7mRTp-.d.ts} +5 -0
- package/dist/{UniformComposition-Bo6UsTDC.d.mts → UniformComposition-CpEVJ-SR.d.mts} +5 -0
- package/dist/cache.js +3 -1
- package/dist/cache.mjs +3 -1
- package/dist/compat.d.mts +1 -1
- package/dist/compat.d.ts +1 -1
- package/dist/component.d.mts +2 -2
- package/dist/component.d.ts +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +3241 -485
- package/dist/index.js +3249 -496
- package/dist/index.mjs +3241 -485
- package/dist/middleware.js +172 -213
- package/dist/middleware.mjs +169 -210
- package/package.json +8 -8
|
@@ -63,6 +63,11 @@ type UniformCompositionProps = {
|
|
|
63
63
|
resolveComponent: ResolveComponentFunction;
|
|
64
64
|
/**
|
|
65
65
|
* If provided, the composition will use the data client to retrieve data.
|
|
66
|
+
*
|
|
67
|
+
* Pass the same client here that you pass to `handleUniformRoute`. Without it, this component
|
|
68
|
+
* falls back to `DefaultDataClient` for the route it resolves and, on draft requests,
|
|
69
|
+
* for the manifest it evaluates personalization against - so a custom manifest source
|
|
70
|
+
* configured only on the middleware would not apply while the page renders.
|
|
66
71
|
*/
|
|
67
72
|
dataClient?: DataClient;
|
|
68
73
|
/**
|
|
@@ -63,6 +63,11 @@ type UniformCompositionProps = {
|
|
|
63
63
|
resolveComponent: ResolveComponentFunction;
|
|
64
64
|
/**
|
|
65
65
|
* If provided, the composition will use the data client to retrieve data.
|
|
66
|
+
*
|
|
67
|
+
* Pass the same client here that you pass to `handleUniformRoute`. Without it, this component
|
|
68
|
+
* falls back to `DefaultDataClient` for the route it resolves and, on draft requests,
|
|
69
|
+
* for the manifest it evaluates personalization against - so a custom manifest source
|
|
70
|
+
* configured only on the middleware would not apply while the page renders.
|
|
66
71
|
*/
|
|
67
72
|
dataClient?: DataClient;
|
|
68
73
|
/**
|
package/dist/cache.js
CHANGED
|
@@ -2039,7 +2039,9 @@ var DefaultDataClient = class {
|
|
|
2039
2039
|
source: "middleware",
|
|
2040
2040
|
route: options.route,
|
|
2041
2041
|
routeClient,
|
|
2042
|
-
|
|
2042
|
+
// The runtime cache is keyed on the route path. Development bypasses it so an author sees
|
|
2043
|
+
// an edit right away, the same way the fetch cache is bypassed for development.
|
|
2044
|
+
enableRuntimeCache: options.route.state === CANVAS_PUBLISHED_STATE && getMiddlewareRuntimeCache() && !isDevelopmentEnvironment(),
|
|
2043
2045
|
disableSwrCache: getDisableSwrMiddlewareCache()
|
|
2044
2046
|
});
|
|
2045
2047
|
if (resolvedRoute.type === "composition") {
|
package/dist/cache.mjs
CHANGED
|
@@ -2026,7 +2026,9 @@ var DefaultDataClient = class {
|
|
|
2026
2026
|
source: "middleware",
|
|
2027
2027
|
route: options.route,
|
|
2028
2028
|
routeClient,
|
|
2029
|
-
|
|
2029
|
+
// The runtime cache is keyed on the route path. Development bypasses it so an author sees
|
|
2030
|
+
// an edit right away, the same way the fetch cache is bypassed for development.
|
|
2031
|
+
enableRuntimeCache: options.route.state === CANVAS_PUBLISHED_STATE && getMiddlewareRuntimeCache() && !isDevelopmentEnvironment(),
|
|
2030
2032
|
disableSwrCache: getDisableSwrMiddlewareCache()
|
|
2031
2033
|
});
|
|
2032
2034
|
if (resolvedRoute.type === "composition") {
|
package/dist/compat.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ComponentType } from 'react';
|
|
2
2
|
import { ComponentProps as ComponentProps$1, ComponentParameter } from '@uniformdev/next-app-router-shared';
|
|
3
3
|
import { U as UniformTextProps$1 } from './UniformText-ChMwHBw4.mjs';
|
|
4
|
-
import { R as ResolveComponentResult, a as ResolveComponentFunction } from './UniformComposition-
|
|
4
|
+
import { R as ResolveComponentResult, a as ResolveComponentFunction } from './UniformComposition-CpEVJ-SR.mjs';
|
|
5
5
|
import '@uniformdev/next-app-router-client';
|
|
6
6
|
import '@uniformdev/canvas';
|
|
7
7
|
import './client-DRMp2gpi.mjs';
|
package/dist/compat.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ComponentType } from 'react';
|
|
2
2
|
import { ComponentProps as ComponentProps$1, ComponentParameter } from '@uniformdev/next-app-router-shared';
|
|
3
3
|
import { U as UniformTextProps$1 } from './UniformText-ChMwHBw4.js';
|
|
4
|
-
import { R as ResolveComponentResult, a as ResolveComponentFunction } from './UniformComposition-
|
|
4
|
+
import { R as ResolveComponentResult, a as ResolveComponentFunction } from './UniformComposition-Ck7mRTp-.js';
|
|
5
5
|
import '@uniformdev/next-app-router-client';
|
|
6
6
|
import '@uniformdev/canvas';
|
|
7
7
|
import './client-DRMp2gpi.js';
|
package/dist/component.d.mts
CHANGED
|
@@ -36,7 +36,7 @@ type RenderRichTextComponentResolver = (node: RichTextNode) => RichTextRendererC
|
|
|
36
36
|
declare const UniformRichText: React.ForwardRefExoticComponent<{
|
|
37
37
|
/**
|
|
38
38
|
* The name of the HTML tag to render.
|
|
39
|
-
* @
|
|
39
|
+
* @defaultValue "div"
|
|
40
40
|
*/
|
|
41
41
|
as?: React.ElementType;
|
|
42
42
|
/**
|
|
@@ -51,7 +51,7 @@ declare const UniformRichText: React.ForwardRefExoticComponent<{
|
|
|
51
51
|
/**
|
|
52
52
|
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
53
53
|
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
54
|
-
* @
|
|
54
|
+
* @defaultValue undefined
|
|
55
55
|
*/
|
|
56
56
|
placeholder?: string | ((parameter: {
|
|
57
57
|
id: string;
|
package/dist/component.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ type RenderRichTextComponentResolver = (node: RichTextNode) => RichTextRendererC
|
|
|
36
36
|
declare const UniformRichText: React.ForwardRefExoticComponent<{
|
|
37
37
|
/**
|
|
38
38
|
* The name of the HTML tag to render.
|
|
39
|
-
* @
|
|
39
|
+
* @defaultValue "div"
|
|
40
40
|
*/
|
|
41
41
|
as?: React.ElementType;
|
|
42
42
|
/**
|
|
@@ -51,7 +51,7 @@ declare const UniformRichText: React.ForwardRefExoticComponent<{
|
|
|
51
51
|
/**
|
|
52
52
|
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
53
53
|
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
54
|
-
* @
|
|
54
|
+
* @defaultValue undefined
|
|
55
55
|
*/
|
|
56
56
|
placeholder?: string | ((parameter: {
|
|
57
57
|
id: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ import { CanvasClient, CompositionDeliveryClient, RouteClient, ComponentInstance
|
|
|
2
2
|
import { CacheMode, CanvasCacheMode, ManifestCacheMode, ProjectMapCacheMode, RewriteRequestPathResult } from '@uniformdev/next-app-router-shared';
|
|
3
3
|
import { ManifestClient } from '@uniformdev/context/api';
|
|
4
4
|
import { ProjectMapClient } from '@uniformdev/project-map';
|
|
5
|
-
import { U as UniformCompositionProps } from './UniformComposition-
|
|
6
|
-
export { C as CompositionCache, a as ResolveComponentFunction, R as ResolveComponentResult, b as UniformComposition, c as createCompositionCache } from './UniformComposition-
|
|
5
|
+
import { U as UniformCompositionProps } from './UniformComposition-CpEVJ-SR.mjs';
|
|
6
|
+
export { C as CompositionCache, a as ResolveComponentFunction, R as ResolveComponentResult, b as UniformComposition, c as createCompositionCache } from './UniformComposition-CpEVJ-SR.mjs';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
export { D as DataClient, a as DefaultDataClient, E as EnhanceRouteOptions, G as GetRouteFromMiddlewareOptions, b as GetRouteFromPageStateOptions, c as GetRouteOptions, R as RewriteRouteOptions, d as RewriteRouteResult, e as expireMiddlewareCacheTag } from './client-DRMp2gpi.mjs';
|
|
9
9
|
import { a as ResolvedRouteResult } from './resolveRouteFromCode-C0dkUV2T.mjs';
|
|
@@ -249,12 +249,12 @@ type EvaluatePersonalizationsFunction = (personalization: {
|
|
|
249
249
|
type PrecomputeCompositionOptions = Pick<ResolvedRouteResult, 'pageState' | 'route'> & {
|
|
250
250
|
/**
|
|
251
251
|
* Whether to evaluate tests
|
|
252
|
-
* @
|
|
252
|
+
* @defaultValue true
|
|
253
253
|
*/
|
|
254
254
|
evaluateTests?: boolean | EvaluateTestsFunction;
|
|
255
255
|
/**
|
|
256
256
|
* Whether to evaluate personalizations
|
|
257
|
-
* @
|
|
257
|
+
* @defaultValue true
|
|
258
258
|
*/
|
|
259
259
|
evaluatePersonalizations?: boolean | EvaluatePersonalizationsFunction;
|
|
260
260
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { CanvasClient, CompositionDeliveryClient, RouteClient, ComponentInstance
|
|
|
2
2
|
import { CacheMode, CanvasCacheMode, ManifestCacheMode, ProjectMapCacheMode, RewriteRequestPathResult } from '@uniformdev/next-app-router-shared';
|
|
3
3
|
import { ManifestClient } from '@uniformdev/context/api';
|
|
4
4
|
import { ProjectMapClient } from '@uniformdev/project-map';
|
|
5
|
-
import { U as UniformCompositionProps } from './UniformComposition-
|
|
6
|
-
export { C as CompositionCache, a as ResolveComponentFunction, R as ResolveComponentResult, b as UniformComposition, c as createCompositionCache } from './UniformComposition-
|
|
5
|
+
import { U as UniformCompositionProps } from './UniformComposition-Ck7mRTp-.js';
|
|
6
|
+
export { C as CompositionCache, a as ResolveComponentFunction, R as ResolveComponentResult, b as UniformComposition, c as createCompositionCache } from './UniformComposition-Ck7mRTp-.js';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
export { D as DataClient, a as DefaultDataClient, E as EnhanceRouteOptions, G as GetRouteFromMiddlewareOptions, b as GetRouteFromPageStateOptions, c as GetRouteOptions, R as RewriteRouteOptions, d as RewriteRouteResult, e as expireMiddlewareCacheTag } from './client-DRMp2gpi.js';
|
|
9
9
|
import { a as ResolvedRouteResult } from './resolveRouteFromCode-Bhz8EJBu.js';
|
|
@@ -249,12 +249,12 @@ type EvaluatePersonalizationsFunction = (personalization: {
|
|
|
249
249
|
type PrecomputeCompositionOptions = Pick<ResolvedRouteResult, 'pageState' | 'route'> & {
|
|
250
250
|
/**
|
|
251
251
|
* Whether to evaluate tests
|
|
252
|
-
* @
|
|
252
|
+
* @defaultValue true
|
|
253
253
|
*/
|
|
254
254
|
evaluateTests?: boolean | EvaluateTestsFunction;
|
|
255
255
|
/**
|
|
256
256
|
* Whether to evaluate personalizations
|
|
257
|
-
* @
|
|
257
|
+
* @defaultValue true
|
|
258
258
|
*/
|
|
259
259
|
evaluatePersonalizations?: boolean | EvaluatePersonalizationsFunction;
|
|
260
260
|
};
|