@lark-apaas/coding-registry-buildless 0.1.8 → 0.1.9
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/components/design-canvas.jsx +10 -0
- package/package.json +1 -1
|
@@ -847,6 +847,10 @@ function DCViewport({ children, minScale = 0.1, maxScale = 8, style = {} }) {
|
|
|
847
847
|
// Clear the pan-tick guard so apply() re-posts the current scale
|
|
848
848
|
// even if it's unchanged — the host just reset dcScale to 1.
|
|
849
849
|
window.parent.postMessage({ type: 'miaoda:canvas:present' }, '*');
|
|
850
|
+
// Re-announce the upgrade capability too — the host's readyGen reset
|
|
851
|
+
// (fires on iframe 'load', which for image/font-heavy canvases lands
|
|
852
|
+
// after the mount-time announce) drops prior state, so re-declare here.
|
|
853
|
+
window.parent.postMessage({ type: 'miaoda:upgrade:available', kind: 'design-canvas' }, '*');
|
|
850
854
|
lastPostedScale.current = undefined;
|
|
851
855
|
apply();
|
|
852
856
|
}
|
|
@@ -860,6 +864,12 @@ function DCViewport({ children, minScale = 0.1, maxScale = 8, style = {} }) {
|
|
|
860
864
|
// effect's restore-path apply() may already have posted the restored
|
|
861
865
|
// scale (before miaoda:canvas:present), so clear the guard to re-post it in order.
|
|
862
866
|
window.parent.postMessage({ type: 'miaoda:canvas:present' }, '*');
|
|
867
|
+
// Generic "upgrade" capability signal — announce that this artifact offers
|
|
868
|
+
// an upgrade entry so the host can show/hide its upgrade button. Decoupled
|
|
869
|
+
// from the canvas zoom-proxy protocol above; any product may post the same
|
|
870
|
+
// message. Listener (onHostMsg) is already registered above → announce-after-
|
|
871
|
+
// register order holds. No client-side behavior here.
|
|
872
|
+
window.parent.postMessage({ type: 'miaoda:upgrade:available', kind: 'design-canvas' }, '*');
|
|
863
873
|
lastPostedScale.current = undefined;
|
|
864
874
|
apply();
|
|
865
875
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/coding-registry-buildless",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Miaoda registry (buildless runtime) — shadcn-style copy-in SDKs (globals + CDN-pinned, browser Babel) for buildless static HTML stacks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|