base-screen 0.3.0 → 0.4.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/dist/_internal/contracts/document/schema.d.ts +7 -0
- package/dist/_internal/contracts/document/schema.js +1 -1
- package/dist/_internal/contracts/document/validate-value-ref.js +6 -1
- package/dist/_internal/contracts/screen-document.schema.json +15 -3
- package/dist/_internal/contracts/types/diagnostics.d.ts +1 -1
- package/dist/_internal/contracts/types/document.d.ts +3 -1
- package/dist/_internal/core/blueprint/runtime-simulate.d.ts +57 -0
- package/dist/_internal/core/blueprint/runtime-simulate.js +177 -0
- package/dist/_internal/core/blueprint/runtime.d.ts +1 -0
- package/dist/_internal/core/blueprint/runtime.js +1 -0
- package/dist/_internal/core/commands/apply-collection-commands.d.ts +32 -0
- package/dist/_internal/core/commands/apply-collection-commands.js +174 -0
- package/dist/_internal/core/commands/apply.js +13 -0
- package/dist/_internal/core/commands/parse-command.js +12 -0
- package/dist/_internal/core/commands/types.d.ts +29 -1
- package/dist/_internal/core/data/data-candidates.d.ts +38 -0
- package/dist/_internal/core/data/data-candidates.js +186 -0
- package/dist/_internal/core/data/dataset-profile.d.ts +71 -0
- package/dist/_internal/core/data/dataset-profile.js +170 -0
- package/dist/_internal/core/data/sample-values.d.ts +25 -0
- package/dist/_internal/core/data/sample-values.js +45 -0
- package/dist/_internal/core/diff/screen-diff.js +6 -0
- package/dist/_internal/core/index.d.ts +7 -1
- package/dist/_internal/core/index.js +7 -1
- package/dist/_internal/core/state/state-preset.d.ts +32 -0
- package/dist/_internal/core/state/state-preset.js +37 -0
- package/dist/_internal/core/validation/layout-audit.d.ts +17 -0
- package/dist/_internal/core/validation/layout-audit.js +228 -0
- package/dist/_internal/core/validation/legibility.d.ts +9 -0
- package/dist/_internal/core/validation/legibility.js +33 -0
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-draft-controller.d.ts +6 -1
- package/dist/_internal/engine/browser/controllers/designer-change-controller.d.ts +27 -0
- package/dist/_internal/engine/browser/dom/change/designer-change-dom.d.ts +21 -5
- package/dist/_internal/engine/browser/dom/dataset/designer-data-section-diff.d.ts +4 -6
- package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-types.d.ts +2 -0
- package/dist/_internal/engine/browser/viewport/designer-canvas-aids-types.d.ts +3 -3
- package/dist/_internal/engine/browser/viewport/designer-canvas-aids.d.ts +5 -3
- package/dist/_internal/engine/browser/viewport/designer-canvas-measurements.d.ts +2 -14
- package/dist/_internal/engine/browser/viewport/designer-guide-overlay-nodes.d.ts +2 -0
- package/dist/_internal/engine/browser/viewport/designer-snap-tuning.d.ts +14 -0
- package/dist/_internal/engine/common/operations/change/designer-change-events.d.ts +2 -0
- package/dist/_internal/engine/common/operations/change/designer-change-proposal.d.ts +35 -2
- package/dist/_internal/engine/common/operations/display/designer-target-display.d.ts +2 -2
- package/dist/_internal/engine/common/operations/style/designer-component-states.d.ts +7 -2
- package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +42 -2
- package/dist/_internal/engine/{designer-blueprint-workbench-panel-CJ3iZo5v.js → designer-blueprint-workbench-panel-BWSglfAb.js} +210 -290
- package/dist/_internal/engine/{designer-dataset-controller-CrfOg2Ys.js → designer-dataset-controller-DdbY4ILC.js} +619 -561
- package/dist/_internal/engine/designer-element/api/designer-element-change.d.ts +24 -0
- package/dist/_internal/engine/designer-element/base-screen-designer-element.d.ts +12 -0
- package/dist/_internal/engine/designer-element/designer-element-public-api.d.ts +2 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +1 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-runtime.d.ts +4 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-sample-data.d.ts +23 -0
- package/dist/_internal/engine/{designer-field-primitives-KBZuWN_D.js → designer-field-primitives-Crn464Qg.js} +44 -3
- package/dist/_internal/engine/{designer-left-panel-groups-dom-N2OHOWjl.js → designer-left-panel-groups-dom-DFdLWxxY.js} +2 -2
- package/dist/_internal/engine/{host-resource-selection-xo2mLCD4.js → host-resource-selection-CWrPLVOc.js} +2 -2
- package/dist/_internal/engine/index.js +4742 -4360
- package/dist/_internal/host-kit/index.d.ts +1 -0
- package/dist/_internal/host-kit/index.js +1 -0
- package/dist/_internal/host-kit/intent/index.d.ts +16 -0
- package/dist/_internal/host-kit/intent/index.js +13 -0
- package/dist/_internal/host-kit/intent/intent-behavior.d.ts +59 -0
- package/dist/_internal/host-kit/intent/intent-behavior.js +812 -0
- package/dist/_internal/host-kit/intent/intent-block.d.ts +59 -0
- package/dist/_internal/host-kit/intent/intent-block.js +359 -0
- package/dist/_internal/host-kit/intent/intent-catalog.d.ts +105 -0
- package/dist/_internal/host-kit/intent/intent-catalog.js +60 -0
- package/dist/_internal/host-kit/intent/intent-compile-types.d.ts +222 -0
- package/dist/_internal/host-kit/intent/intent-compile-types.js +10 -0
- package/dist/_internal/host-kit/intent/intent-compile.d.ts +35 -0
- package/dist/_internal/host-kit/intent/intent-compile.js +465 -0
- package/dist/_internal/host-kit/intent/intent-data-check.d.ts +50 -0
- package/dist/_internal/host-kit/intent/intent-data-check.js +163 -0
- package/dist/_internal/host-kit/intent/intent-data-context.d.ts +53 -0
- package/dist/_internal/host-kit/intent/intent-data-context.js +200 -0
- package/dist/_internal/host-kit/intent/intent-dataset.d.ts +52 -0
- package/dist/_internal/host-kit/intent/intent-dataset.js +125 -0
- package/dist/_internal/host-kit/intent/intent-format.d.ts +33 -0
- package/dist/_internal/host-kit/intent/intent-format.js +94 -0
- package/dist/_internal/host-kit/intent/intent-kpi-bind.d.ts +29 -0
- package/dist/_internal/host-kit/intent/intent-kpi-bind.js +59 -0
- package/dist/_internal/host-kit/intent/intent-layout.d.ts +102 -0
- package/dist/_internal/host-kit/intent/intent-layout.js +264 -0
- package/dist/_internal/host-kit/intent/intent-parse.d.ts +39 -0
- package/dist/_internal/host-kit/intent/intent-parse.js +930 -0
- package/dist/_internal/host-kit/intent/intent-prepare.d.ts +52 -0
- package/dist/_internal/host-kit/intent/intent-prepare.js +104 -0
- package/dist/_internal/host-kit/intent/intent-session.d.ts +202 -0
- package/dist/_internal/host-kit/intent/intent-session.js +1001 -0
- package/dist/_internal/host-kit/intent/intent-stream.d.ts +28 -0
- package/dist/_internal/host-kit/intent/intent-stream.js +183 -0
- package/dist/_internal/host-kit/intent/intent-style.d.ts +37 -0
- package/dist/_internal/host-kit/intent/intent-style.js +77 -0
- package/dist/_internal/host-kit/intent/intent-types.d.ts +234 -0
- package/dist/_internal/host-kit/intent/intent-types.js +10 -0
- package/dist/_internal/material/chart.js +34 -12
- package/dist/_internal/material/table.js +52 -21
- package/dist/_internal/plugin-sdk/index.d.ts +6 -0
- package/dist/_internal/plugin-sdk/index.js +6 -0
- package/dist/_internal/plugin-sdk/material-isolated-csp.d.ts +38 -0
- package/dist/_internal/plugin-sdk/material-isolated-csp.js +67 -0
- package/dist/_internal/plugin-sdk/material-isolated-runtime.d.ts +22 -0
- package/dist/_internal/plugin-sdk/material-isolated-runtime.js +262 -0
- package/dist/_internal/plugin-sdk/material-isolated.d.ts +94 -0
- package/dist/_internal/plugin-sdk/material-isolated.js +1024 -0
- package/dist/_internal/plugin-sdk/material-rendered-element.d.ts +10 -2
- package/dist/_internal/plugin-sdk/material-rendered-element.js +71 -7
- package/dist/_internal/plugin-sdk/material-spec-audit.d.ts +2 -0
- package/dist/_internal/plugin-sdk/material-spec-audit.js +26 -6
- package/dist/_internal/plugin-sdk/material-spec.d.ts +20 -0
- package/dist/_internal/plugin-sdk/material-spec.js +78 -3
- package/dist/_internal/plugin-sdk/material-template-audit.d.ts +12 -0
- package/dist/_internal/plugin-sdk/material-template-audit.js +302 -0
- package/dist/_internal/plugin-sdk/material-template-expression.d.ts +98 -0
- package/dist/_internal/plugin-sdk/material-template-expression.js +549 -0
- package/dist/_internal/plugin-sdk/material-template-render.d.ts +32 -0
- package/dist/_internal/plugin-sdk/material-template-render.js +579 -0
- package/dist/_internal/plugin-sdk/material-template.d.ts +185 -0
- package/dist/_internal/plugin-sdk/material-template.js +879 -0
- package/dist/auto-register.js +10 -10
- package/dist/contracts.js +5 -5
- package/dist/contrast-DRPezUIl.js +131 -0
- package/dist/contrast-DRPezUIl.js.map +1 -0
- package/dist/core.js +156 -136
- package/dist/core.js.map +1 -1
- package/dist/dataset-profile-Dk6xdtsM.js +261 -0
- package/dist/dataset-profile-Dk6xdtsM.js.map +1 -0
- package/dist/{designer-3Tb0EIDV.js → designer-CFOvOmLn.js} +2 -2
- package/dist/{designer-3Tb0EIDV.js.map → designer-CFOvOmLn.js.map} +1 -1
- package/dist/designer-auto-register.js +5 -5
- package/dist/{designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js → designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js} +452 -531
- package/dist/designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js.map +1 -0
- package/dist/{designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js → designer-dataset-controller-DdbY4ILC-CMdGdGbr.js} +862 -804
- package/dist/designer-dataset-controller-DdbY4ILC-CMdGdGbr.js.map +1 -0
- package/dist/{designer-field-primitives-KBZuWN_D-B3h4jpYe.js → designer-field-primitives-Crn464Qg-Bi7q8s5J.js} +45 -4
- package/dist/designer-field-primitives-Crn464Qg-Bi7q8s5J.js.map +1 -0
- package/dist/{designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js → designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js} +4 -4
- package/dist/{designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js.map → designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js.map} +1 -1
- package/dist/designer.js +5 -5
- package/dist/{dist-6GRboBs-.js → dist-B2bW2Tru.js} +4 -4
- package/dist/{dist-6GRboBs-.js.map → dist-B2bW2Tru.js.map} +1 -1
- package/dist/{dist-BjLjFUy1.js → dist-CHK9BTXX.js} +3833 -3453
- package/dist/dist-CHK9BTXX.js.map +1 -0
- package/dist/engine.js +5 -5
- package/dist/{fragment-Y6YnW6wy.js → fragment-B-oP0Fru.js} +3 -3
- package/dist/{fragment-Y6YnW6wy.js.map → fragment-B-oP0Fru.js.map} +1 -1
- package/dist/host-kit.js +3963 -187
- package/dist/host-kit.js.map +1 -1
- package/dist/{host-resource-selection-xo2mLCD4-BR5XCcim.js → host-resource-selection-CWrPLVOc-DPDq3jau.js} +5 -5
- package/dist/{host-resource-selection-xo2mLCD4-BR5XCcim.js.map → host-resource-selection-CWrPLVOc-DPDq3jau.js.map} +1 -1
- package/dist/index.js +10 -10
- package/dist/legibility-CS28ivEz.js +12 -0
- package/dist/legibility-CS28ivEz.js.map +1 -0
- package/dist/{level-scale-BzUjE31V.js → level-scale-CwHqFEVd.js} +2 -2
- package/dist/{level-scale-BzUjE31V.js.map → level-scale-CwHqFEVd.js.map} +1 -1
- package/dist/{manager-Ch0RTu_i.js → manager-CeB4Jnr9.js} +3 -3
- package/dist/{manager-Ch0RTu_i.js.map → manager-CeB4Jnr9.js.map} +1 -1
- package/dist/{material-UbSfiuZq.js → material-DeVkzSoT.js} +2 -2
- package/dist/{material-UbSfiuZq.js.map → material-DeVkzSoT.js.map} +1 -1
- package/dist/material-auto-register.js +1 -1
- package/dist/material.js +2 -2
- package/dist/{migrate-document-D3HhCVlZ.js → migrate-document-BM888PtC.js} +2 -2
- package/dist/{migrate-document-D3HhCVlZ.js.map → migrate-document-BM888PtC.js.map} +1 -1
- package/dist/{parse-AOTE9WnD.js → parse-Ji7kE9ZT.js} +9 -4
- package/dist/parse-Ji7kE9ZT.js.map +1 -0
- package/dist/{parse-B1OD1teS.js → parse-aZat9tAS.js} +3 -3
- package/dist/{parse-B1OD1teS.js.map → parse-aZat9tAS.js.map} +1 -1
- package/dist/{parse-parts-BNrpdG5o.js → parse-parts-qzl4suzk.js} +2 -2
- package/dist/{parse-parts-BNrpdG5o.js.map → parse-parts-qzl4suzk.js.map} +1 -1
- package/dist/{plugin-DHgh9uHh.js → plugin-CstHQ5ws.js} +4 -4
- package/dist/{plugin-DHgh9uHh.js.map → plugin-CstHQ5ws.js.map} +1 -1
- package/dist/plugin-core.js +2 -2
- package/dist/plugin-manager.js +1 -1
- package/dist/plugin-package-DWifuHi1.js +4206 -0
- package/dist/plugin-package-DWifuHi1.js.map +1 -0
- package/dist/{plugin-registration-rsmb4GvS.js → plugin-registration-DTwBvnHX.js} +2 -2
- package/dist/{plugin-registration-rsmb4GvS.js.map → plugin-registration-DTwBvnHX.js.map} +1 -1
- package/dist/plugin-sdk.js +6 -6
- package/dist/{plugins-DGRHgREK.js → plugins-QDL0yIql.js} +2 -2
- package/dist/{plugins-DGRHgREK.js.map → plugins-QDL0yIql.js.map} +1 -1
- package/dist/plugins.js +8 -8
- package/dist/renderer.js +1 -1
- package/dist/{runtime-dispatch-BfnRDtMe.js → runtime-dispatch-C0gyIrTv.js} +2 -2
- package/dist/{runtime-dispatch-BfnRDtMe.js.map → runtime-dispatch-C0gyIrTv.js.map} +1 -1
- package/dist/runtime-simulate-aSYO9yDX.js +147 -0
- package/dist/runtime-simulate-aSYO9yDX.js.map +1 -0
- package/dist/{src-Bm7u11mN-_0u6cMEw.js → src-Bm7u11mN-Bi1hDVkh.js} +39 -39
- package/dist/{src-Bm7u11mN-_0u6cMEw.js.map → src-Bm7u11mN-Bi1hDVkh.js.map} +1 -1
- package/dist/state-preset-DtpygJOH.js +22 -0
- package/dist/state-preset-DtpygJOH.js.map +1 -0
- package/dist/{text-BNksUr5J.js → text-BSTz0pFQ.js} +87 -34
- package/dist/text-BSTz0pFQ.js.map +1 -0
- package/dist/{value-ref-BG_MV9C-.js → value-ref-XkLuckGV.js} +2 -2
- package/dist/{value-ref-BG_MV9C-.js.map → value-ref-XkLuckGV.js.map} +1 -1
- package/dist/{viewer-CrJupI8I-D9dVcNw4.js → viewer-CrJupI8I-BJiz1cvW.js} +4 -4
- package/dist/{viewer-CrJupI8I-D9dVcNw4.js.map → viewer-CrJupI8I-BJiz1cvW.js.map} +1 -1
- package/dist/viewer-auto-register.js +2 -2
- package/dist/viewer.js +2 -2
- package/dist/{viewport-CiCKeAQH.js → viewport-BNIRWjiT.js} +354 -155
- package/dist/viewport-BNIRWjiT.js.map +1 -0
- package/package.json +12 -12
- package/dist/designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js.map +0 -1
- package/dist/designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js.map +0 -1
- package/dist/designer-field-primitives-KBZuWN_D-B3h4jpYe.js.map +0 -1
- package/dist/dist-BjLjFUy1.js.map +0 -1
- package/dist/parse-AOTE9WnD.js.map +0 -1
- package/dist/plugin-package-Dr5ro6h6.js +0 -1221
- package/dist/plugin-package-Dr5ro6h6.js.map +0 -1
- package/dist/text-BNksUr5J.js.map +0 -1
- package/dist/viewport-CiCKeAQH.js.map +0 -1
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
import type { ScreenDocument } from '../../../contracts/index.js';
|
|
2
2
|
import { type DesignerCanvasMeasurement, type DesignerSelectionSnapBounds } from './designer-canvas-aids-types.js';
|
|
3
|
-
/**
|
|
4
|
-
* 生成与当前拖动选区 anchor 对齐的布局间距标注。
|
|
5
|
-
*
|
|
6
|
-
* 每条 x/y 轨道只收集与选区 left/center/right 或 top/middle/bottom 重合、且正交投影真实重叠
|
|
7
|
-
* 的可见组件,再按另一轴的视觉区间排序并标注相邻非重叠 gap。这样能同时显示选区周边和同
|
|
8
|
-
* 轨道后续组件之间的间距(参考图中的 46 / 48 / 59),但不会把仅共享边/角的关系或网格线
|
|
9
|
-
* 变成测量或吸附目标。
|
|
10
|
-
*/
|
|
11
3
|
export declare function collectDesignerCanvasMeasurements(document: ScreenDocument, selection: DesignerSelectionSnapBounds, selectedComponentIds: readonly string[], zoom?: number): readonly DesignerCanvasMeasurement[];
|
|
12
4
|
/** One-off path: indexes the given geometry for a single measurement. */
|
|
13
5
|
export declare function measureDesignerCanvasBounds(components: readonly DesignerSelectionSnapBounds[], selection: DesignerSelectionSnapBounds, zoom?: number): readonly DesignerCanvasMeasurement[];
|
|
14
|
-
/**
|
|
15
|
-
* Gesture path: built once per geometry snapshot. Each rail only visits components whose
|
|
16
|
-
* start / center / end lies inside the tolerance window (binary search over sorted anchors),
|
|
17
|
-
* so a frame costs O(log N + matches) instead of scanning every component per rail.
|
|
18
|
-
*/
|
|
6
|
+
/** Gesture path: built once per geometry snapshot, scanned per frame. */
|
|
19
7
|
export declare class DesignerCanvasMeasurementIndex {
|
|
20
8
|
#private;
|
|
21
9
|
constructor(components: readonly DesignerSelectionSnapBounds[]);
|
|
22
|
-
/** `reach` (document units) drops
|
|
10
|
+
/** `reach` (document units) drops neighbours farther than it from the selection. */
|
|
23
11
|
measure(selection: DesignerSelectionSnapBounds, zoom?: number, reach?: number): readonly DesignerCanvasMeasurement[];
|
|
24
12
|
}
|
|
25
13
|
//# sourceMappingURL=designer-canvas-measurements.d.ts.map
|
|
@@ -12,6 +12,8 @@ export type DesignerGuideOverlayItem = {
|
|
|
12
12
|
readonly key: string;
|
|
13
13
|
readonly kind: 'measurement';
|
|
14
14
|
readonly measurement: DesignerCanvasMeasurement;
|
|
15
|
+
/** False when the gap is shorter than one reading line on screen: draw the ticks only. */
|
|
16
|
+
readonly showLabel: boolean;
|
|
15
17
|
};
|
|
16
18
|
export interface DesignerGuideOverlayNode {
|
|
17
19
|
readonly element: HTMLElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type DesignerSelectionSnapBounds } from './designer-canvas-aids-types.js';
|
|
2
|
+
/** 一帧内使用的吸附参数,均为文档坐标(已按 zoom 换算)。 */
|
|
3
|
+
export interface DesignerSnapTuning {
|
|
4
|
+
/** 捕获阈值:锚点与目标线相差多少文档像素内才吸附。 */
|
|
5
|
+
readonly threshold: number;
|
|
6
|
+
/** 邻近范围:组件与拖动几何在正交方向超过它就不参与参考线 / 等间距 / 标注。 */
|
|
7
|
+
readonly reach: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 按选区周围的组件密度求吸附参数。`focus` 是拖动几何(吸附前的位置);
|
|
11
|
+
* 没有几何(纯点吸附且调用方不提供包围盒)时直接用基础值。
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveDesignerSnapTuning(components: readonly DesignerSelectionSnapBounds[], focus: DesignerSelectionSnapBounds | undefined, zoom: number): DesignerSnapTuning;
|
|
14
|
+
//# sourceMappingURL=designer-snap-tuning.d.ts.map
|
|
@@ -17,6 +17,8 @@ export interface BaseScreenDesignerChangeProposalSummary {
|
|
|
17
17
|
readonly affectedComponentIds: readonly string[];
|
|
18
18
|
readonly units: readonly BaseScreenDesignerChangeUnitSummary[];
|
|
19
19
|
readonly origin?: DesignerChangeProposalOrigin;
|
|
20
|
+
/** 流式落稿中(ADR-0112 §2.5):内容未填完,不可采纳。 */
|
|
21
|
+
readonly streaming?: true;
|
|
20
22
|
}
|
|
21
23
|
export interface BaseScreenDesignerChangeStateDetail {
|
|
22
24
|
readonly pending: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ScreenDiagnostic, type ScreenDocument } from '../../../../contracts/index.js';
|
|
2
2
|
import { type ScreenDiffRow as DesignerChangeDiffRow, type ScreenDocumentCommand, type ScreenTransactionProvenance } from '../../../../core/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* 提案的归属标签:`author` 发起、`approver` 审批。
|
|
@@ -16,6 +16,24 @@ export interface DesignerChangeProposalInput {
|
|
|
16
16
|
readonly scope: string;
|
|
17
17
|
readonly commands: readonly ScreenDocumentCommand[];
|
|
18
18
|
readonly origin?: DesignerChangeProposalOrigin;
|
|
19
|
+
/**
|
|
20
|
+
* 可选的单元分组提示(ADR-0115 D5):宿主知道哪些命令属于同一件事(例如「版面」与「联动」),
|
|
21
|
+
* 引擎按自己的组件并集分组只看得到组件。给了就按它拆单元,但仍失败关闭:分组必须恰好覆盖全部
|
|
22
|
+
* 命令、互不重叠,且每组都能在当前文档上单独成立,否则忽略提示、退回默认拆分。整屏替换不拆。
|
|
23
|
+
*/
|
|
24
|
+
readonly groups?: readonly DesignerChangeProposalGroup[];
|
|
25
|
+
}
|
|
26
|
+
/** 宿主给的一组命令:评审面上显示为一个可独立采纳的单元。 */
|
|
27
|
+
export interface DesignerChangeProposalGroup {
|
|
28
|
+
/** 单元标题(例如「联动:点产线概览 → 筛选告警明细」),1–80 字符。 */
|
|
29
|
+
readonly label: string;
|
|
30
|
+
/** 这一组命令在 `commands` 里的下标。 */
|
|
31
|
+
readonly commandIndexes: readonly number[];
|
|
32
|
+
/**
|
|
33
|
+
* 可读说明,评审面在单元里逐行列出(至多 8 行,每行至多 120 字符)。文档级变化(变量、蓝图、
|
|
34
|
+
* 数据源参数)没有组件差异行,没有说明时评审人看不到这个单元改了什么。
|
|
35
|
+
*/
|
|
36
|
+
readonly notes?: readonly string[];
|
|
19
37
|
}
|
|
20
38
|
export type { ScreenDiffEntry as DesignerChangeDiffEntry, ScreenDiffRow as DesignerChangeDiffRow, } from '../../../../core/index.js';
|
|
21
39
|
export { diffScreenDocuments } from '../../../../core/index.js';
|
|
@@ -47,8 +65,16 @@ export interface DesignerChangeUnit {
|
|
|
47
65
|
readonly commandIndexes: readonly number[];
|
|
48
66
|
readonly diff: readonly DesignerChangeDiffRow[];
|
|
49
67
|
readonly presentation?: DesignerChangeUnitPresentation;
|
|
68
|
+
/** 宿主分组提示带来的可读说明(ADR-0115 D5)。 */
|
|
69
|
+
readonly notes?: readonly string[];
|
|
50
70
|
}
|
|
51
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* 提案单元的组合语义。
|
|
73
|
+
*
|
|
74
|
+
* `whole-screen-replacement`:整屏替换(删除全部未锁定组件并新增一组组件)。识别到它时整份提案
|
|
75
|
+
* 只有这一个单元,只能整体采纳或放弃——单独采纳其中的「删除」会把文档拆成只剩锁定组件,
|
|
76
|
+
* 而画布上仍是完整草案(ADR-0111 §2.1)。
|
|
77
|
+
*/
|
|
52
78
|
export interface DesignerChangeUnitPresentation {
|
|
53
79
|
readonly kind: 'whole-screen-replacement';
|
|
54
80
|
readonly addedCount: number;
|
|
@@ -68,6 +94,13 @@ export type DesignerChangeProposalResult = {
|
|
|
68
94
|
* 「部分生效」的候选,因此草案层永远等于一次可提交的事务。
|
|
69
95
|
*/
|
|
70
96
|
export declare function prepareDesignerChangeProposal(document: ScreenDocument, input: DesignerChangeProposalInput, id: string): DesignerChangeProposalResult;
|
|
97
|
+
/** 提案层自己的拒绝原因(ADR-0111 §2.4):文档根路径、error 级;命令非法时透传事务诊断。 */
|
|
98
|
+
export declare function changeDiagnostic(code: Extract<ScreenDiagnostic['code'], `CHANGE_${string}`>, message: string): ScreenDiagnostic;
|
|
99
|
+
/**
|
|
100
|
+
* 去掉已采纳 / 已忽略的命令后剩下的提案入参:分组提示的下标随之重排,整组被去掉的分组丢弃。
|
|
101
|
+
* 控制器按剩余命令重建提案时用它,分组提示才不会指向错位的命令。
|
|
102
|
+
*/
|
|
103
|
+
export declare function remainingChangeProposalInput(input: DesignerChangeProposalInput, removedIndexes: readonly number[]): DesignerChangeProposalInput;
|
|
71
104
|
/** 取选定单元的原始命令,保持提交时的顺序。 */
|
|
72
105
|
export declare function commandsForUnits(proposal: DesignerChangeProposal, unitIds: readonly string[]): readonly ScreenDocumentCommand[];
|
|
73
106
|
/** 组件级属性 diff:新增/删除整行,修改按字段展开。 */
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ScreenTargetDisplayProfile } from '../../../../contracts/index.js';
|
|
2
|
+
import { computeMinimumLegibleFontPx } from '../../../../core/index.js';
|
|
3
|
+
export { computeMinimumLegibleFontPx };
|
|
2
4
|
export type DesignerDisplayOverlayKind = 'safe-area' | 'seam' | 'distance';
|
|
3
5
|
export interface DesignerDisplayRect {
|
|
4
6
|
readonly x: number;
|
|
@@ -50,8 +52,6 @@ export declare function computeAngularSize(profile: ScreenTargetDisplayProfile,
|
|
|
50
52
|
readonly width: number;
|
|
51
53
|
readonly height: number;
|
|
52
54
|
}): DesignerDisplayAngularSize | null;
|
|
53
|
-
/** 最小可读字号:观距决定字高,点间距把毫米换回逻辑像素。 */
|
|
54
|
-
export declare function computeMinimumLegibleFontPx(profile: ScreenTargetDisplayProfile): number | null;
|
|
55
55
|
/**
|
|
56
56
|
* 可读性判定:信息项,不是守卫。
|
|
57
57
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ScreenComponentNode, type ScreenComponentStateCase, type ScreenComponentStateInput, type ScreenComponentStates, type ScreenDocument, type ScreenJsonObject, type ScreenJsonValue, type ScreenLevelScale, type ScreenLevelTone, type ScreenParseResult } from '../../../../contracts/index.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type ScreenDocumentTransaction, type ScreenStatePresetSource } from '../../../../core/index.js';
|
|
3
3
|
import { type BaseScreenMaterialCatalog, type BaseScreenMaterialManifest } from '../../../../plugin-core/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* 组件状态的作者面纯逻辑(ADR-0110 §2.5、§2.6.3):状态增删改、判定编辑、样式改动重定向、
|
|
@@ -49,7 +49,12 @@ export declare function redirectDesignerStyleTransaction(document: ScreenDocumen
|
|
|
49
49
|
export declare function createDesignerStatesTransaction(document: ScreenDocument, componentId: string, states: ScreenComponentStates | null, catalog: BaseScreenMaterialCatalog | undefined, messages?: DesignerStateMessages): ScreenParseResult<ScreenDocumentTransaction>;
|
|
50
50
|
/** 判定取值对应的宿主分级表(ADR-0110 §2.6.2):按来源找资源类型 / 目录项声明的分级表,路径相同者胜出。 */
|
|
51
51
|
export declare function findDesignerLevelScale(document: ScreenDocument, component: ScreenComponentNode, input: ScreenComponentStateInput, readScales: (dataSourceId: string) => readonly ScreenLevelScale[] | undefined): ScreenLevelScale | undefined;
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* 状态外观预置的入参(ADR-0115 D8):从 manifest 的外观区摊平出 core 要的键表。
|
|
54
|
+
* 宿主把它随智能体目录上送,智能体生成的阈值状态与「按分级生成状态」就用同一套规则。
|
|
55
|
+
*/
|
|
56
|
+
export declare function readDesignerStatePresetSource(manifest: BaseScreenMaterialManifest): ScreenStatePresetSource;
|
|
57
|
+
/** 生成状态时预置覆盖的样式键:规则在 core(`screenStatePresetStyle`),这里只读出 manifest 的键表。 */
|
|
53
58
|
export declare function designerStatePresetStyle(manifest: BaseScreenMaterialManifest, tone: ScreenLevelTone): ScreenJsonObject;
|
|
54
59
|
/**
|
|
55
60
|
* 按分级生成状态(ADR-0110 §2.6.3):为每个尚未存在的等级新建状态并预置覆盖,判定条件重写为
|
|
@@ -258,17 +258,41 @@ export declare const DESIGNER_UI_TEXT: {
|
|
|
258
258
|
readonly removed: '删除此旧组件';
|
|
259
259
|
readonly removedUnit: '删除旧组件';
|
|
260
260
|
readonly wholeScreenReplacement: (count: number) => string;
|
|
261
|
+
readonly wholeScreenHint: '整屏替换不能拆开采纳:请用底部「全部采纳」或「放弃」整体处理。';
|
|
262
|
+
readonly wholeScreenGroup: {
|
|
263
|
+
readonly added: (count: number) => string;
|
|
264
|
+
readonly removed: (count: number) => string;
|
|
265
|
+
readonly document: '画布与数据源';
|
|
266
|
+
};
|
|
267
|
+
readonly wholeScreenEmpty: '无';
|
|
268
|
+
readonly wholeScreenDocumentLabels: {
|
|
269
|
+
readonly canvas: '画布';
|
|
270
|
+
readonly dataSources: '数据源';
|
|
271
|
+
};
|
|
272
|
+
readonly wholeScreenKind: '替换';
|
|
273
|
+
readonly wholeScreenNames: (names: readonly string[]) => string;
|
|
274
|
+
readonly removalMark: '将移除';
|
|
275
|
+
readonly viewingOldLabel: '旧版 · 当前文档';
|
|
276
|
+
readonly streamingLabel: '草案 · 生成中';
|
|
277
|
+
readonly streamingHint: '正在逐块生成,完成后才能采纳。';
|
|
278
|
+
readonly cancelStreaming: '取消生成';
|
|
261
279
|
readonly diffPath: {
|
|
280
|
+
readonly type: '物料类型';
|
|
262
281
|
readonly name: '名称';
|
|
282
|
+
readonly parentId: '父组件';
|
|
263
283
|
readonly positionX: 'X';
|
|
264
284
|
readonly positionY: 'Y';
|
|
265
285
|
readonly sizeWidth: '宽度';
|
|
266
286
|
readonly sizeHeight: '高度';
|
|
267
287
|
readonly rotation: '旋转';
|
|
268
288
|
readonly zIndex: '层级';
|
|
289
|
+
readonly status: '锁定与隐藏';
|
|
269
290
|
readonly dataValue: '数据取值';
|
|
270
291
|
readonly dataSource: '数据源';
|
|
292
|
+
readonly dataBinding: '字段绑定';
|
|
271
293
|
readonly states: '组件状态';
|
|
294
|
+
readonly canvasId: '所属画板';
|
|
295
|
+
readonly belowSubCanvas: '置于页面下方';
|
|
272
296
|
readonly prop: (key: string) => string;
|
|
273
297
|
readonly style: (key: string) => string;
|
|
274
298
|
readonly propKeys: {
|
|
@@ -325,8 +349,8 @@ export declare const DESIGNER_UI_TEXT: {
|
|
|
325
349
|
readonly document: '文档级';
|
|
326
350
|
};
|
|
327
351
|
readonly remainingUnits: (count: number) => string;
|
|
328
|
-
readonly compare: '
|
|
329
|
-
readonly exitCompare: '
|
|
352
|
+
readonly compare: '查看旧版';
|
|
353
|
+
readonly exitCompare: '返回草案';
|
|
330
354
|
readonly close: '关闭';
|
|
331
355
|
readonly draftAria: (title: string, count: number) => string;
|
|
332
356
|
readonly historyTitle: '历史';
|
|
@@ -568,6 +592,21 @@ export declare const DESIGNER_UI_TEXT: {
|
|
|
568
592
|
readonly selectedSingle: '已选中 1 个组件';
|
|
569
593
|
readonly selectedCount: (count: number) => string;
|
|
570
594
|
readonly componentCount: (count: number) => string;
|
|
595
|
+
readonly sampleData: {
|
|
596
|
+
readonly badge: '示例数据';
|
|
597
|
+
readonly count: (count: number) => string;
|
|
598
|
+
readonly locateTip: '逐个定位示例数据;发布前要绑定数据集或保留为常量';
|
|
599
|
+
readonly keep: '保留为常量';
|
|
600
|
+
readonly keepTip: '去掉选中组件的示例数据标记,值不变';
|
|
601
|
+
readonly keepHistory: '示例数据保留为常量';
|
|
602
|
+
readonly inspectorNotice: '示例数据:由智能体生成,发布前需绑定数据集,或确认保留为常量。';
|
|
603
|
+
readonly bind: '绑定数据集';
|
|
604
|
+
readonly bindTip: '为这个组件选择真实数据来源';
|
|
605
|
+
readonly publishBlockedTitle: (count: number) => string;
|
|
606
|
+
readonly publishBlockedHint: '逐项绑定数据集或保留为常量后再发布。点一项可定位到画布上的组件。';
|
|
607
|
+
readonly publishBlockedOther: (count: number) => string;
|
|
608
|
+
readonly publishBlockedClose: '知道了';
|
|
609
|
+
};
|
|
571
610
|
readonly groupEditingPath: (path: string) => string;
|
|
572
611
|
readonly notifications: '操作通知';
|
|
573
612
|
readonly errorConsole: {
|
|
@@ -1330,6 +1369,7 @@ export declare const DESIGNER_UI_TEXT: {
|
|
|
1330
1369
|
readonly projectAborted: '项目操作已取消。';
|
|
1331
1370
|
readonly projectDirty: '请先保存项目。';
|
|
1332
1371
|
readonly projectPublishUnavailable: '当前项目不能发布。';
|
|
1372
|
+
readonly publishSampleData: '还有智能体生成的示例数据,发布前请绑定数据集或保留为常量。';
|
|
1333
1373
|
readonly blueprintCapabilityUnavailable: '当前素材不支持蓝图。';
|
|
1334
1374
|
readonly hostResourceUnavailable: '资源数据不可用。';
|
|
1335
1375
|
readonly commandTargetLocked: '选中组件已锁定。';
|