@endge/core 2.0.4 → 3.0.2
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/core.cjs +346 -322
- package/dist/core.js +30478 -30384
- package/dist/domain/entities/reflect/RAction.d.ts +11 -29
- package/dist/domain/entities/runtime/hosts/ActionRuntimeHost.d.ts +1 -1
- package/dist/domain/entities/runtime/hosts/CompositionRuntimeHost.d.ts +2 -0
- package/dist/domain/types/component/sfc/table-events.types.d.ts +13 -0
- package/dist/domain/types/component/sfc/tag-attribute-contract.types.d.ts +7 -0
- package/dist/domain/types/component/sfc/visual-projection.types.d.ts +2 -1
- package/dist/domain/types/program/action-program.types.d.ts +8 -0
- package/dist/domain/types/program/program.types.d.ts +5 -21
- package/dist/domain/types/runtime/action.types.d.ts +6 -3
- package/dist/domain/types/runtime/context-persistence.types.d.ts +4 -0
- package/dist/domain/types/runtime/runtime-host.types.d.ts +2 -11
- package/dist/domain/types/source/action-source.types.d.ts +40 -0
- package/dist/domain/types/source/composition-source.types.d.ts +24 -3
- package/dist/domain/types/source/source-engine.types.d.ts +25 -2
- package/dist/domain/types/source/source-expression.types.d.ts +9 -0
- package/dist/main.d.ts +5 -7
- package/dist/model/kernel/endge.d.ts +4 -15
- package/dist/model/modules/context/endge-context.d.ts +3 -1
- package/dist/model/modules/program/endge-compiler.d.ts +2 -0
- package/dist/model/modules/program/endge-program.d.ts +3 -6
- package/dist/model/modules/program/endge-source.d.ts +2 -1
- package/dist/model/modules/runtime/core/endge-actions.d.ts +16 -12
- package/dist/model/modules/runtime/core/endge-runtime.d.ts +5 -5
- package/dist/model/modules/runtime/execution/action/action-program-executor.d.ts +13 -0
- package/dist/model/modules/runtime/execution/computation/EndgeComputation.d.ts +36 -1
- package/dist/model/modules/runtime/execution/endge-converters.d.ts +36 -0
- package/dist/model/modules/runtime/implementation/endge-implementations.d.ts +3 -0
- package/dist/model/modules/runtime/operation/endge-operations.d.ts +18 -0
- package/dist/model/modules/runtime/operation/operation-history.d.ts +54 -0
- package/dist/model/services/compiler/action/action-compile.d.ts +3 -2
- package/dist/model/services/compiler/component-sfc/component-sfc-ports.d.ts +2 -0
- package/dist/model/services/compiler/computation/computation-compile.d.ts +3 -0
- package/dist/model/services/source-engine/compilers/action-source-compile.d.ts +17 -0
- package/dist/model/services/source-engine/strategies/ActionSourceEngineStrategy.d.ts +7 -0
- package/dist/model/services/source-engine/strategies/ActionSourceLanguageStrategy.d.ts +23 -0
- package/dist/model/services/source-engine/templates/action.default.source.d.ts +1 -0
- package/dist/test/fixtures/action-source.d.ts +1 -0
- package/dist/test/model/modules/context/endge-context-theme-default.test.d.ts +1 -0
- package/dist/test/model/modules/runtime/action-runtime.test.d.ts +1 -0
- package/dist/test/model/modules/runtime/executable-implementations.test.d.ts +1 -0
- package/dist/test/model/modules/runtime/operation-history.test.d.ts +1 -0
- package/dist/test/model/services/compiler/component-sfc/component-sfc-action-reactions.test.d.ts +1 -0
- package/dist/test/model/services/source-engine/action-source-compile.test.d.ts +1 -0
- package/package.json +4 -4
- package/dist/domain/entities/action-flow/REndgeFlow.d.ts +0 -27
- package/dist/domain/types/flow/action.types.d.ts +0 -65
- package/dist/domain/types/flow/endge-flow-runtime.types.d.ts +0 -28
- package/dist/domain/types/flow/endge-flow.types.d.ts +0 -110
- package/dist/domain/types/flow/flow-condition.types.d.ts +0 -39
- package/dist/model/modules/runtime/core/endge-bind.d.ts +0 -39
- package/dist/model/modules/runtime/flow/endge-flow-registry.d.ts +0 -34
- package/dist/model/modules/runtime/flow/endge-flow.d.ts +0 -94
- /package/dist/test/{action-implementations.test.d.ts → domain/entities/runtime/composition-operation-history.integration.test.d.ts} +0 -0
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
import { ActionCompiledFlow, ActionDefinition, ActionStepHandler, FlowValidationIssue } from '../../types/flow/action.types';
|
|
2
1
|
import { EntityRef } from '../../types/document/entity-management.type';
|
|
3
2
|
import { ActionImplementation, ActionTargetSelector } from '../../types/runtime/action.types';
|
|
4
3
|
import { DuplicateOptions, REntity } from './REntity';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Действие хранится как flow-описание.
|
|
8
|
-
* Атомарное действие = flow из одного шага.
|
|
9
|
-
*/
|
|
4
|
+
/** Canonical source-backed Action definition. Executable code is supplied by a provider. */
|
|
10
5
|
export declare class RAction extends REntity {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
displayName: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
source: string;
|
|
9
|
+
sourceVersion: number;
|
|
15
10
|
target: ActionTargetSelector[] | null;
|
|
16
|
-
|
|
11
|
+
contract: {
|
|
12
|
+
input: unknown | null;
|
|
13
|
+
output: unknown | null;
|
|
14
|
+
};
|
|
17
15
|
defaultImplementation: ActionImplementation;
|
|
18
|
-
/** Definition that owns a derived/component-provided Action. */
|
|
19
16
|
owner?: EntityRef;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
getStepHandler(runtimeId: string): ActionStepHandler | undefined;
|
|
23
|
-
hasStepHandler(runtimeId: string): boolean;
|
|
24
|
-
clearStepHandlers(): void;
|
|
25
|
-
private _normalizeDefinition;
|
|
26
|
-
private _buildCompiledFlow;
|
|
27
|
-
private _validateFlow;
|
|
28
|
-
private _fieldToPlain;
|
|
29
|
-
get compiledFlow(): ActionCompiledFlow | null;
|
|
30
|
-
getValidationIssues(): FlowValidationIssue[];
|
|
31
|
-
validate(): FlowValidationIssue[];
|
|
32
|
-
getCompiledRuntimeNodeId(runtimeId: string): string | null;
|
|
33
|
-
/** Builds an immutable compiler payload without retaining compiled state on the entity. */
|
|
34
|
-
buildCompiledFlow(): ActionCompiledFlow;
|
|
35
|
-
compile(): void;
|
|
36
|
-
run(): Promise<unknown>;
|
|
17
|
+
static fromPlain(json: any, storageMeta?: any): RAction;
|
|
18
|
+
run(input?: unknown): Promise<unknown>;
|
|
37
19
|
toPlain(): Record<string, unknown>;
|
|
38
20
|
duplicate(options: DuplicateOptions): RAction;
|
|
39
21
|
}
|
|
@@ -3,7 +3,7 @@ import { ActionRuntimeHostContext, RuntimeHost } from '../../../types/runtime/ru
|
|
|
3
3
|
import { RuntimeHostBase } from '../RuntimeHostBase';
|
|
4
4
|
/**
|
|
5
5
|
* Создаёт контекст action-runtime с опциональной ссылкой на родительский контекст.
|
|
6
|
-
*
|
|
6
|
+
* Создаёт изолированный invocation context и optional parent link.
|
|
7
7
|
*/
|
|
8
8
|
export declare function createActionContext(options: {
|
|
9
9
|
input?: Record<string, unknown> | unknown;
|
|
@@ -70,6 +70,8 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
|
|
|
70
70
|
mutateStore(dataAlias: string, plan: StoreMutationPlan): void;
|
|
71
71
|
/** Explicitly invokes one named Store-owned RUpdate outside Stream dispatch. */
|
|
72
72
|
applyStoreUpdate(dataAlias: string, updateIdentity: string, payload: unknown): void;
|
|
73
|
+
/** Resolves an Update artifact to the Store data alias owned by this Composition. */
|
|
74
|
+
applyUpdateByIdentity(updateIdentity: string, payload: unknown): void;
|
|
73
75
|
/** Устанавливает literal/Raph-backed источник публичных Composition props. */
|
|
74
76
|
setInputSource(input: RuntimeHostInputSource | null | undefined): void;
|
|
75
77
|
/** Проверяет обязательные props до создания child runtime graph. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type TableSelectionMode = 'none' | 'single' | 'multiple';
|
|
2
|
+
export type TableCellSelectionMode = 'none' | 'single';
|
|
2
3
|
export type TableSelectionTrigger = 'auto' | 'control' | 'row' | 'both';
|
|
3
4
|
export type TableRowActivationKind = 'pointer' | 'keyboard';
|
|
4
5
|
export interface TableEventBase {
|
|
@@ -28,6 +29,17 @@ export interface TableSelectionChangedEvent<TRow extends Record<string, unknown>
|
|
|
28
29
|
addedRowIds: string[];
|
|
29
30
|
removedRowIds: string[];
|
|
30
31
|
}
|
|
32
|
+
export interface TableSelectedCell<TRow extends Record<string, unknown> = Record<string, unknown>> {
|
|
33
|
+
rowId: string;
|
|
34
|
+
rowIndex: number;
|
|
35
|
+
row: TRow;
|
|
36
|
+
columnKey: string;
|
|
37
|
+
value: unknown;
|
|
38
|
+
}
|
|
39
|
+
export interface TableCellSelectionChangedEvent<TRow extends Record<string, unknown> = Record<string, unknown>> extends TableEventBase {
|
|
40
|
+
selectedCell: TableSelectedCell<TRow> | null;
|
|
41
|
+
previousCell: TableSelectedCell<TRow> | null;
|
|
42
|
+
}
|
|
31
43
|
export interface TableSortChangedEvent extends TableEventBase {
|
|
32
44
|
sort: Array<{
|
|
33
45
|
columnKey: string;
|
|
@@ -58,6 +70,7 @@ export interface TableEventMap {
|
|
|
58
70
|
rowActivated: TableRowActivatedEvent;
|
|
59
71
|
rowContextMenuRequested: TableRowContextMenuRequestedEvent;
|
|
60
72
|
selectionChanged: TableSelectionChangedEvent;
|
|
73
|
+
cellSelectionChanged: TableCellSelectionChangedEvent;
|
|
61
74
|
sortChanged: TableSortChangedEvent;
|
|
62
75
|
columnVisibilityChanged: TableColumnVisibilityChangedEvent;
|
|
63
76
|
columnPinChanged: TableColumnPinChangedEvent;
|
|
@@ -20,6 +20,7 @@ export interface ComponentSFCAttributeAnalysisOptions {
|
|
|
20
20
|
resolveTagAttributeContracts?: (tag: string) => readonly ComponentSFCTagAttributeContract[] | null | undefined;
|
|
21
21
|
}
|
|
22
22
|
export declare const ENDGE_SFC_TABLE_SELECTION_MODES: readonly ["none", "single", "multiple"];
|
|
23
|
+
export declare const ENDGE_SFC_TABLE_CELL_SELECTION_MODES: readonly ["none", "single"];
|
|
23
24
|
export declare const ENDGE_SFC_TABLE_SELECTION_TRIGGERS: readonly ["auto", "control", "row", "both"];
|
|
24
25
|
export declare const ENDGE_SFC_TABLE_PAGING_MODES: readonly ["pages", "virtual"];
|
|
25
26
|
export declare const ENDGE_SFC_TABLE_SORT_MODES: readonly ["multiple", "single", "fixed", "disabled"];
|
|
@@ -49,6 +50,12 @@ export declare const ENDGE_SFC_TAG_ATTRIBUTE_CONTRACTS: {
|
|
|
49
50
|
readonly values: readonly ["auto", "control", "row", "both"];
|
|
50
51
|
readonly defaultValue: "auto";
|
|
51
52
|
readonly description: "Действие, которое меняет состояние выбора строки.";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "cell-selection-mode";
|
|
55
|
+
readonly aliases: readonly ["cellSelectionMode"];
|
|
56
|
+
readonly values: readonly ["none", "single"];
|
|
57
|
+
readonly defaultValue: "none";
|
|
58
|
+
readonly description: "Режим выбора одной конкретной ячейки, независимый от выбора строк.";
|
|
52
59
|
}, {
|
|
53
60
|
readonly name: "paging";
|
|
54
61
|
readonly values: readonly ["pages", "virtual"];
|
|
@@ -194,7 +194,7 @@ export type ComponentSFCTableSourcePatch = {
|
|
|
194
194
|
value: string | null;
|
|
195
195
|
} | {
|
|
196
196
|
type: 'set-table-attribute';
|
|
197
|
-
name: 'ref' | 'selection-mode' | 'selection-trigger' | 'paging' | 'page-size' | 'page-sizes' | 'default-pin' | 'default-sort' | 'default-hidden';
|
|
197
|
+
name: 'ref' | 'selection-mode' | 'selection-trigger' | 'cell-selection-mode' | 'paging' | 'page-size' | 'page-sizes' | 'default-pin' | 'default-sort' | 'default-hidden';
|
|
198
198
|
value: string | null;
|
|
199
199
|
} | {
|
|
200
200
|
type: 'set-column-component';
|
|
@@ -300,6 +300,7 @@ export interface ComponentSFCTableVisualProjection {
|
|
|
300
300
|
ref: ComponentSFCVisualSourceValue | null;
|
|
301
301
|
selectionMode: ComponentSFCVisualSourceValue | null;
|
|
302
302
|
selectionTrigger: ComponentSFCVisualSourceValue | null;
|
|
303
|
+
cellSelectionMode: ComponentSFCVisualSourceValue | null;
|
|
303
304
|
rows: ComponentSFCVisualSourceValue | null;
|
|
304
305
|
rowKey: ComponentSFCVisualSourceValue | null;
|
|
305
306
|
paging: ComponentSFCVisualSourceValue | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionSourceDocument } from '../source/action-source.types';
|
|
2
|
+
import { ActionTargetSelector } from '../runtime/action.types';
|
|
3
|
+
export interface ActionProgramPayload {
|
|
4
|
+
type: 'action';
|
|
5
|
+
sourceVersion: number;
|
|
6
|
+
sourceDocument: ActionSourceDocument | null;
|
|
7
|
+
target: ActionTargetSelector[] | null;
|
|
8
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ActionCompiledFlow } from '../flow/action.types';
|
|
2
1
|
import { RComponentContract, RComponentDependencies } from '../component/component-core.types';
|
|
3
2
|
import { DataViewManualTransform, DataViewPipelineStep, DataViewRef, DataViewSourceDocument } from '../source/data-view-source.types';
|
|
4
3
|
import { RComponentSFC_AST } from '../component/sfc/ast.types';
|
|
@@ -11,7 +10,7 @@ import { VocabProgramPayload } from '../source/vocab-source.types';
|
|
|
11
10
|
import { ProgramMetadata } from './program-metadata.types';
|
|
12
11
|
import { ComputationProgramPayload } from '../computation/computation-program.types';
|
|
13
12
|
import { EndgeStyleSheetArtifact } from '../style/style.types';
|
|
14
|
-
|
|
13
|
+
export type { ActionProgramPayload } from './action-program.types';
|
|
15
14
|
export type { ConfigurationProgramPayload } from '../source/configuration-source.types';
|
|
16
15
|
export type ProgramArtifactKey = string;
|
|
17
16
|
/** Тип доменной сущности, для которой compiler может построить program artifact. */
|
|
@@ -56,6 +55,10 @@ export interface ProgramDependency {
|
|
|
56
55
|
identity?: string;
|
|
57
56
|
/** Роль зависимости: child-component, renderer, data-source и т.п. */
|
|
58
57
|
role?: string;
|
|
58
|
+
/** Optional source location of the dependency reference for linker diagnostics. */
|
|
59
|
+
sourcePath?: string;
|
|
60
|
+
start?: number;
|
|
61
|
+
end?: number;
|
|
59
62
|
}
|
|
60
63
|
/** Единица compiled program: результат компиляции одной доменной сущности. */
|
|
61
64
|
export interface ProgramArtifact<TPayload = unknown> {
|
|
@@ -82,25 +85,6 @@ export interface ProgramArtifact<TPayload = unknown> {
|
|
|
82
85
|
/** Локальные compiled artifacts, принадлежащие только этому artifact. */
|
|
83
86
|
children?: ProgramArtifact[];
|
|
84
87
|
}
|
|
85
|
-
/** Payload artifact для action: скомпилированный flow или null при ошибке компиляции. */
|
|
86
|
-
export interface ActionProgramPayload {
|
|
87
|
-
/** Нормализованный action-flow с индексами и runtime-ready структурой. */
|
|
88
|
-
compiledFlow: ActionCompiledFlow | null;
|
|
89
|
-
target: ActionTargetSelector[] | null;
|
|
90
|
-
input: {
|
|
91
|
-
type: string;
|
|
92
|
-
name?: string;
|
|
93
|
-
isArray?: boolean;
|
|
94
|
-
optional?: boolean;
|
|
95
|
-
} | null;
|
|
96
|
-
output: {
|
|
97
|
-
type: string;
|
|
98
|
-
name?: string;
|
|
99
|
-
isArray?: boolean;
|
|
100
|
-
optional?: boolean;
|
|
101
|
-
} | null;
|
|
102
|
-
implementation: ActionImplementation;
|
|
103
|
-
}
|
|
104
88
|
export type QueryProgramOutputSource = {
|
|
105
89
|
type: 'response';
|
|
106
90
|
path: string | null;
|
|
@@ -27,7 +27,7 @@ export interface ActionExecutionTarget<TValue = unknown> {
|
|
|
27
27
|
}
|
|
28
28
|
/** How an Action is executed when there is no higher-priority runtime binding. */
|
|
29
29
|
export type ActionImplementation = {
|
|
30
|
-
kind: '
|
|
30
|
+
kind: 'source';
|
|
31
31
|
} | {
|
|
32
32
|
kind: 'provider';
|
|
33
33
|
providerKey: string;
|
|
@@ -41,8 +41,11 @@ export interface ActionDefinitionInput {
|
|
|
41
41
|
description?: string | null;
|
|
42
42
|
active?: boolean;
|
|
43
43
|
target?: ActionTargetSelector[] | null;
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
contract?: {
|
|
45
|
+
input?: unknown;
|
|
46
|
+
output?: unknown;
|
|
47
|
+
};
|
|
48
|
+
defaultProviderKey?: string;
|
|
46
49
|
defaultImplementation?: ActionImplementation;
|
|
47
50
|
owner?: EntityRef;
|
|
48
51
|
}
|
|
@@ -16,6 +16,10 @@ export interface EndgeContextSnapshot {
|
|
|
16
16
|
theme: string | null;
|
|
17
17
|
timezone: string | null;
|
|
18
18
|
}
|
|
19
|
+
/** Storage payload that distinguishes an explicit theme choice from an effective default. */
|
|
20
|
+
export interface EndgePersistedContextSnapshot extends EndgeContextSnapshot {
|
|
21
|
+
themePreferenceVersion?: 1;
|
|
22
|
+
}
|
|
19
23
|
/** Volatile keyboard state supplied by the active UI adapter. */
|
|
20
24
|
export interface EndgeKeyboardContextSnapshot {
|
|
21
25
|
platform: 'macos' | 'windows' | 'linux' | 'unknown';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FlowExecutionResult, FlowExecutionState } from '../flow/endge-flow-runtime.types';
|
|
2
1
|
import { RuntimeStateControllerLike } from './context-persistence.types';
|
|
3
2
|
import { ProgramArtifact, ProgramEntityType } from '../program/program.types';
|
|
4
3
|
import { RuntimeEntityModelMap, RuntimeEntityType } from './runtime-entity-map.types';
|
|
@@ -39,17 +38,9 @@ export interface RuntimeHostContextBase {
|
|
|
39
38
|
updatedAt: string | null;
|
|
40
39
|
}
|
|
41
40
|
export interface ActionRuntimeHostContext extends RuntimeHostContextBase {
|
|
42
|
-
/**
|
|
41
|
+
/** Immutable input of the current Source Action invocation. */
|
|
43
42
|
input: Record<string, unknown>;
|
|
44
|
-
|
|
45
|
-
flowState: FlowExecutionState;
|
|
46
|
-
/** Текущий node-id, который считается активным в host. */
|
|
47
|
-
currentNodeId: string | null;
|
|
48
|
-
/** Стек вызовов вложенных action-run'ов. */
|
|
49
|
-
callStack: string[];
|
|
50
|
-
/** Последний результат исполнения action-flow. */
|
|
51
|
-
lastFlowResult: FlowExecutionResult | null;
|
|
52
|
-
/** Контекст родительского action-host, если этот action вызван из другого flow (иерархия без мутации). */
|
|
43
|
+
result: unknown;
|
|
53
44
|
parent?: ActionRuntimeHostContext | null;
|
|
54
45
|
}
|
|
55
46
|
export interface QueryRuntimeHostContext extends RuntimeHostContextBase {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SourceExpressionIR, SourceFieldDefinition } from './source-expression.types';
|
|
2
|
+
export interface ActionSourceContract {
|
|
3
|
+
input: SourceFieldDefinition | null;
|
|
4
|
+
output: SourceFieldDefinition | null;
|
|
5
|
+
}
|
|
6
|
+
export type ActionSourceEffectKind = 'query' | 'update' | 'action' | 'computation';
|
|
7
|
+
export interface ActionSourceEffectStep {
|
|
8
|
+
kind: ActionSourceEffectKind;
|
|
9
|
+
name: string;
|
|
10
|
+
identity: string;
|
|
11
|
+
input: SourceExpressionIR;
|
|
12
|
+
}
|
|
13
|
+
export interface ActionSourceExpressionStep {
|
|
14
|
+
kind: 'expression';
|
|
15
|
+
name: string;
|
|
16
|
+
expression: SourceExpressionIR;
|
|
17
|
+
}
|
|
18
|
+
export interface ActionSourceTypescriptStep {
|
|
19
|
+
kind: 'typescript';
|
|
20
|
+
name: string;
|
|
21
|
+
inputs: Record<string, SourceExpressionIR>;
|
|
22
|
+
moduleKey: string;
|
|
23
|
+
source: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ActionSourceOperationStep {
|
|
26
|
+
kind: 'operation';
|
|
27
|
+
name: string;
|
|
28
|
+
input: SourceExpressionIR;
|
|
29
|
+
run: ActionSourceBlock;
|
|
30
|
+
undo: ActionSourceBlock;
|
|
31
|
+
redo: ActionSourceBlock | null;
|
|
32
|
+
}
|
|
33
|
+
export type ActionSourceStep = ActionSourceExpressionStep | ActionSourceEffectStep | ActionSourceTypescriptStep | ActionSourceOperationStep;
|
|
34
|
+
export interface ActionSourceBlock {
|
|
35
|
+
steps: ActionSourceStep[];
|
|
36
|
+
output: SourceExpressionIR | null;
|
|
37
|
+
}
|
|
38
|
+
export interface ActionSourceDocument extends ActionSourceBlock {
|
|
39
|
+
contract: ActionSourceContract;
|
|
40
|
+
}
|
|
@@ -11,18 +11,38 @@ import { I18nCompiledLocales } from '../i18n.types';
|
|
|
11
11
|
import { ComponentSFCEventInputValue } from '../component/sfc/ports.types';
|
|
12
12
|
import { UpdateMutationStrategy } from './update-source.types';
|
|
13
13
|
import { EndgeDataMode } from '../document/workspace.types';
|
|
14
|
+
import { ComponentSFCInteractionTrigger } from '../component/sfc/ir.types';
|
|
14
15
|
export type CompositionRuntimeKind = 'filter' | 'query' | 'component' | 'composition' | 'stream' | 'filter-view';
|
|
15
16
|
export type CompositionActivationMode = 'startup' | 'manual';
|
|
16
17
|
export interface CompositionActivationDescriptor {
|
|
17
18
|
mode: CompositionActivationMode;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
interface CompositionResourceDescriptorBase {
|
|
20
21
|
name: string;
|
|
21
22
|
path: string;
|
|
22
23
|
scopePath: string;
|
|
24
|
+
sourceOrder: number;
|
|
25
|
+
}
|
|
26
|
+
export type CompositionResourceDescriptor = CompositionResourceDescriptorBase & {
|
|
23
27
|
kind: 'style' | 'i18n';
|
|
24
28
|
identity: string;
|
|
25
|
-
|
|
29
|
+
} | CompositionResourceDescriptorBase & {
|
|
30
|
+
kind: 'operation-history';
|
|
31
|
+
operationHistory: {
|
|
32
|
+
limit: number;
|
|
33
|
+
limitConfigurationPath: string | null;
|
|
34
|
+
shortcuts: OperationHistoryShortcutDescriptor[] | null;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export interface OperationHistoryShortcutDescriptor {
|
|
38
|
+
command: 'undo' | 'redo';
|
|
39
|
+
triggerSet: {
|
|
40
|
+
kind: 'configuration';
|
|
41
|
+
path: string;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'literal';
|
|
44
|
+
value: ComponentSFCInteractionTrigger[];
|
|
45
|
+
};
|
|
26
46
|
}
|
|
27
47
|
/** Материализованный i18n-resource внутри Composition program artifact. */
|
|
28
48
|
export interface CompositionI18nResourceArtifact {
|
|
@@ -255,7 +275,7 @@ export interface CompositionSourceAddResourcePatch {
|
|
|
255
275
|
type: 'add-resource';
|
|
256
276
|
name: string;
|
|
257
277
|
kind: CompositionResourceDescriptor['kind'];
|
|
258
|
-
identity
|
|
278
|
+
identity?: string;
|
|
259
279
|
}
|
|
260
280
|
/** Добавление runtime dependency в canonical Composition source. */
|
|
261
281
|
export interface CompositionSourceAddRuntimePatch {
|
|
@@ -370,3 +390,4 @@ export interface CompositionSession {
|
|
|
370
390
|
output: <T = unknown>(name: string) => T | undefined;
|
|
371
391
|
unmount: () => Promise<void>;
|
|
372
392
|
}
|
|
393
|
+
export {};
|
|
@@ -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' | 'vocab' | 'data-view' | 'filter' | 'composition' | 'store' | 'stream' | 'update' | 'computation' | 'style' | 'type' | 'configuration';
|
|
4
|
+
export type SourceKind = 'action' | '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-документа. */
|
|
@@ -28,6 +28,13 @@ export interface SourceLanguageContext {
|
|
|
28
28
|
storage: 'id' | 'identity';
|
|
29
29
|
};
|
|
30
30
|
}>;
|
|
31
|
+
/** Installed storage and code definition catalog used by identity completions. */
|
|
32
|
+
documentSymbols?: Array<{
|
|
33
|
+
target: SourceDocumentReferenceTarget;
|
|
34
|
+
identity: string;
|
|
35
|
+
displayName?: string;
|
|
36
|
+
description?: string | null;
|
|
37
|
+
}>;
|
|
31
38
|
/** Identity of the document that owns current source diagnostics. */
|
|
32
39
|
ownerIdentity?: string;
|
|
33
40
|
/** Effective translation catalogs for all current Project occurrences. */
|
|
@@ -58,8 +65,20 @@ export interface SourceLanguageCompletion {
|
|
|
58
65
|
/** Документация completion item. */
|
|
59
66
|
documentation?: string;
|
|
60
67
|
}
|
|
68
|
+
export interface SourceLanguageSignatureHelp {
|
|
69
|
+
activeSignature: number;
|
|
70
|
+
activeParameter: number;
|
|
71
|
+
signatures: Array<{
|
|
72
|
+
label: string;
|
|
73
|
+
documentation?: string;
|
|
74
|
+
parameters: Array<{
|
|
75
|
+
label: string;
|
|
76
|
+
documentation?: string;
|
|
77
|
+
}>;
|
|
78
|
+
}>;
|
|
79
|
+
}
|
|
61
80
|
/** Логический тип внешнего доменного документа, на который ссылается source. */
|
|
62
|
-
export type SourceDocumentReferenceTarget = 'auth-profile' | 'component' | 'composition' | 'computation' | 'converter' | 'data-view' | 'filter' | 'i18n-bundles' | 'mock' | 'query' | 'store' | 'stream' | 'update' | 'style' | 'type' | 'vocabs';
|
|
81
|
+
export type SourceDocumentReferenceTarget = 'action' | 'auth-profile' | 'component' | 'composition' | 'computation' | 'converter' | 'data-view' | 'filter' | 'i18n-bundles' | 'mock' | 'query' | 'store' | 'stream' | 'update' | 'style' | 'type' | 'vocabs';
|
|
63
82
|
/** Семантическая ссылка из source на внешний доменный документ. */
|
|
64
83
|
export interface SourceDocumentReference {
|
|
65
84
|
/** Логический тип цели; UI может уточнить concrete document type через domain. */
|
|
@@ -125,6 +144,8 @@ export interface SourceEngineCompileResult extends SourceEngineResult {
|
|
|
125
144
|
metadata?: import('../program/program-metadata.types').ProgramMetadataMap;
|
|
126
145
|
/** Diagnostics, найденные source compiler-ом. */
|
|
127
146
|
diagnostics?: unknown[];
|
|
147
|
+
/** Static Program dependencies discovered by the source compiler. */
|
|
148
|
+
dependencies?: import('../program/program.types').ProgramDependency[];
|
|
128
149
|
}
|
|
129
150
|
/** Результат parse source без обязательной runtime-компиляции. */
|
|
130
151
|
export interface SourceParseResult<TDocument = unknown> extends SourceEngineResult {
|
|
@@ -210,6 +231,8 @@ export interface SourceLanguageStrategy {
|
|
|
210
231
|
validate: (source: string, context?: SourceLanguageContext) => SourceLanguageValidationResult;
|
|
211
232
|
/** Возвращает доступные подсказки языка в нейтральном формате. */
|
|
212
233
|
completions: (context: SourceLanguageContext) => SourceLanguageCompletion[];
|
|
234
|
+
/** Returns call signature information at the current cursor position. */
|
|
235
|
+
signatureHelp?: (context: SourceLanguageContext) => SourceLanguageSignatureHelp | null;
|
|
213
236
|
/** Возвращает внешнюю document reference под курсором, если язык её поддерживает. */
|
|
214
237
|
resolveReference?: (context: SourceLanguageContext) => SourceDocumentReference | null;
|
|
215
238
|
/** Возвращает semantic highlights без привязки к конкретному editor adapter. */
|
|
@@ -25,6 +25,12 @@ export type SourceExpressionIR = {
|
|
|
25
25
|
source: SourceExpressionReadKind;
|
|
26
26
|
path: string;
|
|
27
27
|
parameters?: string[];
|
|
28
|
+
} | {
|
|
29
|
+
type: 'transform';
|
|
30
|
+
transform: 'data-view' | 'converter';
|
|
31
|
+
identity: string;
|
|
32
|
+
input: SourceExpressionIR;
|
|
33
|
+
options?: SourceExpressionIR;
|
|
28
34
|
} | {
|
|
29
35
|
type: 'operation';
|
|
30
36
|
operation: SourceExpressionOperation;
|
|
@@ -91,6 +97,9 @@ export interface SourceExpressionContext {
|
|
|
91
97
|
read?: (expression: Extract<SourceExpressionIR, {
|
|
92
98
|
type: 'read';
|
|
93
99
|
}>) => unknown;
|
|
100
|
+
transform?: (expression: Extract<SourceExpressionIR, {
|
|
101
|
+
type: 'transform';
|
|
102
|
+
}>, input: unknown, options: unknown) => unknown;
|
|
94
103
|
onWarning?: (warning: SourceExpressionWarning) => void;
|
|
95
104
|
}
|
|
96
105
|
/** Публичное имя общего декларативного value DSL. */
|
package/dist/main.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export * from './model/modules/runtime/execution/endge-data-view';
|
|
|
14
14
|
export * from './model/modules/runtime/execution/endge-response-output';
|
|
15
15
|
export * from './model/modules/runtime/execution/endge-query';
|
|
16
16
|
export * from './model/modules/runtime/execution/endge-computation';
|
|
17
|
+
export * from './model/modules/runtime/execution/endge-converters';
|
|
18
|
+
export * from './model/modules/runtime/operation/operation-history';
|
|
19
|
+
export * from './model/modules/runtime/operation/endge-operations';
|
|
17
20
|
export * from './model/modules/runtime/core/endge-runtime';
|
|
18
21
|
export * from './model/modules/security/endge-auth';
|
|
19
22
|
export * from './model/modules/security/auth/AuthInteractionRequiredError';
|
|
@@ -71,20 +74,18 @@ export * from './domain/types/document/filter.types';
|
|
|
71
74
|
export * from './domain/types/document/navigation.types';
|
|
72
75
|
export * from './domain/types/document/query.types';
|
|
73
76
|
export * from './domain/types/document/workspace.types';
|
|
74
|
-
export * from './domain/types/flow/action.types';
|
|
75
|
-
export * from './domain/types/flow/endge-flow.types';
|
|
76
|
-
export * from './domain/types/flow/endge-flow-runtime.types';
|
|
77
|
-
export * from './domain/types/flow/flow-condition.types';
|
|
78
77
|
export * from './domain/types/kernel/bootstrap.types';
|
|
79
78
|
export * from './domain/types/kernel/endge-modules.types';
|
|
80
79
|
export * from './domain/types/kernel/events.types';
|
|
81
80
|
export * from './domain/types/kernel/federation.types';
|
|
82
81
|
export * from './domain/types/mock/mock-data.type';
|
|
83
82
|
export * from './domain/types/program/program.types';
|
|
83
|
+
export * from './domain/types/program/action-program.types';
|
|
84
84
|
export * from './domain/types/program/program-metadata.types';
|
|
85
85
|
export * from './domain/types/runtime/action.types';
|
|
86
86
|
export * from './domain/types/runtime/vocab-cache.types';
|
|
87
87
|
export * from './domain/types/runtime/implementation.types';
|
|
88
|
+
export * from './domain/types/source/action-source.types';
|
|
88
89
|
export * from './domain/types/runtime/context-persistence.types';
|
|
89
90
|
export * from './domain/types/runtime/execution-context.types';
|
|
90
91
|
export * from './domain/types/runtime/query-execution.types';
|
|
@@ -168,7 +169,6 @@ export * from './domain/entities/reflect/RVersion';
|
|
|
168
169
|
export * from './domain/entities/reflect/RPageTemplate';
|
|
169
170
|
export * from './domain/entities/reflect/RPage';
|
|
170
171
|
export * from './domain/entities/reflect/RNavigation';
|
|
171
|
-
export * from './domain/entities/action-flow/REndgeFlow';
|
|
172
172
|
export * from './tools/openapi-parser';
|
|
173
173
|
export * from './tools/graphql-parser';
|
|
174
174
|
export * from './tools/ScheduleUpdate-sse-generator';
|
|
@@ -253,5 +253,3 @@ export * from './model/services/runtime/strategies/StoreRuntimeStrategy';
|
|
|
253
253
|
export * from './model/services/runtime/strategies/StreamRuntimeStrategy';
|
|
254
254
|
export * from './domain/entities/runtime/hosts/StreamRuntimeHost';
|
|
255
255
|
export * from './domain/types/runtime/stream-runtime.types';
|
|
256
|
-
export * from './model/modules/runtime/flow/endge-flow';
|
|
257
|
-
export * from './model/modules/runtime/flow/endge-flow-registry';
|
|
@@ -2,7 +2,6 @@ import { EndgeFederation } from '../../domain/entities/endge/EndgeFederation';
|
|
|
2
2
|
import { EndgeBootContext } from '../../domain/types/kernel/bootstrap.types';
|
|
3
3
|
import { EndgeDomainSelection } from '../../domain/types/document/domain-export.type';
|
|
4
4
|
import { EndgeAuth } from '../modules/security/endge-auth';
|
|
5
|
-
import { EndgeBind } from '../modules/runtime/core/endge-bind';
|
|
6
5
|
import { EndgeActions } from '../modules/runtime/core/endge-actions';
|
|
7
6
|
import { EndgeContext } from '../modules/context/endge-context';
|
|
8
7
|
import { EndgeConfigurationModule } from '../modules/context/endge-configuration';
|
|
@@ -13,8 +12,6 @@ import { EndgeDiagnostics } from '../modules/diagnostics/endge-diagnostics';
|
|
|
13
12
|
import { EndgeDomain } from '../modules/domain/endge-domain';
|
|
14
13
|
import { EndgeTypes } from '../modules/domain/endge-types';
|
|
15
14
|
import { EndgeEvents } from '../modules/events/endge-events';
|
|
16
|
-
import { EndgeFlow } from '../modules/runtime/flow/endge-flow';
|
|
17
|
-
import { EndgeFlowRegistry } from '../modules/runtime/flow/endge-flow-registry';
|
|
18
15
|
import { EndgeI18n } from '../modules/context/endge-i18n';
|
|
19
16
|
import { EndgeMock } from '../modules/mock/EndgeMock';
|
|
20
17
|
import { EndgeProgram } from '../modules/program/endge-program';
|
|
@@ -31,6 +28,8 @@ import { EndgeVocabs } from '../modules/domain/endge-vocabs';
|
|
|
31
28
|
import { EndgeWorkspace } from '../modules/context/endge-workspace';
|
|
32
29
|
import { EndgeUIRegistry } from '../modules/ui/endge-ui-registry';
|
|
33
30
|
import { EndgeComposition } from '../modules/runtime/execution/endge-composition';
|
|
31
|
+
import { EndgeComputation } from '../modules/runtime/execution/endge-computation';
|
|
32
|
+
import { EndgeConverters } from '../modules/runtime/execution/endge-converters';
|
|
34
33
|
/**
|
|
35
34
|
* Единая статическая федерация Endge.
|
|
36
35
|
* Хост живёт в `globalThis`, поэтому `Endge` не дублируется даже если пакет подтянут из разных зависимостей.
|
|
@@ -109,14 +108,6 @@ export declare class Endge extends EndgeFederation {
|
|
|
109
108
|
* Доступ к модулю переводов из доменных i18n-bundles.
|
|
110
109
|
*/
|
|
111
110
|
static get i18n(): EndgeI18n;
|
|
112
|
-
/**
|
|
113
|
-
* @deprecated Используйте Endge.runtime.flowRegistry.
|
|
114
|
-
*/
|
|
115
|
-
static get flowRegistry(): EndgeFlowRegistry;
|
|
116
|
-
/**
|
|
117
|
-
* @deprecated Используйте Endge.runtime.flow.
|
|
118
|
-
*/
|
|
119
|
-
static get flow(): EndgeFlow;
|
|
120
111
|
/**
|
|
121
112
|
* Доступ к runtime host manager.
|
|
122
113
|
*/
|
|
@@ -159,12 +150,10 @@ export declare class Endge extends EndgeFederation {
|
|
|
159
150
|
* Доступ к UI registry компонентов, renderers и presets.
|
|
160
151
|
*/
|
|
161
152
|
static get uiRegistry(): EndgeUIRegistry;
|
|
162
|
-
/**
|
|
163
|
-
* Доступ к registry runtime bindings.
|
|
164
|
-
*/
|
|
165
|
-
static get bind(): EndgeBind;
|
|
166
153
|
/** Доступ к единому registry вызываемых runtime Actions. */
|
|
167
154
|
static get actions(): EndgeActions;
|
|
155
|
+
static get computations(): EndgeComputation;
|
|
156
|
+
static get converters(): EndgeConverters;
|
|
168
157
|
/**
|
|
169
158
|
* Доступ к runtime debugger.
|
|
170
159
|
*/
|
|
@@ -22,7 +22,7 @@ export declare class EndgeContext extends EndgeModule {
|
|
|
22
22
|
private _currentLocale;
|
|
23
23
|
private _pendingLocale;
|
|
24
24
|
private _currentTheme;
|
|
25
|
-
private
|
|
25
|
+
private _themePreference;
|
|
26
26
|
private _currentTimezone;
|
|
27
27
|
private _pendingTimezone;
|
|
28
28
|
private _workspaceDataMode;
|
|
@@ -145,6 +145,8 @@ export declare class EndgeContext extends EndgeModule {
|
|
|
145
145
|
private _normalizeLocale;
|
|
146
146
|
private _normalizeTheme;
|
|
147
147
|
private _normalizeTimezone;
|
|
148
|
+
/** Persists only an explicit preference; the effective default remains configuration-owned. */
|
|
149
|
+
private _serializeForPersistence;
|
|
148
150
|
/** Выбирает storage adapter для заданной persistence policy. */
|
|
149
151
|
private resolveAdapter;
|
|
150
152
|
private _syncPersistentContextToRaph;
|
|
@@ -149,6 +149,8 @@ export declare class EndgeCompiler extends EndgeModule {
|
|
|
149
149
|
private _prepareComponentTagRegistry;
|
|
150
150
|
/** Добавляет build diagnostic владельцу persisted SFC tag. */
|
|
151
151
|
private _addComponentTagDiagnostic;
|
|
152
|
+
/** Links every external Action step against storage or installed code catalogs. */
|
|
153
|
+
private _linkActionDependencies;
|
|
152
154
|
/**
|
|
153
155
|
* Создает унифицированный `ProgramArtifact` из доменной сущности и payload.
|
|
154
156
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ActionCompiledFlow } from '../../../domain/types/flow/action.types';
|
|
2
1
|
import { FilterProgramPayload } from '../../../domain/types/source/filter-source.types';
|
|
3
2
|
import { CompositionProgramPayload } from '../../../domain/types/source/composition-source.types';
|
|
4
3
|
import { StoreSourceArtifact } from '../../../domain/types/source/store-source.types';
|
|
@@ -7,7 +6,7 @@ import { UpdateSourceArtifact } from '../../../domain/types/source/update-source
|
|
|
7
6
|
import { TypeProgramCatalogEntry, TypeProgramPayload } from '../../../domain/types/source/type-source.types';
|
|
8
7
|
import { VocabProgramPayload } from '../../../domain/types/source/vocab-source.types';
|
|
9
8
|
import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
|
|
10
|
-
import { DataViewProgramPayload, EndgeProgramSnapshot, ProgramArtifact, ProgramArtifactRef, ProgramArtifactStatus, ComponentSFCTagRegistryEntry, ComputationProgramPayload, ProgramDiagnostic, ProgramEntityType, QueryProgramPayload, EndgeStyleProgramPayload } from '../../../domain/types/program/program.types';
|
|
9
|
+
import { DataViewProgramPayload, EndgeProgramSnapshot, ProgramArtifact, ProgramArtifactRef, ProgramArtifactStatus, ComponentSFCTagRegistryEntry, ComputationProgramPayload, ActionProgramPayload, ProgramDiagnostic, ProgramEntityType, QueryProgramPayload, EndgeStyleProgramPayload } from '../../../domain/types/program/program.types';
|
|
11
10
|
/**
|
|
12
11
|
* Хранилище compiled artifacts, полученных после компиляции домена.
|
|
13
12
|
*/
|
|
@@ -56,10 +55,8 @@ export declare class EndgeProgram extends EndgeModule {
|
|
|
56
55
|
id?: string | number;
|
|
57
56
|
identity?: string;
|
|
58
57
|
}): ProgramArtifact<TPayload> | null;
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
*/
|
|
62
|
-
getActionFlow(idOrIdentity: string | number): ActionCompiledFlow | null;
|
|
58
|
+
/** Returns a compiled Action artifact by id or identity. */
|
|
59
|
+
getActionArtifact(idOrIdentity: string | number): ProgramArtifact<ActionProgramPayload> | null;
|
|
63
60
|
/** Возвращает compiled query artifact по id или identity. */
|
|
64
61
|
getQueryArtifact(idOrIdentity: string | number): ProgramArtifact<QueryProgramPayload> | null;
|
|
65
62
|
/** Возвращает compiled Vocab artifact по id или identity. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SourceEngineCompileResult, SourceEngineGenerateResult, SourceEngineStrategy, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageInlineHint, SourceLanguageSemanticHighlight, SourceDocumentReference, SourceLanguageStrategy, SourceLanguageValidationResult, SourceKind, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from '../../../domain/types/source/source-engine.types';
|
|
1
|
+
import { SourceEngineCompileResult, SourceEngineGenerateResult, SourceEngineStrategy, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageInlineHint, SourceLanguageSignatureHelp, SourceLanguageSemanticHighlight, SourceDocumentReference, SourceLanguageStrategy, SourceLanguageValidationResult, SourceKind, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from '../../../domain/types/source/source-engine.types';
|
|
2
2
|
import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
|
|
3
3
|
/** Модуль authoring-операций над source-документами Endge. */
|
|
4
4
|
export declare class EndgeSource extends EndgeModule {
|
|
@@ -41,6 +41,7 @@ export declare class EndgeSource extends EndgeModule {
|
|
|
41
41
|
validate(sourceKind: SourceKind | string, source: string, context?: Omit<SourceLanguageContext, 'source'>): SourceLanguageValidationResult;
|
|
42
42
|
/** Возвращает editor-facing completion items для указанного source-kind. */
|
|
43
43
|
completions(sourceKind: SourceKind | string, context: SourceLanguageContext): SourceLanguageCompletion[];
|
|
44
|
+
signatureHelp(sourceKind: SourceKind | string, context: SourceLanguageContext): SourceLanguageSignatureHelp | null;
|
|
44
45
|
/** Возвращает семантическую ссылку на внешний документ под курсором. */
|
|
45
46
|
referenceAt(sourceKind: SourceKind | string, context: SourceLanguageContext): SourceDocumentReference | null;
|
|
46
47
|
/** Возвращает renderer-neutral semantic highlights для source-документа. */
|