@endge/core 2.0.1 → 2.0.3

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 (57) hide show
  1. package/dist/core.cjs +361 -296
  2. package/dist/core.js +23365 -21136
  3. package/dist/domain/entities/reflect/RConfiguration.d.ts +11 -0
  4. package/dist/domain/entities/runtime/ComponentSFCEventBoundary.d.ts +5 -3
  5. package/dist/domain/entities/runtime/hosts/ComponentSFCRuntimeHost.d.ts +3 -0
  6. package/dist/domain/types/component/component-core.types.d.ts +2 -2
  7. package/dist/domain/types/component/sfc/dependencies.types.d.ts +14 -2
  8. package/dist/domain/types/component/sfc/intrinsic-events.types.d.ts +2 -0
  9. package/dist/domain/types/component/sfc/ir.types.d.ts +25 -7
  10. package/dist/domain/types/component/sfc/ports.types.d.ts +39 -3
  11. package/dist/domain/types/component/sfc/tag-attribute-contract.types.d.ts +11 -0
  12. package/dist/domain/types/component/sfc/tag-input-contract.types.d.ts +41 -1
  13. package/dist/domain/types/configuration/configuration.type.d.ts +40 -1
  14. package/dist/domain/types/document/document.types.d.ts +4 -2
  15. package/dist/domain/types/document/domain-export.type.d.ts +2 -0
  16. package/dist/domain/types/document/domain-provider.type.d.ts +1 -1
  17. package/dist/domain/types/document/workspace.types.d.ts +2 -1
  18. package/dist/domain/types/program/program.types.d.ts +9 -2
  19. package/dist/domain/types/runtime/context-persistence.types.d.ts +26 -0
  20. package/dist/domain/types/source/configuration-source.types.d.ts +47 -0
  21. package/dist/domain/types/source/query-source.types.d.ts +36 -9
  22. package/dist/domain/types/source/source-engine.types.d.ts +8 -2
  23. package/dist/domain/types/ui/tooltip-markdown.types.d.ts +32 -0
  24. package/dist/main.d.ts +9 -0
  25. package/dist/model/config/kernel.config.d.ts +5 -0
  26. package/dist/model/config/tooltip.config.d.ts +3 -0
  27. package/dist/model/kernel/endge.d.ts +2 -0
  28. package/dist/model/modules/context/endge-configuration-schema.d.ts +24 -0
  29. package/dist/model/modules/context/endge-configuration.d.ts +2 -0
  30. package/dist/model/modules/context/endge-context.d.ts +22 -1
  31. package/dist/model/modules/context/endge-workspace.d.ts +11 -1
  32. package/dist/model/modules/domain/endge-domain.d.ts +16 -0
  33. package/dist/model/modules/program/endge-source.d.ts +1 -1
  34. package/dist/model/modules/runtime/core/endge-runtime.d.ts +3 -2
  35. package/dist/model/modules/ui/endge-ui.d.ts +0 -11
  36. package/dist/model/services/compiler/component-sfc/component-sfc-compile.d.ts +1 -1
  37. package/dist/model/services/compiler/component-sfc/component-sfc-interactions.d.ts +1 -1
  38. package/dist/model/services/compiler/component-sfc/component-sfc-ports.d.ts +2 -2
  39. package/dist/model/services/compiler/component-sfc/component-sfc-template.d.ts +5 -1
  40. package/dist/model/services/configuration/configuration-value.d.ts +20 -0
  41. package/dist/model/services/configuration/endge-configuration.d.ts +3 -1
  42. package/dist/model/services/query/QueryExecutor.d.ts +5 -0
  43. package/dist/model/services/source-engine/compilers/configuration-source-compile.d.ts +4 -0
  44. package/dist/model/services/source-engine/configuration-source-patch.d.ts +16 -0
  45. package/dist/model/services/source-engine/strategies/ConfigurationSourceEngineStrategy.d.ts +7 -0
  46. package/dist/model/services/source-engine/strategies/ConfigurationSourceLanguageStrategy.d.ts +12 -0
  47. package/dist/model/services/source-engine/strategies/QuerySourceLanguageStrategy.d.ts +1 -1
  48. package/dist/model/services/source-engine/templates/configuration.default.source.d.ts +2 -0
  49. package/dist/model/services/source-engine/templates/query.default.source.d.ts +2 -0
  50. package/dist/model/services/source-engine/type-source-references.d.ts +3 -0
  51. package/dist/model/services/source-engine/type-source-serialize.d.ts +2 -1
  52. package/dist/model/services/tooltip/endge-tooltip-markdown.d.ts +5 -0
  53. package/dist/test/model/services/compiler/component-sfc/component-sfc-tooltip.test.d.ts +1 -0
  54. package/dist/test/model/services/source-engine/configuration-source.test.d.ts +1 -0
  55. package/dist/test/tooltip/endge-tooltip-markdown.test.d.ts +1 -0
  56. package/dist/tools/component-sfc-edit-trigger.d.ts +9 -1
  57. package/package.json +4 -4
@@ -0,0 +1,47 @@
1
+ import { ProgramDiagnostic } from '../program/program.types';
2
+ import { TypeSourceExpression } from './type-source.types';
3
+ /** JSON-serializable persisted configuration value. */
4
+ export type EndgeJSONValue = null | boolean | number | string | EndgeJSONValue[] | {
5
+ [key: string]: EndgeJSONValue;
6
+ };
7
+ /** One source-backed user setting. */
8
+ export interface ConfigurationSourceValueDefinition {
9
+ key: string;
10
+ type: TypeSourceExpression;
11
+ defaultValue: EndgeJSONValue;
12
+ defaultWasInferred: boolean;
13
+ label: string;
14
+ description?: string;
15
+ min?: number;
16
+ max?: number;
17
+ step?: number;
18
+ }
19
+ /** Canonical Configuration Source v1 document. */
20
+ export interface ConfigurationSourceDocument {
21
+ values: ConfigurationSourceValueDefinition[];
22
+ }
23
+ /** Early/compiler-facing Configuration artifact. */
24
+ export interface ConfigurationProgramPayload {
25
+ type: 'configuration';
26
+ identity: string;
27
+ displayName: string;
28
+ sourceVersion: 1;
29
+ values: ConfigurationSourceValueDefinition[];
30
+ }
31
+ export interface ConfigurationSourceCompileResult {
32
+ ast: unknown | null;
33
+ document: ConfigurationSourceDocument | null;
34
+ /** Best-effort AST projection for visual repair when semantic diagnostics block compilation. */
35
+ draftDocument?: ConfigurationSourceDocument | null;
36
+ diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
37
+ }
38
+ export interface EndgeConfigurationSchemaEntry {
39
+ id: string | number;
40
+ identity: string;
41
+ displayName: string;
42
+ description?: string | null;
43
+ sourceVersion: number;
44
+ document: ConfigurationSourceDocument | null;
45
+ diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
46
+ status: 'valid' | 'warning' | 'error';
47
+ }
@@ -3,12 +3,14 @@ import { ProgramDiagnostic, QueryProgramPayload } from '../program/program.types
3
3
  import { DataViewRef } from './data-view-source.types';
4
4
  import { ProgramMetadataMap } from '../program/program-metadata.types';
5
5
  import { QueryProgramProp, SourceExpressionIR, SourceFieldDefinition } from './source-expression.types';
6
- /** Поддерживаемые kind query source v1. */
7
- export type QuerySourceKind = 'rest';
6
+ /** Поддерживаемые transport-kind Query source. */
7
+ export type QuerySourceKind = 'rest' | 'graphql';
8
+ /** Политика GraphQL errors в HTTP 2xx response. */
9
+ export type QueryGraphQLErrorPolicy = 'throw' | 'ignore';
8
10
  /** Static request value or a safe expression evaluated from Query props at runtime. */
9
11
  export type QuerySourceRequestValue<T> = T | SourceExpressionIR;
10
12
  /** Source-описание HTTP request части REST-запроса. */
11
- export interface QuerySourceRequest {
13
+ export interface QuerySourceRestRequest {
12
14
  /** Endpoint или Endge var-token вида {API_URL}. */
13
15
  endpoint: QuerySourceRequestValue<string>;
14
16
  /** REST path. В legacy RQuery это поле хранится как query. */
@@ -26,6 +28,25 @@ export interface QuerySourceRequest {
26
28
  /** Безопасный body expression для query source v2. */
27
29
  body?: SourceExpressionIR | null;
28
30
  }
31
+ /** Source-описание GraphQL operation и variables. */
32
+ export interface QuerySourceGraphQLRequest {
33
+ /** GraphQL endpoint или Endge var-token вида {API_URL}. */
34
+ endpoint: QuerySourceRequestValue<string>;
35
+ /** Статический GraphQL document из gql template. */
36
+ document: string;
37
+ /** Operation name для document с несколькими operations. */
38
+ operationName?: string;
39
+ /** Безопасное variables expression, построенное через variables(...). */
40
+ variables?: SourceExpressionIR | null;
41
+ /** Дополнительные HTTP headers. */
42
+ headers: QuerySourceRequestValue<Record<string, string>>;
43
+ /** Auth config. */
44
+ auth: QuerySourceRequestValue<RQueryAuth>;
45
+ /** Request timeout. */
46
+ timeoutMs?: QuerySourceRequestValue<number>;
47
+ /** Обработка GraphQL errors в HTTP 2xx response. */
48
+ errorPolicy: QueryGraphQLErrorPolicy;
49
+ }
29
50
  /** Source-описание mock-режима запроса. */
30
51
  export interface QuerySourceMock {
31
52
  /** Включены ли mock data. */
@@ -48,12 +69,7 @@ export interface QuerySourceOutput {
48
69
  contract?: SourceFieldDefinition | null;
49
70
  }
50
71
  export type QuerySourceOutputs = QuerySourceOutput[];
51
- /** Canonical authoring-модель source-only Query v2. */
52
- export interface QuerySourceDocument {
53
- /** Тип source query. */
54
- kind: QuerySourceKind;
55
- /** Request config. */
56
- request: QuerySourceRequest;
72
+ interface QuerySourceDocumentBase {
57
73
  /** Единственный runtime input contract Query. */
58
74
  props: QueryProgramProp[];
59
75
  /** Ordered output graph: response/output sources and transformations. */
@@ -61,6 +77,16 @@ export interface QuerySourceDocument {
61
77
  /** Mock config. */
62
78
  mock: QuerySourceMock;
63
79
  }
80
+ export interface QuerySourceRestDocument extends QuerySourceDocumentBase {
81
+ kind: 'rest';
82
+ request: QuerySourceRestRequest;
83
+ }
84
+ export interface QuerySourceGraphQLDocument extends QuerySourceDocumentBase {
85
+ kind: 'graphql';
86
+ request: QuerySourceGraphQLRequest;
87
+ }
88
+ /** Canonical authoring-модель source-only Query v2. */
89
+ export type QuerySourceDocument = QuerySourceRestDocument | QuerySourceGraphQLDocument;
64
90
  /** Публичные editor-slots, которые query source patcher умеет менять точечно. */
65
91
  export type QuerySourcePatchPath = 'kind' | 'request.endpoint' | 'request.path' | 'request.method' | 'request.headers' | 'request.auth' | 'request.timeoutMs' | 'request.formUrlencoded' | 'request.body' | 'props' | 'outputs' | 'mock.enabled' | 'mock.data';
66
92
  /** Операция AST-патчинга query source. */
@@ -87,3 +113,4 @@ export interface QuerySourceCompileResult {
87
113
  /** Diagnostics source compiler-а. */
88
114
  diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
89
115
  }
116
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { I18nCatalogProvenance, I18nRuntimeCatalog } from '../i18n.types';
2
+ import { TypeSourceDefinition } from './type-source.types';
2
3
  /** Канонический тип source-документа, для которого выбирается source strategy. */
3
- export type SourceKind = 'query' | 'data-view' | 'filter' | 'composition' | 'store' | 'stream' | 'update' | 'computation' | 'style' | 'type';
4
+ export type SourceKind = 'query' | 'data-view' | 'filter' | 'composition' | 'store' | 'stream' | 'update' | 'computation' | 'style' | 'type' | 'configuration';
4
5
  /** Тип нейтральной source completion без привязки к Monaco или другому editor API. */
5
6
  export type SourceLanguageCompletionKind = 'keyword' | 'function' | 'property' | 'value' | 'snippet';
6
7
  /** Позиция курсора внутри source-документа. */
@@ -21,6 +22,11 @@ export interface SourceLanguageContext {
21
22
  identity: string;
22
23
  displayName?: string;
23
24
  category?: 'primitive' | 'reference' | 'user';
25
+ definition?: TypeSourceDefinition | null;
26
+ entityReference?: {
27
+ target: string;
28
+ storage: 'id' | 'identity';
29
+ };
24
30
  }>;
25
31
  /** Identity of the document that owns current source diagnostics. */
26
32
  ownerIdentity?: string;
@@ -197,7 +203,7 @@ export interface SourceLanguageStrategy {
197
203
  /** Описывает подсветку, brackets и editor triggers в adapter-neutral формате. */
198
204
  syntax: SourceLanguageSyntaxDefinition;
199
205
  /** Возвращает базовый source для новой сущности. */
200
- createDefaultSource: () => string;
206
+ createDefaultSource: (variant?: string) => string;
201
207
  /** Нормализует поддержанный syntax, сохраняя остальной авторский source. */
202
208
  normalize?: (source: string) => string;
203
209
  /** Валидирует source без знания о конкретном editor adapter. */
@@ -0,0 +1,32 @@
1
+ export type EndgeTooltipMarkdownInline = {
2
+ kind: 'text';
3
+ value: string;
4
+ } | {
5
+ kind: 'strong';
6
+ children: EndgeTooltipMarkdownInline[];
7
+ } | {
8
+ kind: 'emphasis';
9
+ children: EndgeTooltipMarkdownInline[];
10
+ } | {
11
+ kind: 'code';
12
+ value: string;
13
+ } | {
14
+ kind: 'link';
15
+ href: string;
16
+ children: EndgeTooltipMarkdownInline[];
17
+ };
18
+ export type EndgeTooltipMarkdownBlock = {
19
+ kind: 'heading';
20
+ level: 1 | 2 | 3;
21
+ children: EndgeTooltipMarkdownInline[];
22
+ } | {
23
+ kind: 'paragraph';
24
+ children: EndgeTooltipMarkdownInline[];
25
+ } | {
26
+ kind: 'list';
27
+ ordered: boolean;
28
+ items: EndgeTooltipMarkdownInline[][];
29
+ } | {
30
+ kind: 'code-block';
31
+ value: string;
32
+ };
package/dist/main.d.ts CHANGED
@@ -25,6 +25,7 @@ export * from './model/modules/diagnostics/endge-problems';
25
25
  export * from './model/modules/diagnostics/endge-telemetry';
26
26
  export * from './model/modules/context/endge-context';
27
27
  export * from './model/modules/context/endge-configuration';
28
+ export * from './model/modules/context/endge-configuration-schema';
28
29
  export * from './model/modules/runtime/core/endge-actions';
29
30
  export * from './model/modules/ui/endge-ui';
30
31
  export * from './model/modules/ui/endge-ui-registry';
@@ -108,12 +109,14 @@ export * from './domain/types/source/store-source.types';
108
109
  export * from './domain/types/source/stream-source.types';
109
110
  export * from './domain/types/source/update-source.types';
110
111
  export * from './domain/types/source/type-source.types';
112
+ export * from './domain/types/source/configuration-source.types';
111
113
  export * from './domain/types/style/style.types';
112
114
  export * from './domain/types/ui/context-menu.types';
113
115
  export * from './domain/types/ui/filter-view.type';
114
116
  export * from './domain/types/ui/jsx.types';
115
117
  export * from './domain/types/ui/ui-composition.types';
116
118
  export * from './domain/types/ui/ui-render-adapter.type';
119
+ export * from './domain/types/ui/tooltip-markdown.types';
117
120
  export * from './domain/types/ui/ui.types';
118
121
  export * from './domain/types/i18n.types';
119
122
  export * from './domain/entities/endge/EndgeModuleController';
@@ -143,6 +146,7 @@ export * from './domain/entities/reflect/REnvironment';
143
146
  export * from './domain/entities/reflect/RTenant';
144
147
  export * from './domain/entities/reflect/RPolicy';
145
148
  export * from './domain/entities/reflect/RStyle';
149
+ export * from './domain/entities/reflect/RConfiguration';
146
150
  export * from './domain/entities/reflect/RVocabs';
147
151
  export * from './domain/entities/reflect/RAuthProfile';
148
152
  export * from './domain/entities/reflect/RI18nBundle';
@@ -173,6 +177,7 @@ export * from './model/adapters/diagnostics/SentryDiagnosticsAdapter';
173
177
  export * from './model/adapters/diagnostics/SentryDiagnosticsAdapter.types';
174
178
  export * from './model/config/kernel.config';
175
179
  export * from './model/config/ui-composition.config';
180
+ export * from './model/config/tooltip.config';
176
181
  export { default as Config } from './model/config/kernel.config';
177
182
  export * from './model/modules/context/persistence/EndgeStorageAdapterRegistry';
178
183
  export * from './model/modules/context/persistence/RuntimeStateController';
@@ -182,6 +187,9 @@ export * from './model/seed/converters/date/string-to-date';
182
187
  export * from './model/seed/converters/date/weekdays-range';
183
188
  export * from './model/services/document/DocumentDraftFactory';
184
189
  export * from './model/services/configuration/endge-configuration';
190
+ export * from './model/services/configuration/configuration-value';
191
+ export * from './model/services/source-engine/compilers/configuration-source-compile';
192
+ export * from './model/services/tooltip/endge-tooltip-markdown';
185
193
  export * from './model/services/i18n/composition-i18n-catalog-projection';
186
194
  export * from './domain/entities/runtime/RuntimeHostBase';
187
195
  export * from './domain/entities/runtime/RuntimeHostRegistry';
@@ -219,6 +227,7 @@ export * from './model/services/style/endgecss-match';
219
227
  export * from './model/services/source-engine/source-expression-evaluate';
220
228
  export * from './model/services/source-engine/filter-source-patch';
221
229
  export * from './model/services/source-engine/type-source-serialize';
230
+ export * from './model/services/source-engine/configuration-source-patch';
222
231
  export * from './model/services/source-engine/typescript-type-source';
223
232
  export * from './model/services/source-engine/component-sfc/component-sfc-visual-projection';
224
233
  export * from './model/services/source-engine/component-sfc/component-sfc-table-source-patch';
@@ -15,9 +15,11 @@ export declare const ENDGE_COMPUTATION_MAX_CALLS = 256;
15
15
  export declare const CONTEXT_STORAGE_KEY = "endge:context:v1";
16
16
  export declare const LEGACY_CONTEXT_STORAGE_KEY = "endge-context";
17
17
  export declare const LEGACY_THEME_STORAGE_KEY = "endge:theme";
18
+ export declare const LEGACY_TIMEZONE_STORAGE_KEY = "endge:isLocalTime";
18
19
  export declare const DEFAULT_LOCALE = "en";
19
20
  export declare const DEFAULT_FALLBACK_LOCALE = "en";
20
21
  export declare const DEFAULT_THEME = "dark";
22
+ export declare const DEFAULT_TIMEZONE = "local";
21
23
  export declare const DEFAULT_SCOPE: {
22
24
  readonly tenantId: "default";
23
25
  readonly projectId: "default";
@@ -33,6 +35,9 @@ export declare const VARS_STORAGE_KEY = "endge:vars";
33
35
  export declare const AUTH_STORAGE_KEY = "endge:auth";
34
36
  /** Ключ в Raph-хранилище для глобальных переменных. */
35
37
  export declare const STORAGE_VARS_KEY = "vars";
38
+ /** Raph namespace containing persistent and volatile Endge context values. */
39
+ export declare const ENDGE_CONTEXT_RAPH_PATH = "context";
40
+ export declare const ENDGE_KEYBOARD_CONTEXT_RAPH_PATH = "context.input.keyboard";
36
41
  /** Обратная совместимость публичного API `Config`. */
37
42
  declare const _default: {
38
43
  DOMAIN_STORAGE_KEY: string;
@@ -0,0 +1,3 @@
1
+ import { EndgeTooltipConfiguration } from '../../domain/types/configuration/configuration.type';
2
+ /** System defaults used before Workspace -> Tenant -> Project -> Environment overrides. */
3
+ export declare const DEFAULT_ENDGE_TOOLTIP_CONFIGURATION: Readonly<EndgeTooltipConfiguration>;
@@ -6,6 +6,7 @@ import { EndgeBind } from '../modules/runtime/core/endge-bind';
6
6
  import { EndgeActions } from '../modules/runtime/core/endge-actions';
7
7
  import { EndgeContext } from '../modules/context/endge-context';
8
8
  import { EndgeConfigurationModule } from '../modules/context/endge-configuration';
9
+ import { EndgeConfigurationSchemaModule } from '../modules/context/endge-configuration-schema';
9
10
  import { EndgeDataView } from '../modules/runtime/execution/endge-data-view';
10
11
  import { EndgeCompiler } from '../modules/program/endge-compiler';
11
12
  import { EndgeDiagnostics } from '../modules/diagnostics/endge-diagnostics';
@@ -178,6 +179,7 @@ export declare class Endge extends EndgeFederation {
178
179
  static get context(): EndgeContext;
179
180
  /** Доступ к effective configuration и immutable compiler build context. */
180
181
  static get configuration(): EndgeConfigurationModule;
182
+ static get configurationSchema(): EndgeConfigurationSchemaModule;
181
183
  /**
182
184
  * Доступ к frontend workspace profile: локали и будущие runtime capabilities.
183
185
  */
@@ -0,0 +1,24 @@
1
+ import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
2
+ import { ProgramDiagnostic } from '../../../domain/types/program/program.types';
3
+ import { EndgeConfigurationValues } from '../../../domain/types/configuration/configuration.type';
4
+ import { EndgeConfigurationSchemaEntry } from '../../../domain/types/source/configuration-source.types';
5
+ import { TypeProgramCatalogEntry } from '../../../domain/types/source/type-source.types';
6
+ import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
7
+ /** Compiles Configuration schemas before effective context resolution. */
8
+ export declare class EndgeConfigurationSchemaModule extends EndgeModule {
9
+ private _entries;
10
+ private _types;
11
+ private _valueDiagnostics;
12
+ build(_ctx: EndgeBootContext): void;
13
+ reset(): void;
14
+ list(): EndgeConfigurationSchemaEntry[];
15
+ get(identity: string): EndgeConfigurationSchemaEntry | null;
16
+ get typeCatalog(): TypeProgramCatalogEntry[];
17
+ get errors(): Array<{
18
+ identity: string;
19
+ diagnostic: Omit<ProgramDiagnostic, 'entityRef'>;
20
+ }>;
21
+ /** Applies defaults, ignores stale keys and records incompatible active values for Compiler Problems. */
22
+ resolveValues(input: EndgeConfigurationValues): EndgeConfigurationValues;
23
+ private _withValueDiagnostics;
24
+ }
@@ -19,6 +19,8 @@ export declare class EndgeConfigurationModule extends EndgeModule {
19
19
  normalizeLocale(locale: string | null | undefined): string;
20
20
  /** Нормализует theme относительно effective configuration. */
21
21
  normalizeTheme(theme: string | null | undefined): string;
22
+ /** Нормализует timezone относительно effective configuration. */
23
+ normalizeTimezone(timezone: string | null | undefined): string;
22
24
  /** Вычисляет upstream snapshot для общего редактора указанного слоя. */
23
25
  resolveUpstream(layer: EndgeConfigurationLayer): EndgeConfiguration;
24
26
  /** Builds a preview without mutating active boot configuration. */
@@ -1,4 +1,4 @@
1
- import { EndgeContextPersistenceConfig, EndgeContextSnapshot, EndgePersistenceScope, EndgeSessionIdentityProvider, EndgeStorageAdapter } from '../../../domain/types/runtime/context-persistence.types';
1
+ import { EndgeContextPersistenceConfig, EndgeKeyboardContextSnapshot, EndgeContextSnapshot, EndgePersistenceScope, EndgeRuntimeContextSnapshot, EndgeSessionIdentityProvider, EndgeStorageAdapter } from '../../../domain/types/runtime/context-persistence.types';
2
2
  import { EndgeConfiguration } from '../../../domain/types/configuration/configuration.type';
3
3
  import { EndgeDataMode } from '../../../domain/types/document/workspace.types';
4
4
  import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
@@ -23,6 +23,8 @@ export declare class EndgeContext extends EndgeModule {
23
23
  private _pendingLocale;
24
24
  private _currentTheme;
25
25
  private _pendingTheme;
26
+ private _currentTimezone;
27
+ private _pendingTimezone;
26
28
  private _workspaceDataMode;
27
29
  private _dataModeOverride;
28
30
  private _sessionProvider;
@@ -46,6 +48,14 @@ export declare class EndgeContext extends EndgeModule {
46
48
  get isTenantLockedBySession(): boolean;
47
49
  /** Сериализует текущий execution scope в snapshot. */
48
50
  serialize(): EndgeContextSnapshot;
51
+ /** Returns the full SFC-visible context without adding volatile values to persistence. */
52
+ runtimeSnapshot(): EndgeRuntimeContextSnapshot;
53
+ /** Returns the current volatile keyboard state from the shared Raph context namespace. */
54
+ getKeyboardState(): EndgeKeyboardContextSnapshot;
55
+ /** Publishes UI-adapter keyboard state as narrow, non-persisted Raph mutations. */
56
+ setKeyboardState(input: EndgeKeyboardContextSnapshot): void;
57
+ /** Keeps legacy module subscribers while projecting persistent context fields into Raph. */
58
+ notify(): void;
49
59
  /** Восстанавливает execution scope из snapshot с безопасными defaults. */
50
60
  deserialize(payload: Partial<EndgeContextSnapshot> | undefined): void;
51
61
  /** Сохраняет текущий context snapshot через выбранный adapter. */
@@ -122,12 +132,23 @@ export declare class EndgeContext extends EndgeModule {
122
132
  setCurrentTheme(theme: string | null): void;
123
133
  /** Согласует сохранённую тему с effective configuration после workspace resolution. */
124
134
  reconcileCurrentThemeWithWorkspace(configuration?: EndgeConfiguration): void;
135
+ /** Возвращает текущую временную зону контекста. */
136
+ get currentTimezone(): string;
137
+ /** Нормализует, сохраняет и публикует новую временную зону. */
138
+ set currentTimezone(value: string);
139
+ /** Устанавливает текущую временную зону через публичный method API. */
140
+ setCurrentTimezone(timezone: string | null): void;
141
+ /** Согласует сохранённую временную зону с effective configuration. */
142
+ reconcileCurrentTimezoneWithWorkspace(configuration?: EndgeConfiguration): void;
125
143
  /** Возвращает effective configuration либо persisted workspace configuration до resolution. */
126
144
  private _activeConfiguration;
127
145
  private _normalizeLocale;
128
146
  private _normalizeTheme;
147
+ private _normalizeTimezone;
129
148
  /** Выбирает storage adapter для заданной persistence policy. */
130
149
  private resolveAdapter;
150
+ private _syncPersistentContextToRaph;
151
+ private _setRaphValueIfChanged;
131
152
  /** Возвращает identity активного workspace для persistence scope. */
132
153
  private _requireCurrentWorkspace;
133
154
  /** Builds a harmless scope for a controller that never reads or writes state. */
@@ -1,5 +1,5 @@
1
1
  import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
2
- import { EndgeDataMode, EndgeWorkspaceDefinition, EndgeWorkspaceLocale, EndgeWorkspaceLocaleLabelMode, EndgeWorkspaceTheme, EndgeWorkspaceVar } from '../../../domain/types/document/workspace.types';
2
+ import { EndgeDataMode, EndgeWorkspaceDefinition, EndgeWorkspaceLocale, EndgeWorkspaceLocaleLabelMode, EndgeWorkspaceTheme, EndgeWorkspaceTimezone, EndgeWorkspaceVar } from '../../../domain/types/document/workspace.types';
3
3
  import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
4
4
  import { WorkspaceVariables } from './endge-vars';
5
5
  /**
@@ -27,6 +27,12 @@ export declare class EndgeWorkspace extends EndgeModule {
27
27
  normalizeTheme(theme: string | null | undefined): string;
28
28
  /** Возвращает пользовательское имя темы. */
29
29
  getThemeLabel(theme: string): string;
30
+ /** Проверяет, поддерживает ли workspace указанную временную зону. */
31
+ supportsTimezone(timezone: string | null | undefined): boolean;
32
+ /** Нормализует временную зону по правилам активного workspace. */
33
+ normalizeTimezone(timezone: string | null | undefined): string;
34
+ /** Возвращает пользовательское имя временной зоны. */
35
+ getTimezoneLabel(timezone: string): string;
30
36
  /** Применяет и публикует новую workspace-конфигурацию. */
31
37
  apply(input: unknown): void;
32
38
  /** Сериализует текущую workspace-конфигурацию. */
@@ -61,6 +67,10 @@ export declare class EndgeWorkspace extends EndgeModule {
61
67
  get themes(): EndgeWorkspaceTheme[];
62
68
  /** Возвращает тему по умолчанию. */
63
69
  get defaultTheme(): string;
70
+ /** Возвращает доступные workspace timezones. */
71
+ get timezones(): EndgeWorkspaceTimezone[];
72
+ /** Возвращает временную зону по умолчанию. */
73
+ get defaultTimezone(): string;
64
74
  /** Возвращает identity auth profile по умолчанию. */
65
75
  get defaultAuthProfileIdentity(): string | null;
66
76
  /** Возвращает список разрешённых SFC adapter ids. */
@@ -28,6 +28,7 @@ import { RPolicy } from '../../../domain/entities/reflect/RPolicy';
28
28
  import { RProject } from '../../../domain/entities/reflect/RProject';
29
29
  import { RQuery } from '../../../domain/entities/reflect/RQuery';
30
30
  import { RStyle } from '../../../domain/entities/reflect/RStyle';
31
+ import { RConfiguration } from '../../../domain/entities/reflect/RConfiguration';
31
32
  import { RTenant } from '../../../domain/entities/reflect/RTenant';
32
33
  import { RType } from '../../../domain/entities/reflect/RType';
33
34
  import { RVocabs } from '../../../domain/entities/reflect/RVocabs';
@@ -63,6 +64,7 @@ export interface EndgeDomainParsed {
63
64
  tenants: RTenant[];
64
65
  policies: RPolicy[];
65
66
  styles: RStyle[];
67
+ configurations: RConfiguration[];
66
68
  vocabs: RVocabs[];
67
69
  i18nBundles: RI18nBundle[];
68
70
  authProfiles: RAuthProfile[];
@@ -124,6 +126,8 @@ export declare class EndgeDomain extends EndgeModule {
124
126
  private _policiesByIdentity;
125
127
  private _stylesById;
126
128
  private _stylesByIdentity;
129
+ private _configurationsById;
130
+ private _configurationsByIdentity;
127
131
  private _vocabsById;
128
132
  private _vocabsByIdentity;
129
133
  private _authProfilesById;
@@ -799,6 +803,18 @@ export declare class EndgeDomain extends EndgeModule {
799
803
  * Проверяет наличие Style по id или identity.
800
804
  */
801
805
  hasStyle(identity: string): boolean;
806
+ /** Workspace-owned Configuration source documents. */
807
+ getConfigurations(): RConfiguration[];
808
+ getConfigurationById(id: string | number): RConfiguration | null;
809
+ getConfigurationByIdentity(identity: string): RConfiguration | null;
810
+ getConfiguration(idOrIdentity: string | number): RConfiguration | null;
811
+ addConfiguration(configuration: RConfiguration): void;
812
+ removeConfigurationById(id: string | number): void;
813
+ removeConfigurationByIdentity(identity: string): void;
814
+ removeConfiguration(identity: string): void;
815
+ hasConfigurationById(id: string | number): boolean;
816
+ hasConfigurationByIdentity(identity: string): boolean;
817
+ hasConfiguration(identity: string): boolean;
802
818
  /**
803
819
  * Методы для работы со словарями
804
820
  */
@@ -34,7 +34,7 @@ export declare class EndgeSource extends EndgeModule {
34
34
  /** Патчит source указанного source-kind, сохраняя нетронутые участки авторского кода. */
35
35
  patch<TPatch = unknown, TDocument = unknown>(sourceKind: SourceKind | string, source: string, patch: TPatch): SourcePatchResult<TDocument>;
36
36
  /** Возвращает базовый source для новой сущности указанного source-kind. */
37
- createDefault(sourceKind: SourceKind | string): string;
37
+ createDefault(sourceKind: SourceKind | string, variant?: string): string;
38
38
  /** Нормализует source через language strategy без изменения semantic document. */
39
39
  normalize(sourceKind: SourceKind | string, source: string): string;
40
40
  /** Валидирует source указанного source-kind для editor-facing сценариев. */
@@ -37,6 +37,7 @@ export declare class EndgeRuntime extends EndgeModule {
37
37
  private _appScopes;
38
38
  private _defaultAppScope;
39
39
  private _unsubscribeWorkspace;
40
+ private _unsubscribeContext;
40
41
  private _destroyedSnapshotLeases;
41
42
  private _destroyingRuntimeIds;
42
43
  /** Retain only bounded lightweight descriptors for an explicit inspector. */
@@ -79,8 +80,8 @@ export declare class EndgeRuntime extends EndgeModule {
79
80
  getRuntimeHosts(): AnyRuntimeHost[];
80
81
  /**
81
82
  * Инвалидирует все renderable roots активных application scopes.
82
- * Операция намеренно coarse-grained: locale меняется редко, поэтому отдельный
83
- * dependency graph переводов на этом этапе не нужен.
83
+ * Операция намеренно coarse-grained: context preferences меняются редко,
84
+ * поэтому отдельный dependency graph на этом этапе не нужен.
84
85
  */
85
86
  invalidateApplicationScopes(): void;
86
87
  /** Регистрирует host, созданный владельцем составной runtime-сущности. */
@@ -11,11 +11,8 @@ export declare class EndgeUI extends EndgeModule {
11
11
  private readonly STEP_ZOOM;
12
12
  private readonly DEFAULT_ZOOM;
13
13
  private readonly LS_KEY_ZOOM;
14
- private readonly DEFAULT_IS_LOCAL_TIME;
15
- private readonly LS_KEY_IS_LOCAL_TIME;
16
14
  private _zoom;
17
15
  private _theme;
18
- private _isLocalTime;
19
16
  /**
20
17
  * Восстанавливает UI-настройки из localStorage и применяет тему к document.
21
18
  */
@@ -99,12 +96,4 @@ export declare class EndgeUI extends EndgeModule {
99
96
  * Переключатель LT <-> UTC.
100
97
  */
101
98
  switchTime(): void;
102
- /**
103
- * Считывает Is Local Time From LS.
104
- */
105
- private readIsLocalTimeFromLS;
106
- /**
107
- * Записывает Is Local Time To LS.
108
- */
109
- private writeIsLocalTimeToLS;
110
99
  }
@@ -42,7 +42,7 @@ export interface ComponentSFCCompileOptions {
42
42
  /** Проверяет существование статической identity из Component is. */
43
43
  hasComponentIdentity?: (identity: string) => boolean;
44
44
  /** Resolves and describes a default port provider for build-time validation. */
45
- resolvePortProvider?: (identity: string, expectedKind: 'computation' | 'component' | 'action') => ComponentSFCPortProviderDescriptor | null;
45
+ resolvePortProvider?: (identity: string, expectedKind: 'computation' | 'component' | 'action' | 'query') => ComponentSFCPortProviderDescriptor | null;
46
46
  /** Resolves the compiled public port manifest of a nested SFC component. */
47
47
  resolveComponentPortManifest?: (identity: string) => ComponentSFCPortManifest | null;
48
48
  /** Resolves explicit root variants of one nested custom component. */
@@ -9,4 +9,4 @@ export interface ComponentSFCInteractionCompileContext {
9
9
  /** Detects statically invalid passive/prevent combinations in shared trigger descriptors. */
10
10
  export declare function hasComponentSFCPassivePreventConflict(source: string, suffixes?: readonly RComponentSFC_IR_EventModifier[]): boolean;
11
11
  /** Compiles one source-owned `:on` annotation into renderer-neutral rules. */
12
- export declare function compileComponentSFCInteractionAnnotation(attribute: RComponentSFC_AST_Attribute, manifest: ComponentSFCPortManifest | null, context: ComponentSFCInteractionCompileContext, dependencies: RComponentDependencies, diagnostics: RComponentDiagnostic[]): RComponentSFC_IR_InteractionGroup | null;
12
+ export declare function compileComponentSFCInteractionAnnotation(attribute: RComponentSFC_AST_Attribute, manifest: ComponentSFCPortManifest | null, context: ComponentSFCInteractionCompileContext, dependencies: RComponentDependencies, diagnostics: RComponentDiagnostic[], ownerPorts?: ComponentSFCPortManifest | null): RComponentSFC_IR_InteractionGroup | null;
@@ -3,11 +3,11 @@ import { TypeSourceDefinition } from '../../../../domain/types/source/type-sourc
3
3
  import { ComponentSFCEventAction, ComponentSFCPortManifest, ComponentSFCPortProviderDescriptor, RComponentSFC_IR_PortCall } from '../../../../domain/types/component/sfc/ports.types';
4
4
  import { RComponentSFC_AST_Script } from '../../../../domain/types/component/sfc/ast.types';
5
5
  export interface ComponentSFCPortAnalysisOptions {
6
- resolveProvider?: (identity: string, expectedKind: 'computation' | 'component' | 'action') => ComponentSFCPortProviderDescriptor | null;
6
+ resolveProvider?: (identity: string, expectedKind: 'computation' | 'component' | 'action' | 'query') => ComponentSFCPortProviderDescriptor | null;
7
7
  resolveTypeDefinition?: (identity: string) => TypeSourceDefinition | null;
8
8
  }
9
9
  /** Compiles the safe reaction grammar used by local `@event` template bindings. */
10
- export declare function compileComponentSFCLocalEventAction(eventName: string, source: string, sourceOffset: number, dependencies: RComponentDependencies, diagnostics: RComponentDiagnostic[]): ComponentSFCEventAction | null;
10
+ export declare function compileComponentSFCLocalEventAction(eventName: string, source: string, sourceOffset: number, dependencies: RComponentDependencies, diagnostics: RComponentDiagnostic[], ownerPorts?: ComponentSFCPortManifest | null): ComponentSFCEventAction | null;
11
11
  export interface ComponentSFCPortAnalysisResult {
12
12
  manifest: ComponentSFCPortManifest;
13
13
  calls: RComponentSFC_IR_PortCall[];
@@ -1,7 +1,7 @@
1
1
  import { RComponentDependencies, RComponentDiagnostic } from '../../../../domain/types/component/component-core.types';
2
2
  import { RComponentSFC_AST_Template } from '../../../../domain/types/component/sfc/ast.types';
3
3
  import { RComponentSFC_IR_Template } from '../../../../domain/types/component/sfc/ir.types';
4
- import { ComponentSFCComponentPort, ComponentSFCPortManifest } from '../../../../domain/types/component/sfc/ports.types';
4
+ import { ComponentSFCComponentPort, ComponentSFCPortProviderDescriptor, ComponentSFCRequiredPortKind, ComponentSFCPortManifest } from '../../../../domain/types/component/sfc/ports.types';
5
5
  import { ProgramNodeMetadata } from '../../../../domain/types/program/program-metadata.types';
6
6
  import { EndgeSFCEditingConfiguration } from '../../../../domain/types/configuration/configuration.type';
7
7
  /** Контекст компиляции template в IR. */
@@ -12,12 +12,16 @@ export interface ComponentSFCTemplateCompileContext {
12
12
  locals: string[];
13
13
  /** Local component ports have priority over the global user tag registry. */
14
14
  componentPorts?: ComponentSFCComponentPort[];
15
+ /** Required ports owned by the Component SFC currently being compiled. */
16
+ ownerPorts?: ComponentSFCPortManifest | null;
15
17
  /** Разрешает зарегистрированный пользовательский tag в identity компонента. */
16
18
  resolveComponentTag?: (tag: string) => string | null;
17
19
  /** Проверяет статическую identity из Component is. */
18
20
  hasComponentIdentity?: (identity: string) => boolean;
19
21
  /** Resolves public Events of a nested user Component for local `@event` bindings. */
20
22
  resolveComponentPortManifest?: (identity: string) => ComponentSFCPortManifest | null;
23
+ /** Resolves static providers used by flat child port bindings. */
24
+ resolvePortProvider?: (identity: string, expectedKind: ComponentSFCRequiredPortKind) => ComponentSFCPortProviderDescriptor | null;
21
25
  /** Resolves explicit root Variant names of a nested custom component. */
22
26
  resolveComponentVariants?: (identity: string) => string[] | null;
23
27
  /** Effective defaults завершения edit session для текущего build context. */
@@ -0,0 +1,20 @@
1
+ import { ProgramDiagnostic } from '../../../domain/types/program/program.types';
2
+ import { EndgeJSONValue } from '../../../domain/types/source/configuration-source.types';
3
+ import { TypeProgramCatalogEntry, TypeSourceExpression } from '../../../domain/types/source/type-source.types';
4
+ type DiagnosticDraft = Omit<ProgramDiagnostic, 'entityRef'>;
5
+ export interface ConfigurationValueResult {
6
+ ok: boolean;
7
+ diagnostics: DiagnosticDraft[];
8
+ }
9
+ /** Validates one persisted/default value against the effective Type Registry. */
10
+ export declare function validateConfigurationValue(expression: TypeSourceExpression, value: unknown, catalog: readonly TypeProgramCatalogEntry[], sourcePath?: string): ConfigurationValueResult;
11
+ /** Infers a deterministic JSON default or returns null when explicit author input is required. */
12
+ export declare function inferConfigurationDefault(expression: TypeSourceExpression, catalog: readonly TypeProgramCatalogEntry[], visiting?: Set<string>): {
13
+ ok: true;
14
+ value: EndgeJSONValue;
15
+ } | {
16
+ ok: false;
17
+ reason: string;
18
+ };
19
+ export declare function isEndgeJSONValue(value: unknown): value is EndgeJSONValue;
20
+ export {};
@@ -1,4 +1,4 @@
1
- import { EndgeConfiguration, EndgeConfigurationContribution } from '../../../domain/types/configuration/configuration.type';
1
+ import { EndgeConfiguration, EndgeConfigurationContribution, EndgePublicConfigurationSnapshot } from '../../../domain/types/configuration/configuration.type';
2
2
  export declare const DEFAULT_ENDGE_CONFIGURATION: Readonly<EndgeConfiguration>;
3
3
  /** Создаёт независимую полную конфигурацию с системными defaults. */
4
4
  export declare function createDefaultEndgeConfiguration(): EndgeConfiguration;
@@ -10,3 +10,5 @@ export declare function normalizeEndgeConfigurationContribution(input: unknown):
10
10
  export declare function applyEndgeConfigurationContribution(upstream: EndgeConfiguration, contribution: EndgeConfigurationContribution): EndgeConfiguration;
11
11
  /** Возвращает стабильный hash полного build context без platform crypto API. */
12
12
  export declare function createEndgeContextHash(input: unknown): string;
13
+ /** Builds the stable public SFC projection without internal vars/diagnostics/storage namespace. */
14
+ export declare function createEndgePublicConfigurationSnapshot(configuration: EndgeConfiguration): EndgePublicConfigurationSnapshot;
@@ -11,8 +11,13 @@ export declare class QueryExecutor {
11
11
  readResponseOutput(output: QueryProgramOutput, response: unknown): unknown;
12
12
  /** Выбирает protocol executor по compiled artifact type. */
13
13
  private _executeByProtocol;
14
+ /** Выполняет GraphQL operation и возвращает ее data, отделяя transport errors от GraphQL errors. */
15
+ private _runGraphQL;
14
16
  /** Выполняет REST artifact. */
15
17
  private _runRest;
18
+ private _throwHttpError;
19
+ /** Пишет краткую transport-индикацию без request body, headers и response payload. */
20
+ private _writeRequestError;
16
21
  /** Публикует runtime warning безопасного expression evaluator. */
17
22
  private _writeExpressionWarning;
18
23
  private _asRecord;