@endge/core 3.0.1 → 3.2.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.
@@ -114,6 +114,9 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
114
114
  private _emitRootEventPort;
115
115
  private _executeEventActionEffect;
116
116
  private _executeEventQueryEffect;
117
+ private _executeInlineOperation;
118
+ private _materializeOperationBlock;
119
+ private _executeMaterializedOperationBlock;
117
120
  private _reportComputationError;
118
121
  /** Синхронизирует runtime context с текущим compiled artifact. */
119
122
  syncArtifactState(target: RComponentRenderTarget | null): void;
@@ -142,6 +142,9 @@ export interface ComponentSFCEventSource {
142
142
  export type ComponentSFCEventInputValue = {
143
143
  kind: 'event';
144
144
  path: string | null;
145
+ } | {
146
+ kind: 'operation-input';
147
+ path: string | null;
145
148
  } | {
146
149
  kind: 'now';
147
150
  } | {
@@ -195,6 +198,22 @@ export interface ComponentSFCEventEmitAction {
195
198
  event: string;
196
199
  payload?: ComponentSFCEventInputValue;
197
200
  }
201
+ export interface ComponentSFCEventOperationBlockStep {
202
+ name: string;
203
+ action: ComponentSFCEventAction;
204
+ }
205
+ export interface ComponentSFCEventOperationBlock {
206
+ steps: ComponentSFCEventOperationBlockStep[];
207
+ output: string | null;
208
+ }
209
+ /** Inline undoable algorithm compiled from one Component SFC reaction. */
210
+ export interface ComponentSFCEventOperationAction {
211
+ kind: 'operation';
212
+ input?: ComponentSFCEventInputValue;
213
+ run: ComponentSFCEventOperationBlock;
214
+ undo: ComponentSFCEventOperationBlock;
215
+ redo: ComponentSFCEventOperationBlock | null;
216
+ }
198
217
  /** Calls one required executable port through its effective per-instance provider. */
199
218
  export interface ComponentSFCEventRequiredPortAction {
200
219
  kind: 'required-port';
@@ -202,7 +221,7 @@ export interface ComponentSFCEventRequiredPortAction {
202
221
  port: string;
203
222
  input?: ComponentSFCEventInputValue;
204
223
  }
205
- export type ComponentSFCEventAction = ComponentSFCEventDirectAction | ComponentSFCEventDirectQuery | ComponentSFCEventTypescriptAction | ComponentSFCEventEmitAction | ComponentSFCEventRequiredPortAction;
224
+ export type ComponentSFCEventAction = ComponentSFCEventDirectAction | ComponentSFCEventDirectQuery | ComponentSFCEventOperationAction | ComponentSFCEventTypescriptAction | ComponentSFCEventEmitAction | ComponentSFCEventRequiredPortAction;
206
225
  export interface ComponentSFCEventRuntimeSource {
207
226
  nodeId: string;
208
227
  ref?: string;
@@ -25,7 +25,7 @@ export interface ActionSourceTypescriptStep {
25
25
  export interface ActionSourceOperationStep {
26
26
  kind: 'operation';
27
27
  name: string;
28
- input: SourceExpressionIR;
28
+ input: SourceExpressionIR | null;
29
29
  run: ActionSourceBlock;
30
30
  undo: ActionSourceBlock;
31
31
  redo: ActionSourceBlock | null;
@@ -144,6 +144,8 @@ export interface SourceEngineCompileResult extends SourceEngineResult {
144
144
  metadata?: import('../program/program-metadata.types').ProgramMetadataMap;
145
145
  /** Diagnostics, найденные source compiler-ом. */
146
146
  diagnostics?: unknown[];
147
+ /** Static Program dependencies discovered by the source compiler. */
148
+ dependencies?: import('../program/program.types').ProgramDependency[];
147
149
  }
148
150
  /** Результат parse source без обязательной runtime-компиляции. */
149
151
  export interface SourceParseResult<TDocument = unknown> extends SourceEngineResult {
@@ -0,0 +1,17 @@
1
+ import { OperationHistory } from './operation-history';
2
+ export interface RuntimeOperationContext {
3
+ input: unknown;
4
+ runOutput?: unknown;
5
+ undoOutput?: unknown;
6
+ }
7
+ export interface ExecuteRuntimeOperationOptions {
8
+ id: string;
9
+ input: unknown;
10
+ history: OperationHistory | null;
11
+ recordHistory: boolean;
12
+ run: (context: RuntimeOperationContext) => Promise<unknown>;
13
+ undo: (context: RuntimeOperationContext) => Promise<unknown>;
14
+ redo?: ((context: RuntimeOperationContext) => Promise<unknown>) | null;
15
+ }
16
+ /** Executes one immutable Operation snapshot and owns the common History cursor semantics. */
17
+ export declare function executeRuntimeOperation(options: ExecuteRuntimeOperationOptions): Promise<unknown>;
@@ -1,4 +1,6 @@
1
1
  import { RComponentDiagnostic } from '../../../../domain/types/component/component-core.types';
2
+ import { EndgeRuntimeContextSnapshot } from '../../../../domain/types/runtime/context-persistence.types';
3
+ import { EndgeConfigurationSchemaEntry } from '../../../../domain/types/source/configuration-source.types';
2
4
  import { RComponentSFC_IR_Value } from '../../../../domain/types/component/sfc/ir.types';
3
5
  /** Контекст анализа выражения SFC template/script. */
4
6
  export interface ComponentSFCExpressionContext {
@@ -16,6 +18,30 @@ export interface ComponentSFCExpressionCompileResult {
16
18
  /** Diagnostics, найденные при анализе expression. */
17
19
  diagnostics: RComponentDiagnostic[];
18
20
  }
21
+ export type ComponentSFCExpressionCompletionScope = 'table-row-menu' | 'table-column-menu';
22
+ export interface ComponentSFCExpressionCompletionRequest {
23
+ source: string;
24
+ cursor: number;
25
+ scope: ComponentSFCExpressionCompletionScope;
26
+ context?: Readonly<EndgeRuntimeContextSnapshot> | Record<string, unknown>;
27
+ configurations?: Iterable<EndgeConfigurationSchemaEntry>;
28
+ }
29
+ export interface ComponentSFCExpressionCompletion {
30
+ label: string;
31
+ insertText: string;
32
+ kind: 'variable' | 'property' | 'configuration';
33
+ detail: string;
34
+ documentation?: string;
35
+ replace: {
36
+ start: number;
37
+ end: number;
38
+ };
39
+ }
40
+ /**
41
+ * Возвращает renderer-neutral подсказки для SFC expression в точной lexical
42
+ * области. UI отвечает только за отображение и применение replacement range.
43
+ */
44
+ export declare function resolveComponentSFCExpressionCompletions(request: ComponentSFCExpressionCompletionRequest): ComponentSFCExpressionCompletion[];
19
45
  /** Возвращает статический fallback из `t(key, fallback)` без i18n/runtime-контекста. */
20
46
  export declare function readComponentSFCTranslationFallback(source: string): string | null;
21
47
  /** Компилирует expression и извлекает reactive reads для runtime-подписок. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endge/core",
3
- "version": "3.0.1",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",