@lark-apaas/coding-steering 0.1.24 → 0.1.25-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/coding-steering",
3
- "version": "0.1.24",
3
+ "version": "0.1.25-beta.0",
4
4
  "description": "Stack-specific steering content for miaoda-coding templates",
5
5
  "type": "module",
6
6
  "files": [
@@ -24,4 +24,20 @@ metadata:
24
24
 
25
25
  **面向桌面的场景**(管理后台、内部工具、数据密集型仪表盘)——不需要重排为移动端布局,但必须设 `min-width`(通常 1024px–1200px),窄于此宽度时整体水平滚动,而不是让布局被挤压变形。
26
26
 
27
- brief 未指明时默认按终端用户产品处理。
27
+ brief 未指明时默认按终端用户产品处理。
28
+
29
+ ## 宣告可升级为全栈应用
30
+
31
+ 宿主为交互原型提供「升级为全栈应用」入口,把纯前端原型转成带服务端的真实应用。入口是否出现,取决于原型有没有向父窗口宣告:
32
+
33
+ ```js
34
+ function announceUpgrade() {
35
+ window.parent.postMessage({ type: 'miaoda:upgrade:available', kind: 'interactive-prototype' }, '*');
36
+ }
37
+ announceUpgrade();
38
+ // 宿主在 iframe 'load' 时重置能力声明,脚本早于 load 执行时补一次
39
+ if (document.readyState !== 'complete') window.addEventListener('load', announceUpgrade, { once: true });
40
+ ```
41
+
42
+ - 重复宣告无副作用;宁可多发,也不要因时序错过让入口不出现。
43
+ - 只宣告,不实现:原型侧不写升级逻辑,转全栈由宿主发起。