@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.js
CHANGED
|
@@ -2299,7 +2299,7 @@ Available Console Commands:
|
|
|
2299
2299
|
if (!highlightComponents && !showZones) return;
|
|
2300
2300
|
const existing = document.getElementById("amplifyup-preview-highlights");
|
|
2301
2301
|
if (existing) existing.remove();
|
|
2302
|
-
const primary = "hsl(82
|
|
2302
|
+
const primary = "hsl(82 100% 52%)";
|
|
2303
2303
|
const lines = [];
|
|
2304
2304
|
if (highlightComponents) {
|
|
2305
2305
|
lines.push(
|
|
@@ -2309,7 +2309,7 @@ Available Console Commands:
|
|
|
2309
2309
|
"[data-amplifyup-component].amplifyup-selected, [data-component-id].amplifyup-selected {",
|
|
2310
2310
|
` outline: 2px solid ${primary} !important;`,
|
|
2311
2311
|
" outline-offset: -2px !important;",
|
|
2312
|
-
" box-shadow: inset 0 0 0 1px hsl(82
|
|
2312
|
+
" box-shadow: inset 0 0 0 1px hsl(82 100% 52% / 0.25) !important;",
|
|
2313
2313
|
"}",
|
|
2314
2314
|
"[data-amplifyup-component].amplifyup-component-hover:not(.amplifyup-selected),",
|
|
2315
2315
|
"[data-component-id].amplifyup-component-hover:not(.amplifyup-selected) {",
|
|
@@ -2321,7 +2321,7 @@ Available Console Commands:
|
|
|
2321
2321
|
if (highlightComponents || showZones) {
|
|
2322
2322
|
lines.push(
|
|
2323
2323
|
"[data-slot-id].amplifyup-selected, [data-amplifyup-slot].amplifyup-selected {",
|
|
2324
|
-
" background-color:
|
|
2324
|
+
" background-color: hsl(82 100% 52% / 0.12) !important;",
|
|
2325
2325
|
"}"
|
|
2326
2326
|
);
|
|
2327
2327
|
}
|
|
@@ -2696,7 +2696,10 @@ function useLiveComposerProps(layoutNodeId, props) {
|
|
|
2696
2696
|
return;
|
|
2697
2697
|
}
|
|
2698
2698
|
if (!matchesNode(nodeId)) return;
|
|
2699
|
-
setLive(
|
|
2699
|
+
setLive((prev) => ({
|
|
2700
|
+
...prev,
|
|
2701
|
+
...nextProps
|
|
2702
|
+
}));
|
|
2700
2703
|
};
|
|
2701
2704
|
const onPatch = (event) => {
|
|
2702
2705
|
const detail = event.detail || {};
|
|
@@ -2743,6 +2746,12 @@ function useAmplifyUp() {
|
|
|
2743
2746
|
}
|
|
2744
2747
|
return context;
|
|
2745
2748
|
}
|
|
2749
|
+
function nodeRenderProps(node) {
|
|
2750
|
+
return {
|
|
2751
|
+
...node.settings || {},
|
|
2752
|
+
...node.props || {}
|
|
2753
|
+
};
|
|
2754
|
+
}
|
|
2746
2755
|
var ComponentRenderBoundary = class extends react.Component {
|
|
2747
2756
|
constructor() {
|
|
2748
2757
|
super(...arguments);
|
|
@@ -3166,7 +3175,7 @@ function AmplifyRenderer({
|
|
|
3166
3175
|
{
|
|
3167
3176
|
nodeId: node.id,
|
|
3168
3177
|
componentId: node.componentId,
|
|
3169
|
-
props: node
|
|
3178
|
+
props: nodeRenderProps(node),
|
|
3170
3179
|
slots: slotsToPass,
|
|
3171
3180
|
renderComponent
|
|
3172
3181
|
}
|