@endge/core 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReadMe.md +23 -0
- package/dist/core.cjs +304 -280
- package/dist/core.js +18756 -17968
- package/dist/domain/entities/reflect/RConverter.d.ts +3 -3
- package/dist/domain/entities/reflect/RVocabs.d.ts +10 -2
- package/dist/domain/types/component/sfc/ir.types.d.ts +12 -2
- package/dist/domain/types/component/sfc/ports.types.d.ts +4 -0
- package/dist/domain/types/component/sfc/visual-projection.types.d.ts +11 -2
- package/dist/domain/types/program/program.types.d.ts +7 -1
- package/dist/domain/types/runtime/action.types.d.ts +27 -1
- package/dist/domain/types/source/query-source.types.d.ts +4 -0
- package/dist/domain/types/source/response-output.types.d.ts +10 -0
- package/dist/domain/types/source/source-engine.types.d.ts +1 -1
- package/dist/domain/types/source/vocab-source.types.d.ts +37 -0
- package/dist/domain/types/ui/context-menu.types.d.ts +1 -0
- package/dist/main.d.ts +5 -0
- package/dist/model/modules/domain/endge-vocabs.d.ts +20 -1
- package/dist/model/modules/program/endge-compiler.d.ts +5 -1
- package/dist/model/modules/program/endge-program.d.ts +3 -0
- package/dist/model/modules/runtime/core/endge-bind.d.ts +1 -1
- package/dist/model/modules/runtime/execution/endge-data-view.d.ts +2 -0
- package/dist/model/modules/runtime/execution/endge-response-output.d.ts +5 -0
- package/dist/model/services/compiler/component-sfc/component-sfc-table-menu.d.ts +6 -2
- package/dist/model/services/source-engine/compilers/vocab-source-compile.d.ts +2 -0
- package/dist/model/services/source-engine/strategies/VocabSourceEngineStrategy.d.ts +8 -0
- package/dist/model/services/source-engine/strategies/VocabSourceLanguageStrategy.d.ts +11 -0
- package/dist/model/services/source-engine/strategies/VocabSourcePatchStrategy.d.ts +9 -0
- package/dist/model/services/source-engine/templates/vocab.default.source.d.ts +1 -0
- package/dist/model/services/source-engine/vocab-source-patch.d.ts +10 -0
- package/dist/test/model/modules/domain/endge-vocabs-source.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ export interface RConverterSchema extends EntityManagement {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class RConverter extends REntity {
|
|
10
10
|
description: string | null;
|
|
11
|
-
customHandler: ((v: any) => any) | undefined;
|
|
12
|
-
setCustom(fn: ((v: any) => any) | undefined): void;
|
|
13
|
-
convert(v: any): any;
|
|
11
|
+
customHandler: ((v: any, options?: Record<string, unknown>) => any) | undefined;
|
|
12
|
+
setCustom(fn: ((v: any, options?: Record<string, unknown>) => any) | undefined): void;
|
|
13
|
+
convert(v: any, options?: Record<string, unknown>): any;
|
|
14
14
|
toPlain(): RConverterSchema;
|
|
15
15
|
}
|
|
@@ -3,8 +3,9 @@ import { DiagnosticsProblemInput } from '../../types/diagnostics/diagnostics.typ
|
|
|
3
3
|
export type RVocabMode = 'external_payload' | 'internal';
|
|
4
4
|
/** Сущность словаря (коллекция vocabs). Один документ = один словарь. */
|
|
5
5
|
export declare class RVocabs extends REntity {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
sourceVersion: number;
|
|
7
|
+
source: string;
|
|
8
|
+
description: string | null;
|
|
8
9
|
mode: RVocabMode;
|
|
9
10
|
baseApiUrl?: string | null;
|
|
10
11
|
collectionSlug?: string | null;
|
|
@@ -17,3 +18,10 @@ export declare class RVocabs extends REntity {
|
|
|
17
18
|
getDiagnosticProblems(): DiagnosticsProblemInput[];
|
|
18
19
|
duplicate(options: DuplicateOptions): RVocabs;
|
|
19
20
|
}
|
|
21
|
+
export declare function createLegacyVocabSource(input: {
|
|
22
|
+
mode: RVocabMode;
|
|
23
|
+
baseApiUrl?: string | null;
|
|
24
|
+
collectionSlug?: string | null;
|
|
25
|
+
authMode?: 'inherit' | 'profile' | 'none';
|
|
26
|
+
authProfileIdentity?: string | null;
|
|
27
|
+
}): string;
|
|
@@ -153,7 +153,7 @@ export interface ComponentSFCEditedEventPayload<T = unknown> {
|
|
|
153
153
|
/** IR узел template после нормализации в Endge primitives. */
|
|
154
154
|
export type RComponentSFC_IR_Node = RComponentSFC_IR_ElementNode | RComponentSFC_IR_TextNode | RComponentSFC_IR_ExpressionNode;
|
|
155
155
|
/** Поддерживаемые v1 primitives нового SFC template. */
|
|
156
|
-
export type RComponentSFC_IR_Tag = 'Text' | 'DateTime' | 'Number' | 'Icon' | 'Badge' | 'Dot' | 'Box' | 'Flex' | 'Grid' | 'Divider' | 'Input' | 'Textarea' | 'Checkbox' | 'Select' | 'Tooltip' | 'TooltipTrigger' | 'TooltipContent' | 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator' | 'Editable' | 'Variant';
|
|
156
|
+
export type RComponentSFC_IR_Tag = 'Text' | 'DateTime' | 'Number' | 'Icon' | 'Badge' | 'Dot' | 'Box' | 'Flex' | 'Grid' | 'Divider' | 'Input' | 'Textarea' | 'Checkbox' | 'Select' | 'Tooltip' | 'TooltipTrigger' | 'TooltipContent' | 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'CellMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator' | 'Editable' | 'Variant';
|
|
157
157
|
/** IR element-узел, который renderer-слои могут читать без знания исходного синтаксиса. */
|
|
158
158
|
export interface RComponentSFC_IR_ElementNode {
|
|
159
159
|
/** Стабильный id узла внутри IR. */
|
|
@@ -182,15 +182,19 @@ export interface RComponentSFC_IR_ElementNode {
|
|
|
182
182
|
portBindings?: ComponentSFCRequiredPortBinding[];
|
|
183
183
|
/** Compiler-resolved Table menus, including forwarded Action identities and targets. */
|
|
184
184
|
tableMenus?: RComponentSFC_IR_TableMenus;
|
|
185
|
+
/** Compiler-resolved CellMenu override for one Column. */
|
|
186
|
+
cellMenu?: ComponentSFCTableCellMenuDescriptor;
|
|
185
187
|
/** Позиция исходного AST-узла. */
|
|
186
188
|
sourceRange?: RComponentSFC_SourceRange;
|
|
187
189
|
}
|
|
188
190
|
export interface RComponentSFC_IR_TableMenus {
|
|
189
191
|
column: ComponentSFCTableColumnMenuDescriptor;
|
|
190
|
-
row
|
|
192
|
+
/** Default data-cell menu. `row` is retained as the compatibility field name. */
|
|
193
|
+
row: ComponentSFCTableCellMenuDescriptor;
|
|
191
194
|
}
|
|
192
195
|
export type ComponentSFCTableColumnMenuMode = 'default' | 'disabled' | 'inline';
|
|
193
196
|
export type ComponentSFCTableRowMenuMode = 'none' | 'inline';
|
|
197
|
+
export type ComponentSFCTableCellMenuMode = 'none' | 'inline';
|
|
194
198
|
/** Renderer-neutral menu retained in compiled SFC form until a concrete row/column context exists. */
|
|
195
199
|
export interface ComponentSFCTableMenuDescriptor {
|
|
196
200
|
kind: 'sfc-table-menu';
|
|
@@ -201,6 +205,10 @@ export interface ComponentSFCTableMenuItemDescriptor {
|
|
|
201
205
|
kind: 'item';
|
|
202
206
|
id: string;
|
|
203
207
|
label: RComponentSFC_IR_Value;
|
|
208
|
+
/** `v-if` expression evaluated against the concrete table/cell context. */
|
|
209
|
+
visible?: RComponentSFC_IR_Value;
|
|
210
|
+
/** Static or dynamic disabled state evaluated against the same context as the Action. */
|
|
211
|
+
disabled?: RComponentSFC_IR_Value;
|
|
204
212
|
action: string;
|
|
205
213
|
/** Required Action port whose mounted provider may replace `action`. */
|
|
206
214
|
requiredPort?: string;
|
|
@@ -223,6 +231,8 @@ export interface ComponentSFCTableRowMenuDescriptor {
|
|
|
223
231
|
menu: ComponentSFCTableMenuDescriptor | null;
|
|
224
232
|
diagnostics: RComponentDiagnostic[];
|
|
225
233
|
}
|
|
234
|
+
/** Canonical cell menu descriptor. RowMenu uses the same shape as a legacy alias. */
|
|
235
|
+
export type ComponentSFCTableCellMenuDescriptor = ComponentSFCTableRowMenuDescriptor;
|
|
226
236
|
export type RComponentSFC_IR_EventModifier = 'stop' | 'prevent' | 'self' | 'once' | 'capture' | 'passive';
|
|
227
237
|
export interface RComponentSFC_IR_EventBinding {
|
|
228
238
|
name: string;
|
|
@@ -150,6 +150,10 @@ export type ComponentSFCEventInputValue = {
|
|
|
150
150
|
} | {
|
|
151
151
|
kind: 'literal';
|
|
152
152
|
value: unknown;
|
|
153
|
+
} | {
|
|
154
|
+
kind: 'coalesce';
|
|
155
|
+
left: ComponentSFCEventInputValue;
|
|
156
|
+
right: ComponentSFCEventInputValue;
|
|
153
157
|
} | {
|
|
154
158
|
kind: 'array';
|
|
155
159
|
items: ComponentSFCEventInputValue[];
|
|
@@ -100,7 +100,7 @@ export interface ComponentSFCTableCellEditingProjection {
|
|
|
100
100
|
message?: string;
|
|
101
101
|
}
|
|
102
102
|
/** Способ, которым содержимое ячейки представлено в простом visual editor. */
|
|
103
|
-
export type ComponentSFCTableVisualCellTag = Exclude<RComponentSFC_IR_Tag, 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator' | 'Editable' | 'Variant'>;
|
|
103
|
+
export type ComponentSFCTableVisualCellTag = Exclude<RComponentSFC_IR_Tag, 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'CellMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator' | 'Editable' | 'Variant'>;
|
|
104
104
|
export type ComponentSFCTableCellProjection = {
|
|
105
105
|
kind: 'default';
|
|
106
106
|
} | {
|
|
@@ -140,6 +140,8 @@ export interface ComponentSFCTableColumnProjection {
|
|
|
140
140
|
cell: ComponentSFCTableCellProjection;
|
|
141
141
|
editing: ComponentSFCTableCellEditingProjection;
|
|
142
142
|
interactions: ComponentSFCTableCellInteractionsProjection;
|
|
143
|
+
/** Column-level CellMenu override; default mode inherits Table > CellMenu. */
|
|
144
|
+
cellMenu: ComponentSFCTableMenuProjection;
|
|
143
145
|
hasCustomCell: boolean;
|
|
144
146
|
cellSource: string | null;
|
|
145
147
|
sourceRange: RComponentSFC_SourceRange;
|
|
@@ -161,6 +163,8 @@ export type ComponentSFCTableMenuNodeProjection = {
|
|
|
161
163
|
action: ComponentSFCVisualSourceValue | null;
|
|
162
164
|
input: ComponentSFCVisualSourceValue | null;
|
|
163
165
|
icon: ComponentSFCVisualSourceValue | null;
|
|
166
|
+
visible: ComponentSFCVisualSourceValue | null;
|
|
167
|
+
disabled: ComponentSFCVisualSourceValue | null;
|
|
164
168
|
sourceOwned: boolean;
|
|
165
169
|
sourceRange: RComponentSFC_SourceRange;
|
|
166
170
|
};
|
|
@@ -254,25 +258,30 @@ export type ComponentSFCTableSourcePatch = {
|
|
|
254
258
|
} | {
|
|
255
259
|
type: 'set-menu-mode';
|
|
256
260
|
menu: ComponentSFCTableVisualMenuKind;
|
|
261
|
+
columnIndex?: number;
|
|
257
262
|
mode: 'default' | 'disabled' | 'none' | 'custom';
|
|
258
263
|
} | {
|
|
259
264
|
type: 'add-menu-node';
|
|
260
265
|
menu: ComponentSFCTableVisualMenuKind;
|
|
266
|
+
columnIndex?: number;
|
|
261
267
|
node: 'item' | 'separator';
|
|
262
268
|
} | {
|
|
263
269
|
type: 'remove-menu-node';
|
|
264
270
|
menu: ComponentSFCTableVisualMenuKind;
|
|
271
|
+
columnIndex?: number;
|
|
265
272
|
nodeIndex: number;
|
|
266
273
|
} | {
|
|
267
274
|
type: 'move-menu-node';
|
|
268
275
|
menu: ComponentSFCTableVisualMenuKind;
|
|
276
|
+
columnIndex?: number;
|
|
269
277
|
fromIndex: number;
|
|
270
278
|
toIndex: number;
|
|
271
279
|
} | {
|
|
272
280
|
type: 'set-menu-item-attribute';
|
|
273
281
|
menu: ComponentSFCTableVisualMenuKind;
|
|
282
|
+
columnIndex?: number;
|
|
274
283
|
nodeIndex: number;
|
|
275
|
-
name: 'label' | 'action' | 'input' | 'icon';
|
|
284
|
+
name: 'label' | 'action' | 'input' | 'icon' | 'visible' | 'disabled';
|
|
276
285
|
value: string | null;
|
|
277
286
|
valueKind: 'expression' | 'literal';
|
|
278
287
|
};
|
|
@@ -6,6 +6,8 @@ import { RComponentSFC_IR } from '../component/sfc/ir.types';
|
|
|
6
6
|
import { RComponentSFC_RuntimeDependencies } from '../component/sfc/dependencies.types';
|
|
7
7
|
import { RComponentSFCSource_Parts } from '../component/sfc/source.types';
|
|
8
8
|
import { QueryProgramProp, SourceExpressionIR, SourceFieldDefinition } from '../source/source-expression.types';
|
|
9
|
+
import { ResponseOutputTransform } from '../source/response-output.types';
|
|
10
|
+
import { VocabProgramPayload } from '../source/vocab-source.types';
|
|
9
11
|
import { ProgramMetadata } from './program-metadata.types';
|
|
10
12
|
import { ComputationProgramPayload } from '../computation/computation-program.types';
|
|
11
13
|
import { EndgeStyleSheetArtifact } from '../style/style.types';
|
|
@@ -13,7 +15,7 @@ import { ActionImplementation, ActionTargetSelector } from '../runtime/action.ty
|
|
|
13
15
|
export type { ConfigurationProgramPayload } from '../source/configuration-source.types';
|
|
14
16
|
export type ProgramArtifactKey = string;
|
|
15
17
|
/** Тип доменной сущности, для которой compiler может построить program artifact. */
|
|
16
|
-
export type ProgramEntityType = 'type' | 'component-sfc' | 'computation' | 'action' | 'query' | 'data-view' | 'store' | 'stream' | 'update' | 'filter' | 'composition' | 'style' | 'configuration';
|
|
18
|
+
export type ProgramEntityType = 'type' | 'component-sfc' | 'computation' | 'action' | 'query' | 'vocab' | 'data-view' | 'store' | 'stream' | 'update' | 'filter' | 'composition' | 'style' | 'configuration';
|
|
17
19
|
/** Итоговый статус artifact после компиляции и валидации. */
|
|
18
20
|
export type ProgramArtifactStatus = 'valid' | 'warning' | 'error';
|
|
19
21
|
/** Возможность, которую artifact предоставляет runtime/render слоям. */
|
|
@@ -110,6 +112,9 @@ export type QueryProgramOutputSource = {
|
|
|
110
112
|
export interface QueryProgramOutput {
|
|
111
113
|
key: string;
|
|
112
114
|
source: QueryProgramOutputSource;
|
|
115
|
+
/** Ordered transform chain used by new runtimes. */
|
|
116
|
+
transforms?: ResponseOutputTransform[];
|
|
117
|
+
/** Compatibility projection for runtimes compiled before ordered transforms. */
|
|
113
118
|
dataViews: DataViewRef[];
|
|
114
119
|
contract?: SourceFieldDefinition | null;
|
|
115
120
|
materialization: {
|
|
@@ -162,6 +167,7 @@ export interface QueryProgramPayload {
|
|
|
162
167
|
/** Ordered output graph, который runtime вычисляет после backend response. */
|
|
163
168
|
outputs: QueryProgramOutput[];
|
|
164
169
|
}
|
|
170
|
+
export type { VocabProgramPayload };
|
|
165
171
|
/** Payload artifact для DataView: executable read-model без persisted runtime state. */
|
|
166
172
|
export interface DataViewProgramPayload {
|
|
167
173
|
/** Тип artifact для diagnostics/debug UI. */
|
|
@@ -146,9 +146,33 @@ export interface TableColumnActionContext extends RuntimeActionContext {
|
|
|
146
146
|
sortState: TableColumnSortState;
|
|
147
147
|
activeSortCount: number;
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
export interface TableActionTableContext {
|
|
150
|
+
id: string;
|
|
151
|
+
runtimeId: string;
|
|
152
|
+
state: Readonly<Record<string, unknown>>;
|
|
153
|
+
}
|
|
154
|
+
export interface TableActionRowContext {
|
|
155
|
+
id: string;
|
|
156
|
+
index: number;
|
|
157
|
+
data: Record<string, unknown>;
|
|
158
|
+
}
|
|
159
|
+
export interface TableActionColumnContext {
|
|
160
|
+
key: string;
|
|
161
|
+
index: number;
|
|
162
|
+
title: string;
|
|
163
|
+
metadata: Readonly<Record<string, unknown>>;
|
|
164
|
+
}
|
|
165
|
+
export interface TableActionCellContext {
|
|
166
|
+
value: unknown;
|
|
167
|
+
}
|
|
168
|
+
/** Renderer-neutral cell context shared by every Table menu adapter. */
|
|
150
169
|
export interface TableRowActionContext extends RuntimeActionContext {
|
|
170
|
+
/** Compatibility surface value retained for existing Action providers. */
|
|
151
171
|
surface: 'table-row';
|
|
172
|
+
table: TableActionTableContext;
|
|
173
|
+
rowContext: TableActionRowContext;
|
|
174
|
+
column: TableActionColumnContext;
|
|
175
|
+
cell: TableActionCellContext;
|
|
152
176
|
tableRuntimeId: string;
|
|
153
177
|
tableId: string;
|
|
154
178
|
target: TableRuntimeActionTarget;
|
|
@@ -158,3 +182,5 @@ export interface TableRowActionContext extends RuntimeActionContext {
|
|
|
158
182
|
columnKey: string;
|
|
159
183
|
value: unknown;
|
|
160
184
|
}
|
|
185
|
+
/** Canonical name for new consumers; TableRowActionContext remains source-compatible. */
|
|
186
|
+
export type TableCellActionContext = TableRowActionContext;
|
|
@@ -3,6 +3,7 @@ import { ProgramDiagnostic, QueryProgramPayload } from '../program/program.types
|
|
|
3
3
|
import { DataViewRef } from './data-view-source.types';
|
|
4
4
|
import { ProgramMetadataMap } from '../program/program-metadata.types';
|
|
5
5
|
import { QueryProgramProp, SourceExpressionIR, SourceFieldDefinition } from './source-expression.types';
|
|
6
|
+
import { ResponseOutputTransform } from './response-output.types';
|
|
6
7
|
/** Поддерживаемые transport-kind Query source. */
|
|
7
8
|
export type QuerySourceKind = 'rest' | 'graphql';
|
|
8
9
|
/** Политика GraphQL errors в HTTP 2xx response. */
|
|
@@ -65,6 +66,9 @@ export type QueryOutputSource = {
|
|
|
65
66
|
export interface QuerySourceOutput {
|
|
66
67
|
key: string;
|
|
67
68
|
source: QueryOutputSource;
|
|
69
|
+
/** Ordered transform chain. */
|
|
70
|
+
transforms: ResponseOutputTransform[];
|
|
71
|
+
/** Compatibility projection containing only DataView transforms. */
|
|
68
72
|
dataViews: DataViewRef[];
|
|
69
73
|
contract?: SourceFieldDefinition | null;
|
|
70
74
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DataViewRef } from './data-view-source.types';
|
|
2
|
+
/** Ordered response-output transform shared by Query and Vocab. */
|
|
3
|
+
export type ResponseOutputTransform = {
|
|
4
|
+
kind: 'data-view';
|
|
5
|
+
ref: DataViewRef;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'converter';
|
|
8
|
+
identity: string;
|
|
9
|
+
options?: Record<string, unknown>;
|
|
10
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I18nCatalogProvenance, I18nRuntimeCatalog } from '../i18n.types';
|
|
2
2
|
import { TypeSourceDefinition } from './type-source.types';
|
|
3
3
|
/** Канонический тип source-документа, для которого выбирается source strategy. */
|
|
4
|
-
export type SourceKind = 'query' | 'data-view' | 'filter' | 'composition' | 'store' | 'stream' | 'update' | 'computation' | 'style' | 'type' | 'configuration';
|
|
4
|
+
export type SourceKind = 'query' | 'vocab' | 'data-view' | 'filter' | 'composition' | 'store' | 'stream' | 'update' | 'computation' | 'style' | 'type' | 'configuration';
|
|
5
5
|
/** Тип нейтральной source completion без привязки к Monaco или другому editor API. */
|
|
6
6
|
export type SourceLanguageCompletionKind = 'keyword' | 'function' | 'property' | 'value' | 'snippet';
|
|
7
7
|
/** Позиция курсора внутри source-документа. */
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { RQueryAuth } from '../document/query.types';
|
|
2
|
+
import { ProgramDiagnostic, QueryProgramOutput } from '../program/program.types';
|
|
3
|
+
import { ProgramMetadataMap } from '../program/program-metadata.types';
|
|
4
|
+
export type VocabProviderBaseUrl = string | {
|
|
5
|
+
kind: 'env';
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
export interface VocabPayloadProvider {
|
|
9
|
+
kind: 'payload';
|
|
10
|
+
baseUrl: VocabProviderBaseUrl;
|
|
11
|
+
collection: string;
|
|
12
|
+
auth: RQueryAuth;
|
|
13
|
+
}
|
|
14
|
+
export interface VocabMockReference {
|
|
15
|
+
identity: string;
|
|
16
|
+
path: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface VocabSourceDocument {
|
|
19
|
+
sourceVersion: 1;
|
|
20
|
+
provider: VocabPayloadProvider | null;
|
|
21
|
+
mock: VocabMockReference | null;
|
|
22
|
+
outputs: QueryProgramOutput[];
|
|
23
|
+
}
|
|
24
|
+
export interface VocabProgramPayload extends VocabSourceDocument {
|
|
25
|
+
ast?: unknown;
|
|
26
|
+
sourceDocument?: VocabSourceDocument | null;
|
|
27
|
+
}
|
|
28
|
+
export interface VocabSourceCompileResult {
|
|
29
|
+
ast: unknown;
|
|
30
|
+
document: VocabSourceDocument | null;
|
|
31
|
+
artifact: VocabProgramPayload | null;
|
|
32
|
+
metadata: ProgramMetadataMap;
|
|
33
|
+
diagnostics: Array<Omit<ProgramDiagnostic, 'entityRef'>>;
|
|
34
|
+
}
|
|
35
|
+
export interface VocabSourcePatch {
|
|
36
|
+
mock: VocabMockReference | null;
|
|
37
|
+
}
|
package/dist/main.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './model/modules/mock/EndgeMock';
|
|
|
11
11
|
export * from './model/modules/runtime/execution/endge-composition';
|
|
12
12
|
export * from './model/modules/runtime/execution/endge-project';
|
|
13
13
|
export * from './model/modules/runtime/execution/endge-data-view';
|
|
14
|
+
export * from './model/modules/runtime/execution/endge-response-output';
|
|
14
15
|
export * from './model/modules/runtime/execution/endge-query';
|
|
15
16
|
export * from './model/modules/runtime/execution/endge-computation';
|
|
16
17
|
export * from './model/modules/runtime/core/endge-runtime';
|
|
@@ -103,6 +104,8 @@ export * from './domain/types/source/composition-source.types';
|
|
|
103
104
|
export * from './domain/types/source/data-view-source.types';
|
|
104
105
|
export * from './domain/types/source/filter-source.types';
|
|
105
106
|
export * from './domain/types/source/query-source.types';
|
|
107
|
+
export * from './domain/types/source/response-output.types';
|
|
108
|
+
export * from './domain/types/source/vocab-source.types';
|
|
106
109
|
export * from './domain/types/source/source-engine.types';
|
|
107
110
|
export * from './domain/types/source/source-expression.types';
|
|
108
111
|
export * from './domain/types/source/store-source.types';
|
|
@@ -226,6 +229,8 @@ export * from './model/services/style/endgecss-compile';
|
|
|
226
229
|
export * from './model/services/style/endgecss-match';
|
|
227
230
|
export * from './model/services/source-engine/source-expression-evaluate';
|
|
228
231
|
export * from './model/services/source-engine/filter-source-patch';
|
|
232
|
+
export * from './model/services/source-engine/vocab-source-patch';
|
|
233
|
+
export * from './model/services/source-engine/compilers/vocab-source-compile';
|
|
229
234
|
export * from './model/services/source-engine/type-source-serialize';
|
|
230
235
|
export * from './model/services/source-engine/configuration-source-patch';
|
|
231
236
|
export * from './model/services/source-engine/typescript-type-source';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
|
|
2
2
|
import { VocabCacheOperationResult, VocabLoadPolicy, VocabReference } from '../../../domain/types/runtime/vocab-cache.types';
|
|
3
|
+
export interface VocabAcquireOptions {
|
|
4
|
+
dataMode?: 'live' | 'mock';
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Модуль загрузки и чтения external vocabs в Raph cache.
|
|
5
8
|
*/
|
|
@@ -12,6 +15,7 @@ export declare class EndgeVocabs extends EndgeModule {
|
|
|
12
15
|
private byIdCache;
|
|
13
16
|
private readonly loadedIdentities;
|
|
14
17
|
private readonly loadedAtByIdentity;
|
|
18
|
+
private readonly loadedModeByIdentity;
|
|
15
19
|
private readonly inFlight;
|
|
16
20
|
private readonly cacheVersions;
|
|
17
21
|
private _loadingRequests;
|
|
@@ -65,7 +69,7 @@ export declare class EndgeVocabs extends EndgeModule {
|
|
|
65
69
|
/**
|
|
66
70
|
* Загружает отсутствующие справочники параллельно и переиспользует cache.
|
|
67
71
|
*/
|
|
68
|
-
acquire(vocabs: readonly VocabReference[], policy?: Partial<VocabLoadPolicy
|
|
72
|
+
acquire(vocabs: readonly VocabReference[], policy?: Partial<VocabLoadPolicy>, options?: VocabAcquireOptions): Promise<VocabCacheOperationResult[]>;
|
|
69
73
|
/**
|
|
70
74
|
* Принудительно обновляет справочники параллельно, сохраняя дедупликацию одновременных запросов.
|
|
71
75
|
*/
|
|
@@ -87,7 +91,17 @@ export declare class EndgeVocabs extends EndgeModule {
|
|
|
87
91
|
*/
|
|
88
92
|
loadVocab(idOrIdentity: string | number, options?: {
|
|
89
93
|
throwOnError?: boolean;
|
|
94
|
+
dataMode?: 'live' | 'mock';
|
|
90
95
|
}): Promise<any[]>;
|
|
96
|
+
/** Загружает raw Payload без output pipeline; используется authoring preview и Mock generator. */
|
|
97
|
+
loadRawVocab(idOrIdentity: string | number, options?: {
|
|
98
|
+
limit?: number;
|
|
99
|
+
throwOnError?: boolean;
|
|
100
|
+
}): Promise<unknown>;
|
|
101
|
+
/** Применяет pipeline source-outputs и проверяет обязательный массив items. */
|
|
102
|
+
private applyOutputs;
|
|
103
|
+
/** Читает explicit Mock JSON; отсутствие ссылки штатно означает пустой Vocab. */
|
|
104
|
+
private resolveMockValue;
|
|
91
105
|
/**
|
|
92
106
|
* Нормализует Vocab Id.
|
|
93
107
|
*/
|
|
@@ -103,6 +117,10 @@ export declare class EndgeVocabs extends EndgeModule {
|
|
|
103
117
|
* Устанавливает By Identity Cache.
|
|
104
118
|
*/
|
|
105
119
|
private setByIdentityCache;
|
|
120
|
+
/** Пишет canonical identity cache и переходный alias provider.collection. */
|
|
121
|
+
private setCache;
|
|
122
|
+
/** Читает canonical identity cache с переходным fallback на collection alias. */
|
|
123
|
+
private getCache;
|
|
106
124
|
/**
|
|
107
125
|
* Разрешает Vocab Config By Id.
|
|
108
126
|
*/
|
|
@@ -111,6 +129,7 @@ export declare class EndgeVocabs extends EndgeModule {
|
|
|
111
129
|
* Разрешает Vocab Config By Id Or Identity.
|
|
112
130
|
*/
|
|
113
131
|
private resolveVocabConfigByIdOrIdentity;
|
|
132
|
+
private createRuntimeConfig;
|
|
114
133
|
/** Находит runtime config справочника по identity или collection slug. */
|
|
115
134
|
private resolveVocabConfigByIdentityOrSlug;
|
|
116
135
|
/** Собирает auth headers для обращения к внешнему справочнику. */
|
|
@@ -6,12 +6,14 @@ import { StreamSourceArtifact } from '../../../domain/types/source/stream-source
|
|
|
6
6
|
import { UpdateSourceArtifact } from '../../../domain/types/source/update-source.types';
|
|
7
7
|
import { TypeProgramPayload } from '../../../domain/types/source/type-source.types';
|
|
8
8
|
import { ComponentSFCProgramPayload, ActionProgramPayload, ComputationProgramPayload, DataViewProgramPayload, ProgramArtifact, QueryProgramPayload, EndgeStyleProgramPayload } from '../../../domain/types/program/program.types';
|
|
9
|
+
import { VocabProgramPayload } from '../../../domain/types/source/vocab-source.types';
|
|
9
10
|
import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
|
|
10
11
|
import { RComponentSFC } from '../../../domain/entities/reflect/RComponentSFC';
|
|
11
12
|
import { RAction } from '../../../domain/entities/reflect/RAction';
|
|
12
13
|
import { RComputation } from '../../../domain/entities/reflect/RComputation';
|
|
13
14
|
import { RDataView } from '../../../domain/entities/reflect/RDataView';
|
|
14
15
|
import { RQuery } from '../../../domain/entities/reflect/RQuery';
|
|
16
|
+
import { RVocabs } from '../../../domain/entities/reflect/RVocabs';
|
|
15
17
|
import { RFilter } from '../../../domain/entities/reflect/RFilter';
|
|
16
18
|
import { RComposition } from '../../../domain/entities/reflect/RComposition';
|
|
17
19
|
import { RStore } from '../../../domain/entities/reflect/RStore';
|
|
@@ -46,6 +48,8 @@ export declare class EndgeCompiler extends EndgeModule {
|
|
|
46
48
|
build(_ctx: EndgeBootContext): void;
|
|
47
49
|
/** Компилирует один query source в Endge.program без запуска остальных compiler-фаз. */
|
|
48
50
|
buildQuery(entity: RQuery): ProgramArtifact<QueryProgramPayload>;
|
|
51
|
+
/** Компилирует один Vocab source в Endge.program. */
|
|
52
|
+
buildVocab(entity: RVocabs): ProgramArtifact<VocabProgramPayload>;
|
|
49
53
|
/** Компилирует одну Computation в безопасный runtime artifact. */
|
|
50
54
|
buildComputation(entity: RComputation): ProgramArtifact<ComputationProgramPayload>;
|
|
51
55
|
/** Compiles one Type Source into the shared Type Registry. */
|
|
@@ -153,7 +157,7 @@ export declare class EndgeCompiler extends EndgeModule {
|
|
|
153
157
|
*/
|
|
154
158
|
private _makeArtifact;
|
|
155
159
|
/** Материализует локальные DataView внутри query output graph в child artifacts. */
|
|
156
|
-
private
|
|
160
|
+
private _materializeResponseOutputDataViews;
|
|
157
161
|
/** Сворачивает цепочку DataView: byKey допустим только при одинаковом доказанном ключе. */
|
|
158
162
|
private _resolveDataViewChainStrategy;
|
|
159
163
|
/** Рекурсивно ищет локальный DataView artifact среди дочерних artifacts. */
|
|
@@ -5,6 +5,7 @@ import { StoreSourceArtifact } from '../../../domain/types/source/store-source.t
|
|
|
5
5
|
import { StreamSourceArtifact } from '../../../domain/types/source/stream-source.types';
|
|
6
6
|
import { UpdateSourceArtifact } from '../../../domain/types/source/update-source.types';
|
|
7
7
|
import { TypeProgramCatalogEntry, TypeProgramPayload } from '../../../domain/types/source/type-source.types';
|
|
8
|
+
import { VocabProgramPayload } from '../../../domain/types/source/vocab-source.types';
|
|
8
9
|
import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
|
|
9
10
|
import { DataViewProgramPayload, EndgeProgramSnapshot, ProgramArtifact, ProgramArtifactRef, ProgramArtifactStatus, ComponentSFCTagRegistryEntry, ComputationProgramPayload, ProgramDiagnostic, ProgramEntityType, QueryProgramPayload, EndgeStyleProgramPayload } from '../../../domain/types/program/program.types';
|
|
10
11
|
/**
|
|
@@ -61,6 +62,8 @@ export declare class EndgeProgram extends EndgeModule {
|
|
|
61
62
|
getActionFlow(idOrIdentity: string | number): ActionCompiledFlow | null;
|
|
62
63
|
/** Возвращает compiled query artifact по id или identity. */
|
|
63
64
|
getQueryArtifact(idOrIdentity: string | number): ProgramArtifact<QueryProgramPayload> | null;
|
|
65
|
+
/** Возвращает compiled Vocab artifact по id или identity. */
|
|
66
|
+
getVocabArtifact(idOrIdentity: string | number): ProgramArtifact<VocabProgramPayload> | null;
|
|
64
67
|
/** Returns a compiled Computation artifact by id or identity. */
|
|
65
68
|
getComputationArtifact(idOrIdentity: string | number): ProgramArtifact<ComputationProgramPayload> | null;
|
|
66
69
|
/** Возвращает compiled DataView artifact по id или identity. */
|
|
@@ -22,7 +22,7 @@ export declare class EndgeBind extends EndgeModule {
|
|
|
22
22
|
* @param handler - функция (value) => convertedValue
|
|
23
23
|
* @returns true, если конвертер найден и обработчик установлен
|
|
24
24
|
*/
|
|
25
|
-
converter(identity: string, handler: (v: any) => any): boolean;
|
|
25
|
+
converter(identity: string, handler: (v: any, options?: Record<string, unknown>) => any): boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Привязывает обработчик runtime-step в контексте конкретного action.
|
|
28
28
|
* @deprecated Для полного Action используйте Endge.actions.override(); этот API оставлен только для legacy runtimeAction nodes.
|
|
@@ -45,6 +45,8 @@ export declare class EndgeDataView {
|
|
|
45
45
|
private _createTools;
|
|
46
46
|
/** Минимальные built-in converters для preview v1. */
|
|
47
47
|
private _convert;
|
|
48
|
+
/** Applies one registered Converter to the current value as a whole. */
|
|
49
|
+
convert(identity: string, value: unknown, options?: Record<string, unknown>): unknown;
|
|
48
50
|
/** Читает dot-path из object/array без выбрасывания ошибок. */
|
|
49
51
|
private _path;
|
|
50
52
|
/** Ищет локальный DataView artifact среди child artifacts, включая вложенные children. */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ProgramArtifact } from '../../../../domain/types/program/program.types';
|
|
2
|
+
import { DataViewRef } from '../../../../domain/types/source/data-view-source.types';
|
|
3
|
+
import { ResponseOutputTransform } from '../../../../domain/types/source/response-output.types';
|
|
4
|
+
/** Applies ordered Query/Vocab transforms without implicit array mapping. */
|
|
5
|
+
export declare function runResponseOutputTransforms(transforms: readonly ResponseOutputTransform[] | undefined, legacyDataViews: readonly DataViewRef[], value: unknown, children?: readonly ProgramArtifact[]): unknown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComponentSFCTableColumnMenuDescriptor, ComponentSFCTableRowMenuDescriptor, RComponentSFC_IR_ElementNode } from '../../../../domain/types/component/sfc/ir.types';
|
|
1
|
+
import { ComponentSFCTableColumnMenuDescriptor, ComponentSFCTableCellMenuDescriptor, ComponentSFCTableRowMenuDescriptor, RComponentSFC_IR_ElementNode } from '../../../../domain/types/component/sfc/ir.types';
|
|
2
2
|
import { ComponentSFCActionPort } from '../../../../domain/types/component/sfc/ports.types';
|
|
3
3
|
export declare const SFC_TABLE_COLUMN_MENU_MODES: readonly ["default", "disabled"];
|
|
4
|
-
export type { ComponentSFCTableColumnMenuDescriptor, ComponentSFCTableColumnMenuMode, ComponentSFCTableMenuDescriptor, ComponentSFCTableMenuItemDescriptor, ComponentSFCTableMenuNodeDescriptor, ComponentSFCTableMenuSeparatorDescriptor, ComponentSFCTableRowMenuDescriptor, ComponentSFCTableRowMenuMode, } from '../../../../domain/types/component/sfc/ir.types';
|
|
4
|
+
export type { ComponentSFCTableCellMenuDescriptor, ComponentSFCTableCellMenuMode, ComponentSFCTableColumnMenuDescriptor, ComponentSFCTableColumnMenuMode, ComponentSFCTableMenuDescriptor, ComponentSFCTableMenuItemDescriptor, ComponentSFCTableMenuNodeDescriptor, ComponentSFCTableMenuSeparatorDescriptor, ComponentSFCTableRowMenuDescriptor, ComponentSFCTableRowMenuMode, } from '../../../../domain/types/component/sfc/ir.types';
|
|
5
5
|
interface NormalizeMenuOptions {
|
|
6
6
|
availableActions?: ComponentSFCActionPort[];
|
|
7
7
|
}
|
|
@@ -9,6 +9,10 @@ interface NormalizeMenuOptions {
|
|
|
9
9
|
export declare function normalizeComponentSFCTableColumnMenu(tableNode: RComponentSFC_IR_ElementNode, actionsOrOptions?: ComponentSFCActionPort[] | NormalizeMenuOptions): ComponentSFCTableColumnMenuDescriptor;
|
|
10
10
|
/** Normalizes one optional row menu. Cell-aware values remain expressions until a right click occurs. */
|
|
11
11
|
export declare function normalizeComponentSFCTableRowMenu(tableNode: RComponentSFC_IR_ElementNode, actionsOrOptions?: ComponentSFCActionPort[] | NormalizeMenuOptions): ComponentSFCTableRowMenuDescriptor;
|
|
12
|
+
/** Normalizes the canonical Table > CellMenu, falling back to legacy Table > RowMenu. */
|
|
13
|
+
export declare function normalizeComponentSFCTableCellMenu(tableNode: RComponentSFC_IR_ElementNode, actionsOrOptions?: ComponentSFCActionPort[] | NormalizeMenuOptions): ComponentSFCTableCellMenuDescriptor;
|
|
14
|
+
/** Normalizes an optional Column > CellMenu override; `cell-menu="none"` disables the default. */
|
|
15
|
+
export declare function normalizeComponentSFCColumnCellMenu(tableNode: RComponentSFC_IR_ElementNode, columnNode: RComponentSFC_IR_ElementNode, actionsOrOptions?: ComponentSFCActionPort[] | NormalizeMenuOptions): ComponentSFCTableCellMenuDescriptor | undefined;
|
|
12
16
|
/** Reads a compile-time MenuItem reference to one Action port. */
|
|
13
17
|
export declare function readComponentSFCTableMenuActionPortReference(source: string): {
|
|
14
18
|
name: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SourceEngineCompileResult, SourceEngineOperation, SourceEngineResult, SourceEngineStrategy, SourceKind } from '../../../../domain/types/source/source-engine.types';
|
|
2
|
+
export declare class VocabSourceEngineStrategy implements SourceEngineStrategy {
|
|
3
|
+
readonly id = "source:vocab";
|
|
4
|
+
readonly sourceKind: SourceKind;
|
|
5
|
+
supports(sourceKind: SourceKind | string): boolean;
|
|
6
|
+
execute(_operation: SourceEngineOperation): SourceEngineResult;
|
|
7
|
+
compile(source: string): SourceEngineCompileResult;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SourceKind, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageStrategy, SourceLanguageValidationResult } from '../../../../domain/types/source/source-engine.types';
|
|
2
|
+
export declare class VocabSourceLanguageStrategy implements SourceLanguageStrategy {
|
|
3
|
+
readonly id = "source-language:vocab";
|
|
4
|
+
readonly sourceKind: SourceKind;
|
|
5
|
+
readonly syntax: import('../../../../domain/types/source/source-engine.types').SourceLanguageSyntaxDefinition;
|
|
6
|
+
supports(sourceKind: SourceKind | string): boolean;
|
|
7
|
+
createDefaultSource(): string;
|
|
8
|
+
validate(source: string): SourceLanguageValidationResult;
|
|
9
|
+
completions(_context: SourceLanguageContext): SourceLanguageCompletion[];
|
|
10
|
+
resolveReference(context: SourceLanguageContext): import('../../../../domain/types/source/source-engine.types').SourceDocumentReference | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VocabSourceDocument, VocabSourcePatch } from '../../../../domain/types/source/vocab-source.types';
|
|
2
|
+
import { SourceKind, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from '../../../../domain/types/source/source-engine.types';
|
|
3
|
+
export declare class VocabSourcePatchStrategy implements SourcePatchStrategy<VocabSourcePatch, VocabSourceDocument> {
|
|
4
|
+
readonly id = "source-patch:vocab";
|
|
5
|
+
readonly sourceKind: SourceKind;
|
|
6
|
+
supports(sourceKind: SourceKind | string): boolean;
|
|
7
|
+
parse(source: string): SourceParseResult<VocabSourceDocument>;
|
|
8
|
+
patch(source: string, patch: VocabSourcePatch): SourcePatchResult<VocabSourceDocument>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VOCAB_DEFAULT_SOURCE = "defineVocab({\n outputs: {\n items: output()\n .from(response()),\n },\n})\n";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VocabSourceDocument, VocabSourcePatch } from '../../../domain/types/source/vocab-source.types';
|
|
2
|
+
import { SourcePatchResult } from '../../../domain/types/source/source-engine.types';
|
|
3
|
+
export declare function parseVocabSource(source: string): {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
ast: {} | undefined;
|
|
6
|
+
document: VocabSourceDocument | undefined;
|
|
7
|
+
diagnostics: Omit<import('../../../main').ProgramDiagnostic, "entityRef">[];
|
|
8
|
+
message: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare function patchVocabSource(source: string, patch: VocabSourcePatch): SourcePatchResult<VocabSourceDocument>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|