@byteluck-fe/model-driven-controls 7.1.0-beta.2 → 7.1.0-beta.4

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/README.md CHANGED
@@ -6,7 +6,11 @@
6
6
 
7
7
  `@byteluck-fe/model-driven-controls/catalog` 是构建期生成的纯 JSON 控件事实,不运行 Designer/Vue,也不访问 DOM 或接口。优先使用 `listControlTypes`、`getControlEventKeys`、`getControlSettingFacts`、`getControlSavedPropertyFact`、`getControlCatalogInfo` 等窄查询;仅 headless 内部需要完整 `getControlDefinition`。
8
8
 
9
- `getControlSavedPropertyFact(type, savedPropertyKey)` 仅在 generated `propertyNameMap` 与真实 Designer `defaultProps` 同时命中时返回属性键、保存键和默认值。它可用于证明控件切换后的目标工厂确实支持某个保存属性;跨控件继承哪些属性以及值域校验仍由调用方的版本化 authoring 策略决定,不能把存在性事实当作任意写入授权。
9
+ `getControlSavedPropertyFact(type, savedPropertyKey)` 仅在 generated `propertyNameMap` 与真实 Designer `defaultProps` 同时命中时返回属性键、保存键和新建默认值。若源码还登记了已核实的历史 Runtime 缺失语义,事实会额外包含 `absentRuntimeValue`;`resolveControlSavedPropertyValue` 与 `applyControlRuntimeAbsentDefaults` 可让 Designer 等构造态消费者通用对齐 Runtime,且只处理缺失/`undefined`,不覆盖 `null` 或其它显式值。跨控件继承哪些属性以及值域校验仍由调用方的版本化 authoring 策略决定,不能把存在性事实当作任意写入授权。
10
+
11
+ `getControlAuthoringFacts` 与 `getControlAuthoringPropertyFact` 只投影单控件/单属性的保存键、创建默认、已核实的历史缺失语义和紧凑顶层约束,不暴露完整 catalog。`createDefaultValue` 与判别联合 `absentRuntimeValue` 语义不同;`optionHints` 只是 Designer/schema 候选提示,并非完整 enum,不能据此拒绝其它同类型值。object/array 事实标为 `top-level`,深层结构必须由宿主策略另行校验。
12
+
13
+ `visitControlTree`、`collectControlTreeNodes` 与 `applyRuntimeAbsentDefaultsToControlTree` 是 browser-safe 的纯 JSON 树入口,默认只遍历已核实的 `children`、`props.headers` 与历史 `props.footers` 槽位;宿主可显式追加其它槽位。整树缺失默认处理采用结构共享,不修改输入,也不会把构造态兼容结果回写成页面 Schema 升级。
10
14
 
11
15
  国际化列从 `i18n_messages.json` 动态发现;locale dynamic default 保存稳定 `messageKey`、已发布 values 与自身 fallback,page/permissions 通过 `getControlLocaleMessageFact` 窄查紧凑消息事实。
12
16