@endge/core 1.2.11 → 1.2.13

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.
Files changed (32) hide show
  1. package/dist/core.cjs +274 -266
  2. package/dist/core.js +18187 -17502
  3. package/dist/domain/entities/runtime/RuntimeHostBase.d.ts +3 -0
  4. package/dist/domain/entities/runtime/hosts/ComponentSFCRuntimeHost.d.ts +2 -1
  5. package/dist/domain/entities/runtime/hosts/CompositionRuntimeHost.d.ts +5 -0
  6. package/dist/domain/entities/runtime/hosts/QueryRuntimeHost.d.ts +1 -0
  7. package/dist/domain/entities/runtime/hosts/StreamRuntimeHost.d.ts +1 -0
  8. package/dist/domain/types/auth/auth-profile.types.d.ts +10 -0
  9. package/dist/domain/types/component/sfc/table-events.types.d.ts +1 -0
  10. package/dist/domain/types/component/sfc/tag-attribute-contract.types.d.ts +134 -0
  11. package/dist/domain/types/component/sfc/visual-projection.types.d.ts +5 -2
  12. package/dist/domain/types/document/document-move.type.d.ts +6 -0
  13. package/dist/domain/types/document/domain-provider.type.d.ts +24 -0
  14. package/dist/domain/types/program/program.types.d.ts +4 -0
  15. package/dist/domain/types/runtime/runtime-host.types.d.ts +25 -1
  16. package/dist/domain/types/source/composition-source.types.d.ts +6 -0
  17. package/dist/domain/types/source/data-view-source.types.d.ts +12 -0
  18. package/dist/domain/types/source/filter-source.types.d.ts +2 -0
  19. package/dist/domain/types/source/source-expression.types.d.ts +3 -0
  20. package/dist/domain/types/source/store-source.types.d.ts +1 -0
  21. package/dist/domain/types/ui/filter-view.type.d.ts +13 -0
  22. package/dist/main.d.ts +3 -0
  23. package/dist/model/adapters/diagnostics/ConsoleDiagnosticsAdapter.d.ts +1 -1
  24. package/dist/model/modules/domain/endge-domain-repository.d.ts +3 -0
  25. package/dist/model/modules/runtime/execution/endge-data-view.d.ts +8 -6
  26. package/dist/model/modules/security/auth/AuthRequestResolver.d.ts +1 -1
  27. package/dist/model/modules/security/auth/AuthSessionManager.d.ts +20 -18
  28. package/dist/model/modules/security/endge-auth.d.ts +2 -2
  29. package/dist/model/services/compiler/component-sfc/component-sfc-attributes.d.ts +9 -0
  30. package/dist/model/services/compiler/component-sfc/component-sfc-table-menu.d.ts +5 -0
  31. package/dist/test/diagnostics/console-diagnostics-adapter.test.d.ts +1 -0
  32. package/package.json +4 -4
@@ -50,6 +50,7 @@ export declare abstract class RuntimeHostBase<TType extends RuntimeEntityType, T
50
50
  private _updateBindings;
51
51
  private _updateDisposers;
52
52
  private _updateTimers;
53
+ private _quiesced;
53
54
  /** Read-only доступ к compiled artifacts, если host связан с program artifact. */
54
55
  private _artifactReader;
55
56
  /** Ссылка на compiled artifact, связанный с host. */
@@ -95,6 +96,8 @@ export declare abstract class RuntimeHostBase<TType extends RuntimeEntityType, T
95
96
  reconcile(): void;
96
97
  stop(): void;
97
98
  unmount(): void;
99
+ /** Останавливает доставку новых updates, не освобождая данные host-а. */
100
+ quiesce(): void;
98
101
  /**
99
102
  * LIFECYCLE
100
103
  */
@@ -132,8 +132,9 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
132
132
  private _makeBoundaryPatch;
133
133
  private _makeTableRowPatch;
134
134
  private _makeTableColumnPatch;
135
+ /** Собирает все keyed события frame-а, не теряя соседние SSE-изменения. */
136
+ private _makeCollectionPatch;
135
137
  private _resolveBoundarySourcePath;
136
- private _extractCollectionItemIndex;
137
138
  private _extractChangedPath;
138
139
  private _makeColumnProjection;
139
140
  private _makeObservedRaphPaths;
@@ -21,6 +21,7 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
21
21
  private _publicationDisposers;
22
22
  private _disposers;
23
23
  private _bridgePaths;
24
+ private _bindingDerivedHandles;
24
25
  private _dataPaths;
25
26
  private _storeRuntimeIds;
26
27
  private _storeProviderRuntimeIds;
@@ -86,6 +87,7 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
86
87
  private _requireOutputBridge;
87
88
  private _connectRuntimeOutputs;
88
89
  private _disconnectRuntimeOutputs;
90
+ quiesce(): void;
89
91
  destroy(): Promise<void>;
90
92
  /** Строит effective catalogs по той же иерархии, что и lifecycle scopes. */
91
93
  private _buildI18nCatalogs;
@@ -125,6 +127,8 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
125
127
  private _subscribeBinding;
126
128
  private _bindingPath;
127
129
  private _materializeBinding;
130
+ /** Материализует parameterized DataView binding без отдельного runtime host. */
131
+ private _materializeDataViewBinding;
128
132
  /** Гарантирует, что список outputs для fromOutput(runtime) был связан до запуска runtime. */
129
133
  private _requireResolvedOutputs;
130
134
  /** Читает и распаковывает один именованный runtime output. */
@@ -135,6 +139,7 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
135
139
  private _readRuntimeMetadata;
136
140
  private _readExpressionSource;
137
141
  private _collectExpressionReads;
142
+ private _flattenBindings;
138
143
  private _subscribeExpressionRead;
139
144
  private _readFilterFieldsBinding;
140
145
  isFilterViewRuntime(runtime: RuntimeHost<any, any>): runtime is FilterViewRuntimeHost;
@@ -47,6 +47,7 @@ export declare class QueryRuntimeHost extends RuntimeHostBase<'query', RuntimeHo
47
47
  pause(): void;
48
48
  stop(): void;
49
49
  reconcile(): Promise<void>;
50
+ quiesce(): void;
50
51
  destroy(): void;
51
52
  protected onUpdate(ctx: RuntimeHostUpdateContext): void;
52
53
  /** Монтирует compiled output graph как runtime-scoped Raph materialized dependencies. */
@@ -25,6 +25,7 @@ export declare class StreamRuntimeHost extends RuntimeHostBase<'stream', Runtime
25
25
  }): StreamRuntimeHost | null;
26
26
  start(): void;
27
27
  stop(): void;
28
+ quiesce(): void;
28
29
  destroy(): void;
29
30
  private _receive;
30
31
  }
@@ -58,6 +58,16 @@ export interface AuthEnsureOptions {
58
58
  /** Запрещает первичный auto-login service-профиля, сохраняя restore и refresh. */
59
59
  allowServiceLogin?: boolean;
60
60
  }
61
+ export interface AuthSessionSourceResolveOptions {
62
+ forceRefresh: boolean;
63
+ minValiditySeconds: number;
64
+ }
65
+ /** Host-owned источник session для внешнего Authorization Code/PKCE flow. */
66
+ export interface AuthSessionSource {
67
+ resolveToken: (options: AuthSessionSourceResolveOptions) => Promise<AuthTokenSet | null>;
68
+ logout?: () => Promise<void>;
69
+ loadUserInfo?: () => Promise<Record<string, unknown> | null>;
70
+ }
61
71
  /** Минимальный синхронный auth context без tokens и полного claims payload. */
62
72
  export interface EndgeAuthContext {
63
73
  authenticated: boolean;
@@ -1,4 +1,5 @@
1
1
  export type TableSelectionMode = 'none' | 'single' | 'multiple';
2
+ export type TableSelectionTrigger = 'auto' | 'control' | 'row' | 'both';
2
3
  export type TableRowActivationKind = 'pointer' | 'keyboard';
3
4
  export interface TableEventBase {
4
5
  tableId: string;
@@ -0,0 +1,134 @@
1
+ /** Статическое значение атрибута, которое можно безопасно предлагать в Source Editor. */
2
+ export type ComponentSFCTagAttributeLiteral = string | number | boolean;
3
+ /** Renderer-neutral контракт атрибута встроенного SFC tag с конечным набором значений. */
4
+ export interface ComponentSFCTagAttributeContract {
5
+ /** Каноническое имя для нового source. */
6
+ name: string;
7
+ /** Совместимые имена, которые уже принимает compiler/runtime. */
8
+ aliases?: readonly string[];
9
+ /** Полный набор допустимых статических значений. */
10
+ values: readonly ComponentSFCTagAttributeLiteral[];
11
+ /** Значение, которое применяется при отсутствии атрибута. */
12
+ defaultValue?: ComponentSFCTagAttributeLiteral;
13
+ /** Краткое описание для completion и hover. */
14
+ description: string;
15
+ /** false, когда более контекстная проверка уже выполняется compiler-ом. */
16
+ validate?: boolean;
17
+ }
18
+ /** Дополнительные контракты tag, например literal-union props пользовательского компонента. */
19
+ export interface ComponentSFCAttributeAnalysisOptions {
20
+ resolveTagAttributeContracts?: (tag: string) => readonly ComponentSFCTagAttributeContract[] | null | undefined;
21
+ }
22
+ export declare const ENDGE_SFC_TABLE_SELECTION_MODES: readonly ["none", "single", "multiple"];
23
+ export declare const ENDGE_SFC_TABLE_SELECTION_TRIGGERS: readonly ["auto", "control", "row", "both"];
24
+ export declare const ENDGE_SFC_TABLE_PAGING_MODES: readonly ["pages", "virtual"];
25
+ export declare const ENDGE_SFC_TABLE_SORT_MODES: readonly ["multiple", "single", "fixed", "disabled"];
26
+ export declare const ENDGE_SFC_TABLE_SORT_COMPARATORS: readonly ["natural", "text", "number", "date", "time", "boolean"];
27
+ export declare const ENDGE_SFC_TABLE_COLUMN_PIN_MODES: readonly ["enabled", "disabled"];
28
+ export declare const ENDGE_SFC_TABLE_COLUMN_MENU_MODES: readonly ["default", "disabled"];
29
+ export declare const ENDGE_SFC_TABLE_CELL_ALIGNMENTS: readonly ["left", "center", "right"];
30
+ export declare const ENDGE_SFC_TABLE_CELL_VERTICAL_ALIGNMENTS: readonly ["top", "middle", "bottom"];
31
+ export declare const ENDGE_SFC_GRID_AUTO_FLOWS: readonly ["row", "column", "row dense", "column dense"];
32
+ export declare const ENDGE_SFC_GRID_ALIGNMENTS: readonly ["start", "center", "end", "stretch"];
33
+ export declare const ENDGE_SFC_FLEX_DIRECTIONS: readonly ["row", "column"];
34
+ export declare const ENDGE_SFC_DIVIDER_ORIENTATIONS: readonly ["horizontal", "vertical"];
35
+ export declare const ENDGE_SFC_INPUT_TYPES: readonly ["String", "Number", "Date", "Time", "DateTime"];
36
+ /** Конечные значения встроенных SFC tags. Свободные string/number props сюда не входят. */
37
+ export declare const ENDGE_SFC_TAG_ATTRIBUTE_CONTRACTS: {
38
+ readonly Table: readonly [{
39
+ readonly name: "selection-mode";
40
+ readonly aliases: readonly ["selectionMode"];
41
+ readonly values: readonly ["none", "single", "multiple"];
42
+ readonly defaultValue: "none";
43
+ readonly description: "Допустимое количество выбранных строк.";
44
+ }, {
45
+ readonly name: "selection-trigger";
46
+ readonly aliases: readonly ["selectionTrigger"];
47
+ readonly values: readonly ["auto", "control", "row", "both"];
48
+ readonly defaultValue: "auto";
49
+ readonly description: "Действие, которое меняет состояние выбора строки.";
50
+ }, {
51
+ readonly name: "paging";
52
+ readonly values: readonly ["pages", "virtual"];
53
+ readonly defaultValue: "pages";
54
+ readonly description: "Страничное или виртуализированное отображение строк.";
55
+ }, {
56
+ readonly name: "sort-mode";
57
+ readonly aliases: readonly ["sortMode"];
58
+ readonly values: readonly ["multiple", "single", "fixed", "disabled"];
59
+ readonly defaultValue: "multiple";
60
+ readonly description: "Режим пользовательской сортировки Table.";
61
+ readonly validate: false;
62
+ }, {
63
+ readonly name: "column-pin";
64
+ readonly aliases: readonly ["columnPin"];
65
+ readonly values: readonly ["enabled", "disabled"];
66
+ readonly defaultValue: "enabled";
67
+ readonly description: "Разрешает или запрещает runtime-закрепление колонок.";
68
+ readonly validate: false;
69
+ }, {
70
+ readonly name: "column-menu";
71
+ readonly aliases: readonly ["columnMenu"];
72
+ readonly values: readonly ["default", "disabled"];
73
+ readonly defaultValue: "default";
74
+ readonly description: "Стандартное или отключённое меню заголовка колонки.";
75
+ readonly validate: false;
76
+ }, {
77
+ readonly name: "cell-align";
78
+ readonly aliases: readonly ["cellAlign"];
79
+ readonly values: readonly ["left", "center", "right"];
80
+ readonly defaultValue: "left";
81
+ readonly description: "Горизонтальное выравнивание содержимого ячеек.";
82
+ }, {
83
+ readonly name: "cell-vertical-align";
84
+ readonly aliases: readonly ["cellVerticalAlign"];
85
+ readonly values: readonly ["top", "middle", "bottom"];
86
+ readonly defaultValue: "middle";
87
+ readonly description: "Вертикальное выравнивание содержимого ячеек.";
88
+ }];
89
+ readonly Column: readonly [{
90
+ readonly name: "sort";
91
+ readonly values: readonly ["natural", "text", "number", "date", "time", "boolean"];
92
+ readonly defaultValue: "natural";
93
+ readonly description: "Comparator для значений колонки.";
94
+ readonly validate: false;
95
+ }];
96
+ readonly Grid: readonly [{
97
+ readonly name: "autoFlow";
98
+ readonly values: readonly ["row", "column", "row dense", "column dense"];
99
+ readonly defaultValue: "row";
100
+ readonly description: "Направление автоматического размещения CSS Grid.";
101
+ }, {
102
+ readonly name: "align";
103
+ readonly values: readonly ["start", "center", "end", "stretch"];
104
+ readonly defaultValue: "stretch";
105
+ readonly description: "Выравнивание элементов по вертикальной оси Grid.";
106
+ }, {
107
+ readonly name: "justify";
108
+ readonly values: readonly ["start", "center", "end", "stretch"];
109
+ readonly defaultValue: "stretch";
110
+ readonly description: "Выравнивание элементов по горизонтальной оси Grid.";
111
+ }];
112
+ readonly Flex: readonly [{
113
+ readonly name: "direction";
114
+ readonly values: readonly ["row", "column"];
115
+ readonly defaultValue: "row";
116
+ readonly description: "Направление основной оси Flex.";
117
+ }];
118
+ readonly Divider: readonly [{
119
+ readonly name: "orientation";
120
+ readonly values: readonly ["horizontal", "vertical"];
121
+ readonly defaultValue: "horizontal";
122
+ readonly description: "Ориентация разделителя.";
123
+ }];
124
+ readonly Input: readonly [{
125
+ readonly name: "type";
126
+ readonly values: readonly ["String", "Number", "Date", "Time", "DateTime"];
127
+ readonly defaultValue: "String";
128
+ readonly description: "Семантический тип значения Input.";
129
+ }];
130
+ };
131
+ /** Возвращает строгие контракты атрибутов одного встроенного SFC tag. */
132
+ export declare function getComponentSFCTagAttributeContracts(tag: string): readonly ComponentSFCTagAttributeContract[];
133
+ /** Находит строгий контракт по каноническому или совместимому имени атрибута. */
134
+ export declare function getComponentSFCTagAttributeContract(tag: string, attributeName: string): ComponentSFCTagAttributeContract | null;
@@ -42,6 +42,8 @@ export type ComponentSFCTableCellProjection = {
42
42
  export interface ComponentSFCVisualInspectionOptions {
43
43
  resolveComponentTag?: (tag: string) => string | null;
44
44
  resolveTypeDefinition?: (identity: string) => TypeSourceDefinition | null;
45
+ /** Direct Action identities available to source-authored MenuItem bindings. */
46
+ actionIdentities?: Iterable<string>;
45
47
  }
46
48
  /** Visual read-model одной прямой Column внутри корневого Table. */
47
49
  export interface ComponentSFCTableColumnProjection {
@@ -64,7 +66,7 @@ export type ComponentSFCTableVisualMenuKind = 'column' | 'row';
64
66
  export type ComponentSFCTableVisualMenuMode = 'default' | 'disabled' | 'none' | 'custom' | 'source';
65
67
  export interface ComponentSFCTableMenuActionOption {
66
68
  identity: string;
67
- source: 'intrinsic' | 'built-in' | 'required' | 'provided' | 'forwarded';
69
+ source: 'intrinsic' | 'built-in' | 'external' | 'required' | 'provided' | 'forwarded';
68
70
  }
69
71
  export type ComponentSFCTableMenuNodeProjection = {
70
72
  kind: 'separator';
@@ -106,7 +108,7 @@ export type ComponentSFCTableSourcePatch = {
106
108
  value: string | null;
107
109
  } | {
108
110
  type: 'set-table-attribute';
109
- name: 'ref' | 'selection-mode' | 'paging' | 'page-size' | 'page-sizes' | 'default-pin' | 'default-sort' | 'default-hidden';
111
+ name: 'ref' | 'selection-mode' | 'selection-trigger' | 'paging' | 'page-size' | 'page-sizes' | 'default-pin' | 'default-sort' | 'default-hidden';
110
112
  value: string | null;
111
113
  } | {
112
114
  type: 'set-column-component';
@@ -163,6 +165,7 @@ export interface ComponentSFCTableVisualProjection {
163
165
  kind: 'table';
164
166
  ref: ComponentSFCVisualSourceValue | null;
165
167
  selectionMode: ComponentSFCVisualSourceValue | null;
168
+ selectionTrigger: ComponentSFCVisualSourceValue | null;
166
169
  rows: ComponentSFCVisualSourceValue | null;
167
170
  rowKey: ComponentSFCVisualSourceValue | null;
168
171
  paging: ComponentSFCVisualSourceValue | null;
@@ -0,0 +1,6 @@
1
+ import { DomainDocumentType } from './document.types';
2
+ /** Ссылка на persisted-документ для перемещения внутри домена. */
3
+ export interface EndgeDomainDocumentMove {
4
+ documentId: string | number;
5
+ documentType: DomainDocumentType;
6
+ }
@@ -25,6 +25,29 @@ export interface EndgeDocumentMutationResult {
25
25
  document: EndgeLiveDomainDocument;
26
26
  etag: string | null;
27
27
  }
28
+ /** Документ с optimistic revision для атомарного перемещения. */
29
+ export interface EndgeDocumentMoveRequestItem {
30
+ collection: EndgeDomainCollection;
31
+ identity: string;
32
+ expectedRevision: number;
33
+ }
34
+ /** Запрос атомарного перемещения документов в одну папку. */
35
+ export interface EndgeDocumentsMoveRequest {
36
+ workspaceIdentity: string;
37
+ documents: EndgeDocumentMoveRequestItem[];
38
+ folderIdentity: string;
39
+ signal?: AbortSignal;
40
+ }
41
+ /** Актуальный документ и его transport-коллекция после перемещения. */
42
+ export interface EndgeMovedDocument {
43
+ collection: EndgeDomainCollection;
44
+ document: EndgeLiveDomainDocument;
45
+ }
46
+ /** Результат атомарного перемещения документов. */
47
+ export interface EndgeDocumentsMoveResult {
48
+ documents: EndgeMovedDocument[];
49
+ moved: number;
50
+ }
28
51
  export interface EndgeWorkspaceMutationRequest {
29
52
  workspaceIdentity: string;
30
53
  document: Record<string, unknown>;
@@ -47,6 +70,7 @@ export interface EndgeDomainProvider {
47
70
  updateDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
48
71
  softDeleteDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
49
72
  restoreDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
73
+ moveDocuments?(request: EndgeDocumentsMoveRequest): Promise<EndgeDocumentsMoveResult>;
50
74
  updateWorkspace(request: EndgeWorkspaceMutationRequest): Promise<EndgeWorkspaceMutationResult>;
51
75
  }
52
76
  export type EndgeDomainRepositoryProviderId = 'service-backend' | 'bundle' | 'plain';
@@ -167,6 +167,10 @@ export interface DataViewProgramPayload {
167
167
  sourceDocument: DataViewSourceDocument | null;
168
168
  /** Декларативный входной и выходной тип DataView. */
169
169
  contract?: DataViewSourceDocument['contract'];
170
+ /** Контракт внешних параметров одного materialized DataView instance. */
171
+ props?: SourceFieldDefinition[];
172
+ /** Row-local predicate, применяемый после pipeline steps. */
173
+ filter?: SourceExpressionIR | null;
170
174
  /** Compiled manual transform. Используется только в mode=manual. */
171
175
  transform: DataViewManualTransform | null;
172
176
  /** Compiled pipeline steps. Используется только в mode=pipeline. */
@@ -165,6 +165,8 @@ export interface RuntimeHostLifecycle {
165
165
  reconcile: () => Promise<void> | void;
166
166
  stop: () => Promise<void> | void;
167
167
  unmount: () => Promise<void> | void;
168
+ /** Синхронно запрещает новые updates перед освобождением runtime tree. */
169
+ quiesce: () => Promise<void> | void;
168
170
  /** Корректно остановить host и освободить ресурсы. */
169
171
  destroy: () => Promise<void> | void;
170
172
  /** Обработать runtime update, пришедший из логической либо boundary Raph-фазы. */
@@ -277,8 +279,30 @@ export interface RuntimeCollectionProjectionUpdatePatch {
277
279
  /** Raph-нода, которая стала верхней dirty boundary. */
278
280
  node: RaphNode;
279
281
  }
282
+ /** Одно keyed изменение строки внутри пакетного patch коллекции. */
283
+ export interface RuntimeCollectionItemPatch {
284
+ /** Текущий индекс строки; null означает, что строка удалена из результата. */
285
+ itemIndex: number | null;
286
+ /** Стабильный ключ строки из selector или актуального snapshot. */
287
+ itemKey: unknown;
288
+ /** Актуальный snapshot строки; null/undefined означает удаление. */
289
+ itemSnapshot: unknown;
290
+ /** Измененные относительные paths внутри строки. */
291
+ changedPaths: string[][];
292
+ }
293
+ /** Пакет keyed изменений одной коллекции за один Raph frame. */
294
+ export interface RuntimeCollectionProjectionBatchPatch {
295
+ kind: 'collection-projection-batch';
296
+ boundaryId: string;
297
+ boundaryType: 'table';
298
+ sourcePath: string;
299
+ items: RuntimeCollectionItemPatch[];
300
+ affectedProjections: RuntimeCollectionProjectionPatch[];
301
+ events: PhaseEvent[];
302
+ node: RaphNode;
303
+ }
280
304
  /** Нейтральный patch runtime boundary для render adapter-а. */
281
- export type RuntimeBoundaryPatch = RuntimeCollectionProjectionUpdatePatch;
305
+ export type RuntimeBoundaryPatch = RuntimeCollectionProjectionUpdatePatch | RuntimeCollectionProjectionBatchPatch;
282
306
  export interface RuntimeHost<TType extends RuntimeEntityType = RuntimeEntityType, TContext extends RuntimeHostContext<TType> = RuntimeHostContext<TType>, TArtifactPayload = unknown> extends RuntimeHostLifecycle {
283
307
  /** Уникальный runtime-id host. */
284
308
  readonly id: string;
@@ -73,6 +73,12 @@ export type CompositionBindingValue = {
73
73
  kind: 'filter-fields';
74
74
  runtime: string;
75
75
  fields: string[];
76
+ } | {
77
+ kind: 'data-view';
78
+ data: string;
79
+ path: string;
80
+ identity: string;
81
+ props: Record<string, CompositionBindingValue>;
76
82
  } | {
77
83
  kind: 'expression';
78
84
  expression: SourceExpressionIR;
@@ -9,12 +9,18 @@ export type DataViewIncrementalRequest = {
9
9
  } | {
10
10
  mode: 'collection-by-key';
11
11
  key: string;
12
+ } | {
13
+ mode: 'filter-by-key';
14
+ key: string;
12
15
  };
13
16
  export type DataViewMaterializationStrategy = {
14
17
  kind: 'full';
15
18
  } | {
16
19
  kind: 'collection-by-key';
17
20
  key: string;
21
+ } | {
22
+ kind: 'filter-by-key';
23
+ key: string;
18
24
  };
19
25
  export interface DataViewSourceContract {
20
26
  input: SourceFieldDefinition;
@@ -23,12 +29,18 @@ export interface DataViewSourceContract {
23
29
  export interface DataViewSourceDocument {
24
30
  mode: DataViewSourceMode;
25
31
  incremental: DataViewIncrementalRequest;
32
+ props: SourceFieldDefinition[];
26
33
  contract?: DataViewSourceContract | null;
34
+ filter?: SourceExpressionIR | null;
27
35
  transform?: DataViewManualTransform;
28
36
  steps?: DataViewPipelineStep[];
29
37
  output?: Record<string, SourceExpressionIR>;
30
38
  expression?: SourceExpressionIR;
31
39
  }
40
+ /** Runtime-контекст одного вызова parameterized DataView. */
41
+ export interface DataViewRunContext {
42
+ props?: Record<string, unknown>;
43
+ }
32
44
  export interface DataViewManualTransform {
33
45
  params: string[];
34
46
  body: string;
@@ -58,12 +58,14 @@ export interface FilterProgramJsonOutput {
58
58
  key: string;
59
59
  kind: 'json';
60
60
  expression: SourceExpressionIR;
61
+ dependencies?: string[];
61
62
  }
62
63
  /** Локальный predicate, вычисляемый над строкой и state фильтра. */
63
64
  export interface FilterProgramPredicateOutput {
64
65
  key: string;
65
66
  kind: 'predicate';
66
67
  expression: SourceExpressionIR;
68
+ dependencies?: string[];
67
69
  }
68
70
  export type FilterProgramOutput = FilterProgramJsonOutput | FilterProgramPredicateOutput;
69
71
  /** Payload Filter artifact без persisted source и diagnostics envelope. */
@@ -1,3 +1,4 @@
1
+ import { ProgramMetadataMap } from '../program/program-metadata.types';
1
2
  import { TypeSourceExpression } from './type-source.types';
2
3
  /** Type Registry identity used by Query/Filter field contracts. */
3
4
  export type SourceFieldType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Time' | 'DateTime' | 'Object' | 'Any' | (string & {});
@@ -51,6 +52,8 @@ export interface SourceFieldDefinition {
51
52
  defaultValue?: SourceExpressionIR;
52
53
  options?: SourceFieldOption[];
53
54
  vocab?: SourceFieldVocab;
55
+ /** Статическая presentation metadata поля, не влияющая на Filter state. */
56
+ metadata?: ProgramMetadataMap;
54
57
  }
55
58
  /** Default value prop, вычисляемый через output внешнего или локального Filter. */
56
59
  export type SourceFieldDefaultSource = {
@@ -18,6 +18,7 @@ export interface StoreDerivedDescriptor {
18
18
  kind: 'derived';
19
19
  source: string;
20
20
  dataViews: DataViewRef[];
21
+ materializationStrategy?: import('./data-view-source.types').DataViewMaterializationStrategy;
21
22
  contract?: SourceFieldDefinition | null;
22
23
  }
23
24
  export interface StoreSourceDocument {
@@ -1,4 +1,17 @@
1
1
  import { SourceFieldDefinition, SourceFieldOption } from '../source/source-expression.types';
2
+ export declare const ENDGE_UI_SELECT_METADATA_NAMESPACE = "endge.ui.select";
3
+ export declare const FILTER_SELECT_AUTO_OPTIMIZE_THRESHOLD = 10;
4
+ /** Presentation hints встроенного Select; неизвестные metadata adapters игнорируют. */
5
+ export interface FilterSelectPresentationMetadata {
6
+ searchable?: boolean;
7
+ }
8
+ /** Результат применения metadata и безопасных adapter defaults к Select. */
9
+ export interface FilterSelectPresentation {
10
+ searchable: boolean;
11
+ virtualized: boolean;
12
+ }
13
+ /** Применяет явный searchable override и автоматическую оптимизацию больших списков. */
14
+ export declare function resolveFilterSelectPresentation(field: Pick<SourceFieldDefinition, 'metadata'>, optionCount: number): FilterSelectPresentation;
2
15
  /** Renderer-neutral primitive, выбранный для поля Filter view. */
3
16
  export type FilterViewControlType = 'Input' | 'Textarea' | 'Checkbox' | 'Select';
4
17
  /** Явное переопределение автоматически выбранного контрола. */
package/dist/main.d.ts CHANGED
@@ -40,6 +40,7 @@ export * from './domain/types/component/sfc/table-visibility.types';
40
40
  export * from './domain/types/component/sfc/table-events.types';
41
41
  export * from './domain/types/component/sfc/intrinsic-events.types';
42
42
  export * from './domain/types/component/sfc/tag-input-contract.types';
43
+ export * from './domain/types/component/sfc/tag-attribute-contract.types';
43
44
  export * from './domain/types/component/sfc/location.types';
44
45
  export * from './domain/types/component/sfc/ast.types';
45
46
  export * from './domain/types/component/sfc/ir.types';
@@ -57,6 +58,7 @@ export * from './domain/types/document/codegen.types';
57
58
  export * from './domain/types/document/document.types';
58
59
  export * from './domain/types/document/document-create.type';
59
60
  export * from './domain/types/document/document-draft.type';
61
+ export * from './domain/types/document/document-move.type';
60
62
  export * from './domain/types/document/domain-export.type';
61
63
  export * from './domain/types/document/domain-provider.type';
62
64
  export * from './domain/types/document/domain-snapshot.type';
@@ -194,6 +196,7 @@ export * from './domain/entities/runtime/hosts/CompositionRuntimeHost';
194
196
  export * from './domain/entities/runtime/hosts/StoreRuntimeHost';
195
197
  export * from './domain/entities/runtime/hosts/ActionRuntimeHost';
196
198
  export * from './model/services/compiler/component-sfc/component-sfc-compile';
199
+ export * from './model/services/compiler/component-sfc/component-sfc-attributes';
197
200
  export * from './model/services/compiler/component-sfc/component-sfc-expression';
198
201
  export * from './model/services/compiler/component-sfc/component-sfc-parse';
199
202
  export * from './model/services/compiler/component-sfc/component-sfc-script';
@@ -13,7 +13,7 @@ export declare class ConsoleDiagnosticsAdapter implements DiagnosticsAdapter {
13
13
  constructor(output: EndgeDiagnosticsOutputConfiguration);
14
14
  /** Выводит одну routed record в pretty или JSON формате. */
15
15
  acceptRecord(record: DiagnosticsRecord, context: DiagnosticsAdapterRecordContext): void;
16
- /** Выводит полный snapshot одной JSON-записью, пригодной для копирования. */
16
+ /** Выводит bounded summary снимка, не сериализуя telemetry history целиком. */
17
17
  acceptSnapshot(snapshot: DiagnosticsSnapshot, context: DiagnosticsAdapterSnapshotContext): void;
18
18
  /** Пишет безопасную тестовую строку без добавления record в diagnostics history. */
19
19
  test(): void;
@@ -1,5 +1,6 @@
1
1
  import { DomainDocumentType } from '../../../domain/types/document/document.types';
2
2
  import { DocumentCreateRequest, DocumentCreateResult } from '../../../domain/types/document/document-create.type';
3
+ import { EndgeDomainDocumentMove } from '../../../domain/types/document/document-move.type';
3
4
  import { EndgeDomainRepositoryCapabilities } from '../../../domain/types/document/domain-provider.type';
4
5
  import { EndgeDocumentServerState, EndgeLiveDomainSnapshot } from '../../../domain/types/document/domain-snapshot.type';
5
6
  import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
@@ -31,6 +32,8 @@ export declare class EndgeDomainRepository extends EndgeModule {
31
32
  deleteDocument(documentIdOrIdentity: string, documentType: DomainDocumentType): Promise<void>;
32
33
  restoreDocument(documentIdOrIdentity: string, documentType: DomainDocumentType): Promise<void>;
33
34
  changeDocumentFolder(documentId: string | number, documentType: DomainDocumentType, folderIdOrIdentity: string | number | null): Promise<void>;
35
+ /** Атомарно переносит несколько persisted-документов в одну папку. */
36
+ changeDocumentsFolder(documents: readonly EndgeDomainDocumentMove[], folderIdOrIdentity: string | number): Promise<number>;
34
37
  saveFolder(folderId: string): Promise<void>;
35
38
  deleteFolder(folderIdentity: string): Promise<void>;
36
39
  restoreFolder(folderIdentity: string): Promise<void>;
@@ -1,14 +1,14 @@
1
- import { DataViewRef, DataViewRunTools } from '../../../../domain/types/source/data-view-source.types';
1
+ import { DataViewRef, DataViewRunContext, DataViewRunTools } from '../../../../domain/types/source/data-view-source.types';
2
2
  import { DataViewProgramPayload, ProgramArtifact } from '../../../../domain/types/program/program.types';
3
3
  import { RDataView } from '../../../../domain/entities/reflect/RDataView';
4
4
  /** Модуль выполнения скомпилированных RDataView artifacts. */
5
5
  export declare class EndgeDataView {
6
6
  /** Выполняет DataView по id/identity/model над переданным input object. */
7
- run(dataViewOrId: RDataView | string | number, input: unknown, tools?: Partial<DataViewRunTools>): unknown;
7
+ run(dataViewOrId: RDataView | string | number, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
8
8
  /** Выполняет уже скомпилированный DataView artifact без поиска в домене. */
9
- runArtifact(artifact: ProgramArtifact<DataViewProgramPayload>, input: unknown, tools?: Partial<DataViewRunTools>): unknown;
9
+ runArtifact(artifact: ProgramArtifact<DataViewProgramPayload>, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
10
10
  /** Выполняет уже скомпилированный DataView payload. */
11
- runPayload(artifact: DataViewProgramPayload, input: unknown, tools?: Partial<DataViewRunTools>, context?: {
11
+ runPayload(artifact: DataViewProgramPayload, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext & {
12
12
  children?: ProgramArtifact[];
13
13
  }): unknown;
14
14
  /** Вычисляет object projection один раз над целым DataView input. */
@@ -16,11 +16,11 @@ export declare class EndgeDataView {
16
16
  /** Вычисляет root ValueExpression без object projection wrapper. */
17
17
  private _runExpression;
18
18
  /** Выполняет DataView-ссылку из query/DataView artifact. */
19
- runRef(ref: DataViewRef, input: unknown, tools?: Partial<DataViewRunTools>, context?: {
19
+ runRef(ref: DataViewRef, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext & {
20
20
  children?: ProgramArtifact[];
21
21
  }): unknown;
22
22
  /** Выполняет DataView source без записи artifact в `Endge.program`. */
23
- runSource(source: string, input: unknown, tools?: Partial<DataViewRunTools>): unknown;
23
+ runSource(source: string, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
24
24
  /** Возвращает DataView model из домена или входного экземпляра. */
25
25
  private _resolveDataView;
26
26
  /** Возвращает compiled artifact, компилируя DataView локально при необходимости. */
@@ -29,6 +29,8 @@ export declare class EndgeDataView {
29
29
  private _runManual;
30
30
  /** Интерпретирует декларативные pipeline steps без eval. */
31
31
  private _runPipeline;
32
+ /** Заполняет отсутствующие props декларативными defaults DataView artifact. */
33
+ private _resolveProps;
32
34
  /** Последовательно вычисляет whole-value steps; каждый select получает результат предыдущего. */
33
35
  private _runSelectPipeline;
34
36
  /** Собирает базовый output для map step из spread-источников. */
@@ -1,7 +1,7 @@
1
1
  import { AuthRequestPolicy, AuthResolvedSession, AuthResolveOptions } from '../../../../domain/types/auth/auth-profile.types';
2
2
  import { AuthProfileRegistry } from './AuthProfileRegistry';
3
3
  import { AuthSessionManager } from './AuthSessionManager';
4
- /** Разрешает auth policy запроса без изменения application session identity. */
4
+ /** Разрешает auth policy запроса без изменения sessions других profiles. */
5
5
  export declare class AuthRequestResolver {
6
6
  private readonly _profiles;
7
7
  private readonly _sessions;