@amplifyup/sdk 0.1.38 → 0.1.40
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.js +14 -5
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +14 -5
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +234 -85
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +194 -49
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/AmplifyRenderer.mjs
CHANGED
|
@@ -2297,7 +2297,7 @@ Available Console Commands:
|
|
|
2297
2297
|
if (!highlightComponents && !showZones) return;
|
|
2298
2298
|
const existing = document.getElementById("amplifyup-preview-highlights");
|
|
2299
2299
|
if (existing) existing.remove();
|
|
2300
|
-
const primary = "hsl(82
|
|
2300
|
+
const primary = "hsl(82 100% 52%)";
|
|
2301
2301
|
const lines = [];
|
|
2302
2302
|
if (highlightComponents) {
|
|
2303
2303
|
lines.push(
|
|
@@ -2307,7 +2307,7 @@ Available Console Commands:
|
|
|
2307
2307
|
"[data-amplifyup-component].amplifyup-selected, [data-component-id].amplifyup-selected {",
|
|
2308
2308
|
` outline: 2px solid ${primary} !important;`,
|
|
2309
2309
|
" outline-offset: -2px !important;",
|
|
2310
|
-
" box-shadow: inset 0 0 0 1px hsl(82
|
|
2310
|
+
" box-shadow: inset 0 0 0 1px hsl(82 100% 52% / 0.25) !important;",
|
|
2311
2311
|
"}",
|
|
2312
2312
|
"[data-amplifyup-component].amplifyup-component-hover:not(.amplifyup-selected),",
|
|
2313
2313
|
"[data-component-id].amplifyup-component-hover:not(.amplifyup-selected) {",
|
|
@@ -2319,7 +2319,7 @@ Available Console Commands:
|
|
|
2319
2319
|
if (highlightComponents || showZones) {
|
|
2320
2320
|
lines.push(
|
|
2321
2321
|
"[data-slot-id].amplifyup-selected, [data-amplifyup-slot].amplifyup-selected {",
|
|
2322
|
-
" background-color:
|
|
2322
|
+
" background-color: hsl(82 100% 52% / 0.12) !important;",
|
|
2323
2323
|
"}"
|
|
2324
2324
|
);
|
|
2325
2325
|
}
|
|
@@ -2694,7 +2694,10 @@ function useLiveComposerProps(layoutNodeId, props) {
|
|
|
2694
2694
|
return;
|
|
2695
2695
|
}
|
|
2696
2696
|
if (!matchesNode(nodeId)) return;
|
|
2697
|
-
setLive(
|
|
2697
|
+
setLive((prev) => ({
|
|
2698
|
+
...prev,
|
|
2699
|
+
...nextProps
|
|
2700
|
+
}));
|
|
2698
2701
|
};
|
|
2699
2702
|
const onPatch = (event) => {
|
|
2700
2703
|
const detail = event.detail || {};
|
|
@@ -2741,6 +2744,12 @@ function useAmplifyUp() {
|
|
|
2741
2744
|
}
|
|
2742
2745
|
return context;
|
|
2743
2746
|
}
|
|
2747
|
+
function nodeRenderProps(node) {
|
|
2748
|
+
return {
|
|
2749
|
+
...node.settings || {},
|
|
2750
|
+
...node.props || {}
|
|
2751
|
+
};
|
|
2752
|
+
}
|
|
2744
2753
|
var ComponentRenderBoundary = class extends Component {
|
|
2745
2754
|
constructor() {
|
|
2746
2755
|
super(...arguments);
|
|
@@ -3164,7 +3173,7 @@ function AmplifyRenderer({
|
|
|
3164
3173
|
{
|
|
3165
3174
|
nodeId: node.id,
|
|
3166
3175
|
componentId: node.componentId,
|
|
3167
|
-
props: node
|
|
3176
|
+
props: nodeRenderProps(node),
|
|
3168
3177
|
slots: slotsToPass,
|
|
3169
3178
|
renderComponent
|
|
3170
3179
|
}
|