soma-core 2.2.5 → 2.2.6

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.
Files changed (259) hide show
  1. package/README.md +5 -6
  2. package/bin/soma.cjs +2 -2
  3. package/core/build/compiler/flat-page.ts +16 -0
  4. package/core/build/compiler/full-manifest-builder.ts +0 -3
  5. package/core/build/compiler/page-assets.ts +0 -1
  6. package/core/build/compiler/page-closure.ts +245 -0
  7. package/core/build/compiler/page-declaration-compiler.ts +2 -5
  8. package/core/build/compiler/soma-precompile.js +1848 -3244
  9. package/core/build/compiler/soma-precompile.ts +4 -7
  10. package/core/build/component-tree/artifact-codec.ts +4 -8
  11. package/core/build/lsp/soma-declaration.cjs +1 -1
  12. package/core/build/lsp/std-completion.generated.json +3 -3
  13. package/core/client/a11y/a11y-config.ts +2 -1
  14. package/core/client/a11y/dom-id.ts +1 -1
  15. package/core/client/base/SomaHttpClient.ts +11 -3
  16. package/core/client/base/SomaPageRootBase.ts +6 -0
  17. package/core/client/base/defineSomaView.ts +178 -0
  18. package/core/client/base/index.ts +13 -0
  19. package/core/client/base/view-context.ts +328 -0
  20. package/core/client/behavior/adapter-collection.ts +2 -2
  21. package/core/client/compiler/manifest-compiler.ts +5 -36
  22. package/core/client/component/component-definition.types.ts +2 -1
  23. package/core/client/component/component-manager.ts +110 -20
  24. package/core/client/component/structure-adapter.ts +3 -7
  25. package/core/client/container/SomaContainerAdapter.ts +9 -1
  26. package/core/client/data/data-object-resolver.ts +516 -181
  27. package/core/client/data/data-write-actions.ts +79 -15
  28. package/core/client/data/format-config.ts +3 -1
  29. package/core/client/data/region-scope-port.ts +11 -0
  30. package/core/client/engine/asset-resolver.ts +2 -5
  31. package/core/client/engine/dom-renderer.ts +7 -40
  32. package/core/client/engine/event-engine.ts +1 -105
  33. package/core/client/engine/property-watcher.ts +1 -1
  34. package/core/client/engine/reactive-proxy.ts +78 -17
  35. package/core/client/engine/runtime-builder.ts +0 -14
  36. package/core/client/engine/scope-resolver.ts +18 -0
  37. package/core/client/engine/soma-bootstrap.ts +385 -98
  38. package/core/client/engine/style-binder.ts +49 -106
  39. package/core/client/engine/timer-engine.ts +11 -1
  40. package/core/client/host-bridge/load-host-domain-class.ts +2 -1
  41. package/core/client/infra/http/SomaHttpService.ts +15 -4
  42. package/core/client/infra/i18n/pack-locales.ts +2 -2
  43. package/core/client/mount/domain-rule.ts +7 -3
  44. package/core/client/mount/mount-page.ts +38 -5
  45. package/core/client/mount/types.ts +2 -0
  46. package/core/client/parser/confirm-spec.ts +1 -1
  47. package/core/client/parser/data-config-parser.ts +27 -210
  48. package/core/client/parser/pipeline-parser.ts +14 -59
  49. package/core/client/parser/style-config-parser.ts +101 -95
  50. package/core/client/parser/timer-parser.ts +21 -0
  51. package/core/client/parser/ui-config-parser.ts +64 -12
  52. package/core/client/registry/declaration-renderer.ts +1 -1
  53. package/core/client/runtime/SomaRuntimeServices.ts +2 -1
  54. package/core/client/runtime/SomaSnapshotStore.ts +5 -0
  55. package/core/client/security/url-guard.ts +71 -11
  56. package/core/client/validation/async-check-registry.ts +2 -1
  57. package/core/client/validation/contract-validator.ts +2 -6
  58. package/core/client/validation/field-rules.ts +3 -13
  59. package/core/client/validation/object-rules.ts +2 -10
  60. package/core/index.ts +1 -35
  61. package/core/inspect/check-product.ts +5 -5
  62. package/core/inspect/runtime.ts +2 -1
  63. package/core/server/api/dispatch-service-api.ts +35 -36
  64. package/core/server/api/load-host-service.ts +5 -4
  65. package/core/server/compile-port.ts +1 -1
  66. package/core/server/host/app-config-composer.ts +2 -1
  67. package/core/server/host/host-assembly-entry.ts +1 -0
  68. package/core/server/host/host-assembly.ts +47 -3
  69. package/core/server/host/host-caller.ts +2 -1
  70. package/core/server/host/host-dir.ts +9 -0
  71. package/core/server/host/host-response-headers.ts +2 -1
  72. package/core/server/host/invoke-host-request-hook.ts +28 -4
  73. package/core/server/host/published-page-assets.ts +2 -1
  74. package/core/server/host/resolve-host-request-hook.ts +25 -7
  75. package/core/server/host/server-page-assets.ts +4 -4
  76. package/core/server/host/virtual-pages.ts +3 -2
  77. package/core/server/infra/cache/ServerFileCache.ts +79 -9
  78. package/core/server/registry/api-registry-store.ts +3 -1
  79. package/core/server/registry/declaration-precompiler.ts +0 -2
  80. package/core/server/registry/page-registry-repository.ts +2 -1
  81. package/core/server/registry/page-registry-store.ts +2 -1
  82. package/core/server/registry/registry-error.ts +6 -1
  83. package/core/server/registry/registry-file-lock.ts +296 -23
  84. package/core/server/registry/request-body-limit.ts +3 -2
  85. package/core/server/registry/validation/declaration-safety-scan.ts +151 -27
  86. package/core/server/runtime-space/access-gate.ts +21 -7
  87. package/core/server/runtime-space/bindings.ts +3 -6
  88. package/core/server/runtime-space/dynamic-pages.ts +181 -49
  89. package/core/server/runtime-space/errors.ts +3 -0
  90. package/core/server/runtime-space/inject.ts +74 -15
  91. package/core/server/runtime-space/page-grants.ts +7 -1
  92. package/core/server/runtime-space/resolve.ts +66 -19
  93. package/core/server/runtime-space/store.ts +32 -3
  94. package/core/server/runtime-space/submit-steps.ts +2 -1
  95. package/core/server/runtime-space/types.ts +3 -1
  96. package/core/shared/component-tree-errors.ts +2 -1
  97. package/core/shared/contract-a11y.ts +1 -1
  98. package/core/shared/contract-sections.ts +2 -2
  99. package/core/shared/core-diagnostic-codes.ts +8 -0
  100. package/core/shared/declaration-keys.ts +1 -1
  101. package/core/shared/engines/engine-error.ts +2 -1
  102. package/core/shared/generation-error.ts +2 -1
  103. package/core/shared/page-envelope.ts +1 -1
  104. package/core/shared/pure-binding.ts +88 -0
  105. package/core/shared/registry-generated/diagnostic-registry-index.ts +16 -19
  106. package/core/shared/registry-generated/diagnostic-registry.ts +135 -177
  107. package/core/shared/registry-generated/limits.ts +49 -13
  108. package/core/shared/registry-generated/std-grammar-completion.ts +0 -4
  109. package/core/shared/registry-generated/std-grammar-views.ts +40 -10
  110. package/core/shared/registry-generated/std-grammar.ts +42 -20
  111. package/core/shared/soma-error.ts +36 -0
  112. package/core/shared/types/compile-port.types.ts +1 -1
  113. package/core/shared/types/data-config.types.ts +17 -17
  114. package/core/shared/types/engine.types.ts +0 -3
  115. package/core/shared/types/event.types.ts +1 -11
  116. package/core/shared/types/generation-error.types.ts +5 -1
  117. package/core/shared/types/host-assembly.types.ts +7 -1
  118. package/core/shared/types/manifest.types.ts +0 -3
  119. package/core/shared/types/region-scope.types.ts +5 -1
  120. package/core/shared/types/scope-manifest.types.ts +0 -2
  121. package/core/shared/types/style-config.types.ts +21 -21
  122. package/core/shared/types/ui-config.types.ts +4 -5
  123. package/core/shared/types/watcher.types.ts +1 -1
  124. package/dist/browser/runtime-bundle.manifest.json +11 -13
  125. package/dist/browser/soma-runtime.js +2567 -2696
  126. package/dist/core/index.cjs +5446 -5486
  127. package/dist/host-native/aot-builder.cjs +46 -1
  128. package/dist/host-native/native-server.cjs +4879 -4505
  129. package/dist/lsp/component-tree.cjs +5814 -7042
  130. package/dist/types/build/compiler/full-manifest-builder.d.ts +0 -2
  131. package/dist/types/build/compiler/page-closure.d.ts +21 -0
  132. package/dist/types/build/compiler/page-declaration-compiler.d.ts +2 -4
  133. package/dist/types/build/compiler/soma-precompile.d.ts +1 -3
  134. package/dist/types/build/component-tree/artifact-codec.d.ts +0 -2
  135. package/dist/types/client/a11y/a11y-config.d.ts +2 -1
  136. package/dist/types/client/base/SomaHttpClient.d.ts +1 -1
  137. package/dist/types/client/base/SomaPageRootBase.d.ts +5 -0
  138. package/dist/types/client/base/defineSomaView.d.ts +46 -0
  139. package/dist/types/client/base/index.d.ts +2 -0
  140. package/dist/types/client/base/view-context.d.ts +136 -0
  141. package/dist/types/client/behavior/adapter-collection.d.ts +1 -1
  142. package/dist/types/client/compiler/manifest-compiler.d.ts +0 -3
  143. package/dist/types/client/component/component-definition.types.d.ts +2 -1
  144. package/dist/types/client/component/component-manager.d.ts +29 -0
  145. package/dist/types/client/data/data-object-resolver.d.ts +91 -31
  146. package/dist/types/client/data/format-config.d.ts +2 -1
  147. package/dist/types/client/engine/dom-renderer.d.ts +1 -2
  148. package/dist/types/client/engine/event-engine.d.ts +0 -7
  149. package/dist/types/client/engine/reactive-proxy.d.ts +11 -4
  150. package/dist/types/client/engine/runtime-builder.d.ts +0 -4
  151. package/dist/types/client/engine/soma-bootstrap.d.ts +44 -6
  152. package/dist/types/client/engine/style-binder.d.ts +8 -4
  153. package/dist/types/client/host-bridge/load-host-domain-class.d.ts +2 -1
  154. package/dist/types/client/mount/domain-rule.d.ts +2 -0
  155. package/dist/types/client/mount/mount-page.d.ts +2 -1
  156. package/dist/types/client/mount/types.d.ts +2 -0
  157. package/dist/types/client/parser/data-config-parser.d.ts +6 -5
  158. package/dist/types/client/parser/style-config-parser.d.ts +7 -3
  159. package/dist/types/client/parser/timer-parser.d.ts +5 -0
  160. package/dist/types/client/parser/ui-config-parser.d.ts +6 -2
  161. package/dist/types/client/runtime/SomaSnapshotStore.d.ts +2 -0
  162. package/dist/types/client/security/url-guard.d.ts +14 -0
  163. package/dist/types/client/validation/async-check-registry.d.ts +2 -1
  164. package/dist/types/client/validation/object-rules.d.ts +0 -5
  165. package/dist/types/index.d.ts +2 -7
  166. package/dist/types/inspect/runtime.d.ts +2 -1
  167. package/dist/types/server/api/dispatch-service-api.d.ts +5 -0
  168. package/dist/types/server/api/load-host-service.d.ts +1 -1
  169. package/dist/types/server/compile-port.d.ts +1 -1
  170. package/dist/types/server/host/host-assembly-entry.d.ts +1 -1
  171. package/dist/types/server/host/host-assembly.d.ts +2 -0
  172. package/dist/types/server/host/host-dir.d.ts +2 -0
  173. package/dist/types/server/host/invoke-host-request-hook.d.ts +10 -3
  174. package/dist/types/server/host/published-page-assets.d.ts +2 -1
  175. package/dist/types/server/host/resolve-host-request-hook.d.ts +18 -5
  176. package/dist/types/server/host/server-page-assets.d.ts +2 -1
  177. package/dist/types/server/infra/cache/ServerFileCache.d.ts +8 -0
  178. package/dist/types/server/registry/declaration-precompiler.d.ts +0 -1
  179. package/dist/types/server/registry/registry-error.d.ts +5 -1
  180. package/dist/types/server/registry/registry-file-lock.d.ts +30 -0
  181. package/dist/types/server/registry/request-body-limit.d.ts +3 -2
  182. package/dist/types/server/registry/validation/declaration-safety-scan.d.ts +3 -0
  183. package/dist/types/server/runtime-space/access-gate.d.ts +7 -0
  184. package/dist/types/server/runtime-space/bindings.d.ts +3 -2
  185. package/dist/types/server/runtime-space/dynamic-pages.d.ts +6 -1
  186. package/dist/types/server/runtime-space/errors.d.ts +1 -1
  187. package/dist/types/server/runtime-space/resolve.d.ts +2 -0
  188. package/dist/types/server/runtime-space/store.d.ts +8 -1
  189. package/dist/types/server/runtime-space/submit-steps.d.ts +2 -1
  190. package/dist/types/server/runtime-space/types.d.ts +3 -1
  191. package/dist/types/shared/component-tree-errors.d.ts +2 -1
  192. package/dist/types/shared/core-diagnostic-codes.d.ts +1 -1
  193. package/dist/types/shared/declaration-keys.d.ts +1 -1
  194. package/dist/types/shared/engines/engine-error.d.ts +2 -1
  195. package/dist/types/shared/generation-error.d.ts +2 -1
  196. package/dist/types/shared/pure-binding.d.ts +48 -0
  197. package/dist/types/shared/registry-generated/diagnostic-registry.d.ts +119 -158
  198. package/dist/types/shared/registry-generated/limits.d.ts +40 -10
  199. package/dist/types/shared/registry-generated/std-grammar-completion.d.ts +0 -30
  200. package/dist/types/shared/registry-generated/std-grammar-views.d.ts +97 -23
  201. package/dist/types/shared/registry-generated/std-grammar.d.ts +109 -241
  202. package/dist/types/shared/soma-error.d.ts +15 -0
  203. package/dist/types/shared/types/data-config.types.d.ts +14 -16
  204. package/dist/types/shared/types/engine.types.d.ts +0 -3
  205. package/dist/types/shared/types/event.types.d.ts +1 -7
  206. package/dist/types/shared/types/generation-error.types.d.ts +1 -1
  207. package/dist/types/shared/types/host-assembly.types.d.ts +2 -0
  208. package/dist/types/shared/types/manifest.types.d.ts +0 -3
  209. package/dist/types/shared/types/region-scope.types.d.ts +4 -1
  210. package/dist/types/shared/types/scope-manifest.types.d.ts +0 -2
  211. package/dist/types/shared/types/style-config.types.d.ts +17 -19
  212. package/dist/types/shared/types/ui-config.types.d.ts +4 -5
  213. package/host-native/bin/host-native.cjs +22 -1
  214. package/host-native/client/browser-entry.ts +21 -172
  215. package/host-native/src/aot-builder.ts +52 -0
  216. package/host-native/src/host-prepare.ts +39 -5
  217. package/host-native/src/manifest-http.ts +2 -3
  218. package/host-native/src/native-server.ts +812 -174
  219. package/host-native/src/page-http.ts +3 -3
  220. package/host-native/src/public-packages.cjs +0 -1
  221. package/host-native/src/registry-handler.ts +12 -5
  222. package/host-native/src/static-file.ts +203 -53
  223. package/package.json +3 -2
  224. package/core/client/engine/step-runner.ts +0 -212
  225. package/core/client/engine/trigger-engine.ts +0 -55
  226. package/core/client/format/zoned.ts +0 -10
  227. package/core/client/parser/step-parser.ts +0 -359
  228. package/core/client/parser/trigger-parser.ts +0 -90
  229. package/core/client/parser/value-lang.ts +0 -340
  230. package/core/client/time/instant.ts +0 -2
  231. package/core/shared/calc/coerce.ts +0 -2
  232. package/core/shared/calc/errors.ts +0 -40
  233. package/core/shared/calc/evaluator.ts +0 -113
  234. package/core/shared/calc/index.ts +0 -11
  235. package/core/shared/calc/lexer.ts +0 -189
  236. package/core/shared/calc/parser.ts +0 -193
  237. package/core/shared/calc/typer.ts +0 -171
  238. package/core/shared/date-parts.ts +0 -2
  239. package/core/shared/show-when.ts +0 -77
  240. package/core/shared/types/step.types.ts +0 -91
  241. package/core/shared/types/trigger.types.ts +0 -14
  242. package/dist/types/client/engine/step-runner.d.ts +0 -42
  243. package/dist/types/client/engine/trigger-engine.d.ts +0 -16
  244. package/dist/types/client/format/zoned.d.ts +0 -1
  245. package/dist/types/client/parser/step-parser.d.ts +0 -23
  246. package/dist/types/client/parser/trigger-parser.d.ts +0 -13
  247. package/dist/types/client/parser/value-lang.d.ts +0 -63
  248. package/dist/types/client/time/instant.d.ts +0 -1
  249. package/dist/types/shared/calc/coerce.d.ts +0 -1
  250. package/dist/types/shared/calc/errors.d.ts +0 -14
  251. package/dist/types/shared/calc/evaluator.d.ts +0 -2
  252. package/dist/types/shared/calc/index.d.ts +0 -6
  253. package/dist/types/shared/calc/lexer.d.ts +0 -19
  254. package/dist/types/shared/calc/parser.d.ts +0 -43
  255. package/dist/types/shared/calc/typer.d.ts +0 -11
  256. package/dist/types/shared/date-parts.d.ts +0 -1
  257. package/dist/types/shared/show-when.d.ts +0 -21
  258. package/dist/types/shared/types/step.types.d.ts +0 -76
  259. package/dist/types/shared/types/trigger.types.d.ts +0 -12
@@ -28,14 +28,6 @@ export declare const SOMA_STD_COMPLETION_SCHEMA: {
28
28
  };
29
29
  readonly summary: "集合读取";
30
30
  readonly status: "implemented";
31
- }, {
32
- readonly key: "transform";
33
- readonly value: {
34
- readonly kind: "map";
35
- readonly of: "string";
36
- };
37
- readonly summary: "取数后派生";
38
- readonly status: "implemented";
39
31
  }, {
40
32
  readonly key: "fields";
41
33
  readonly value: {
@@ -53,14 +45,6 @@ export declare const SOMA_STD_COMPLETION_SCHEMA: {
53
45
  };
54
46
  readonly summary: "写通道";
55
47
  readonly status: "implemented";
56
- }, {
57
- readonly key: "predicates";
58
- readonly value: {
59
- readonly kind: "map";
60
- readonly of: "shape";
61
- };
62
- readonly summary: "具名条件";
63
- readonly status: "implemented";
64
48
  }, {
65
49
  readonly key: "name";
66
50
  readonly value: {
@@ -261,13 +245,6 @@ export declare const SOMA_STD_COMPLETION_SCHEMA: {
261
245
  };
262
246
  readonly summary: "枚举候选";
263
247
  readonly status: "implemented";
264
- }, {
265
- readonly key: "calc";
266
- readonly value: {
267
- readonly kind: "string";
268
- };
269
- readonly summary: "派生";
270
- readonly status: "implemented";
271
248
  }, {
272
249
  readonly key: "default";
273
250
  readonly value: {
@@ -372,13 +349,6 @@ export declare const SOMA_STD_COMPLETION_SCHEMA: {
372
349
  };
373
350
  readonly summary: "校验失败提示";
374
351
  readonly status: "implemented";
375
- }, {
376
- readonly key: "when";
377
- readonly value: {
378
- readonly kind: "shape";
379
- };
380
- readonly summary: "条件规则(谓词成立才参与)";
381
- readonly status: "implemented";
382
352
  }, {
383
353
  readonly key: "async";
384
354
  readonly value: {
@@ -3,7 +3,7 @@ export declare const SOMA_DATA_OBJECT_KEYS: readonly string[];
3
3
  /** 视图:取代手写常量 soma-core/core/client/parser/data-config-parser.ts#SOMA_DATA_FIELD_KEYS(迁移时已用 HEAD 源码逐值逐序对账相等)。 */
4
4
  export declare const SOMA_DATA_FIELD_KEYS: readonly string[];
5
5
  /** 视图:取代手写常量 soma-core/core/client/parser/data-config-parser.ts#SOMA_DATA_RULE_KEYS(迁移时已用 HEAD 源码逐值逐序对账相等)。 */
6
- export declare const SOMA_DATA_RULE_KEYS: readonly ["required", "max_len", "min_len", "pattern", "min", "max", "step", "message", "when", "async", "severity"];
6
+ export declare const SOMA_DATA_RULE_KEYS: readonly ["required", "max_len", "min_len", "pattern", "min", "max", "step", "message", "async", "severity"];
7
7
  /** 视图:取代手写常量 soma-core/core/client/parser/data-config-parser.ts#SOMA_DATA_WRITE_KEYS(迁移时已用 HEAD 源码逐值逐序对账相等)。 */
8
8
  export declare const SOMA_DATA_WRITE_KEYS: readonly ["create", "update", "version", "map", "only", "reload", "delete", "validate_on", "failWhen", "messagePath", "timeoutMs"];
9
9
  /** 视图:取代手写常量 soma-core/core/shared/page-envelope.ts#SOMA_PAGE_ENVELOPE_KEYS(迁移时已用 HEAD 源码逐值逐序对账相等)。 */
@@ -32,8 +32,6 @@ export declare const SOMA_STD_DOMAIN_PREDICATE_OPS: readonly ["eq", "ne", "in",
32
32
  export declare const SOMA_STD_DOMAIN_COMMAND_METHODS: readonly ["POST", "PUT", "PATCH"];
33
33
  /** 取值域 validate-triggers(对应 SOMA_VALIDATE_TRIGGERS):写通道 validate_on 的校验时机:非空无重复列表 */
34
34
  export declare const SOMA_STD_DOMAIN_VALIDATE_TRIGGERS: readonly ["change", "blur", "submit"];
35
- /** 取值域 show-when-presence-ops(对应 SOMA_SHOW_WHEN_PRESENCE_OPS):Show when 对象形 { field, op, value? } 在谓词算子(predicate-ops)之外多出的有无值算子,不带 value:present = 非 null / undefined / 空白串 / 空数组(0 与 false 算有值,与动作 available_when.requires 同口径);blank = 相反。谓词里的 empty / not_empty 把 false 当空,口径不同 */
36
- export declare const SOMA_STD_DOMAIN_SHOW_WHEN_PRESENCE_OPS: readonly ["present", "blank"];
37
35
  /** 取值域 url-schemes(对应 SOMA_URL_FIELD_SCHEMES):url / image 字段 schemes 的协议闭集(S8);缺省只放行 http / https */
38
36
  export declare const SOMA_STD_DOMAIN_URL_SCHEMES: readonly ["http", "https", "mailto", "tel", "sms", "ftp"];
39
37
  /** 取值域 envelope-param-types(对应 SOMA_ENVELOPE_PARAM_TYPES):信封 params.<名>.type */
@@ -97,13 +95,6 @@ export declare const SOMA_STD_CARRY_TABLE: readonly [{
97
95
  readonly key: "name";
98
96
  readonly prop: "name";
99
97
  readonly carry: "passthrough";
100
- }, {
101
- readonly context: "object";
102
- readonly key: "transform";
103
- readonly prop: "transform";
104
- readonly carry: {
105
- readonly transform: "ObjectTransform";
106
- };
107
98
  }, {
108
99
  readonly context: "field";
109
100
  readonly key: "type";
@@ -139,13 +130,6 @@ export declare const SOMA_STD_CARRY_TABLE: readonly [{
139
130
  readonly carry: {
140
131
  readonly transform: "FieldOptions";
141
132
  };
142
- }, {
143
- readonly context: "object";
144
- readonly key: "predicates";
145
- readonly prop: "predicates";
146
- readonly carry: {
147
- readonly transform: "ObjectPredicates";
148
- };
149
133
  }, {
150
134
  readonly context: "object";
151
135
  readonly key: "name";
@@ -160,11 +144,6 @@ export declare const SOMA_STD_CARRY_TABLE: readonly [{
160
144
  readonly carry: {
161
145
  readonly transform: "ObjectPoll";
162
146
  };
163
- }, {
164
- readonly context: "field";
165
- readonly key: "calc";
166
- readonly prop: "calc";
167
- readonly carry: "passthrough";
168
147
  }, {
169
148
  readonly context: "field";
170
149
  readonly key: "default";
@@ -173,7 +152,7 @@ export declare const SOMA_STD_CARRY_TABLE: readonly [{
173
152
  readonly transform: "FieldDefault";
174
153
  };
175
154
  }];
176
- export declare const SOMA_STD_TRANSFORM_HOOKS: readonly ["ObjectFrom", "ObjectTransform", "FieldType", "ObjectFields", "FieldRules", "ObjectWrite", "FieldOptions", "ObjectPredicates", "ObjectName", "ObjectPoll", "FieldDefault"];
155
+ export declare const SOMA_STD_TRANSFORM_HOOKS: readonly ["ObjectFrom", "FieldType", "ObjectFields", "FieldRules", "ObjectWrite", "FieldOptions", "ObjectName", "ObjectPoll", "FieldDefault"];
177
156
  export type SomaStdTransformHookName = (typeof SOMA_STD_TRANSFORM_HOOKS)[number];
178
157
  export declare const SOMA_STD_AUTH_SCAN: {
179
158
  readonly points: readonly [{
@@ -201,3 +180,98 @@ export declare const SOMA_STD_AUTH_SCAN: {
201
180
  }];
202
181
  readonly containers: readonly [];
203
182
  };
183
+ export declare const SOMA_STD_PAGE_FORBIDDEN_LOGIC_KEYS: {
184
+ readonly title: "视觉页面不含逻辑语法:页面语法里禁止出现的逻辑键(三层分工:业务逻辑归业务对象,交互逻辑归展示对象,页面只做纯视觉翻译;见 knowledge/SOMA领域建模与组件编写准则.md §1.0)";
185
+ readonly decidedAt: "2026-11-09";
186
+ readonly keys: readonly [{
187
+ readonly key: "calc";
188
+ readonly was: "core 字段计算";
189
+ }, {
190
+ readonly key: "derive";
191
+ readonly was: "foundation 字段级派生(K19)/ kit derive 模板";
192
+ }, {
193
+ readonly key: "derived";
194
+ readonly was: "页面声明里的派生写法";
195
+ }, {
196
+ readonly key: "showWhen";
197
+ readonly was: "条件显示";
198
+ }, {
199
+ readonly key: "hiddenWhen";
200
+ readonly was: "条件隐藏";
201
+ }, {
202
+ readonly key: "disabledWhen";
203
+ readonly was: "条件禁用";
204
+ }, {
205
+ readonly key: "requiredWhen";
206
+ readonly was: "条件必填";
207
+ }, {
208
+ readonly key: "when";
209
+ readonly was: "动作 when 条件 / show when 对象谓词 { field, op, value } / rules[].when 条件规则(纯路径字符串形 when 是纯绑定,放行)";
210
+ readonly forbiddenShape: "object";
211
+ }, {
212
+ readonly key: "predicates";
213
+ readonly scope: "standard";
214
+ readonly was: "data.<对象>.predicates 具名谓词";
215
+ }, {
216
+ readonly key: "transform";
217
+ readonly scope: "standard";
218
+ readonly was: "data.<对象>.transform 取数后派生字段";
219
+ }, {
220
+ readonly key: "steps";
221
+ readonly scope: "standard";
222
+ readonly was: "_event 事件编排(when / switch / for_each / goto)";
223
+ }, {
224
+ readonly key: "triggers";
225
+ readonly scope: "standard";
226
+ readonly was: "_event triggers 条件触发器(condition + value)";
227
+ }, {
228
+ readonly key: "switch";
229
+ readonly scope: "standard";
230
+ readonly was: "_event steps 内 switch 条件分支";
231
+ }, {
232
+ readonly key: "for_each";
233
+ readonly scope: "standard";
234
+ readonly was: "_event steps 内 for_each 循环";
235
+ }, {
236
+ readonly key: "parallel";
237
+ readonly scope: "standard";
238
+ readonly was: "_event steps 内 parallel 并行编排";
239
+ }];
240
+ readonly pureBinding: {
241
+ readonly title: "展示对象的值对页面只读:页面只做纯路径读取,不在页面里取反、比较、映射;需要判断的地方由展示对象直接给最终值(2026-11-10 裁决)";
242
+ readonly negatedPath: {
243
+ readonly code: "CORE-PAGE-NEGATE-FORBIDDEN";
244
+ readonly prefix: "!";
245
+ readonly positions: readonly ["show.when", "show.class 值", "show.props 值", "嵌套绑定 when"];
246
+ readonly pathPattern: "^!\\s*[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)+\\s*$";
247
+ readonly was: "`!path` 取反前缀(when / class 条件路径 / 组件 props 值)";
248
+ readonly remedy: "由展示对象另给相反的成员(如 remarkHidden),页面绑定它";
249
+ };
250
+ readonly styleComparison: {
251
+ readonly code: "CORE-STYLE-COMPARE-FORBIDDEN";
252
+ readonly keys: readonly ["condition", "value"];
253
+ readonly positions: readonly ["_style states 条目", "_style transitions.active_state"];
254
+ readonly was: "_style states 的 `condition: 路径` + `value` 比较 + `apply`,以及 transitions.active_state 的 condition + value";
255
+ readonly remedy: "改写成类名档位绑定:`bind: page.成员` + `tiers: { 档位名: 类名 }`,成员的值就是档位名";
256
+ };
257
+ readonly styleTier: {
258
+ readonly keys: readonly ["bind", "tiers"];
259
+ readonly tierNamePattern: "^[a-z][a-z0-9_-]*$";
260
+ readonly maxTiers: 8;
261
+ readonly positions: readonly ["_style states.<锚点>", "_style transitions.<锚点>(trigger: active_state)"];
262
+ readonly note: "bind 是纯路径(点分标识符,无取反 / 管道 / 运算符);tiers 是 档位名 到 类名串 的闭集映射,成员值不在档位内时不加任何类;档位名闭集 pattern 与个数上限读本节,页面不写比较";
263
+ };
264
+ readonly roleBy: {
265
+ readonly code: "CORE-PAGE-ROLE-BY-INVALID";
266
+ readonly pathPattern: "^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)*$";
267
+ readonly positions: readonly ["bind.role_by"];
268
+ readonly was: "bind.role_by 写了表达式 / 取反 / 管道 / 映射";
269
+ readonly remedy: "role_by 只许纯路径:行字段的值直接作为模板名,匹配 data-soma-role=\"item:取值\";行数据自带模板名";
270
+ };
271
+ };
272
+ readonly exemptContexts: readonly ["diagnostics", "diagnosticExamples", "rejected", "title", "basis", "was", "summary", "docSummary"];
273
+ readonly exampleRoots: readonly ["soma-kit-demo/pages", "soma-kit/examples", "soma-ui/tests/fixtures/hosts", "soma-core-demo/ui", "soma-core-demo/pages"];
274
+ readonly exampleFilePatterns: readonly ["_ui.yaml", ".kit.yaml", "_style.yaml"];
275
+ readonly exampleSkipDirs: readonly ["node_modules", "negative", "__negative__"];
276
+ readonly note: "forbiddenShape: 'object' = 只禁对象 / 列表形,值为字符串(纯路径绑定)放行;scope: 'standard' = 只在 core 标准格式(四件套 / 注入口)判定,不进 G83 的跨方言语法源与示例页扫描(方言同名键含义不同,如 steps 页面模式)";
277
+ };