@uniformdev/next-app-router 20.7.1-alpha.118
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/LICENSE.txt +2 -0
- package/dist/UniformComposition-Bekn8k24.d.mts +74 -0
- package/dist/UniformComposition-CdXfLiaB.d.ts +74 -0
- package/dist/UniformText-ChMwHBw4.d.mts +10 -0
- package/dist/UniformText-ChMwHBw4.d.ts +10 -0
- package/dist/cache.d.mts +9 -0
- package/dist/cache.d.ts +9 -0
- package/dist/cache.js +1915 -0
- package/dist/cache.mjs +1903 -0
- package/dist/client-BCGVjYM-.d.mts +779 -0
- package/dist/client-BCGVjYM-.d.ts +779 -0
- package/dist/compat.d.mts +36 -0
- package/dist/compat.d.ts +36 -0
- package/dist/compat.js +120 -0
- package/dist/compat.mjs +89 -0
- package/dist/component.d.mts +61 -0
- package/dist/component.d.ts +61 -0
- package/dist/component.js +1397 -0
- package/dist/component.mjs +1384 -0
- package/dist/config.d.mts +13 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.js +80 -0
- package/dist/config.mjs +55 -0
- package/dist/handler.d.mts +29 -0
- package/dist/handler.d.ts +29 -0
- package/dist/handler.js +2664 -0
- package/dist/handler.mjs +2648 -0
- package/dist/index.d.mts +264 -0
- package/dist/index.d.ts +264 -0
- package/dist/index.esm.js +3935 -0
- package/dist/index.js +3953 -0
- package/dist/index.mjs +3935 -0
- package/dist/middleware.d.mts +70 -0
- package/dist/middleware.d.ts +70 -0
- package/dist/middleware.js +5873 -0
- package/dist/middleware.mjs +5867 -0
- package/dist/resolveRouteFromCode-B2rqnHgJ.d.ts +26 -0
- package/dist/resolveRouteFromCode-CA63-EPp.d.mts +26 -0
- package/package.json +112 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { RootComponentInstance, ComponentInstance } from '@uniformdev/canvas';
|
|
2
|
+
import { ComponentProps } from '@uniformdev/next-app-router-shared';
|
|
3
|
+
import React, { ComponentType } from 'react';
|
|
4
|
+
import { a as ResolvedRouteResult, R as ResolveRouteFunction } from './resolveRouteFromCode-CA63-EPp.mjs';
|
|
5
|
+
import { ClientContextComponent } from '@uniformdev/next-app-router-client';
|
|
6
|
+
|
|
7
|
+
type CompositionCache = {
|
|
8
|
+
getUniformComposition: ({ id }: {
|
|
9
|
+
id: string;
|
|
10
|
+
}) => RootComponentInstance | null;
|
|
11
|
+
setUniformComposition: (composition: RootComponentInstance) => void;
|
|
12
|
+
getUniformComponent: ({ compositionId, componentId, }: {
|
|
13
|
+
compositionId: string;
|
|
14
|
+
componentId: string;
|
|
15
|
+
}) => ComponentInstance | null;
|
|
16
|
+
};
|
|
17
|
+
declare const createCompositionCache: () => CompositionCache;
|
|
18
|
+
|
|
19
|
+
type UniformContextProps = {
|
|
20
|
+
/**
|
|
21
|
+
* Component to initialize Uniform context on the client.
|
|
22
|
+
*/
|
|
23
|
+
clientContextComponent?: ClientContextComponent;
|
|
24
|
+
/**
|
|
25
|
+
* The result of the route resolution.
|
|
26
|
+
*/
|
|
27
|
+
result: ResolvedRouteResult | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type ResolveComponentResult = {
|
|
31
|
+
component: ComponentType<ComponentProps<any, any>> | null;
|
|
32
|
+
includeContext?: boolean;
|
|
33
|
+
suspense?: {
|
|
34
|
+
fallback: ComponentType<any> | undefined;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
type ResolveEmptyPlaceholderResult = {
|
|
38
|
+
component: ComponentType<ComponentProps<any, any>> | null;
|
|
39
|
+
};
|
|
40
|
+
type ResolveEmptyPlaceholderOptions = {
|
|
41
|
+
parentComponent: ComponentInstance;
|
|
42
|
+
component: ComponentInstance;
|
|
43
|
+
slotName: string;
|
|
44
|
+
slotIndex: number;
|
|
45
|
+
};
|
|
46
|
+
type ResolveComponentFunction = (options: {
|
|
47
|
+
component: ComponentInstance;
|
|
48
|
+
}) => ResolveComponentResult;
|
|
49
|
+
type ResolveEmptyPlaceholderFunction = (options: ResolveEmptyPlaceholderOptions) => ResolveEmptyPlaceholderResult;
|
|
50
|
+
type UniformCompositionProps = {
|
|
51
|
+
/**
|
|
52
|
+
* The code to resolve the route from.
|
|
53
|
+
*/
|
|
54
|
+
code: string;
|
|
55
|
+
/**
|
|
56
|
+
* Function to resolve the route from the code.
|
|
57
|
+
*/
|
|
58
|
+
resolveRoute: ResolveRouteFunction;
|
|
59
|
+
/**
|
|
60
|
+
* Function to map composition components to React components.
|
|
61
|
+
*/
|
|
62
|
+
resolveComponent: ResolveComponentFunction;
|
|
63
|
+
/**
|
|
64
|
+
* Function to map empty placeholders to React components.
|
|
65
|
+
*/
|
|
66
|
+
resolveEmptyPlaceholder?: ResolveEmptyPlaceholderFunction;
|
|
67
|
+
/**
|
|
68
|
+
* Composition cache, will be used to cache the composition.
|
|
69
|
+
*/
|
|
70
|
+
compositionCache?: CompositionCache;
|
|
71
|
+
} & Pick<UniformContextProps, 'clientContextComponent'>;
|
|
72
|
+
declare function UniformComposition({ code, ...props }: UniformCompositionProps): React.JSX.Element;
|
|
73
|
+
|
|
74
|
+
export { type CompositionCache as C, type ResolveComponentResult as R, type UniformCompositionProps as U, type ResolveComponentFunction as a, UniformComposition as b, createCompositionCache as c };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { RootComponentInstance, ComponentInstance } from '@uniformdev/canvas';
|
|
2
|
+
import { ComponentProps } from '@uniformdev/next-app-router-shared';
|
|
3
|
+
import React, { ComponentType } from 'react';
|
|
4
|
+
import { a as ResolvedRouteResult, R as ResolveRouteFunction } from './resolveRouteFromCode-B2rqnHgJ.js';
|
|
5
|
+
import { ClientContextComponent } from '@uniformdev/next-app-router-client';
|
|
6
|
+
|
|
7
|
+
type CompositionCache = {
|
|
8
|
+
getUniformComposition: ({ id }: {
|
|
9
|
+
id: string;
|
|
10
|
+
}) => RootComponentInstance | null;
|
|
11
|
+
setUniformComposition: (composition: RootComponentInstance) => void;
|
|
12
|
+
getUniformComponent: ({ compositionId, componentId, }: {
|
|
13
|
+
compositionId: string;
|
|
14
|
+
componentId: string;
|
|
15
|
+
}) => ComponentInstance | null;
|
|
16
|
+
};
|
|
17
|
+
declare const createCompositionCache: () => CompositionCache;
|
|
18
|
+
|
|
19
|
+
type UniformContextProps = {
|
|
20
|
+
/**
|
|
21
|
+
* Component to initialize Uniform context on the client.
|
|
22
|
+
*/
|
|
23
|
+
clientContextComponent?: ClientContextComponent;
|
|
24
|
+
/**
|
|
25
|
+
* The result of the route resolution.
|
|
26
|
+
*/
|
|
27
|
+
result: ResolvedRouteResult | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type ResolveComponentResult = {
|
|
31
|
+
component: ComponentType<ComponentProps<any, any>> | null;
|
|
32
|
+
includeContext?: boolean;
|
|
33
|
+
suspense?: {
|
|
34
|
+
fallback: ComponentType<any> | undefined;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
type ResolveEmptyPlaceholderResult = {
|
|
38
|
+
component: ComponentType<ComponentProps<any, any>> | null;
|
|
39
|
+
};
|
|
40
|
+
type ResolveEmptyPlaceholderOptions = {
|
|
41
|
+
parentComponent: ComponentInstance;
|
|
42
|
+
component: ComponentInstance;
|
|
43
|
+
slotName: string;
|
|
44
|
+
slotIndex: number;
|
|
45
|
+
};
|
|
46
|
+
type ResolveComponentFunction = (options: {
|
|
47
|
+
component: ComponentInstance;
|
|
48
|
+
}) => ResolveComponentResult;
|
|
49
|
+
type ResolveEmptyPlaceholderFunction = (options: ResolveEmptyPlaceholderOptions) => ResolveEmptyPlaceholderResult;
|
|
50
|
+
type UniformCompositionProps = {
|
|
51
|
+
/**
|
|
52
|
+
* The code to resolve the route from.
|
|
53
|
+
*/
|
|
54
|
+
code: string;
|
|
55
|
+
/**
|
|
56
|
+
* Function to resolve the route from the code.
|
|
57
|
+
*/
|
|
58
|
+
resolveRoute: ResolveRouteFunction;
|
|
59
|
+
/**
|
|
60
|
+
* Function to map composition components to React components.
|
|
61
|
+
*/
|
|
62
|
+
resolveComponent: ResolveComponentFunction;
|
|
63
|
+
/**
|
|
64
|
+
* Function to map empty placeholders to React components.
|
|
65
|
+
*/
|
|
66
|
+
resolveEmptyPlaceholder?: ResolveEmptyPlaceholderFunction;
|
|
67
|
+
/**
|
|
68
|
+
* Composition cache, will be used to cache the composition.
|
|
69
|
+
*/
|
|
70
|
+
compositionCache?: CompositionCache;
|
|
71
|
+
} & Pick<UniformContextProps, 'clientContextComponent'>;
|
|
72
|
+
declare function UniformComposition({ code, ...props }: UniformCompositionProps): React.JSX.Element;
|
|
73
|
+
|
|
74
|
+
export { type CompositionCache as C, type ResolveComponentResult as R, type UniformCompositionProps as U, type ResolveComponentFunction as a, UniformComposition as b, createCompositionCache as c };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ClientUniformTextProps } from '@uniformdev/next-app-router-client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
type UniformTextProps = ClientUniformTextProps;
|
|
5
|
+
/**
|
|
6
|
+
* Renders text parameters. Offers inline editing capability out of the box.
|
|
7
|
+
*/
|
|
8
|
+
declare const UniformText: (props: UniformTextProps) => React.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { type UniformTextProps as U, UniformText as a };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ClientUniformTextProps } from '@uniformdev/next-app-router-client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
type UniformTextProps = ClientUniformTextProps;
|
|
5
|
+
/**
|
|
6
|
+
* Renders text parameters. Offers inline editing capability out of the box.
|
|
7
|
+
*/
|
|
8
|
+
declare const UniformText: (props: UniformTextProps) => React.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { type UniformTextProps as U, UniformText as a };
|
package/dist/cache.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { R as ResolveRouteFunction } from './resolveRouteFromCode-CA63-EPp.mjs';
|
|
2
|
+
import '@uniformdev/canvas';
|
|
3
|
+
import '@uniformdev/next-app-router-shared';
|
|
4
|
+
import './client-BCGVjYM-.mjs';
|
|
5
|
+
import '@uniformdev/context';
|
|
6
|
+
|
|
7
|
+
declare const resolveRouteFromCode: ResolveRouteFunction;
|
|
8
|
+
|
|
9
|
+
export { resolveRouteFromCode };
|
package/dist/cache.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { R as ResolveRouteFunction } from './resolveRouteFromCode-B2rqnHgJ.js';
|
|
2
|
+
import '@uniformdev/canvas';
|
|
3
|
+
import '@uniformdev/next-app-router-shared';
|
|
4
|
+
import './client-BCGVjYM-.js';
|
|
5
|
+
import '@uniformdev/context';
|
|
6
|
+
|
|
7
|
+
declare const resolveRouteFromCode: ResolveRouteFunction;
|
|
8
|
+
|
|
9
|
+
export { resolveRouteFromCode };
|