@endge/core 1.2.7 → 1.2.8

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 (49) hide show
  1. package/dist/core.cjs +289 -267
  2. package/dist/core.js +23190 -21989
  3. package/dist/domain/entities/runtime/RuntimeHostBase.d.ts +2 -0
  4. package/dist/domain/entities/runtime/hosts/ComponentSFCRuntimeHost.d.ts +10 -0
  5. package/dist/domain/entities/runtime/hosts/CompositionRuntimeHost.d.ts +8 -1
  6. package/dist/domain/entities/runtime/hosts/FilterViewRuntimeHost.d.ts +13 -0
  7. package/dist/domain/types/component/sfc/dependencies.types.d.ts +13 -0
  8. package/dist/domain/types/component/sfc/ir.types.d.ts +13 -0
  9. package/dist/domain/types/runtime/action.types.d.ts +3 -0
  10. package/dist/domain/types/runtime/index.d.ts +1 -0
  11. package/dist/domain/types/runtime/runtime-host.types.d.ts +2 -0
  12. package/dist/domain/types/runtime/runtime-project-session.types.d.ts +3 -0
  13. package/dist/domain/types/runtime/vocab-cache.types.d.ts +33 -0
  14. package/dist/domain/types/source/composition-source.types.d.ts +35 -0
  15. package/dist/domain/types/source/source-expression.types.d.ts +3 -0
  16. package/dist/domain/types/source/type-source.types.d.ts +6 -1
  17. package/dist/model/db/repositories/PageTemplates_Repository.d.ts +1 -0
  18. package/dist/model/db/repositories/Pages_Repository.d.ts +1 -0
  19. package/dist/model/endge/domain/endge-vocabs.d.ts +24 -0
  20. package/dist/model/endge/program/endge-compiler.d.ts +5 -0
  21. package/dist/model/endge/runtime/core/endge-actions.d.ts +1 -0
  22. package/dist/model/endge/runtime/core/endge-bind.d.ts +1 -5
  23. package/dist/model/services/compiler/component-sfc/component-sfc-expression.d.ts +2 -0
  24. package/dist/model/services/compiler/type/type-program-validation.d.ts +5 -1
  25. package/dist/model/services/source-engine/compilers/source-field-compile.d.ts +4 -1
  26. package/dist/model/services/source-engine/compilers/type-source-compile.d.ts +7 -1
  27. package/dist/model/services/source-engine/composition-source-patch.d.ts +6 -0
  28. package/dist/model/services/source-engine/strategies/CompositionSourcePatchStrategy.d.ts +13 -0
  29. package/dist/test/component-sfc-table-visibility.test.d.ts +1 -0
  30. package/dist/test/domain/entities/runtime/ComponentSFCEventBoundary.test.d.ts +1 -0
  31. package/dist/test/domain/entity-meta.test.d.ts +1 -0
  32. package/dist/test/model/db/repositories/types-repository.test.d.ts +1 -0
  33. package/dist/test/model/endge/domain/type-identity-index.test.d.ts +1 -0
  34. package/dist/test/model/endge/program/endge-compiler-query-auth.test.d.ts +1 -0
  35. package/dist/test/model/endge/program/endge-compiler-type.test.d.ts +1 -0
  36. package/dist/test/model/endge/schema/document-create.test.d.ts +1 -0
  37. package/dist/test/model/endge/schema/type-payload.test.d.ts +1 -0
  38. package/dist/test/model/services/source-engine/component-sfc/component-sfc-metadata-source-patch.test.d.ts +1 -0
  39. package/dist/test/model/services/source-engine/component-sfc/component-sfc-ports-source-patch.test.d.ts +1 -0
  40. package/dist/test/model/services/source-engine/component-sfc/component-sfc-props-source-patch.test.d.ts +1 -0
  41. package/dist/test/model/services/source-engine/data-view-select-steps.test.d.ts +1 -0
  42. package/dist/test/model/services/source-engine/source-language-normalize.test.d.ts +1 -0
  43. package/dist/test/model/services/source-engine/type-source-compile.test.d.ts +1 -0
  44. package/dist/test/model/services/source-engine/typescript-type-source.test.d.ts +1 -0
  45. package/dist/test/runtime/sfc-render-inspection-session.test.d.ts +1 -0
  46. package/dist/test/tools/type-import-source.test.d.ts +1 -0
  47. package/package.json +1 -1
  48. package/dist/model/seed/actions/console_log.d.ts +0 -3
  49. package/dist/model/seed/actions/load_vocabs.d.ts +0 -3
@@ -141,6 +141,8 @@ export declare abstract class RuntimeHostBase<TType extends RuntimeEntityType, T
141
141
  * ACCESS
142
142
  */
143
143
  getArtifact(): ProgramArtifact<TArtifactPayload> | null;
144
+ /** Возвращает read-only artifact reader текущей runtime session. */
145
+ getArtifactReader(): RuntimeArtifactReader | null;
144
146
  /**
145
147
  * ACCESS
146
148
  */
@@ -4,6 +4,8 @@ import { RComponentSFC_AST, RComponentSFC_IR, RComponentSFC_RuntimeDependencies,
4
4
  import { ComponentSFCPreviewOptions, ComponentSFCProgramPayload, ProgramDiagnostic } from '../../../types/program/program.types';
5
5
  import { RuntimeArtifactReader, RuntimeHost, RuntimeHostContext, RuntimeHostInputSource, RuntimeHostUpdateContext } from '../../../types/runtime/runtime-host.types';
6
6
  import { ComputationResource } from '../../../types/computation';
7
+ import { SourceFieldOption } from '../../../types/source/source-expression.types';
8
+ import { VocabOptionMapping } from '../../../types/runtime/vocab-cache.types';
7
9
  import { RuntimeHostBase } from '../RuntimeHostBase';
8
10
  /**
9
11
  * Runtime-host нового SFC-компонента.
@@ -18,6 +20,7 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
18
20
  private readonly _computationErrorSignatures;
19
21
  private _styleLease;
20
22
  private readonly _eventPortListeners;
23
+ private readonly _vocabDisposers;
21
24
  constructor(input: {
22
25
  id: string;
23
26
  model: RComponentSFC;
@@ -43,6 +46,11 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
43
46
  getDiagnostics(): ProgramDiagnostic[];
44
47
  /** Переводит public key через накопленный Composition catalog этого runtime. */
45
48
  translate(key: string, fallback?: string): string;
49
+ /**
50
+ * Читает Vocab alias из ближайшего Composition scope и преобразует cache
51
+ * records в renderer-neutral Select options.
52
+ */
53
+ resolveVocabOptions(alias: string, mapping?: Partial<VocabOptionMapping>): SourceFieldOption[];
46
54
  /** Возвращает внешний контракт компонента из compiled artifact. */
47
55
  getContract(): RComponentContract | null;
48
56
  /** Возвращает зависимости компонента из compiled artifact. */
@@ -90,6 +98,8 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
90
98
  /** Backward-compatible alias для старого runtime prepare API. */
91
99
  preparePlaceholders(target: RComponentRenderTarget | null): void;
92
100
  private makeArtifactResourcePayload;
101
+ /** Подписывает host на shared Vocab path один раз, включая вложенные SFC artifacts. */
102
+ private _ensureVocabSubscription;
93
103
  private _createRuntimeBoundaryNodes;
94
104
  private _createTableColumnBoundaryNode;
95
105
  private _bindRaphInputSource;
@@ -3,6 +3,7 @@ import { FilterViewRuntimeHost } from './FilterViewRuntimeHost';
3
3
  import { CompositionFilterFieldsSlice, CompositionProgramPayload, CompositionPublicOutputHandle, CompositionRuntimeActivationHandle, CompositionRuntimeChildHandle } from '../../../types/source/composition-source.types';
4
4
  import { RuntimeArtifactReader, RuntimeHost, RuntimeHostContext, RuntimeHostInputSource, RuntimeHostUpdateContext } from '../../../types/runtime/runtime-host.types';
5
5
  import { I18nRuntimeCatalog } from '../../../types/i18n.types';
6
+ import { VocabRuntimeCatalog } from '../../../types/runtime/vocab-cache.types';
6
7
  import { RuntimeHostBase } from '../RuntimeHostBase';
7
8
  import { RuntimeScope } from '../RuntimeScope';
8
9
  /** Runtime orchestration host: children, bindings, hooks и public handles. */
@@ -25,6 +26,7 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
25
26
  private _ownedStoreRuntimeIds;
26
27
  private _compositionInputBindings;
27
28
  private _i18nCatalogs;
29
+ private _vocabCatalogs;
28
30
  private _orchestratedQueries;
29
31
  private _orchestratedSuccesses;
30
32
  private _mounted;
@@ -51,6 +53,8 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
51
53
  getScope(path: string): RuntimeScope | null;
52
54
  /** Возвращает накопленный translation catalog для заданного lifecycle scope. */
53
55
  getI18nCatalog(scopePath?: string): I18nRuntimeCatalog;
56
+ /** Возвращает накопленный Vocab catalog для заданного lifecycle scope. */
57
+ getVocabCatalog(scopePath?: string): VocabRuntimeCatalog;
54
58
  getRuntimeHandle(path: string): CompositionRuntimeActivationHandle | null;
55
59
  /** Возвращает текущее значение публичного Composition output. */
56
60
  getOutput(name: string): unknown;
@@ -78,7 +82,9 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
78
82
  destroy(): Promise<void>;
79
83
  /** Строит effective catalogs по той же иерархии, что и lifecycle scopes. */
80
84
  private _buildI18nCatalogs;
81
- /** Монтирует vocab data и разрешает Store aliases через explicit, ancestor или local provider. */
85
+ /** Строит nearest-scope catalog публичных Vocab aliases поверх shared cache paths. */
86
+ private _buildVocabCatalogs;
87
+ /** Регистрирует shared Vocab paths и разрешает Store aliases через explicit, ancestor или local provider. */
82
88
  private _mountData;
83
89
  /** Находит ближайший Store provider только среди Composition ancestors. */
84
90
  private _findAncestorStoreProvider;
@@ -88,6 +94,7 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
88
94
  private _publishUpdates;
89
95
  protected onUpdate(ctx: RuntimeHostUpdateContext): void;
90
96
  private _requireDataPath;
97
+ private _resolveDataReference;
91
98
  private _createChild;
92
99
  private _bindChild;
93
100
  private _makeOutputs;
@@ -14,6 +14,7 @@ export declare class FilterViewRuntimeHost extends RuntimeHostBase<'filter', Run
14
14
  private readonly _implementation;
15
15
  private readonly _onSourceChange;
16
16
  private readonly _disposeSourceWatch;
17
+ private readonly _disposeVocabWatch;
17
18
  private _props;
18
19
  constructor(input: {
19
20
  id: string;
@@ -40,4 +41,16 @@ export declare class FilterViewRuntimeHost extends RuntimeHostBase<'filter', Run
40
41
  getSlice(): CompositionFilterFieldsSlice;
41
42
  destroy(): void;
42
43
  private _resolveControl;
44
+ /**
45
+ * Возвращает готовые renderer-neutral options без сетевых запросов.
46
+ */
47
+ private _resolveOptions;
48
+ /**
49
+ * Возвращает Raph path справочника, используемого полем.
50
+ */
51
+ private _resolveVocabPath;
52
+ /**
53
+ * Читает вложенное значение строки справочника.
54
+ */
55
+ private _readPath;
43
56
  }
@@ -42,12 +42,25 @@ export interface RComponentSFC_RuntimeBoundaryDependency {
42
42
  /** Колонки таблицы, которые можно обновлять точечно. */
43
43
  columns: RComponentSFC_RuntimeTableColumnDependency[];
44
44
  }
45
+ /** Runtime-зависимость SFC от Vocab alias ближайшего Composition scope. */
46
+ export interface RComponentSFC_RuntimeVocabDependency {
47
+ /** Публичный, scope-local alias; физическая Vocab identity сюда не протекает. */
48
+ alias: string;
49
+ /** Путь option value внутри элемента Vocab. */
50
+ valuePath: string;
51
+ /** Путь option label внутри элемента Vocab. */
52
+ labelPath: string;
53
+ /** Исходное выражение для diagnostics/debug. */
54
+ raw: string;
55
+ }
45
56
  /** Набор runtime-зависимостей SFC artifact. */
46
57
  export interface RComponentSFC_RuntimeDependencies {
47
58
  /** Зависимости от props, которые можно связать с внешним input source. */
48
59
  props: RComponentSFC_RuntimeDependency[];
49
60
  /** Patchable boundaries, для которых runtime строит отдельные Raph-ноды. */
50
61
  boundaries: RComponentSFC_RuntimeBoundaryDependency[];
62
+ /** Vocab aliases, которые должен предоставить ближайший Composition scope. */
63
+ vocabs?: RComponentSFC_RuntimeVocabDependency[];
51
64
  }
52
65
  /** Создает пустой dependency artifact SFC runtime. */
53
66
  export declare function createEmptyComponentSFCRuntimeDependencies(): RComponentSFC_RuntimeDependencies;
@@ -123,6 +123,19 @@ export interface RComponentSFC_IR_ExpressionValue {
123
123
  source: string;
124
124
  /** Зависимости, которые выражение читает. */
125
125
  reads: RComponentSFC_IR_Read[];
126
+ /** Статические обращения к Vocab aliases текущего Composition scope. */
127
+ vocabReads?: RComponentSFC_IR_VocabRead[];
128
+ }
129
+ /** Статическое обращение `vocab(alias, mapping?)` внутри SFC expression. */
130
+ export interface RComponentSFC_IR_VocabRead {
131
+ /** Публичный alias из ближайшего Composition scope. */
132
+ alias: string;
133
+ /** Путь option value внутри элемента Vocab. */
134
+ valuePath: string;
135
+ /** Путь option label внутри элемента Vocab. */
136
+ labelPath: string;
137
+ /** Исходное выражение для diagnostics/debug. */
138
+ raw: string;
126
139
  }
127
140
  /** Реактивное чтение, найденное внутри выражения. */
128
141
  export interface RComponentSFC_IR_Read {
@@ -4,6 +4,9 @@ export type RuntimeActionSurface = string;
4
4
  /** Stable identities of targetless Actions provided by Endge itself. */
5
5
  export declare const BUILTIN_ACTION_IDS: {
6
6
  readonly consoleLog: "built-in-console-log";
7
+ readonly vocabAcquire: "built-in-vocabs-acquire";
8
+ readonly vocabRefresh: "built-in-vocabs-refresh";
9
+ readonly vocabInvalidate: "built-in-vocabs-invalidate";
7
10
  };
8
11
  /** Declarative reference accepted by interactive primitives such as MenuItem. */
9
12
  export interface ActionBinding<TInput = unknown> {
@@ -1,4 +1,5 @@
1
1
  export * from './action.types';
2
+ export * from './vocab-cache.types';
2
3
  export * from './implementation.types';
3
4
  export * from './context-persistence.types';
4
5
  export * from './query-execution.types';
@@ -309,6 +309,8 @@ export interface RuntimeHost<TType extends RuntimeEntityType = RuntimeEntityType
309
309
  bindUpdate: (binding: RuntimeHostUpdateBinding) => () => void;
310
310
  /** Возвращает compiled artifact, связанный с host, если он доступен. */
311
311
  getArtifact: () => ProgramArtifact<TArtifactPayload> | null;
312
+ /** Возвращает session-local reader, через который host читает compiled artifacts. */
313
+ getArtifactReader: () => RuntimeArtifactReader | null;
312
314
  /** Возвращает payload compiled artifact, связанный с host, если он доступен. */
313
315
  getArtifactPayload: () => TArtifactPayload | null;
314
316
  /** Изменить статус host и обновить updatedAt. */
@@ -1,6 +1,7 @@
1
1
  import { CompositionPublicOutputHandle, CompositionSession } from '../source/composition-source.types';
2
2
  import { CompositionRuntimeHost } from '../../entities/runtime/hosts/CompositionRuntimeHost';
3
3
  import { RuntimeScopeHandle } from './runtime-scope.types';
4
+ import { RuntimeArtifactReader } from './runtime-host.types';
4
5
  export interface ProjectCompositionRegistry {
5
6
  get: (identity: string) => ProjectCompositionHandle | null;
6
7
  require: (identity: string) => ProjectCompositionHandle;
@@ -21,6 +22,8 @@ export interface ProjectCompositionHandle {
21
22
  export interface ProjectRuntimeMountOptions {
22
23
  /** `declared` preserves root activateOn; `none` creates stable handles for an on-demand/debug session. */
23
24
  autoActivate?: 'declared' | 'none';
25
+ /** Session-local artifact projection used by Preview without mutating Endge.program. */
26
+ artifactReader?: RuntimeArtifactReader;
24
27
  }
25
28
  export interface ProjectRuntimeSession {
26
29
  readonly id: string;
@@ -0,0 +1,33 @@
1
+ export type VocabReference = string | number;
2
+ export type VocabLoadStrategy = 'cache-first' | 'network-first' | 'stale-while-revalidate';
3
+ export type VocabLoadErrorPolicy = 'fail' | 'use-cache';
4
+ export interface VocabLoadPolicy {
5
+ strategy: VocabLoadStrategy;
6
+ /**
7
+ * Максимальный возраст cache entry в миллисекундах.
8
+ * `null` означает, что cache не устаревает автоматически.
9
+ */
10
+ maxAgeMs: number | null;
11
+ onError: VocabLoadErrorPolicy;
12
+ }
13
+ export declare const DEFAULT_VOCAB_LOAD_POLICY: Readonly<VocabLoadPolicy>;
14
+ export type VocabCacheOperationStatus = 'cache-hit' | 'loaded' | 'refreshed' | 'refreshing' | 'invalidated';
15
+ export interface VocabCacheOperationResult {
16
+ identity: string;
17
+ status: VocabCacheOperationStatus;
18
+ count: number;
19
+ }
20
+ /** Один публичный Vocab alias, доступный внутри runtime scope Composition. */
21
+ export interface VocabRuntimeCatalogEntry {
22
+ /** Физическая identity Vocab-документа, полезная для diagnostics. */
23
+ identity: string;
24
+ /** Реактивный Raph path загруженного массива значений. */
25
+ path: string;
26
+ }
27
+ /** Накопленный Vocab catalog ближайшего Composition scope. */
28
+ export type VocabRuntimeCatalog = Record<string, VocabRuntimeCatalogEntry>;
29
+ /** Явное преобразование элемента Vocab в renderer-neutral option. */
30
+ export interface VocabOptionMapping {
31
+ valuePath: string;
32
+ labelPath: string;
33
+ }
@@ -2,6 +2,7 @@ import { ProgramDiagnostic } from '../program/program.types';
2
2
  import { ProgramMetadataMap } from '../program/program-metadata.types';
3
3
  import { RuntimeHost } from '../runtime/runtime-host.types';
4
4
  import { RuntimeScopeHandle } from '../runtime/runtime-scope.types';
5
+ import { VocabLoadPolicy } from '../runtime/vocab-cache.types';
5
6
  import { CompositionRuntimeHost } from '../../entities/runtime/hosts/CompositionRuntimeHost';
6
7
  import { SourceExpressionIR, SourceFieldDefinition } from './source-expression.types';
7
8
  import { FilterViewControlDefinition } from '../ui/filter-view.type';
@@ -36,6 +37,8 @@ export interface CompositionScopeDescriptor {
36
37
  parentPath: string | null;
37
38
  activationOverride: CompositionActivationDescriptor | null;
38
39
  effectiveActivation: CompositionActivationDescriptor;
40
+ /** Data dependencies, активируемые вместе с lifecycle scope. */
41
+ data?: string[];
39
42
  resources: string[];
40
43
  runtimes: string[];
41
44
  children: string[];
@@ -73,12 +76,18 @@ export type CompositionBindingValue = {
73
76
  };
74
77
  export interface CompositionDataDescriptor {
75
78
  name: string;
79
+ /** Полный data path. Для root data совпадает с name. */
80
+ path?: string;
81
+ /** Lifecycle scope, которому принадлежит dependency. */
82
+ scopePath?: string;
76
83
  kind: 'store' | 'vocab';
77
84
  identity: string;
78
85
  /** Политика разрешения Store; для Vocab не используется. */
79
86
  resolution?: 'contextual' | 'isolated' | 'injected';
80
87
  /** Provider slot для нескольких Store instances с одной identity. */
81
88
  slot?: string | null;
89
+ /** Нормализованная политика загрузки Vocab; для Store не используется. */
90
+ policy?: VocabLoadPolicy;
82
91
  }
83
92
  export interface CompositionStorePublication {
84
93
  data: string;
@@ -188,6 +197,32 @@ export interface CompositionSourceDocument {
188
197
  hooks: CompositionHook[];
189
198
  outputs: CompositionOutputDescriptor[];
190
199
  }
200
+ /** Добавление data dependency в canonical Composition source. */
201
+ export interface CompositionSourceAddDataPatch {
202
+ type: 'add-data';
203
+ name: string;
204
+ kind: CompositionDataDescriptor['kind'];
205
+ identity: string;
206
+ }
207
+ /** Добавление owned resource в canonical Composition source. */
208
+ export interface CompositionSourceAddResourcePatch {
209
+ type: 'add-resource';
210
+ name: string;
211
+ kind: CompositionResourceDescriptor['kind'];
212
+ identity: string;
213
+ }
214
+ /** Добавление runtime dependency в canonical Composition source. */
215
+ export interface CompositionSourceAddRuntimePatch {
216
+ type: 'add-runtime';
217
+ name: string;
218
+ kind: Exclude<CompositionRuntimeKind, 'filter-view'>;
219
+ identity: string;
220
+ activation?: CompositionActivationMode;
221
+ }
222
+ /** Одна узкая source-preserving операция над Composition dependencies. */
223
+ export type CompositionSourcePatchOperation = CompositionSourceAddDataPatch | CompositionSourceAddResourcePatch | CompositionSourceAddRuntimePatch;
224
+ /** Composition source patch: одиночная операция или атомарная пачка. */
225
+ export type CompositionSourcePatch = CompositionSourcePatchOperation | CompositionSourcePatchOperation[];
191
226
  /** Нормализованная связь input runtime-ноды. */
192
227
  export interface CompositionRuntimeInputConnection {
193
228
  targetRuntime: string;
@@ -1,3 +1,4 @@
1
+ import { TypeSourceExpression } from './type-source.types';
1
2
  /** Type Registry identity used by Query/Filter field contracts. */
2
3
  export type SourceFieldType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Time' | 'DateTime' | 'Object' | 'Any' | (string & {});
3
4
  /** Источник безопасного чтения значения внутри source expression. */
@@ -43,6 +44,8 @@ export interface SourceFieldVocab {
43
44
  export interface SourceFieldDefinition {
44
45
  key: string;
45
46
  type: SourceFieldType;
47
+ /** Точный inline-контракт для objectOf/recordOf; type сохраняет coarse runtime identity. */
48
+ typeExpression?: TypeSourceExpression;
46
49
  optional: boolean;
47
50
  array: boolean;
48
51
  defaultValue?: SourceExpressionIR;
@@ -31,10 +31,15 @@ export interface TypeSourceArrayDefinition {
31
31
  kind: 'array';
32
32
  items: TypeSourceExpression;
33
33
  }
34
+ /** Словарь с произвольными string-ключами и единым типом значений. */
35
+ export interface TypeSourceRecordDefinition {
36
+ kind: 'record';
37
+ values: TypeSourceExpression;
38
+ }
34
39
  /** Поддержанные корневые формы Type Source v1. */
35
40
  export type TypeSourceDefinition = TypeSourceObjectDefinition | TypeSourceEnumDefinition | TypeSourceUnionDefinition | TypeSourceArrayDefinition;
36
41
  /** Рекурсивное выражение типа: ссылка или анонимное inline-определение. */
37
- export type TypeSourceExpression = TypeSourceReference | TypeSourceDefinition;
42
+ export type TypeSourceExpression = TypeSourceReference | TypeSourceDefinition | TypeSourceRecordDefinition;
38
43
  /** Canonical authoring document Type Source v1. */
39
44
  export interface TypeSourceDocument {
40
45
  definition: TypeSourceDefinition;
@@ -58,4 +58,5 @@ export declare class PageTemplates_Repository {
58
58
  preview?: PageTemplatePreviewDoc | null;
59
59
  meta?: Record<string, unknown>;
60
60
  }): Promise<PageTemplateDoc>;
61
+ patchFolder(id: number | string, folder: number | string | null): Promise<PageTemplateDoc>;
61
62
  }
@@ -90,5 +90,6 @@ export declare class Pages_Repository {
90
90
  areas?: PageAreaDoc[];
91
91
  meta?: Record<string, unknown>;
92
92
  }): Promise<PageDoc>;
93
+ patchFolder(id: number | string, folder: number | string | null): Promise<PageDoc>;
93
94
  hardDelete(identity: string): Promise<void>;
94
95
  }
@@ -1,4 +1,5 @@
1
1
  import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
2
+ import { VocabCacheOperationResult, VocabLoadPolicy, VocabReference } from '../../../domain/types/runtime/vocab-cache.types';
2
3
  /**
3
4
  * Модуль загрузки и чтения external vocabs в Raph cache.
4
5
  */
@@ -9,6 +10,10 @@ export declare class EndgeVocabs extends EndgeModule {
9
10
  */
10
11
  private index;
11
12
  private byIdCache;
13
+ private readonly loadedIdentities;
14
+ private readonly loadedAtByIdentity;
15
+ private readonly inFlight;
16
+ private readonly cacheVersions;
12
17
  private _loadingRequests;
13
18
  loading: boolean;
14
19
  /**
@@ -57,6 +62,18 @@ export declare class EndgeVocabs extends EndgeModule {
57
62
  * Очищает cache словаря по id.
58
63
  */
59
64
  clearCacheById(vocabId: string | number): void;
65
+ /**
66
+ * Загружает отсутствующие справочники параллельно и переиспользует cache.
67
+ */
68
+ acquire(vocabs: readonly VocabReference[], policy?: Partial<VocabLoadPolicy>): Promise<VocabCacheOperationResult[]>;
69
+ /**
70
+ * Принудительно обновляет справочники параллельно, сохраняя дедупликацию одновременных запросов.
71
+ */
72
+ refresh(vocabs: readonly VocabReference[]): Promise<VocabCacheOperationResult[]>;
73
+ /**
74
+ * Удаляет справочники только из runtime cache, не выполняя сетевых запросов.
75
+ */
76
+ invalidate(vocabs: readonly VocabReference[]): VocabCacheOperationResult[];
60
77
  /**
61
78
  * Загружает словарь по id и кладет результат в Raph cache.
62
79
  */
@@ -75,6 +92,13 @@ export declare class EndgeVocabs extends EndgeModule {
75
92
  * Нормализует Vocab Id.
76
93
  */
77
94
  private normalizeVocabId;
95
+ private normalizeReferences;
96
+ private requireVocabConfig;
97
+ private loadShared;
98
+ private bumpCacheVersion;
99
+ private normalizePolicy;
100
+ private isFresh;
101
+ private markLoaded;
78
102
  /**
79
103
  * Устанавливает By Identity Cache.
80
104
  */
@@ -58,6 +58,11 @@ export declare class EndgeCompiler extends EndgeModule {
58
58
  buildFilter(entity: RFilter): ProgramArtifact<FilterProgramPayload>;
59
59
  /** Компилирует один Composition source в Endge.program. */
60
60
  buildComposition(entity: RComposition): ProgramArtifact<CompositionProgramPayload>;
61
+ /**
62
+ * Компилирует transient Composition artifact без публикации в Endge.program.
63
+ * Используется runtime session overlays, которым нельзя менять общий build.
64
+ */
65
+ compileCompositionArtifact(entity: RComposition): ProgramArtifact<CompositionProgramPayload>;
61
66
  /** Compiles one global source-first EndgeCSS document. */
62
67
  buildStyle(entity: RStyle): ProgramArtifact<EndgeStyleProgramPayload>;
63
68
  /**
@@ -65,6 +65,7 @@ export declare class EndgeActions extends Subscribable {
65
65
  /** Bridges typed Action invocation to the legacy context-menu adapter during migration. */
66
66
  private _tableInvocationContext;
67
67
  private _registerCoreActions;
68
+ private _vocabReferences;
68
69
  private _syncResolvedIndex;
69
70
  private _legacyAction;
70
71
  private _isLegacyContext;
@@ -9,17 +9,13 @@ import { RAction } from '../../../../domain/entities/reflect/RAction';
9
9
  export declare class EndgeBind extends EndgeModule {
10
10
  private readonly computationOverrides;
11
11
  /**
12
- * Регистрирует built-in converters и runtime action handlers после загрузки домена.
12
+ * Регистрирует built-in converters после загрузки домена.
13
13
  */
14
14
  start(): void;
15
15
  /**
16
16
  * Регистрирует Default Converters.
17
17
  */
18
18
  private registerDefaultConverters;
19
- /**
20
- * Регистрирует Default Actions.
21
- */
22
- private registerDefaultActions;
23
19
  /**
24
20
  * Находит конвертер по identity и ставит кастомный обработчик (setCustom).
25
21
  * @param identity - id конвертера в домене
@@ -16,5 +16,7 @@ export interface ComponentSFCExpressionCompileResult {
16
16
  /** Diagnostics, найденные при анализе expression. */
17
17
  diagnostics: RComponentDiagnostic[];
18
18
  }
19
+ /** Возвращает статический fallback из `t(key, fallback)` без i18n/runtime-контекста. */
20
+ export declare function readComponentSFCTranslationFallback(source: string): string | null;
19
21
  /** Компилирует expression и извлекает reactive reads для runtime-подписок. */
20
22
  export declare function compileComponentSFCExpression(source: string, context?: ComponentSFCExpressionContext): ComponentSFCExpressionCompileResult;
@@ -1,10 +1,14 @@
1
- import { TypeProgramCatalogEntry, TypeSourceDefinition } from '../../../../domain/types/source/type-source.types';
1
+ import { TypeProgramCatalogEntry, TypeSourceDefinition, TypeSourceExpression } from '../../../../domain/types/source/type-source.types';
2
2
  import { ProgramDiagnostic } from '../../../../domain/types/program/program.types';
3
3
  type DiagnosticDraft = Omit<ProgramDiagnostic, 'entityRef'>;
4
4
  /** Returns every named reference without expanding the referenced document. */
5
5
  export declare function collectTypeDefinitionReferences(definition: TypeSourceDefinition | null): string[];
6
+ /** Returns every named reference from one recursive source type expression. */
7
+ export declare function collectTypeSourceExpressionReferences(expression: TypeSourceExpression | null | undefined): string[];
6
8
  /** Semantic diagnostics for one Type Source against the compiled/domain catalog. */
7
9
  export declare function validateTypeDefinitionReferences(definition: TypeSourceDefinition | null, knownIdentities: ReadonlySet<string>): DiagnosticDraft[];
10
+ /** Diagnostics for a structural inline type expression owned by Query or another source document. */
11
+ export declare function validateTypeSourceExpressionUsage(expression: TypeSourceExpression | null | undefined, catalog: readonly TypeProgramCatalogEntry[], sourcePath: string): DiagnosticDraft[];
8
12
  /** Diagnostics for a type expression owned by Action, Computation, SFC or another document. */
9
13
  export declare function validateTypeExpressionUsage(expression: string | null | undefined, catalog: readonly TypeProgramCatalogEntry[], sourcePath: string): DiagnosticDraft[];
10
14
  /** Named registry references used by Type Program dependency indexing. */
@@ -6,6 +6,9 @@ export interface SourceFieldParseResult {
6
6
  field: SourceFieldDefinition;
7
7
  defaultSource?: SourceFieldDefaultSource;
8
8
  }
9
+ interface SourceFieldCompileOptions {
10
+ allowInlineTypeExpressions?: boolean;
11
+ }
9
12
  /** Компилирует chain field(...).optional().array()... в общий field contract. */
10
- export declare function compileSourceField(key: string, raw: t.Expression, source: string, diagnostics: DiagnosticDraft[], sourcePath: string): SourceFieldParseResult | null;
13
+ export declare function compileSourceField(key: string, raw: t.Expression, source: string, diagnostics: DiagnosticDraft[], sourcePath: string, options?: SourceFieldCompileOptions): SourceFieldParseResult | null;
11
14
  export {};
@@ -1,3 +1,9 @@
1
- import { TypeSourceCompileResult } from '../../../../domain/types/source/type-source.types';
1
+ import { TypeSourceCompileResult, TypeSourceExpression } from '../../../../domain/types/source/type-source.types';
2
+ import { ProgramDiagnostic } from '../../../../domain/types/program/program.types';
3
+ import * as t from '@babel/types';
4
+ type DiagnosticDraft = Omit<ProgramDiagnostic, 'entityRef'>;
2
5
  /** Компилирует Type Source v1 без выполнения пользовательского JavaScript. */
3
6
  export declare function compileTypeSource(source: string, sourceVersion?: number): TypeSourceCompileResult;
7
+ /** Компилирует одно рекурсивное inline type expression без выполнения JavaScript. */
8
+ export declare function compileTypeSourceExpression(raw: t.Expression, diagnostics: DiagnosticDraft[], sourcePath: string): TypeSourceExpression | null;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import { CompositionSourceDocument, CompositionSourcePatch } from '../../../domain/types/source/composition-source.types';
2
+ import { SourceParseResult, SourcePatchResult } from '../../../domain/types/source/source-engine.types';
3
+ /** Парсит Composition source в normalized editor document. */
4
+ export declare function parseCompositionSource(source: string): SourceParseResult<CompositionSourceDocument>;
5
+ /** Атомарно добавляет dependencies, сохраняя нетронутые участки Composition source. */
6
+ export declare function patchCompositionSource(source: string, patch: CompositionSourcePatch): SourcePatchResult<CompositionSourceDocument>;
@@ -0,0 +1,13 @@
1
+ import { CompositionSourceDocument, CompositionSourcePatch } from '../../../../domain/types/source/composition-source.types';
2
+ import { SourceKind, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from '../../../../domain/types/source/source-engine.types';
3
+ /** Source patch strategy для RComposition/source-kind=composition. */
4
+ export declare class CompositionSourcePatchStrategy implements SourcePatchStrategy<CompositionSourcePatch, CompositionSourceDocument> {
5
+ readonly id = "source-patch:composition";
6
+ readonly sourceKind: SourceKind;
7
+ /** Проверяет, что strategy обслуживает Composition source. */
8
+ supports(sourceKind: SourceKind | string): boolean;
9
+ /** Парсит Composition source в normalized document. */
10
+ parse(source: string): SourceParseResult<CompositionSourceDocument>;
11
+ /** Атомарно добавляет Composition dependencies. */
12
+ patch(source: string, patch: CompositionSourcePatch): SourcePatchResult<CompositionSourceDocument>;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endge/core",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,3 +0,0 @@
1
- import { ActionRuntimeHostContext } from '../../../domain/types/runtime/runtime-host.types';
2
- /** Логирует полный контекст шага (в т.ч. context.input). */
3
- export declare function consoleLog(context: ActionRuntimeHostContext): void;
@@ -1,3 +0,0 @@
1
- import { ActionRuntimeHostContext } from '../../../domain/types/runtime/runtime-host.types';
2
- /** Берёт вход из context.input (массив id справочников), при необходимости — из context.input.input. */
3
- export declare function loadVocabs(context: ActionRuntimeHostContext): Promise<void>;