@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,11 @@
1
+ import { DuplicateOptions, REntity } from './REntity';
2
+ /** Workspace-owned source document that declares one settings category. */
3
+ export declare class RConfiguration extends REntity {
4
+ readonly type: "configuration";
5
+ description: string | null;
6
+ source: string;
7
+ sourceVersion: number;
8
+ static fromPlain(json: any, storageMeta?: any): RConfiguration;
9
+ toPlain(): Record<string, unknown>;
10
+ duplicate(options: DuplicateOptions): RConfiguration;
11
+ }
@@ -1,5 +1,5 @@
1
1
  import { ComponentSFCRuntimeHost } from './hosts/ComponentSFCRuntimeHost';
2
- import { ComponentSFCEventRuntimeSource, ComponentSFCPortManifest } from '../../types/component/sfc/ports.types';
2
+ import { ComponentSFCEventRuntimeSource, ComponentSFCRequiredPortBinding, ComponentSFCPortManifest } from '../../types/component/sfc/ports.types';
3
3
  import { RComponentSFC_IR_EventBinding } from '../../types/component/sfc/ir.types';
4
4
  /** Mount-scoped Event router for one Component SFC artifact boundary. */
5
5
  export declare class ComponentSFCEventBoundary {
@@ -10,15 +10,16 @@ export declare class ComponentSFCEventBoundary {
10
10
  private readonly parentSource?;
11
11
  private readonly parentBindings;
12
12
  private readonly parentEventTransform?;
13
+ private readonly requiredPortBindings;
13
14
  private readonly consumedLocalOnce;
14
15
  constructor(host: ComponentSFCRuntimeHost | null, componentIdentity: string, manifest: ComponentSFCPortManifest, parent?: ComponentSFCEventBoundary | null, parentSource?: ComponentSFCEventRuntimeSource | undefined, parentBindings?: readonly RComponentSFC_IR_EventBinding[], parentEventTransform?: ((event: string, payload: unknown) => {
15
16
  event: string;
16
17
  payload: unknown;
17
- } | null) | undefined);
18
+ } | null) | undefined, requiredPortBindings?: readonly ComponentSFCRequiredPortBinding[]);
18
19
  createChild(componentIdentity: string, manifest: ComponentSFCPortManifest, source: ComponentSFCEventRuntimeSource, bindings?: readonly RComponentSFC_IR_EventBinding[], transform?: (event: string, payload: unknown) => {
19
20
  event: string;
20
21
  payload: unknown;
21
- } | null): ComponentSFCEventBoundary;
22
+ } | null, requiredPortBindings?: readonly ComponentSFCRequiredPortBinding[]): ComponentSFCEventBoundary;
22
23
  /** True when the current public manifest observes one Event of this child source. */
23
24
  observesChild(source: ComponentSFCEventRuntimeSource, event: string): boolean;
24
25
  /** Claims a mount-scoped logical `.once` rule after it has matched. */
@@ -30,5 +31,6 @@ export declare class ComponentSFCEventBoundary {
30
31
  /** Emits an Event declared as own by this component. */
31
32
  emitOwn(name: string, payload: unknown, trace?: string[], depth?: number): Promise<void>;
32
33
  private dispatch;
34
+ private resolveRequiredPortAction;
33
35
  private reportError;
34
36
  }
@@ -125,6 +125,9 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
125
125
  private _createRuntimeBoundaryNodes;
126
126
  private _createTableColumnBoundaryNode;
127
127
  private _bindRaphInputSource;
128
+ /** Context dependencies are Raph-backed and do not depend on the component props input kind. */
129
+ private _bindRaphContextSources;
130
+ private _observeContextPath;
128
131
  private _bindRaphBoundaryInputSource;
129
132
  private _isCoveredByPatchableBoundary;
130
133
  private _findRuntimeNodeByMeta;
@@ -11,13 +11,13 @@ export interface RComponentRef {
11
11
  /** Идентификатор компонента внутри выбранного хранилища. */
12
12
  id: string | number;
13
13
  /** Semantic dependency role in the compiled artifact. */
14
- role?: 'child-component' | 'port-default-component';
14
+ role?: 'child-component' | 'port-default-component' | 'port-override-component';
15
15
  }
16
16
  /** Ссылка SFC-компонента на computation provider. */
17
17
  export interface RComputationRef {
18
18
  source: 'computation';
19
19
  id: string | number;
20
- role: 'port-default-computation';
20
+ role: 'port-default-computation' | 'port-override-computation';
21
21
  }
22
22
  /** Описание одного сообщения компилятора или валидатора. */
23
23
  export interface RComponentDiagnostic {
@@ -1,10 +1,10 @@
1
1
  import { RComponentSFC_IR_Read } from './ir.types';
2
2
  /** Источник runtime-зависимости SFC v1. */
3
- export type RComponentSFC_RuntimeDependencySource = 'props';
3
+ export type RComponentSFC_RuntimeDependencySource = 'props' | 'context';
4
4
  /** Runtime-зависимость SFC template от входного prop. */
5
5
  export interface RComponentSFC_RuntimeDependency {
6
6
  /** Источник зависимости. В v1 поддерживаем только props. */
7
- source: RComponentSFC_RuntimeDependencySource;
7
+ source: 'props';
8
8
  /** Имя входного prop, например `flight`. */
9
9
  prop: string;
10
10
  /** Путь внутри prop, например `['status']` для `flight.status`. */
@@ -14,6 +14,14 @@ export interface RComponentSFC_RuntimeDependency {
14
14
  /** Нормализованный read из IR. */
15
15
  read: RComponentSFC_IR_Read;
16
16
  }
17
+ /** Runtime-зависимость SFC template от глобального Endge context. */
18
+ export interface RComponentSFC_RuntimeContextDependency {
19
+ source: 'context';
20
+ /** Путь после `$context`, например `['input', 'keyboard', 'modifiers', 'shift']`. */
21
+ path: string[];
22
+ raw: string;
23
+ read: RComponentSFC_IR_Read;
24
+ }
17
25
  /** Тип patchable runtime boundary внутри SFC IR. */
18
26
  export type RComponentSFC_RuntimeBoundaryKind = 'table';
19
27
  /** Runtime-зависимость колонки таблицы от полей текущей строки. */
@@ -39,6 +47,8 @@ export interface RComponentSFC_RuntimeBoundaryDependency {
39
47
  sourcePath: string[];
40
48
  /** Поле ключа строки из `row-key`. */
41
49
  rowKey: string | null;
50
+ /** Context paths used inside this boundary; they invalidate the whole boundary. */
51
+ contextReads: string[][];
42
52
  /** Колонки таблицы, которые можно обновлять точечно. */
43
53
  columns: RComponentSFC_RuntimeTableColumnDependency[];
44
54
  }
@@ -57,6 +67,8 @@ export interface RComponentSFC_RuntimeVocabDependency {
57
67
  export interface RComponentSFC_RuntimeDependencies {
58
68
  /** Зависимости от props, которые можно связать с внешним input source. */
59
69
  props: RComponentSFC_RuntimeDependency[];
70
+ /** Context dependencies outside patchable boundaries. */
71
+ context: RComponentSFC_RuntimeContextDependency[];
60
72
  /** Patchable boundaries, для которых runtime строит отдельные Raph-ноды. */
61
73
  boundaries: RComponentSFC_RuntimeBoundaryDependency[];
62
74
  /** Vocab aliases, которые должен предоставить ближайший Composition scope. */
@@ -8,6 +8,8 @@ export interface ComponentSFCEventModifiersState {
8
8
  }
9
9
  export interface ComponentSFCInteractionEventPayload {
10
10
  type: string;
11
+ /** UTC-время нормализации исходного occurrence, одинаковое для всех его локальных reactions. */
12
+ occurredAt: string;
11
13
  modifiers: ComponentSFCEventModifiersState;
12
14
  held: {
13
15
  key: string[];
@@ -1,6 +1,6 @@
1
1
  import { RComponentSFC_SourceRange } from './location.types';
2
2
  import { RComponentDiagnostic } from '../component-core.types';
3
- import { ComponentSFCEventAction, ComponentSFCPortForwardOrigin, ComponentSFCPortManifest, RComponentSFC_IR_ComponentPortMarker, RComponentSFC_IR_PortCall } from './ports.types';
3
+ import { ComponentSFCEventAction, ComponentSFCRequiredPortBinding, ComponentSFCPortForwardOrigin, ComponentSFCPortManifest, RComponentSFC_IR_ComponentPortMarker, RComponentSFC_IR_PortCall } from './ports.types';
4
4
  import { EndgeStyleSheetArtifact } from '../../style/style.types';
5
5
  /** Семантическая модель компонента после compiler pipeline, независимая от DOM и Nova. */
6
6
  export interface RComponentSFC_IR {
@@ -86,12 +86,15 @@ export interface ComponentSFCInteractionTriggerHeldKeys {
86
86
  /** Запрещает другие удерживаемые обычные клавиши. */
87
87
  exact?: boolean;
88
88
  }
89
- export interface ComponentSFCInteractionTrigger {
89
+ /** Условие на текущее состояние клавиатуры без привязки к конкретному событию. */
90
+ export interface ComponentSFCInteractionKeyboardCondition {
91
+ modifiers?: ComponentSFCInteractionTriggerModifiers;
92
+ held?: ComponentSFCInteractionTriggerHeldKeys;
93
+ }
94
+ export interface ComponentSFCInteractionTrigger extends ComponentSFCInteractionKeyboardCondition {
90
95
  event: string;
91
96
  key?: string[];
92
97
  code?: string[];
93
- held?: ComponentSFCInteractionTriggerHeldKeys;
94
- modifiers?: ComponentSFCInteractionTriggerModifiers;
95
98
  repeat?: boolean;
96
99
  composing?: boolean;
97
100
  button?: number;
@@ -150,7 +153,7 @@ export interface ComponentSFCEditedEventPayload<T = unknown> {
150
153
  /** IR узел template после нормализации в Endge primitives. */
151
154
  export type RComponentSFC_IR_Node = RComponentSFC_IR_ElementNode | RComponentSFC_IR_TextNode | RComponentSFC_IR_ExpressionNode;
152
155
  /** Поддерживаемые v1 primitives нового SFC template. */
153
- export type RComponentSFC_IR_Tag = 'Text' | 'DateTime' | 'Number' | 'Icon' | 'Badge' | 'Dot' | 'Box' | 'Flex' | 'Grid' | 'Divider' | 'Input' | 'Textarea' | 'Checkbox' | 'Select' | 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator' | 'Editable' | 'Variant';
156
+ export type RComponentSFC_IR_Tag = 'Text' | 'DateTime' | 'Number' | 'Icon' | 'Badge' | 'Dot' | 'Box' | 'Flex' | 'Grid' | 'Divider' | 'Input' | 'Textarea' | 'Checkbox' | 'Select' | 'Tooltip' | 'TooltipTrigger' | 'TooltipContent' | 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator' | 'Editable' | 'Variant';
154
157
  /** IR element-узел, который renderer-слои могут читать без знания исходного синтаксиса. */
155
158
  export interface RComponentSFC_IR_ElementNode {
156
159
  /** Стабильный id узла внутри IR. */
@@ -175,6 +178,8 @@ export interface RComponentSFC_IR_ElementNode {
175
178
  children: RComponentSFC_IR_Node[];
176
179
  /** Local component port marker retained for future provider overrides. */
177
180
  port?: RComponentSFC_IR_ComponentPortMarker;
181
+ /** Static per-instance bindings for required ports of this child component. */
182
+ portBindings?: ComponentSFCRequiredPortBinding[];
178
183
  /** Compiler-resolved Table menus, including forwarded Action identities and targets. */
179
184
  tableMenus?: RComponentSFC_IR_TableMenus;
180
185
  /** Позиция исходного AST-узла. */
@@ -197,6 +202,8 @@ export interface ComponentSFCTableMenuItemDescriptor {
197
202
  id: string;
198
203
  label: RComponentSFC_IR_Value;
199
204
  action: string;
205
+ /** Required Action port whose mounted provider may replace `action`. */
206
+ requiredPort?: string;
200
207
  input?: RComponentSFC_IR_Value;
201
208
  icon?: string;
202
209
  /** Set only for a provided alias forwarded from this exact Table node. */
@@ -241,9 +248,20 @@ export interface RComponentSFC_IR_InteractionRule {
241
248
  reactions: ComponentSFCEventAction[];
242
249
  sourceRange?: RComponentSFC_SourceRange;
243
250
  }
251
+ /** One referenced TriggerSet paired with reactions that stay stable across context layers. */
252
+ export interface RComponentSFC_IR_InteractionTriggerSet {
253
+ triggers: RComponentSFC_IR_Value;
254
+ /** Event names supported by the source tag's compiled event surface. */
255
+ events: string[];
256
+ modifiers: RComponentSFC_IR_EventModifier[];
257
+ reactions: ComponentSFCEventAction[];
258
+ sourceRange?: RComponentSFC_SourceRange;
259
+ }
244
260
  /** One `:on` annotation. Rules inside the group use first-match-wins semantics. */
245
261
  export interface RComponentSFC_IR_InteractionGroup {
246
262
  rules: RComponentSFC_IR_InteractionRule[];
263
+ /** Optional context-backed TriggerSet form `{ triggers, reaction }`. */
264
+ triggerSet?: RComponentSFC_IR_InteractionTriggerSet;
247
265
  sourceRange?: RComponentSFC_SourceRange;
248
266
  }
249
267
  /** IR текстовый узел. */
@@ -301,8 +319,8 @@ export interface RComponentSFC_IR_VocabRead {
301
319
  }
302
320
  /** Реактивное чтение, найденное внутри выражения. */
303
321
  export interface RComponentSFC_IR_Read {
304
- /** Источник чтения: props, Raph/store или локальный binding. */
305
- source: 'props' | 'raph' | 'local';
322
+ /** Источник чтения: props, Raph/store, context или локальный binding. */
323
+ source: 'props' | 'raph' | 'context' | 'local';
306
324
  /** Нормализованный путь чтения. */
307
325
  path: string[];
308
326
  /** Исходный текст чтения. */
@@ -2,7 +2,8 @@ import { RComponentContractInput } from '../component-core.types';
2
2
  import { RComponentSFC_IR_Value } from './ir.types';
3
3
  import { RComponentSFC_SourceRange } from './location.types';
4
4
  export type ComponentSFCPortRole = 'require' | 'provides' | 'emits';
5
- export type ComponentSFCPortKind = 'computation' | 'component' | 'action' | 'event';
5
+ export type ComponentSFCPortKind = 'computation' | 'component' | 'action' | 'query' | 'event';
6
+ export type ComponentSFCRequiredPortKind = Exclude<ComponentSFCPortKind, 'event'>;
6
7
  /** Public child port selected by a compile-time `definePorts.forward` rule. */
7
8
  export interface ComponentSFCPortForwardOrigin {
8
9
  nodeId: string;
@@ -59,6 +60,12 @@ export type ComponentSFCPortProviderDescriptor = {
59
60
  isArray?: boolean;
60
61
  optional?: boolean;
61
62
  } | null;
63
+ } | {
64
+ kind: 'query';
65
+ identity: string;
66
+ active: boolean;
67
+ inputs: RComponentContractInput[];
68
+ outputs: RComponentContractInput[];
62
69
  };
63
70
  /** Computation port declared by `computation<Input, Output>`. */
64
71
  export interface ComponentSFCComputationPort {
@@ -92,6 +99,25 @@ export interface ComponentSFCActionPort {
92
99
  forwardedFrom?: ComponentSFCPortForwardOrigin;
93
100
  sourceRange?: RComponentSFC_SourceRange;
94
101
  }
102
+ /** Callable Query required by a component. */
103
+ export interface ComponentSFCQueryPort {
104
+ kind: 'query';
105
+ name: string;
106
+ defaultIdentity: string;
107
+ inputType: string;
108
+ outputType: string;
109
+ inputs: RComponentContractInput[];
110
+ outputs: RComponentContractInput[];
111
+ forwardedFrom?: ComponentSFCPortForwardOrigin;
112
+ sourceRange?: RComponentSFC_SourceRange;
113
+ }
114
+ /** One static provider override attached to a mounted child Component SFC call. */
115
+ export interface ComponentSFCRequiredPortBinding {
116
+ port: string;
117
+ kind: ComponentSFCRequiredPortKind;
118
+ identity: string;
119
+ sourceRange?: RComponentSFC_SourceRange;
120
+ }
95
121
  /** Multicast notification emitted by this component. */
96
122
  export interface ComponentSFCEventPort {
97
123
  kind: 'event';
@@ -112,10 +138,12 @@ export interface ComponentSFCEventSource {
112
138
  ref: string;
113
139
  event: string;
114
140
  }
115
- /** Renderer-neutral value mapped from an Event payload into Action input. */
141
+ /** Renderer-neutral safe expression mapped into an Event reaction input. */
116
142
  export type ComponentSFCEventInputValue = {
117
143
  kind: 'event';
118
144
  path: string | null;
145
+ } | {
146
+ kind: 'now';
119
147
  } | {
120
148
  kind: 'scope';
121
149
  path: string;
@@ -163,7 +191,14 @@ export interface ComponentSFCEventEmitAction {
163
191
  event: string;
164
192
  payload?: ComponentSFCEventInputValue;
165
193
  }
166
- export type ComponentSFCEventAction = ComponentSFCEventDirectAction | ComponentSFCEventDirectQuery | ComponentSFCEventTypescriptAction | ComponentSFCEventEmitAction;
194
+ /** Calls one required executable port through its effective per-instance provider. */
195
+ export interface ComponentSFCEventRequiredPortAction {
196
+ kind: 'required-port';
197
+ portKind: 'action' | 'query';
198
+ port: string;
199
+ input?: ComponentSFCEventInputValue;
200
+ }
201
+ export type ComponentSFCEventAction = ComponentSFCEventDirectAction | ComponentSFCEventDirectQuery | ComponentSFCEventTypescriptAction | ComponentSFCEventEmitAction | ComponentSFCEventRequiredPortAction;
167
202
  export interface ComponentSFCEventRuntimeSource {
168
203
  nodeId: string;
169
204
  ref?: string;
@@ -185,6 +220,7 @@ export interface ComponentSFCRequiredPorts {
185
220
  computations: ComponentSFCComputationPort[];
186
221
  components: ComponentSFCComponentPort[];
187
222
  actions: ComponentSFCActionPort[];
223
+ queries: ComponentSFCQueryPort[];
188
224
  }
189
225
  export interface ComponentSFCProvidedPorts {
190
226
  actions: ComponentSFCActionPort[];
@@ -33,6 +33,8 @@ export declare const ENDGE_SFC_GRID_ALIGNMENTS: readonly ["start", "center", "en
33
33
  export declare const ENDGE_SFC_FLEX_DIRECTIONS: readonly ["row", "column"];
34
34
  export declare const ENDGE_SFC_DIVIDER_ORIENTATIONS: readonly ["horizontal", "vertical"];
35
35
  export declare const ENDGE_SFC_INPUT_TYPES: readonly ["String", "Number", "Date", "Time", "DateTime"];
36
+ export declare const ENDGE_SFC_TOOLTIP_SIDES: readonly ["top", "right", "bottom", "left"];
37
+ export declare const ENDGE_SFC_TOOLTIP_ALIGNS: readonly ["start", "center", "end"];
36
38
  /** Конечные значения встроенных SFC tags. Свободные string/number props сюда не входят. */
37
39
  export declare const ENDGE_SFC_TAG_ATTRIBUTE_CONTRACTS: {
38
40
  readonly Table: readonly [{
@@ -127,6 +129,15 @@ export declare const ENDGE_SFC_TAG_ATTRIBUTE_CONTRACTS: {
127
129
  readonly defaultValue: "String";
128
130
  readonly description: "Семантический тип значения Input.";
129
131
  }];
132
+ readonly Tooltip: readonly [{
133
+ readonly name: "side";
134
+ readonly values: readonly ["top", "right", "bottom", "left"];
135
+ readonly description: "Предпочтительная сторона; adapter может перевернуть её при collision с viewport.";
136
+ }, {
137
+ readonly name: "align";
138
+ readonly values: readonly ["start", "center", "end"];
139
+ readonly description: "Выравнивание tooltip относительно trigger.";
140
+ }];
130
141
  };
131
142
  /** Возвращает строгие контракты атрибутов одного встроенного SFC tag. */
132
143
  export declare function getComponentSFCTagAttributeContracts(tag: string): readonly ComponentSFCTagAttributeContract[];
@@ -1,7 +1,10 @@
1
1
  import { RComponentContractInput } from '../component-core.types';
2
2
  import { RComponentSFC_IR_Tag } from './ir.types';
3
3
  /** Публичный входной параметр renderer-neutral встроенного SFC tag. */
4
- export type ComponentSFCTagInputContract = Readonly<RComponentContractInput>;
4
+ export type ComponentSFCTagInputContract = Readonly<RComponentContractInput> & {
5
+ /** Допустимые SFC spelling aliases для одного renderer-facing параметра. */
6
+ aliases?: readonly string[];
7
+ };
5
8
  /**
6
9
  * Data-facing входы встроенных tags для source-aware visual editors.
7
10
  * Presentation-атрибуты остаются в отдельном редакторе атрибутов.
@@ -11,6 +14,11 @@ export declare const ENDGE_SFC_TAG_INPUT_CONTRACTS: {
11
14
  readonly name: "value";
12
15
  readonly type: "string";
13
16
  readonly optional: true;
17
+ }, {
18
+ readonly name: "editorVariant";
19
+ readonly aliases: readonly ["editor-variant"];
20
+ readonly type: "'default' | 'compact'";
21
+ readonly optional: true;
14
22
  }];
15
23
  readonly DateTime: readonly [{
16
24
  readonly name: "value";
@@ -24,6 +32,16 @@ export declare const ENDGE_SFC_TAG_INPUT_CONTRACTS: {
24
32
  readonly name: "timezone";
25
33
  readonly type: "string";
26
34
  readonly optional: true;
35
+ }, {
36
+ readonly name: "editMode";
37
+ readonly aliases: readonly ["edit-mode"];
38
+ readonly type: "'datetime' | 'time'";
39
+ readonly optional: true;
40
+ }, {
41
+ readonly name: "editorVariant";
42
+ readonly aliases: readonly ["editor-variant"];
43
+ readonly type: "'default' | 'compact'";
44
+ readonly optional: true;
27
45
  }, {
28
46
  readonly name: "empty";
29
47
  readonly type: "string";
@@ -33,6 +51,11 @@ export declare const ENDGE_SFC_TAG_INPUT_CONTRACTS: {
33
51
  readonly name: "value";
34
52
  readonly type: "number";
35
53
  readonly optional: false;
54
+ }, {
55
+ readonly name: "editorVariant";
56
+ readonly aliases: readonly ["editor-variant"];
57
+ readonly type: "'default' | 'compact'";
58
+ readonly optional: true;
36
59
  }, {
37
60
  readonly name: "decimals";
38
61
  readonly type: "number";
@@ -173,6 +196,23 @@ export declare const ENDGE_SFC_TAG_INPUT_CONTRACTS: {
173
196
  readonly type: "boolean";
174
197
  readonly optional: true;
175
198
  }];
199
+ readonly Tooltip: readonly [{
200
+ readonly name: "text";
201
+ readonly type: "string";
202
+ readonly optional: true;
203
+ }, {
204
+ readonly name: "markdown";
205
+ readonly type: "string";
206
+ readonly optional: true;
207
+ }, {
208
+ readonly name: "openDelay";
209
+ readonly type: "number";
210
+ readonly optional: true;
211
+ }, {
212
+ readonly name: "closeDelay";
213
+ readonly type: "number";
214
+ readonly optional: true;
215
+ }];
176
216
  };
177
217
  /** Возвращает публичные data-входы встроенного SFC tag. */
178
218
  export declare function getComponentSFCTagInputContract(tag: RComponentSFC_IR_Tag): readonly ComponentSFCTagInputContract[];
@@ -1,6 +1,9 @@
1
- import { ComponentSFCInteractionTrigger } from '../component/sfc/ir.types';
1
+ import { ComponentSFCInteractionKeyboardCondition, ComponentSFCInteractionTrigger } from '../component/sfc/ir.types';
2
2
  import { DiagnosticsSeverityNumber, DiagnosticsSignal, EndgeDiagnosticsOutputConfiguration, EndgeDiagnosticsConfiguration, EndgeDiagnosticsRoute } from '../diagnostics/diagnostics.types';
3
3
  import { EndgeExecutionContext } from '../runtime/execution-context.types';
4
+ import { EndgeJSONValue } from '../source/configuration-source.types';
5
+ export type EndgeConfigurationValues = Record<string, Record<string, EndgeJSONValue>>;
6
+ export type EndgeConfigurationValuePatch = Record<string, Record<string, EndgeValueOverride<EndgeJSONValue>>>;
4
7
  export interface EndgeLocaleDefinition {
5
8
  code: string;
6
9
  displayName: string;
@@ -11,6 +14,10 @@ export interface EndgeThemeDefinition {
11
14
  identity: string;
12
15
  displayName: string;
13
16
  }
17
+ export interface EndgeTimezoneDefinition {
18
+ identity: string;
19
+ displayName: string;
20
+ }
14
21
  export interface EndgeVariableDefinition {
15
22
  name: string;
16
23
  defaultValue: string;
@@ -20,6 +27,17 @@ export interface EndgeSFCEditingConfiguration {
20
27
  cancelOn: ComponentSFCInteractionTrigger[];
21
28
  commitOn: ComponentSFCInteractionTrigger[];
22
29
  }
30
+ export type EndgeTooltipSide = 'top' | 'right' | 'bottom' | 'left';
31
+ export type EndgeTooltipAlign = 'start' | 'center' | 'end';
32
+ /** Effective behavioral defaults of the single Shell-owned tooltip overlay. */
33
+ export interface EndgeTooltipConfiguration {
34
+ side: EndgeTooltipSide;
35
+ align: EndgeTooltipAlign;
36
+ openDelay: number;
37
+ closeDelay: number;
38
+ /** Optional keyboard state required while the pointer or focus activates a tooltip. */
39
+ keyboard?: ComponentSFCInteractionKeyboardCondition;
40
+ }
23
41
  /** Полная конфигурация, с которой компилируется один Endge context. */
24
42
  export interface EndgeConfiguration {
25
43
  vars: EndgeVariableDefinition[];
@@ -28,14 +46,22 @@ export interface EndgeConfiguration {
28
46
  fallbackLocale: string;
29
47
  themes: EndgeThemeDefinition[];
30
48
  defaultTheme: string;
49
+ timezones: EndgeTimezoneDefinition[];
50
+ defaultTimezone: string;
31
51
  defaultAuthProfileIdentity: string | null;
32
52
  sfcAdapterIds: string[];
33
53
  defaultSfcAdapterId: string;
34
54
  /** Effective triggers, которые наследуют editable-узлы без локальных атрибутов. */
35
55
  sfcEditing: EndgeSFCEditingConfiguration;
56
+ /** Effective tooltip behavior. Visual styling is owned by CSS and adapter hooks. */
57
+ tooltips: EndgeTooltipConfiguration;
36
58
  /** Настройки telemetry, output adapters, routing и snapshots. */
37
59
  diagnostics: EndgeDiagnosticsConfiguration;
60
+ /** Persisted/effective values grouped by Configuration document identity. */
61
+ values: EndgeConfigurationValues;
38
62
  }
63
+ /** Deep-readonly, SFC-visible effective configuration projection. */
64
+ export type EndgePublicConfigurationSnapshot = Readonly<Omit<EndgeConfiguration, 'vars' | 'diagnostics' | 'values'> & Record<string, unknown>>;
39
65
  export type EndgeValueOverride<T> = {
40
66
  op: 'set';
41
67
  value: T;
@@ -47,6 +73,14 @@ export interface EndgeSFCEditingConfigurationPatch {
47
73
  cancelOn?: EndgeValueOverride<ComponentSFCInteractionTrigger[]>;
48
74
  commitOn?: EndgeValueOverride<ComponentSFCInteractionTrigger[]>;
49
75
  }
76
+ /** Field-level tooltip overrides for one configuration cascade layer. */
77
+ export interface EndgeTooltipConfigurationPatch {
78
+ side?: EndgeValueOverride<EndgeTooltipSide>;
79
+ align?: EndgeValueOverride<EndgeTooltipAlign>;
80
+ openDelay?: EndgeValueOverride<number>;
81
+ closeDelay?: EndgeValueOverride<number>;
82
+ keyboard?: EndgeValueOverride<ComponentSFCInteractionKeyboardCondition>;
83
+ }
50
84
  export type EndgeCollectionPatchEntry<T> = {
51
85
  key: string;
52
86
  op: 'upsert';
@@ -66,12 +100,17 @@ export interface EndgeConfigurationPatch {
66
100
  fallbackLocale?: EndgeValueOverride<string>;
67
101
  themes?: EndgeCollectionPatch<EndgeThemeDefinition>;
68
102
  defaultTheme?: EndgeValueOverride<string>;
103
+ timezones?: EndgeCollectionPatch<EndgeTimezoneDefinition>;
104
+ defaultTimezone?: EndgeValueOverride<string>;
69
105
  defaultAuthProfileIdentity?: EndgeValueOverride<string>;
70
106
  sfcAdapterIds?: EndgeCollectionPatch<string>;
71
107
  defaultSfcAdapterId?: EndgeValueOverride<string>;
72
108
  sfcEditing?: EndgeSFCEditingConfigurationPatch;
109
+ tooltips?: EndgeTooltipConfigurationPatch;
73
110
  /** Локальный contribution diagnostics для текущего configuration layer. */
74
111
  diagnostics?: EndgeDiagnosticsConfigurationPatch;
112
+ /** Field-level overrides of source-backed Configuration values. */
113
+ values?: EndgeConfigurationValuePatch;
75
114
  }
76
115
  /** Patch локальной collection policy модуля диагностики. */
77
116
  export interface EndgeDiagnosticsCollectionPatch {
@@ -24,6 +24,7 @@ import { RStream } from '../../entities/reflect/RStream';
24
24
  import { RUpdate } from '../../entities/reflect/RUpdate';
25
25
  import { RMock } from '../../entities/reflect/RMock';
26
26
  import { RComputation } from '../../entities/reflect/RComputation';
27
+ import { RConfiguration } from '../../entities/reflect/RConfiguration';
27
28
  /**
28
29
  * Разновидности типов компонентов
29
30
  */
@@ -75,6 +76,7 @@ export declare enum DomainSectionType {
75
76
  Tenant = "tenant",
76
77
  Policy = "policy",
77
78
  Style = "style",
79
+ Configuration = "configuration",
78
80
  PageTemplate = "page-template",
79
81
  Page = "page",
80
82
  Navigation = "navigation",
@@ -86,7 +88,7 @@ export declare enum DomainSectionType {
86
88
  /**
87
89
  * Все возможные типы документов
88
90
  */
89
- export type DomainDocumentType = 'primitive' | 'type' | 'action' | 'converter' | 'computation' | 'data-view' | 'composition' | 'store' | 'stream' | 'update' | 'mock' | 'integration' | 'page-template' | 'page' | 'navigation' | 'environment' | 'policy' | 'style' | 'vocabs' | 'i18n-bundles' | 'auth-profile' | 'tenant' | 'project' | 'workspace' | Exclude<ComponentType, ComponentType.Component | ComponentType.Html> | QueryType | ParameterType | FilterType;
91
+ export type DomainDocumentType = 'primitive' | 'type' | 'action' | 'converter' | 'computation' | 'data-view' | 'composition' | 'store' | 'stream' | 'update' | 'mock' | 'integration' | 'page-template' | 'page' | 'navigation' | 'environment' | 'policy' | 'style' | 'configuration' | 'vocabs' | 'i18n-bundles' | 'auth-profile' | 'tenant' | 'project' | 'workspace' | Exclude<ComponentType, ComponentType.Component | ComponentType.Html> | QueryType | ParameterType | FilterType;
90
92
  /**
91
93
  * Описывает любой документ
92
94
  */
@@ -98,4 +100,4 @@ export interface Document {
98
100
  /**
99
101
  * Описывает любой документ рефлекцию
100
102
  */
101
- export type RDocument = RComponent | RComponentSFC | RQuery | RDataView | RComposition | RStore | RStream | RUpdate | RMock | RAction | RConverter | RComputation | RIntegration | RParameter | RFilter | RPolicy | RStyle | RType | RVocabs | RI18nBundle | RAuthProfile | RWorkspace | RTenant | RPageTemplate | RPage | RNavigation;
103
+ export type RDocument = RComponent | RComponentSFC | RQuery | RDataView | RComposition | RStore | RStream | RUpdate | RMock | RAction | RConverter | RComputation | RIntegration | RParameter | RFilter | RPolicy | RStyle | RConfiguration | RType | RVocabs | RI18nBundle | RAuthProfile | RWorkspace | RTenant | RPageTemplate | RPage | RNavigation;
@@ -26,6 +26,7 @@ export interface EndgeDomainPlain {
26
26
  tenants: unknown[];
27
27
  policies: unknown[];
28
28
  styles: unknown[];
29
+ configurations: unknown[];
29
30
  vocabs: unknown[];
30
31
  authProfiles: unknown[];
31
32
  i18nBundles: unknown[];
@@ -57,6 +58,7 @@ export interface EndgePortableDocuments {
57
58
  'auth-profiles': unknown[];
58
59
  navigations: unknown[];
59
60
  styles: unknown[];
61
+ configurations: unknown[];
60
62
  }
61
63
  export interface EndgeInstalledIntegrationExport {
62
64
  identity: string;
@@ -1,6 +1,6 @@
1
1
  import { EndgeLiveDomainSnapshot, EndgeLiveDomainDocument, EndgeWorkspaceServerState } from './domain-snapshot.type';
2
2
  /** Канонические коллекции persisted-домена нового backend. */
3
- export type EndgeDomainCollection = 'projects' | 'tenants' | 'environments' | 'folders' | 'types' | 'queries' | 'data-views' | 'compositions' | 'stores' | 'streams' | 'updates' | 'mocks' | 'components' | 'actions' | 'filters' | 'converters' | 'computations' | 'vocabs' | 'i18n-bundles' | 'auth-profiles' | 'navigations' | 'styles';
3
+ export type EndgeDomainCollection = 'projects' | 'tenants' | 'environments' | 'folders' | 'types' | 'queries' | 'data-views' | 'compositions' | 'stores' | 'streams' | 'updates' | 'mocks' | 'components' | 'actions' | 'filters' | 'converters' | 'computations' | 'vocabs' | 'i18n-bundles' | 'auth-profiles' | 'navigations' | 'styles' | 'configurations';
4
4
  /** Возможности выбранного источника домена. */
5
5
  export interface EndgeDomainProviderCapabilities {
6
6
  snapshot: true;
@@ -1,9 +1,10 @@
1
- import { EndgeConfiguration, EndgeLocaleDefinition, EndgeThemeDefinition, EndgeVariableDefinition } from '../configuration/configuration.type';
1
+ import { EndgeConfiguration, EndgeLocaleDefinition, EndgeThemeDefinition, EndgeTimezoneDefinition, EndgeVariableDefinition } from '../configuration/configuration.type';
2
2
  import { EntityManagement } from './entity-management.type';
3
3
  export type EndgeWorkspaceLocale = EndgeLocaleDefinition;
4
4
  export type EndgeDataMode = 'live' | 'mock';
5
5
  export type EndgeWorkspaceLocaleLabelMode = keyof Pick<EndgeWorkspaceLocale, 'displayName' | 'shortLabel'>;
6
6
  export type EndgeWorkspaceTheme = EndgeThemeDefinition;
7
+ export type EndgeWorkspaceTimezone = EndgeTimezoneDefinition;
7
8
  export type EndgeWorkspaceVar = EndgeVariableDefinition;
8
9
  export interface WorkspaceIntegrationReference {
9
10
  integrationId: string | number;
@@ -10,9 +10,10 @@ import { ProgramMetadata } from './program-metadata.types';
10
10
  import { ComputationProgramPayload } from '../computation/computation-program.types';
11
11
  import { EndgeStyleSheetArtifact } from '../style/style.types';
12
12
  import { ActionImplementation, ActionTargetSelector } from '../runtime/action.types';
13
+ export type { ConfigurationProgramPayload } from '../source/configuration-source.types';
13
14
  export type ProgramArtifactKey = string;
14
15
  /** Тип доменной сущности, для которой compiler может построить program artifact. */
15
- export type ProgramEntityType = 'type' | 'component-sfc' | 'computation' | 'action' | 'query' | 'data-view' | 'store' | 'stream' | 'update' | 'filter' | 'composition' | 'style';
16
+ export type ProgramEntityType = 'type' | 'component-sfc' | 'computation' | 'action' | 'query' | 'data-view' | 'store' | 'stream' | 'update' | 'filter' | 'composition' | 'style' | 'configuration';
16
17
  /** Итоговый статус artifact после компиляции и валидации. */
17
18
  export type ProgramArtifactStatus = 'valid' | 'warning' | 'error';
18
19
  /** Возможность, которую artifact предоставляет runtime/render слоям. */
@@ -136,7 +137,11 @@ export interface QueryProgramPayload {
136
137
  endpoint: QueryProgramRequestValue<string>;
137
138
  /** Тело запроса, GraphQL document или custom query expression. */
138
139
  query: QueryProgramRequestValue<string>;
139
- /** Заголовки REST query. */
140
+ /** GraphQL operation name, если artifact использует query-gql transport. */
141
+ operationName?: string;
142
+ /** Политика GraphQL errors в HTTP 2xx response. */
143
+ errorPolicy?: 'throw' | 'ignore';
144
+ /** HTTP headers Query transport. */
140
145
  headers?: QueryProgramRequestValue<Record<string, string>>;
141
146
  /** Auth config, подготовленный для runtime query layer. */
142
147
  auth?: QueryProgramRequestValue<unknown>;
@@ -148,6 +153,8 @@ export interface QueryProgramPayload {
148
153
  props: QueryProgramProp[];
149
154
  /** Безопасный request.body IR. При null отправляется пустой object payload. */
150
155
  requestBody: SourceExpressionIR | null;
156
+ /** Безопасный GraphQL variables IR. */
157
+ requestVariables?: SourceExpressionIR | null;
151
158
  /** Включены ли mock data для query. */
152
159
  mockDataEnabled?: boolean;
153
160
  /** Mock payload query. */
@@ -1,3 +1,4 @@
1
+ import { EndgePublicConfigurationSnapshot } from '../configuration/configuration.type';
1
2
  export type EndgePersistenceDriver = 'local' | 'disabled';
2
3
  export interface EndgePersistenceOptions {
3
4
  driver?: EndgePersistenceDriver;
@@ -13,6 +14,31 @@ export interface EndgeContextSnapshot {
13
14
  user: string | null;
14
15
  locale: string | null;
15
16
  theme: string | null;
17
+ timezone: string | null;
18
+ }
19
+ /** Volatile keyboard state supplied by the active UI adapter. */
20
+ export interface EndgeKeyboardContextSnapshot {
21
+ platform: 'macos' | 'windows' | 'linux' | 'unknown';
22
+ modifiers: {
23
+ ctrl: boolean;
24
+ shift: boolean;
25
+ alt: boolean;
26
+ meta: boolean;
27
+ mod: boolean;
28
+ altGraph: boolean;
29
+ };
30
+ held: {
31
+ key: string[];
32
+ code: string[];
33
+ };
34
+ }
35
+ /** Full read-only SFC context. Volatile input state is deliberately not serializable. */
36
+ export interface EndgeRuntimeContextSnapshot extends EndgeContextSnapshot {
37
+ /** Static effective configuration of the current build; never persisted or Raph-backed. */
38
+ config: EndgePublicConfigurationSnapshot;
39
+ input: {
40
+ keyboard: EndgeKeyboardContextSnapshot;
41
+ };
16
42
  }
17
43
  export interface EndgePersistenceScope {
18
44
  workspaceId: string;