soma-core 2.2.10 → 2.2.11

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 (41) hide show
  1. package/README.md +8 -19
  2. package/bin/service-codegen.cjs +2 -3
  3. package/bin/soma.cjs +2 -2
  4. package/core/build/compiler/soma-precompile.js +13 -4
  5. package/core/client/data/region-scope-port.ts +8 -3
  6. package/core/client/engine/event-engine.ts +1 -1
  7. package/core/client/engine/soma-bootstrap.ts +9 -0
  8. package/core/client/parser/confirm-spec.ts +10 -4
  9. package/core/client/parser/ui-config-parser.ts +14 -2
  10. package/core/index.ts +1 -1
  11. package/core/server/api/load-host-service.ts +0 -1
  12. package/core/shared/registry-generated/diagnostic-registry-index.ts +16 -0
  13. package/core/shared/registry-generated/diagnostic-registry.ts +130 -0
  14. package/core/shared/registry-generated/std-grammar-views.ts +1 -1
  15. package/core/shared/registry-generated/std-grammar.ts +1 -1
  16. package/core/shared/types/region-scope.types.ts +6 -0
  17. package/dist/browser/runtime-bundle.manifest.json +11 -12
  18. package/dist/browser/soma-runtime.js +127 -112
  19. package/dist/core/index.cjs +127 -112
  20. package/dist/host-native/aot-builder.cjs +22 -5
  21. package/dist/host-native/native-server.cjs +122 -54
  22. package/dist/lsp/component-tree.cjs +17 -8
  23. package/dist/types/client/data/region-scope-port.d.ts +1 -1
  24. package/dist/types/client/engine/soma-bootstrap.d.ts +5 -0
  25. package/dist/types/client/parser/confirm-spec.d.ts +1 -1
  26. package/dist/types/shared/registry-generated/diagnostic-registry.d.ts +113 -1
  27. package/dist/types/shared/registry-generated/std-grammar-views.d.ts +1 -1
  28. package/dist/types/shared/registry-generated/std-grammar.d.ts +1 -1
  29. package/dist/types/shared/types/region-scope.types.d.ts +6 -0
  30. package/host-native/bin/host-native.cjs +1 -1
  31. package/host-native/client/browser-entry.ts +12 -1
  32. package/host-native/client/first-frame.ts +8 -0
  33. package/host-native/client/router-bridge.ts +8 -2
  34. package/host-native/src/aot-builder.ts +26 -2
  35. package/host-native/src/native-server.ts +131 -25
  36. package/host-native/src/public-packages.cjs +11 -2
  37. package/host-native/styles/globals.css +28 -2
  38. package/package.json +2 -2
  39. package/dist/core/adaptive-pure.cjs +0 -41
  40. package/dist/core/theme-pure.cjs +0 -38
  41. package/dist/preview-export.cjs +0 -3401
@@ -21,8 +21,9 @@ body {
21
21
  margin: 0;
22
22
  }
23
23
 
24
+ /* 主题 CSS 进文档前(水合期)的回落值取画布系统色 Canvas(随 color-scheme),与主题画布同色,挂载前后底色不跳变 */
24
25
  body {
25
- background: var(--soma-surface-base, #f8fafc);
26
+ background: var(--soma-surface-base, Canvas);
26
27
  color: var(--soma-text-primary, #1f2937);
27
28
  font-family: var(--soma-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
28
29
  }
@@ -69,6 +70,31 @@ select {
69
70
  color: inherit;
70
71
  text-decoration: inherit;
71
72
  }
73
+
74
+ /*
75
+ * 浮层根(data-soma-overlay-root,挂在 body 下、不在组件宿主里)补齐与组件宿主相同的归零范围:标题 / 段落、列表、表格、链接。
76
+ * 只在文档根带 data-soma-overlay-reset 时生效(宿主选择加入;soma-kit 在主题流水线新模式启动时写上),
77
+ * 没有这个标记的页面(含 soma-kit 旧版)浮层外观不变。表单控件的归零上面一条已覆盖浮层根,不受此标记限定。
78
+ */
79
+ :where([data-soma-overlay-reset] [data-soma-overlay-root]) :where(h1, h2, h3, h4, h5, h6, p, blockquote, figure, dl, dd) {
80
+ margin: 0;
81
+ }
82
+
83
+ :where([data-soma-overlay-reset] [data-soma-overlay-root]) :where(ol, ul, menu) {
84
+ list-style: none;
85
+ margin: 0;
86
+ padding: 0;
87
+ }
88
+
89
+ :where([data-soma-overlay-reset] [data-soma-overlay-root]) table {
90
+ border-collapse: collapse;
91
+ text-indent: 0;
92
+ }
93
+
94
+ :where([data-soma-overlay-reset] [data-soma-overlay-root]) a {
95
+ color: inherit;
96
+ text-decoration: inherit;
97
+ }
72
98
  }
73
99
 
74
100
  .soma-hidden {
@@ -84,7 +110,7 @@ select {
84
110
  display: grid;
85
111
  min-block-size: 100dvh;
86
112
  place-items: center;
87
- background: var(--soma-surface-base, #f8fafc);
113
+ background: var(--soma-surface-base, Canvas);
88
114
  color: var(--soma-text-primary, #374151);
89
115
  }
90
116
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soma-core",
3
- "version": "2.2.10",
3
+ "version": "2.2.11",
4
4
  "description": "SOMA — Semantic Oriented Modular Architecture. A declarative frontend framework runtime with no UI framework dependency; native host shell ships in host-native/.",
5
5
  "keywords": [
6
6
  "soma",
@@ -346,7 +346,7 @@
346
346
  "parse5": "7.3.0",
347
347
  "qrcode-generator": "2.0.4",
348
348
  "server-only": "0.0.1",
349
- "soma-foundation": "^0.1.6",
349
+ "soma-foundation": "^0.1.7",
350
350
  "temporal-polyfill": "0.3.2"
351
351
  },
352
352
  "peerDependencies": {
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // core/shared/adaptive-pure.ts
21
- var adaptive_pure_exports = {};
22
- __export(adaptive_pure_exports, {
23
- SOMA_ADAPTIVE_MAX_LADDER: () => import_adaptive2.SOMA_ADAPTIVE_MAX_LADDER,
24
- SOMA_ADAPTIVE_PROFILES: () => import_adaptive2.SOMA_ADAPTIVE_PROFILES,
25
- SOMA_DEFAULT_HYSTERESIS: () => import_adaptive.SOMA_DEFAULT_HYSTERESIS,
26
- resolveTierWithHysteresis: () => import_adaptive.resolveTierWithHysteresis
27
- });
28
- module.exports = __toCommonJS(adaptive_pure_exports);
29
-
30
- // core/client/adaptive/hysteresis.ts
31
- var import_adaptive = require("soma-foundation/adaptive");
32
-
33
- // core/shared/types/adaptive.types.ts
34
- var import_adaptive2 = require("soma-foundation/adaptive");
35
- // Annotate the CommonJS export names for ESM import in node:
36
- 0 && (module.exports = {
37
- SOMA_ADAPTIVE_MAX_LADDER,
38
- SOMA_ADAPTIVE_PROFILES,
39
- SOMA_DEFAULT_HYSTERESIS,
40
- resolveTierWithHysteresis
41
- });
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // core/client/theme/theme-derivation.ts
21
- var theme_derivation_exports = {};
22
- __export(theme_derivation_exports, {
23
- contrastRatio: () => import_theme_derivation.contrastRatio,
24
- deriveTheme: () => import_theme_derivation.deriveTheme,
25
- hexToOklch: () => import_theme_derivation.hexToOklch,
26
- oklchToHex: () => import_theme_derivation.oklchToHex,
27
- themeRootAttributes: () => import_theme_derivation.themeRootAttributes
28
- });
29
- module.exports = __toCommonJS(theme_derivation_exports);
30
- var import_theme_derivation = require("soma-foundation/theme/theme-derivation");
31
- // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
33
- contrastRatio,
34
- deriveTheme,
35
- hexToOklch,
36
- oklchToHex,
37
- themeRootAttributes
38
- });