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.
- package/README.md +8 -19
- package/bin/service-codegen.cjs +2 -3
- package/bin/soma.cjs +2 -2
- package/core/build/compiler/soma-precompile.js +13 -4
- package/core/client/data/region-scope-port.ts +8 -3
- package/core/client/engine/event-engine.ts +1 -1
- package/core/client/engine/soma-bootstrap.ts +9 -0
- package/core/client/parser/confirm-spec.ts +10 -4
- package/core/client/parser/ui-config-parser.ts +14 -2
- package/core/index.ts +1 -1
- package/core/server/api/load-host-service.ts +0 -1
- package/core/shared/registry-generated/diagnostic-registry-index.ts +16 -0
- package/core/shared/registry-generated/diagnostic-registry.ts +130 -0
- package/core/shared/registry-generated/std-grammar-views.ts +1 -1
- package/core/shared/registry-generated/std-grammar.ts +1 -1
- package/core/shared/types/region-scope.types.ts +6 -0
- package/dist/browser/runtime-bundle.manifest.json +11 -12
- package/dist/browser/soma-runtime.js +127 -112
- package/dist/core/index.cjs +127 -112
- package/dist/host-native/aot-builder.cjs +22 -5
- package/dist/host-native/native-server.cjs +122 -54
- package/dist/lsp/component-tree.cjs +17 -8
- package/dist/types/client/data/region-scope-port.d.ts +1 -1
- package/dist/types/client/engine/soma-bootstrap.d.ts +5 -0
- package/dist/types/client/parser/confirm-spec.d.ts +1 -1
- package/dist/types/shared/registry-generated/diagnostic-registry.d.ts +113 -1
- package/dist/types/shared/registry-generated/std-grammar-views.d.ts +1 -1
- package/dist/types/shared/registry-generated/std-grammar.d.ts +1 -1
- package/dist/types/shared/types/region-scope.types.d.ts +6 -0
- package/host-native/bin/host-native.cjs +1 -1
- package/host-native/client/browser-entry.ts +12 -1
- package/host-native/client/first-frame.ts +8 -0
- package/host-native/client/router-bridge.ts +8 -2
- package/host-native/src/aot-builder.ts +26 -2
- package/host-native/src/native-server.ts +131 -25
- package/host-native/src/public-packages.cjs +11 -2
- package/host-native/styles/globals.css +28 -2
- package/package.json +2 -2
- package/dist/core/adaptive-pure.cjs +0 -41
- package/dist/core/theme-pure.cjs +0 -38
- package/dist/preview-export.cjs +0 -3401
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# soma-core
|
|
2
2
|
|
|
3
3
|
SOMA 通用运行时:core 的标准体系 = HTML + 一份 `_ui.yaml` + 组件。页面 = HTML 锚点(Soma Mark)
|
|
4
|
-
+ 一份 core 标准格式页面声明(四件套:`html/<page>.html` + 平铺 `ui/<page>_ui.yaml`(`soma: 1`)+ `event/<page>_event.yaml` + `style/<page>_style.yaml`;含 Soma Show / Flow / Timer / Data / Scope / State / Envelope / Fragment 等各子 DSL
|
|
5
|
-
+ 组件 + 可选 Domain TS —— 声明即数据,落盘即渲染,零构建。core
|
|
4
|
+
+ 一份 core 标准格式页面声明(四件套:`html/<page>.html` + 平铺 `ui/<page>_ui.yaml`(`soma: 1`)+ `event/<page>_event.yaml` + `style/<page>_style.yaml`;含 Soma Show / Flow / Timer / Data / Scope / State / Envelope / Fragment 等各子 DSL;上层方言源文件编译成四件套后交给 core)
|
|
5
|
+
+ 组件 + 可选 Domain TS —— 声明即数据,落盘即渲染,零构建。core 不认识上层方言页面源:方言由上层扩展包在编译/运行期
|
|
6
6
|
编译成标准格式后经 `registerSomaPage(s)` 按 URL 注入。
|
|
7
7
|
|
|
8
8
|
Registry 页面以页面名作为公开根路径:注册 `myworkspace` 后直接访问 `/myworkspace`。
|
|
9
9
|
Host 文件页优先,Registry 页面在 Host 404 时兜底;存量 `/pages/<name>` 链接仅保留兼容读取。
|
|
10
10
|
|
|
11
|
-
当前版本为 `soma-core@2.2.
|
|
11
|
+
当前版本为 `soma-core@2.2.10`(唯一版本)。core 不含纯计算出口(纯计算由 `soma-foundation` 提供,边界由根 `scripts/verify-foundation.mjs` 检查)。
|
|
12
12
|
|
|
13
13
|
## 当前能力(以代码为准)
|
|
14
14
|
|
|
@@ -22,35 +22,24 @@ Host 文件页优先,Registry 页面在 Host 404 时兜底;存量 `/pages/<n
|
|
|
22
22
|
- **数据对象层**:数据对象解析器(输入是标准格式的数据对象声明、`_ui.yaml` 顶层 `data:`;
|
|
23
23
|
多接口 DAG 依赖编排/字段字典/类型双态映射/速记列/mock 样本兜底),解析结果注入 `page.data`,支持 `reloadData`(`core/client/data`)。
|
|
24
24
|
窗口 `block` 缺省不写在 core:Host 装配调 `configureWindowBlockDefaults` 注入(值取 soma-design 限值表 `hostDefaults.windowBlock`),未注入即抛错。
|
|
25
|
-
- **主题**:core 不认识主题。派生在 soma-foundation
|
|
25
|
+
- **主题**:core 不认识主题。派生在 `soma-foundation`,编译在上层扩展包;core 只装载编译产出的普通样式。
|
|
26
26
|
- **引擎端口**:样式(`style-engine`)、行为(`behavior`)、会话焦点(`session-focus`)、表格(`table`)、虚拟滚动(`virtual`)、
|
|
27
27
|
Temporal 值语义(`temporal`)、图表(`chart`)、拖放(`dnd`)、文本差异(`diff`)、二维码(`qrcode`)各一个子路径;
|
|
28
28
|
引擎库只在 `adapter-*.ts` 里动态 import,可经 `SomaBootstrapOptions.engines` 逐槽替换。
|
|
29
|
-
- **渲染端口**:`render-ports` 的 notify / regionFallback
|
|
29
|
+
- **渲染端口**:`render-ports` 的 notify / regionFallback 由上层体系注入,缺省无头(只记录 / 只打标记)。
|
|
30
30
|
- **宿主与 CLI**:core 运行时与宿主壳均零 Next / React 依赖;原生极速单进程宿主壳在包内 `host-native/`(含客户端分片与后端服务预先静态编译,支持 `--web-dir` / `--api-dir` 前后端分目录同进程运行),`soma dev/build/start` 以子进程转调它;`soma` CLI
|
|
31
|
-
(`dev/build/start` 转调包内 host-native、`codegen`、`sync`、`lsp
|
|
31
|
+
(`dev/build/start` 转调包内 host-native、`codegen`、`sync`、`lsp`、以及通过 `soma.commands` 注册转调的扩展子命令,见 `bin/` 与 `soma help`)。
|
|
32
32
|
mock 服务器与 `soma-mock` 已迁 soma-testkit;`verify` 在 soma-testkit。
|
|
33
33
|
|
|
34
34
|
## 文档索引
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
对外接入文档见仓库 `external-docs/soma-core接入指南.md`,内部工程文档统一归口于仓库 `docs/`。
|
|
37
37
|
|
|
38
38
|
子路径与依赖:`package.json` `exports` 是唯一清单。`soma-core/scheduling`(`createObserverPool` / `scheduleFlush`,原 adaptive 目录改名)
|
|
39
39
|
与各引擎端口子路径见上;命名判据 `COMPONENT_NAME_PATTERN` / `isComponentName` 引自 `soma-foundation/design/naming`,core 不自带。
|
|
40
40
|
引擎库(`@tanstack/*`、`@zag-js/*`、`diff`、`qrcode-generator`、`temporal-polyfill`)是 dependencies;`echarts`、`tailwindcss` 为可选 peer。
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- `soma 运行时引擎详设.md` — 引擎架构拓扑、编译管线、组件运行时、作用域、emit 路由、services 白名单。模块详设旗舰篇
|
|
45
|
-
- `soma 业务领域详设.md` — 业务领域模块:三类领域对象、服务层分层、生命周期、基类与注解驱动
|
|
46
|
-
- `soma 数据对象层.md` — 数据对象语法与解析器
|
|
47
|
-
- `soma 引擎端口.md` — 引擎端口、样式引擎与渲染端口
|
|
48
|
-
- `soma 页面 Registry 详设.md` — 页面 / API 注册中心、发布与回滚
|
|
49
|
-
- `soma Runtime 扩展内部设计.md` — Runtime 扩展与跨端接入
|
|
50
|
-
- `soma CLI 与 Host 工作区.md` — CLI 与 Next Host 实施方案
|
|
51
|
-
- `soma DSL 语法全书.md` — core 标准格式与 `std-grammar` 的实现级语法参考,自成一册(对外入口是 `external-docs/soma-core原生手册.md`;BDL 归 soma-ui、kit 页面源归 soma-kit)
|
|
52
|
-
|
|
53
|
-
全局架构见仓库 `docs/02-系统架构/SOMA全局系统架构.md`,模块类设计见 `docs/03-类与模块/soma-core类与模块设计.md`。
|
|
42
|
+
全局架构见仓库 `docs/02-系统架构/SOMA全局系统架构.md`,模块类设计见 `docs/03-类与模块/soma-core类与模块设计.md`,语法规范见 `docs/04-语法与规范/`。
|
|
54
43
|
|
|
55
44
|
## 测试
|
|
56
45
|
|
package/bin/service-codegen.cjs
CHANGED
|
@@ -33,14 +33,13 @@ function generateServiceSource({ name, methods, route }) {
|
|
|
33
33
|
const methodBlocks = methods.map((m) => {
|
|
34
34
|
const upper = m.toUpperCase();
|
|
35
35
|
return `
|
|
36
|
-
async ${m}(req:
|
|
36
|
+
async ${m}(req: Request): Promise<Response> {
|
|
37
37
|
// TODO: 实现 ${upper} /api/service/${routeHint}
|
|
38
38
|
return Response.json({ code: 0, message: '${upper} ${className} stub' });
|
|
39
39
|
}`;
|
|
40
40
|
}).join('\n');
|
|
41
41
|
|
|
42
|
-
return `import type {
|
|
43
|
-
import type { IService } from '@core/server/api/IService';
|
|
42
|
+
return `import type { IService } from '@core/server/api/IService';
|
|
44
43
|
|
|
45
44
|
/** Generated by soma codegen service — ${new Date().toISOString()} */
|
|
46
45
|
export default class ${className} implements IService {
|
package/bin/soma.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* 扩展命令表(Host 工程里的 `package.json` 或已装的 `soma-*` 包的 `package.json`):
|
|
13
13
|
* { "soma": { "commands": { "<命令名>": "<相对该 package.json 所在目录的入口文件>" } } }
|
|
14
|
-
* ·
|
|
14
|
+
* · 表由上层方言扩展包安装时带上,core 不在代码里点名任何方言命令;
|
|
15
15
|
* · 这里从 Host 工程(`SOMA_HOST_DIR`,其次当前目录及其各级父目录)按命令名查表,
|
|
16
16
|
* 以**子进程**执行入口文件并透传退出码——不经任何 import / require 说明符,所以 core 对方言包零依赖;
|
|
17
17
|
* · 环境变量 `SOMA_EXTENSION_CLI` 显式指定一个入口文件,对所有扩展命令生效,优先于查表;
|
|
@@ -116,7 +116,7 @@ function runExtensionCommand(name, argv) {
|
|
|
116
116
|
* 已下线的子命令 → 替代做法。入口在这里集中拦截:stderr 写明替代命令,退出码 2(与「命令不存在」的 1 区分)。
|
|
117
117
|
*/
|
|
118
118
|
const RETIRED_COMMANDS = {
|
|
119
|
-
init: '应用工程请在 Host 根配置 soma.app.ts
|
|
119
|
+
init: '应用工程请在 Host 根配置 soma.app.ts(应用配置与工程初始化按所用上层扩展包的约定);新建组件包请使用 soma pack init <包名> [--dir <目录>]',
|
|
120
120
|
'package-vscode': '请直接通过 soma lsp(或 soma-lsp)以 stdio 协议接入编辑器',
|
|
121
121
|
};
|
|
122
122
|
|
|
@@ -3362,7 +3362,7 @@ var SOMA_STD_PAGE_FORBIDDEN_LOGIC_KEYS = {
|
|
|
3362
3362
|
"roleBy": { "code": "CORE-PAGE-ROLE-BY-INVALID", "pathPattern": "^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)*$", "positions": ["bind.role_by"], "was": "bind.role_by \u5199\u4E86\u8868\u8FBE\u5F0F / \u53D6\u53CD / \u7BA1\u9053 / \u6620\u5C04", "remedy": 'role_by \u53EA\u8BB8\u7EAF\u8DEF\u5F84\uFF1A\u884C\u5B57\u6BB5\u7684\u503C\u76F4\u63A5\u4F5C\u4E3A\u6A21\u677F\u540D\uFF0C\u5339\u914D data-soma-role="item:\u53D6\u503C"\uFF1B\u884C\u6570\u636E\u81EA\u5E26\u6A21\u677F\u540D' }
|
|
3363
3363
|
},
|
|
3364
3364
|
"exemptContexts": ["diagnostics", "diagnosticExamples", "rejected", "title", "basis", "was", "summary", "docSummary"],
|
|
3365
|
-
"exampleRoots": ["soma-kit-demo/pages", "soma-kit/examples", "soma-ui/tests/fixtures/hosts"
|
|
3365
|
+
"exampleRoots": ["soma-kit-demo/pages", "soma-kit/examples", "soma-ui/tests/fixtures/hosts"],
|
|
3366
3366
|
"exampleFilePatterns": ["_ui.yaml", ".kit.yaml", "_style.yaml"],
|
|
3367
3367
|
"exampleSkipDirs": ["node_modules", "negative", "__negative__"],
|
|
3368
3368
|
"note": "forbiddenShape: 'object' = \u53EA\u7981\u5BF9\u8C61 / \u5217\u8868\u5F62\uFF0C\u503C\u4E3A\u5B57\u7B26\u4E32\uFF08\u7EAF\u8DEF\u5F84\u7ED1\u5B9A\uFF09\u653E\u884C\uFF1Bscope: 'standard' = \u53EA\u5728 core \u6807\u51C6\u683C\u5F0F\uFF08\u56DB\u4EF6\u5957 / \u6CE8\u5165\u53E3\uFF09\u5224\u5B9A\uFF0C\u4E0D\u8FDB G83 \u7684\u8DE8\u65B9\u8A00\u8BED\u6CD5\u6E90\u4E0E\u793A\u4F8B\u9875\u626B\u63CF\uFF08\u65B9\u8A00\u540C\u540D\u952E\u542B\u4E49\u4E0D\u540C\uFF0C\u5982 steps \u9875\u9762\u6A21\u5F0F\uFF09"
|
|
@@ -3711,7 +3711,7 @@ function parseUiConfig(raw, options) {
|
|
|
3711
3711
|
config.initProps = parseInitProps(raw.initProps, "initProps");
|
|
3712
3712
|
}
|
|
3713
3713
|
if ("adaptive" in raw && raw.adaptive !== void 0) {
|
|
3714
|
-
throw new SomaUiConfigError("adaptive \u58F0\u660E\u5DF2\u9000\u5F79\uFF1A\u81EA\u9002\u5E94\u5728\u7F16\u8BD1\u671F\u7531
|
|
3714
|
+
throw new SomaUiConfigError("adaptive \u58F0\u660E\u5DF2\u9000\u5F79\uFF1A\u81EA\u9002\u5E94\u5728\u7F16\u8BD1\u671F\u7531\u4E0A\u5C42\u65B9\u8A00\u51B3\u5B9A\uFF0C\u9875\u9762\u58F0\u660E\u91CC\u4E0D\u518D\u5199 adaptive", "adaptive");
|
|
3715
3715
|
}
|
|
3716
3716
|
if ("state" in raw && raw.state !== void 0) {
|
|
3717
3717
|
config.state = parsePageState(
|
|
@@ -3821,6 +3821,13 @@ function isMapValue(value) {
|
|
|
3821
3821
|
function isTextValue(value) {
|
|
3822
3822
|
return typeof value === "string" && value.trim() !== "";
|
|
3823
3823
|
}
|
|
3824
|
+
function isPlainJsonValue(value) {
|
|
3825
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return true;
|
|
3826
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
3827
|
+
if (Array.isArray(value)) return value.every(isPlainJsonValue);
|
|
3828
|
+
if (typeof value === "object" && [Object.prototype, null].includes(Object.getPrototypeOf(value))) return Object.values(value).every(isPlainJsonValue);
|
|
3829
|
+
return false;
|
|
3830
|
+
}
|
|
3824
3831
|
function shapeError(message, path) {
|
|
3825
3832
|
throw new SomaUiConfigError(message, path);
|
|
3826
3833
|
}
|
|
@@ -3844,7 +3851,7 @@ function shapeClosedKeys(value, allowed, what, path) {
|
|
|
3844
3851
|
var SCOPE_DECL_KEYS = { id: true, object: true, slices: true, mirrors: true, gates: true };
|
|
3845
3852
|
var SCOPE_MIRROR_KEYS = { key: true, slice: true, path: true, as: true };
|
|
3846
3853
|
var SCOPE_GATE_KEYS = { hook: true, slice: true, path: true };
|
|
3847
|
-
var SCOPE_SLICE_KEYS = { name: true, owner: true, writers: true, readers: true, ready: true };
|
|
3854
|
+
var SCOPE_SLICE_KEYS = { name: true, owner: true, writers: true, readers: true, ready: true, initial: true };
|
|
3848
3855
|
function parseScopeDeclarations(raw, path) {
|
|
3849
3856
|
if (!Array.isArray(raw)) shapeError(`${path} \u5FC5\u987B\u662F\u6570\u7EC4\uFF08\u533A\u57DF\u534F\u8C03\u4F5C\u7528\u57DF\u58F0\u660E\uFF09`, path);
|
|
3850
3857
|
const decls = raw.map((item, index) => {
|
|
@@ -3875,12 +3882,14 @@ function parseScopeDeclarations(raw, path) {
|
|
|
3875
3882
|
readers = slice.readers;
|
|
3876
3883
|
}
|
|
3877
3884
|
if (slice.ready !== void 0 && typeof slice.ready !== "boolean") shapeError("ready \u5FC5\u987B\u662F\u5E03\u5C14\u503C", `${sliceAt}.ready`);
|
|
3885
|
+
if (slice.initial !== void 0 && !isPlainJsonValue(slice.initial)) shapeError("initial \u5FC5\u987B\u662F\u7EAF JSON \u503C\uFF08\u5BF9\u8C61 / \u6570\u7EC4 / \u5B57\u7B26\u4E32 / \u6570\u5B57 / \u5E03\u5C14 / null\uFF09", `${sliceAt}.initial`);
|
|
3878
3886
|
return {
|
|
3879
3887
|
name,
|
|
3880
3888
|
owner,
|
|
3881
3889
|
...writers !== void 0 ? { writers } : {},
|
|
3882
3890
|
...readers !== void 0 ? { readers } : {},
|
|
3883
|
-
...slice.ready === true ? { ready: true } : {}
|
|
3891
|
+
...slice.ready === true ? { ready: true } : {},
|
|
3892
|
+
...slice.initial !== void 0 ? { initial: slice.initial } : {}
|
|
3884
3893
|
};
|
|
3885
3894
|
});
|
|
3886
3895
|
const object = entry.object === void 0 ? void 0 : shapeText(entry.object, "object", `${at}.object`);
|
|
@@ -55,13 +55,18 @@ export interface SomaRegionScopeStore {
|
|
|
55
55
|
/** 清空(数据层失效、页面卸载) */
|
|
56
56
|
clear(): void;
|
|
57
57
|
/**
|
|
58
|
-
* 重置切片值(C43,切换主体时清理,接 `resetOnContextChange
|
|
58
|
+
* 重置切片值(C43,切换主体时清理,接 `resetOnContextChange`):声明保留,值回到声明的初值(`initial`,没声明 = 空)、`ready` 回到声明的初值,
|
|
59
59
|
* 写入序号加一(在途的取数响应按序号判迟到,不会写回上个主体的数据),订阅者收到通知。
|
|
60
60
|
* `scopeIds` 缺省 = 全部作用域;`names` 缺省 = 全部切片。返回被重置的切片个数。
|
|
61
61
|
*/
|
|
62
62
|
reset(scopeIds?: readonly string[], names?: readonly SomaRegionSliceName[]): number;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/** 切片初值(声明的 `initial`,纯 JSON 值)的独立副本;没声明 = undefined(空切片) */
|
|
66
|
+
function initialOf(decl: SomaScopeSliceDecl): unknown {
|
|
67
|
+
return decl.initial === undefined ? undefined : structuredClone(decl.initial);
|
|
68
|
+
}
|
|
69
|
+
|
|
65
70
|
interface SliceState {
|
|
66
71
|
readonly decl: SomaScopeSliceDecl;
|
|
67
72
|
value: unknown;
|
|
@@ -188,7 +193,7 @@ export function createRegionScopeStore(): SomaRegionScopeStore {
|
|
|
188
193
|
const slices = new Map<SomaRegionSliceName, SliceState>();
|
|
189
194
|
for (const sliceDecl of decl.slices) {
|
|
190
195
|
slices.set(sliceDecl.name, {
|
|
191
|
-
decl: sliceDecl, value:
|
|
196
|
+
decl: sliceDecl, value: initialOf(sliceDecl), ready: sliceDecl.ready !== true, revision: 0, listeners: new Set(), queued: false,
|
|
192
197
|
});
|
|
193
198
|
}
|
|
194
199
|
next.set(decl.id, { decl, slices, semantic: new Set() });
|
|
@@ -259,7 +264,7 @@ export function createRegionScopeStore(): SomaRegionScopeStore {
|
|
|
259
264
|
if (scopeIds !== undefined && !scopeIds.includes(id)) continue;
|
|
260
265
|
for (const [name, slice] of scope.slices) {
|
|
261
266
|
if (names !== undefined && !names.includes(name)) continue;
|
|
262
|
-
slice.value =
|
|
267
|
+
slice.value = initialOf(slice.decl);
|
|
263
268
|
slice.ready = slice.decl.ready !== true;
|
|
264
269
|
slice.revision += 1;
|
|
265
270
|
notify(slice);
|
|
@@ -617,7 +617,7 @@ export class SomaEventEngine<TContext extends Record<string, unknown> = Record<s
|
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
if (config.confirm) {
|
|
620
|
-
// 确认文案占位(`{字段}` / `{n}
|
|
620
|
+
// 确认文案占位(`{字段}` / `{n}`)在触发时代入:替换 text / impact / typed 的 phrase(缺值的 phrase 作废 → 确认钮恒不可用),permission / roles 顺序与确认级别不受影响
|
|
621
621
|
const spec = resolveConfirmSpec(
|
|
622
622
|
config.confirmSpec ?? { level: 'plain', text: config.confirm },
|
|
623
623
|
confirmContext,
|
|
@@ -1266,6 +1266,15 @@ export class SomaBootstrap {
|
|
|
1266
1266
|
&& (this.domainInstance?._services?.http.pendingCount() ?? 0) === 0;
|
|
1267
1267
|
}
|
|
1268
1268
|
|
|
1269
|
+
/**
|
|
1270
|
+
* 首轮渲染落定:组件初始化完成、调度队列清空;不等在途请求(与 whenSettled 的区别)。
|
|
1271
|
+
* 宿主据此在数据到位前判断页面是否已画出自己声明的加载态(见 host-native 首帧显示)。
|
|
1272
|
+
*/
|
|
1273
|
+
async whenRendered(): Promise<void> {
|
|
1274
|
+
await this.componentManager?.whenInitialized();
|
|
1275
|
+
await this.scheduler.whenSettled();
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1269
1278
|
async whenSettled(): Promise<void> {
|
|
1270
1279
|
do {
|
|
1271
1280
|
await this.componentManager?.whenInitialized();
|
|
@@ -119,7 +119,8 @@ export function parseConfirmSegment(message: string): SomaConfirmSegment | { rea
|
|
|
119
119
|
//
|
|
120
120
|
// · 语法:`{名字}`,名字 = `[A-Za-z_][A-Za-z0-9_]*`(标识符,不含点、不含路径、不含格式化函数);
|
|
121
121
|
// `{{` 是字面 `{`,`}}` 是字面 `}`;不符合标识符语法的花括号原样保留(不是占位)。
|
|
122
|
-
// · 作用位置:确认的 `text` 与 `
|
|
122
|
+
// · 作用位置:确认的 `text`、`impact` 与 typed 级的 `phrase`(要用户键入的比对串,如被操作对象的名称 `{name}`),三处同一代入函数。
|
|
123
|
+
// `phrase` 有任一占位取不到值时整串作废(代入为空串):确认钮恒不可用——宁可点不了,也不能让用户照着「—」键入就放行。
|
|
123
124
|
// · 取值:`{n}` 是保留名 = 本次触发的已选行数(载荷 `rows` 数组的长度);其余名字取载荷 `row`(对象)的同名字段,
|
|
124
125
|
// 行内触发而载荷没带 `row` 时取所在行的数据(与具名动作载荷同口径)。
|
|
125
126
|
// · 值一律转成纯文本:字符串原样、数字 / 布尔 String();对象 / 数组 / null / undefined / 缺字段 / 无行可取 = 缺失。
|
|
@@ -174,12 +175,17 @@ export function substituteConfirmText(text: string, context: SomaConfirmContext,
|
|
|
174
175
|
});
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
/** 把确认规格的 text / impact
|
|
178
|
+
/** 把确认规格的 text / impact / phrase 代入占位;无花括号时返回原规格(同一引用)。phrase 缺任一占位值 → 空串(确认钮恒不可用) */
|
|
178
179
|
export function resolveConfirmSpec(spec: SomaConfirmSpec, context: SomaConfirmContext, onMissing?: (name: string) => void): SomaConfirmSpec {
|
|
179
180
|
const text = substituteConfirmText(spec.text, context, onMissing);
|
|
180
181
|
const impact = spec.impact === undefined ? undefined : substituteConfirmText(spec.impact, context, onMissing);
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
let phraseMissing = false;
|
|
183
|
+
const phrase = spec.phrase === undefined
|
|
184
|
+
? undefined
|
|
185
|
+
: substituteConfirmText(spec.phrase, context, (name) => { phraseMissing = true; onMissing?.(name); });
|
|
186
|
+
const finalPhrase = phrase === undefined ? undefined : phraseMissing ? '' : phrase;
|
|
187
|
+
if (text === spec.text && impact === spec.impact && finalPhrase === spec.phrase) return spec;
|
|
188
|
+
return { ...spec, text, ...(impact !== undefined ? { impact } : {}), ...(finalPhrase !== undefined ? { phrase: finalPhrase } : {}) };
|
|
183
189
|
}
|
|
184
190
|
|
|
185
191
|
/** 开发期告警(按占位名去重;生产构建不输出) */
|
|
@@ -462,7 +462,7 @@ export function parseUiConfig(raw: any, options?: SomaUiConfigParseOptions): UiC
|
|
|
462
462
|
|
|
463
463
|
// adaptive 段已随自适应编译期化退役:运行期不再解析、不再仲裁;写了就明确拒收,不静默丢弃
|
|
464
464
|
if ('adaptive' in raw && raw.adaptive !== undefined) {
|
|
465
|
-
throw new SomaUiConfigError('adaptive
|
|
465
|
+
throw new SomaUiConfigError('adaptive 声明已退役:自适应在编译期由上层方言决定,页面声明里不再写 adaptive', 'adaptive');
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
// state 同为可选保留键(REQ-010 F-37),同一条纪律:缺席时连字段都不写。
|
|
@@ -615,6 +615,15 @@ function isTextValue(value: unknown): value is string {
|
|
|
615
615
|
return typeof value === 'string' && value.trim() !== '';
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
+
/** 纯 JSON 值谓词(切片初值):null / 字符串 / 有限数 / 布尔,或元素都是纯 JSON 值的数组 / 原型为 Object 的普通对象 */
|
|
619
|
+
function isPlainJsonValue(value: unknown): boolean {
|
|
620
|
+
if (value === null || typeof value === 'string' || typeof value === 'boolean') return true;
|
|
621
|
+
if (typeof value === 'number') return Number.isFinite(value);
|
|
622
|
+
if (Array.isArray(value)) return value.every(isPlainJsonValue);
|
|
623
|
+
if (typeof value === 'object' && [Object.prototype, null].includes(Object.getPrototypeOf(value))) return Object.values(value as Record<string, unknown>).every(isPlainJsonValue);
|
|
624
|
+
return false;
|
|
625
|
+
}
|
|
626
|
+
|
|
618
627
|
/** 形状错误一律抛 `SomaUiConfigError`。写成函数声明,调用点才吃得到 `never` 收窄 */
|
|
619
628
|
function shapeError(message: string, path: string): never {
|
|
620
629
|
throw new SomaUiConfigError(message, path);
|
|
@@ -646,7 +655,7 @@ function shapeClosedKeys(value: Record<string, unknown>, allowed: object, what:
|
|
|
646
655
|
const SCOPE_DECL_KEYS = { id: true, object: true, slices: true, mirrors: true, gates: true } as const;
|
|
647
656
|
const SCOPE_MIRROR_KEYS = { key: true, slice: true, path: true, as: true } as const;
|
|
648
657
|
const SCOPE_GATE_KEYS = { hook: true, slice: true, path: true } as const;
|
|
649
|
-
const SCOPE_SLICE_KEYS = { name: true, owner: true, writers: true, readers: true, ready: true } as const;
|
|
658
|
+
const SCOPE_SLICE_KEYS = { name: true, owner: true, writers: true, readers: true, ready: true, initial: true } as const;
|
|
650
659
|
|
|
651
660
|
/**
|
|
652
661
|
* 区域协调作用域声明数组(页面级 `scopes:` 与 `fragments.scopes` 同一份判据)。
|
|
@@ -685,11 +694,14 @@ export function parseScopeDeclarations(raw: unknown, path: string): SomaScopeDec
|
|
|
685
694
|
readers = slice.readers as string[];
|
|
686
695
|
}
|
|
687
696
|
if (slice.ready !== undefined && typeof slice.ready !== 'boolean') shapeError('ready 必须是布尔值', `${sliceAt}.ready`);
|
|
697
|
+
// 初值只收纯 JSON 值(对象 / 数组 / 字符串 / 数字 / 布尔 / null):它会被逐次复制进切片,函数、日期等不可复制的值是产出方的缺陷
|
|
698
|
+
if (slice.initial !== undefined && !isPlainJsonValue(slice.initial)) shapeError('initial 必须是纯 JSON 值(对象 / 数组 / 字符串 / 数字 / 布尔 / null)', `${sliceAt}.initial`);
|
|
688
699
|
return {
|
|
689
700
|
name, owner,
|
|
690
701
|
...(writers !== undefined ? { writers } : {}),
|
|
691
702
|
...(readers !== undefined ? { readers } : {}),
|
|
692
703
|
...(slice.ready === true ? { ready: true } : {}),
|
|
704
|
+
...(slice.initial !== undefined ? { initial: slice.initial } : {}),
|
|
693
705
|
};
|
|
694
706
|
});
|
|
695
707
|
const object = entry.object === undefined ? undefined : shapeText(entry.object, 'object', `${at}.object`);
|
package/core/index.ts
CHANGED
|
@@ -148,7 +148,6 @@ function getJitiLoader(
|
|
|
148
148
|
* 按约定从宿主 apiRoot 加载 IService 实例(运行时按需加载,零手动 registry)。
|
|
149
149
|
*/
|
|
150
150
|
export function loadHostService(segments: string[], hostDir?: string): IService | null {
|
|
151
|
-
if (typeof process !== "undefined" && process.env.NEXT_RUNTIME === "edge") return null;
|
|
152
151
|
const resolvedHostDir = hostDir || currentHostDir();
|
|
153
152
|
if (!resolvedHostDir) return null;
|
|
154
153
|
|
|
@@ -597,6 +597,22 @@ export const SOMA_DIAGNOSTIC_CODE_INDEX: readonly (readonly [code: string, famil
|
|
|
597
597
|
['FND-THEME-SHADOW-UNPAIRED', 'FND-THEME', 'foundation', 'error'],
|
|
598
598
|
['FND-THEME-SURFACE-INDISTINCT', 'FND-THEME', 'foundation', 'error'],
|
|
599
599
|
['FND-THEME-VALUE-DOMAIN', 'FND-THEME', 'foundation', 'error'],
|
|
600
|
+
['KIT-PAGE-GATE-001', 'KIT-PAGE-GATE', 'page', 'error'],
|
|
601
|
+
['KIT-PAGE-GATE-002', 'KIT-PAGE-GATE', 'page', 'error'],
|
|
602
|
+
['KIT-PAGE-GATE-003', 'KIT-PAGE-GATE', 'page', 'error'],
|
|
603
|
+
['KIT-PAGE-GATE-004', 'KIT-PAGE-GATE', 'page', 'error'],
|
|
604
|
+
['KIT-PAGE-GATE-005', 'KIT-PAGE-GATE', 'page', 'error'],
|
|
605
|
+
['KIT-PAGE-GATE-006', 'KIT-PAGE-GATE', 'page', 'warn'],
|
|
606
|
+
['KIT-PAGE-GATE-900', 'KIT-PAGE-GATE', 'page', 'warn'],
|
|
607
|
+
['KIT-PAGE-GATE-901', 'KIT-PAGE-GATE', 'page', 'error'],
|
|
608
|
+
['KIT-THEME-GATE-001', 'KIT-THEME-GATE', 'theme', 'error'],
|
|
609
|
+
['KIT-THEME-GATE-002', 'KIT-THEME-GATE', 'theme', 'error'],
|
|
610
|
+
['KIT-THEME-GATE-003', 'KIT-THEME-GATE', 'theme', 'warn'],
|
|
611
|
+
['KIT-THEME-GATE-010', 'KIT-THEME-GATE', 'theme', 'error'],
|
|
612
|
+
['KIT-THEME-GATE-011', 'KIT-THEME-GATE', 'theme', 'warn'],
|
|
613
|
+
['KIT-THEME-GATE-012', 'KIT-THEME-GATE', 'theme', 'warn'],
|
|
614
|
+
['KIT-THEME-GATE-013', 'KIT-THEME-GATE', 'theme', 'warn'],
|
|
615
|
+
['KIT-THEME-GATE-014', 'KIT-THEME-GATE', 'theme', 'warn'],
|
|
600
616
|
['OOUI-ART-ANCHOR-DUPLICATE', 'OOUI-ART', 'ooui', 'error'],
|
|
601
617
|
['OOUI-ART-ANCHOR-SYNTAX', 'OOUI-ART', 'ooui', 'error'],
|
|
602
618
|
['OOUI-ART-NODE-SHAPE', 'OOUI-ART', 'ooui', 'error'],
|
|
@@ -67,6 +67,8 @@ export const SOMA_PIPELINE_DIAGNOSTIC_REGISTRY = {
|
|
|
67
67
|
"FND-PROOF",
|
|
68
68
|
"FND-STYLE",
|
|
69
69
|
"FND-THEME",
|
|
70
|
+
"KIT-PAGE-GATE",
|
|
71
|
+
"KIT-THEME-GATE",
|
|
70
72
|
"OOUI-ART",
|
|
71
73
|
"OOUI-ASM",
|
|
72
74
|
"OOUI-SEM",
|
|
@@ -4393,6 +4395,134 @@ export const SOMA_PIPELINE_DIAGNOSTIC_REGISTRY = {
|
|
|
4393
4395
|
"severity": "error",
|
|
4394
4396
|
"owner": "soma-foundation/src/primitives/diag.ts"
|
|
4395
4397
|
},
|
|
4398
|
+
{
|
|
4399
|
+
"code": "KIT-PAGE-GATE-001",
|
|
4400
|
+
"family": "KIT-PAGE-GATE",
|
|
4401
|
+
"stage": "page",
|
|
4402
|
+
"severity": "error",
|
|
4403
|
+
"owner": "soma-kit/src/spatial/emit.ts",
|
|
4404
|
+
"negative": "soma-kit/tests/spatial/emit-gates.test.ts"
|
|
4405
|
+
},
|
|
4406
|
+
{
|
|
4407
|
+
"code": "KIT-PAGE-GATE-002",
|
|
4408
|
+
"family": "KIT-PAGE-GATE",
|
|
4409
|
+
"stage": "page",
|
|
4410
|
+
"severity": "error",
|
|
4411
|
+
"owner": "soma-kit/src/spatial/emit.ts",
|
|
4412
|
+
"negative": "soma-kit/tests/spatial/emit-gates.test.ts"
|
|
4413
|
+
},
|
|
4414
|
+
{
|
|
4415
|
+
"code": "KIT-PAGE-GATE-003",
|
|
4416
|
+
"family": "KIT-PAGE-GATE",
|
|
4417
|
+
"stage": "page",
|
|
4418
|
+
"severity": "error",
|
|
4419
|
+
"owner": "soma-kit/src/spatial/emit.ts",
|
|
4420
|
+
"negative": "soma-kit/tests/spatial/emit-gates.test.ts"
|
|
4421
|
+
},
|
|
4422
|
+
{
|
|
4423
|
+
"code": "KIT-PAGE-GATE-004",
|
|
4424
|
+
"family": "KIT-PAGE-GATE",
|
|
4425
|
+
"stage": "page",
|
|
4426
|
+
"severity": "error",
|
|
4427
|
+
"owner": "soma-kit/src/spatial/emit.ts",
|
|
4428
|
+
"negative": "soma-kit/tests/spatial/emit-gates.test.ts"
|
|
4429
|
+
},
|
|
4430
|
+
{
|
|
4431
|
+
"code": "KIT-PAGE-GATE-005",
|
|
4432
|
+
"family": "KIT-PAGE-GATE",
|
|
4433
|
+
"stage": "page",
|
|
4434
|
+
"severity": "error",
|
|
4435
|
+
"owner": "soma-kit/src/spatial/emit.ts",
|
|
4436
|
+
"negative": "soma-kit/tests/spatial/emit-gates.test.ts"
|
|
4437
|
+
},
|
|
4438
|
+
{
|
|
4439
|
+
"code": "KIT-PAGE-GATE-006",
|
|
4440
|
+
"family": "KIT-PAGE-GATE",
|
|
4441
|
+
"stage": "page",
|
|
4442
|
+
"severity": "warn",
|
|
4443
|
+
"owner": "soma-kit/src/spatial/emit.ts",
|
|
4444
|
+
"negative": "soma-kit/tests/spatial/emit-gates.test.ts"
|
|
4445
|
+
},
|
|
4446
|
+
{
|
|
4447
|
+
"code": "KIT-PAGE-GATE-900",
|
|
4448
|
+
"family": "KIT-PAGE-GATE",
|
|
4449
|
+
"stage": "page",
|
|
4450
|
+
"severity": "warn",
|
|
4451
|
+
"owner": "soma-kit/src/compile/page-pipeline.ts",
|
|
4452
|
+
"negative": "soma-kit/tests/compile/page-pipeline-wiring.test.ts"
|
|
4453
|
+
},
|
|
4454
|
+
{
|
|
4455
|
+
"code": "KIT-PAGE-GATE-901",
|
|
4456
|
+
"family": "KIT-PAGE-GATE",
|
|
4457
|
+
"stage": "page",
|
|
4458
|
+
"severity": "error",
|
|
4459
|
+
"owner": "soma-kit/src/compile/compile-page.ts",
|
|
4460
|
+
"negative": "soma-kit/tests/compile/page-pipeline-wiring.test.ts"
|
|
4461
|
+
},
|
|
4462
|
+
{
|
|
4463
|
+
"code": "KIT-THEME-GATE-001",
|
|
4464
|
+
"family": "KIT-THEME-GATE",
|
|
4465
|
+
"stage": "theme",
|
|
4466
|
+
"severity": "error",
|
|
4467
|
+
"owner": "soma-kit/src/theme/value-table.ts",
|
|
4468
|
+
"negative": "soma-kit/tests/theme/value-table.test.ts"
|
|
4469
|
+
},
|
|
4470
|
+
{
|
|
4471
|
+
"code": "KIT-THEME-GATE-002",
|
|
4472
|
+
"family": "KIT-THEME-GATE",
|
|
4473
|
+
"stage": "theme",
|
|
4474
|
+
"severity": "error",
|
|
4475
|
+
"owner": "soma-kit/src/theme/value-table.ts",
|
|
4476
|
+
"negative": "soma-kit/tests/theme/value-table.test.ts"
|
|
4477
|
+
},
|
|
4478
|
+
{
|
|
4479
|
+
"code": "KIT-THEME-GATE-003",
|
|
4480
|
+
"family": "KIT-THEME-GATE",
|
|
4481
|
+
"stage": "theme",
|
|
4482
|
+
"severity": "warn",
|
|
4483
|
+
"owner": "soma-kit/src/theme/value-table.ts",
|
|
4484
|
+
"negative": "soma-kit/tests/theme/value-table.test.ts"
|
|
4485
|
+
},
|
|
4486
|
+
{
|
|
4487
|
+
"code": "KIT-THEME-GATE-010",
|
|
4488
|
+
"family": "KIT-THEME-GATE",
|
|
4489
|
+
"stage": "theme",
|
|
4490
|
+
"severity": "error",
|
|
4491
|
+
"owner": "soma-kit/src/app/tier-compat.ts",
|
|
4492
|
+
"negative": "soma-kit/tests/app/tier-compat.test.ts"
|
|
4493
|
+
},
|
|
4494
|
+
{
|
|
4495
|
+
"code": "KIT-THEME-GATE-011",
|
|
4496
|
+
"family": "KIT-THEME-GATE",
|
|
4497
|
+
"stage": "theme",
|
|
4498
|
+
"severity": "warn",
|
|
4499
|
+
"owner": "soma-kit/src/app/tier-compat.ts",
|
|
4500
|
+
"negative": "soma-kit/tests/app/tier-compat.test.ts"
|
|
4501
|
+
},
|
|
4502
|
+
{
|
|
4503
|
+
"code": "KIT-THEME-GATE-012",
|
|
4504
|
+
"family": "KIT-THEME-GATE",
|
|
4505
|
+
"stage": "theme",
|
|
4506
|
+
"severity": "warn",
|
|
4507
|
+
"owner": "soma-kit/src/app/server.ts",
|
|
4508
|
+
"negative": "soma-kit/tests/app/tier-compat.test.ts"
|
|
4509
|
+
},
|
|
4510
|
+
{
|
|
4511
|
+
"code": "KIT-THEME-GATE-013",
|
|
4512
|
+
"family": "KIT-THEME-GATE",
|
|
4513
|
+
"stage": "theme",
|
|
4514
|
+
"severity": "warn",
|
|
4515
|
+
"owner": "soma-kit/src/app/tier-compat.ts",
|
|
4516
|
+
"negative": "soma-kit/tests/app/tier-compat.test.ts"
|
|
4517
|
+
},
|
|
4518
|
+
{
|
|
4519
|
+
"code": "KIT-THEME-GATE-014",
|
|
4520
|
+
"family": "KIT-THEME-GATE",
|
|
4521
|
+
"stage": "theme",
|
|
4522
|
+
"severity": "warn",
|
|
4523
|
+
"owner": "soma-kit/src/theme/value-table.ts",
|
|
4524
|
+
"negative": "soma-kit/tests/theme/value-table.test.ts"
|
|
4525
|
+
},
|
|
4396
4526
|
{
|
|
4397
4527
|
"code": "OOUI-ART-ANCHOR-DUPLICATE",
|
|
4398
4528
|
"family": "OOUI-ART",
|
|
@@ -162,7 +162,7 @@ export const SOMA_STD_PAGE_FORBIDDEN_LOGIC_KEYS = {
|
|
|
162
162
|
"roleBy": { "code": "CORE-PAGE-ROLE-BY-INVALID", "pathPattern": "^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)*$", "positions": ["bind.role_by"], "was": "bind.role_by 写了表达式 / 取反 / 管道 / 映射", "remedy": "role_by 只许纯路径:行字段的值直接作为模板名,匹配 data-soma-role=\"item:取值\";行数据自带模板名" }
|
|
163
163
|
},
|
|
164
164
|
"exemptContexts": ["diagnostics", "diagnosticExamples", "rejected", "title", "basis", "was", "summary", "docSummary"],
|
|
165
|
-
"exampleRoots": ["soma-kit-demo/pages", "soma-kit/examples", "soma-ui/tests/fixtures/hosts"
|
|
165
|
+
"exampleRoots": ["soma-kit-demo/pages", "soma-kit/examples", "soma-ui/tests/fixtures/hosts"],
|
|
166
166
|
"exampleFilePatterns": ["_ui.yaml", ".kit.yaml", "_style.yaml"],
|
|
167
167
|
"exampleSkipDirs": ["node_modules", "negative", "__negative__"],
|
|
168
168
|
"note": "forbiddenShape: 'object' = 只禁对象 / 列表形,值为字符串(纯路径绑定)放行;scope: 'standard' = 只在 core 标准格式(四件套 / 注入口)判定,不进 G83 的跨方言语法源与示例页扫描(方言同名键含义不同,如 steps 页面模式)"
|
|
@@ -161,7 +161,7 @@ export const SOMA_PIPELINE_STD_GRAMMAR = {
|
|
|
161
161
|
],
|
|
162
162
|
"pureBinding": { "title": "展示对象的值对页面只读:页面只做纯路径读取,不在页面里取反、比较、映射;需要判断的地方由展示对象直接给最终值(2026-11-10 裁决)", "negatedPath": { "code": "CORE-PAGE-NEGATE-FORBIDDEN", "prefix": "!", "positions": ["show.when", "show.class 值", "show.props 值", "嵌套绑定 when"], "pathPattern": "^!\\s*[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)+\\s*$", "was": "`!path` 取反前缀(when / class 条件路径 / 组件 props 值)", "remedy": "由展示对象另给相反的成员(如 remarkHidden),页面绑定它" }, "styleComparison": { "code": "CORE-STYLE-COMPARE-FORBIDDEN", "keys": ["condition", "value"], "positions": ["_style states 条目", "_style transitions.active_state"], "was": "_style states 的 `condition: 路径` + `value` 比较 + `apply`,以及 transitions.active_state 的 condition + value", "remedy": "改写成类名档位绑定:`bind: page.成员` + `tiers: { 档位名: 类名 }`,成员的值就是档位名" }, "styleTier": { "keys": ["bind", "tiers"], "tierNamePattern": "^[a-z][a-z0-9_-]*$", "maxTiers": 8, "positions": ["_style states.<锚点>", "_style transitions.<锚点>(trigger: active_state)"], "note": "bind 是纯路径(点分标识符,无取反 / 管道 / 运算符);tiers 是 档位名 到 类名串 的闭集映射,成员值不在档位内时不加任何类;档位名闭集 pattern 与个数上限读本节,页面不写比较" }, "roleBy": { "code": "CORE-PAGE-ROLE-BY-INVALID", "pathPattern": "^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*)*$", "positions": ["bind.role_by"], "was": "bind.role_by 写了表达式 / 取反 / 管道 / 映射", "remedy": "role_by 只许纯路径:行字段的值直接作为模板名,匹配 data-soma-role=\"item:取值\";行数据自带模板名" } },
|
|
163
163
|
"exemptContexts": ["diagnostics", "diagnosticExamples", "rejected", "title", "basis", "was", "summary", "docSummary"],
|
|
164
|
-
"exampleRoots": ["soma-kit-demo/pages", "soma-kit/examples", "soma-ui/tests/fixtures/hosts"
|
|
164
|
+
"exampleRoots": ["soma-kit-demo/pages", "soma-kit/examples", "soma-ui/tests/fixtures/hosts"],
|
|
165
165
|
"exampleFilePatterns": ["_ui.yaml", ".kit.yaml", "_style.yaml"],
|
|
166
166
|
"exampleSkipDirs": ["node_modules", "negative", "__negative__"],
|
|
167
167
|
"note": "forbiddenShape: 'object' = 只禁对象 / 列表形,值为字符串(纯路径绑定)放行;scope: 'standard' = 只在 core 标准格式(四件套 / 注入口)判定,不进 G83 的跨方言语法源与示例页扫描(方言同名键含义不同,如 steps 页面模式)"
|
|
@@ -82,6 +82,12 @@ export interface SomaScopeSliceDecl {
|
|
|
82
82
|
readonly readers?: readonly string[];
|
|
83
83
|
/** 带 ready 位:初值未就绪,owner 调 `markReady()` 置位 */
|
|
84
84
|
readonly ready?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* 切片初值(纯 JSON 值):装入与重置(`reset`)时切片取它的副本而不是空;不写 = 空(读作 undefined)。
|
|
87
|
+
* 用途:读接口参数经镜像绑切片子路径时,首个请求就带上初值(例:列表视图切片 `{ page: 1, size: <每页缺省> }`),
|
|
88
|
+
* 不必等 owner 第一次写入后再重取。初值不经写权核对(它是声明的一部分,不是某个部件的写入)。
|
|
89
|
+
*/
|
|
90
|
+
readonly initial?: unknown;
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
/**
|
|
@@ -613,8 +613,17 @@
|
|
|
613
613
|
"../node_modules/echarts/lib/visual/tokens.js",
|
|
614
614
|
"../node_modules/echarts/lib/visual/visualDefault.js",
|
|
615
615
|
"../node_modules/echarts/lib/visual/visualSolution.js",
|
|
616
|
-
"../node_modules/echarts/node_modules/tslib/tslib.es6.js",
|
|
617
616
|
"../node_modules/echarts/renderers.js",
|
|
617
|
+
"../node_modules/entities/dist/decode-codepoint.js",
|
|
618
|
+
"../node_modules/entities/dist/decode.js",
|
|
619
|
+
"../node_modules/entities/dist/encode.js",
|
|
620
|
+
"../node_modules/entities/dist/escape.js",
|
|
621
|
+
"../node_modules/entities/dist/generated/decode-data-html.js",
|
|
622
|
+
"../node_modules/entities/dist/generated/decode-data-xml.js",
|
|
623
|
+
"../node_modules/entities/dist/generated/encode-html.js",
|
|
624
|
+
"../node_modules/entities/dist/index.js",
|
|
625
|
+
"../node_modules/entities/dist/internal/bin-trie-flags.js",
|
|
626
|
+
"../node_modules/entities/dist/internal/decode-shared.js",
|
|
618
627
|
"../node_modules/get-east-asian-width/index.js",
|
|
619
628
|
"../node_modules/get-east-asian-width/lookup-data.js",
|
|
620
629
|
"../node_modules/get-east-asian-width/lookup.js",
|
|
@@ -624,16 +633,6 @@
|
|
|
624
633
|
"../node_modules/markdown-it-cjk-friendly/dist/index.js",
|
|
625
634
|
"../node_modules/markdown-it-footnote/index.mjs",
|
|
626
635
|
"../node_modules/markdown-it/dist/markdown-it.mjs",
|
|
627
|
-
"../node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.js",
|
|
628
|
-
"../node_modules/markdown-it/node_modules/entities/dist/decode.js",
|
|
629
|
-
"../node_modules/markdown-it/node_modules/entities/dist/encode.js",
|
|
630
|
-
"../node_modules/markdown-it/node_modules/entities/dist/escape.js",
|
|
631
|
-
"../node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.js",
|
|
632
|
-
"../node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.js",
|
|
633
|
-
"../node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.js",
|
|
634
|
-
"../node_modules/markdown-it/node_modules/entities/dist/index.js",
|
|
635
|
-
"../node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.js",
|
|
636
|
-
"../node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.js",
|
|
637
636
|
"../node_modules/mdurl/index.mjs",
|
|
638
637
|
"../node_modules/mdurl/lib/decode.mjs",
|
|
639
638
|
"../node_modules/mdurl/lib/encode.mjs",
|
|
@@ -645,6 +644,7 @@
|
|
|
645
644
|
"../node_modules/temporal-polyfill/chunks/classApi.js",
|
|
646
645
|
"../node_modules/temporal-polyfill/chunks/internal.js",
|
|
647
646
|
"../node_modules/temporal-polyfill/index.js",
|
|
647
|
+
"../node_modules/tslib/tslib.es6.js",
|
|
648
648
|
"../node_modules/uc.micro/build/index.mjs",
|
|
649
649
|
"../node_modules/zrender/lib/Element.js",
|
|
650
650
|
"../node_modules/zrender/lib/Handler.js",
|
|
@@ -739,7 +739,6 @@
|
|
|
739
739
|
"../node_modules/zrender/lib/tool/path.js",
|
|
740
740
|
"../node_modules/zrender/lib/tool/transformPath.js",
|
|
741
741
|
"../node_modules/zrender/lib/zrender.js",
|
|
742
|
-
"../node_modules/zrender/node_modules/tslib/tslib.es6.js",
|
|
743
742
|
"../soma-foundation/dist/esm/design-generated/impl/_data.js",
|
|
744
743
|
"../soma-foundation/dist/esm/design-generated/impl/naming.js",
|
|
745
744
|
"../soma-foundation/dist/esm/design-generated/view-state-rules.js",
|