@amplifyup/sdk 0.1.12 → 0.1.13
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/AmplifyRenderer.d.mts +3 -1
- package/dist/AmplifyRenderer.d.ts +3 -1
- package/dist/AmplifyRenderer.js +291 -131
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +291 -131
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/index.d.mts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +247 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +247 -123
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +8 -2
- package/dist/react.d.ts +8 -2
- package/dist/react.js +313 -155
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +313 -155
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.d.mts
CHANGED
|
@@ -6,7 +6,11 @@ export { AmplifyRenderer } from './AmplifyRenderer.mjs';
|
|
|
6
6
|
export { i as isComposerPreview, a as isPreviewRequest } from './preview-BMrIgUvp.mjs';
|
|
7
7
|
export { fetchPageConfigServer } from './server.mjs';
|
|
8
8
|
|
|
9
|
-
type
|
|
9
|
+
type RenderComponentContext = {
|
|
10
|
+
/** Unique layout-tree node id — required when multiple instances share a component type. */
|
|
11
|
+
layoutNodeId: string;
|
|
12
|
+
};
|
|
13
|
+
type RenderComponentFn = (componentId: string, props: Record<string, any>, slots?: Record<string, ReactNode>, context?: RenderComponentContext) => ReactNode;
|
|
10
14
|
interface AmplifyPageContentProps {
|
|
11
15
|
/**
|
|
12
16
|
* Native page content shown to visitors when no AmplifyUp layout is configured.
|
|
@@ -35,10 +39,12 @@ declare function AmplifyPageContent({ fallback, renderComponent, pageConfig: pag
|
|
|
35
39
|
* ComponentContextProvider - Provides slots and props to child components
|
|
36
40
|
* This should wrap each component when rendering
|
|
37
41
|
*/
|
|
38
|
-
declare function ComponentContextProvider({ children, slots, props, }: {
|
|
42
|
+
declare function ComponentContextProvider({ children, slots, props, layoutNodeId, componentId, }: {
|
|
39
43
|
children: ReactNode;
|
|
40
44
|
slots?: Record<string, ReactNode>;
|
|
41
45
|
props?: Record<string, any>;
|
|
46
|
+
layoutNodeId?: string;
|
|
47
|
+
componentId?: string;
|
|
42
48
|
}): react_jsx_runtime.JSX.Element;
|
|
43
49
|
/**
|
|
44
50
|
* Slot Component
|
package/dist/react.d.ts
CHANGED
|
@@ -6,7 +6,11 @@ export { AmplifyRenderer } from './AmplifyRenderer.js';
|
|
|
6
6
|
export { i as isComposerPreview, a as isPreviewRequest } from './preview-BMrIgUvp.js';
|
|
7
7
|
export { fetchPageConfigServer } from './server.js';
|
|
8
8
|
|
|
9
|
-
type
|
|
9
|
+
type RenderComponentContext = {
|
|
10
|
+
/** Unique layout-tree node id — required when multiple instances share a component type. */
|
|
11
|
+
layoutNodeId: string;
|
|
12
|
+
};
|
|
13
|
+
type RenderComponentFn = (componentId: string, props: Record<string, any>, slots?: Record<string, ReactNode>, context?: RenderComponentContext) => ReactNode;
|
|
10
14
|
interface AmplifyPageContentProps {
|
|
11
15
|
/**
|
|
12
16
|
* Native page content shown to visitors when no AmplifyUp layout is configured.
|
|
@@ -35,10 +39,12 @@ declare function AmplifyPageContent({ fallback, renderComponent, pageConfig: pag
|
|
|
35
39
|
* ComponentContextProvider - Provides slots and props to child components
|
|
36
40
|
* This should wrap each component when rendering
|
|
37
41
|
*/
|
|
38
|
-
declare function ComponentContextProvider({ children, slots, props, }: {
|
|
42
|
+
declare function ComponentContextProvider({ children, slots, props, layoutNodeId, componentId, }: {
|
|
39
43
|
children: ReactNode;
|
|
40
44
|
slots?: Record<string, ReactNode>;
|
|
41
45
|
props?: Record<string, any>;
|
|
46
|
+
layoutNodeId?: string;
|
|
47
|
+
componentId?: string;
|
|
42
48
|
}): react_jsx_runtime.JSX.Element;
|
|
43
49
|
/**
|
|
44
50
|
* Slot Component
|