@endge/core 2.0.0 → 2.0.2

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 (72) hide show
  1. package/dist/core.cjs +376 -287
  2. package/dist/core.js +22256 -19461
  3. package/dist/domain/entities/reflect/RConfiguration.d.ts +11 -0
  4. package/dist/domain/entities/runtime/hosts/ComponentSFCRuntimeHost.d.ts +3 -0
  5. package/dist/domain/types/auth/auth-profile.types.d.ts +17 -4
  6. package/dist/domain/types/component/sfc/dependencies.types.d.ts +14 -2
  7. package/dist/domain/types/component/sfc/intrinsic-events.types.d.ts +2 -0
  8. package/dist/domain/types/component/sfc/ir.types.d.ts +26 -6
  9. package/dist/domain/types/component/sfc/ports.types.d.ts +3 -1
  10. package/dist/domain/types/component/sfc/tag-attribute-contract.types.d.ts +11 -0
  11. package/dist/domain/types/component/sfc/tag-input-contract.types.d.ts +17 -0
  12. package/dist/domain/types/component/sfc/visual-projection.types.d.ts +99 -8
  13. package/dist/domain/types/configuration/configuration.type.d.ts +52 -7
  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/query.types.d.ts +1 -1
  18. package/dist/domain/types/document/workspace.types.d.ts +2 -3
  19. package/dist/domain/types/i18n.types.d.ts +2 -0
  20. package/dist/domain/types/kernel/events.types.d.ts +0 -3
  21. package/dist/domain/types/program/program.types.d.ts +9 -2
  22. package/dist/domain/types/runtime/action.types.d.ts +1 -0
  23. package/dist/domain/types/runtime/context-persistence.types.d.ts +27 -0
  24. package/dist/domain/types/source/configuration-source.types.d.ts +47 -0
  25. package/dist/domain/types/source/query-source.types.d.ts +36 -9
  26. package/dist/domain/types/source/source-engine.types.d.ts +34 -3
  27. package/dist/domain/types/source/stream-source.types.d.ts +2 -1
  28. package/dist/domain/types/ui/tooltip-markdown.types.d.ts +32 -0
  29. package/dist/main.d.ts +10 -0
  30. package/dist/model/config/kernel.config.d.ts +5 -1
  31. package/dist/model/config/sfc-editing.config.d.ts +3 -0
  32. package/dist/model/config/tooltip.config.d.ts +3 -0
  33. package/dist/model/config/ui-composition.config.d.ts +10 -10
  34. package/dist/model/kernel/endge.d.ts +2 -5
  35. package/dist/model/modules/context/endge-configuration-schema.d.ts +24 -0
  36. package/dist/model/modules/context/endge-configuration.d.ts +2 -0
  37. package/dist/model/modules/context/endge-context.d.ts +22 -1
  38. package/dist/model/modules/context/endge-vars.d.ts +4 -2
  39. package/dist/model/modules/context/endge-workspace.d.ts +11 -3
  40. package/dist/model/modules/context/persistence/RuntimeStateController.d.ts +7 -4
  41. package/dist/model/modules/domain/endge-domain.d.ts +20 -0
  42. package/dist/model/modules/program/endge-source.d.ts +4 -2
  43. package/dist/model/modules/runtime/core/endge-runtime.d.ts +3 -2
  44. package/dist/model/modules/runtime/execution/computation/ComputationResourceRegistry.d.ts +2 -0
  45. package/dist/model/modules/security/auth/adapters/OAuth2PasswordAuthAdapter.d.ts +11 -0
  46. package/dist/model/modules/ui/endge-ui.d.ts +0 -11
  47. package/dist/model/services/compiler/component-sfc/component-sfc-compile.d.ts +3 -0
  48. package/dist/model/services/compiler/component-sfc/component-sfc-template.d.ts +3 -0
  49. package/dist/model/services/configuration/configuration-value.d.ts +20 -0
  50. package/dist/model/services/configuration/endge-configuration.d.ts +3 -1
  51. package/dist/model/services/i18n/composition-i18n-catalog-projection.d.ts +19 -0
  52. package/dist/model/services/i18n/i18n-catalog.d.ts +3 -1
  53. package/dist/model/services/query/QueryExecutor.d.ts +3 -0
  54. package/dist/model/services/source-engine/compilers/configuration-source-compile.d.ts +4 -0
  55. package/dist/model/services/source-engine/component-sfc/component-sfc-table-source-patch.d.ts +2 -2
  56. package/dist/model/services/source-engine/composition-source-i18n-hints.d.ts +5 -0
  57. package/dist/model/services/source-engine/configuration-source-patch.d.ts +16 -0
  58. package/dist/model/services/source-engine/strategies/CompositionSourceLanguageStrategy.d.ts +1 -0
  59. package/dist/model/services/source-engine/strategies/ConfigurationSourceEngineStrategy.d.ts +7 -0
  60. package/dist/model/services/source-engine/strategies/ConfigurationSourceLanguageStrategy.d.ts +12 -0
  61. package/dist/model/services/source-engine/strategies/QuerySourceLanguageStrategy.d.ts +1 -1
  62. package/dist/model/services/source-engine/templates/configuration.default.source.d.ts +2 -0
  63. package/dist/model/services/source-engine/templates/query.default.source.d.ts +2 -0
  64. package/dist/model/services/source-engine/type-source-references.d.ts +3 -0
  65. package/dist/model/services/source-engine/type-source-serialize.d.ts +2 -1
  66. package/dist/model/services/tooltip/endge-tooltip-markdown.d.ts +5 -0
  67. package/dist/test/model/services/compiler/component-sfc/component-sfc-tooltip.test.d.ts +1 -0
  68. package/dist/test/model/services/source-engine/configuration-source.test.d.ts +1 -0
  69. package/dist/test/tooltip/endge-tooltip-markdown.test.d.ts +1 -0
  70. package/dist/tools/component-sfc-edit-trigger.d.ts +9 -1
  71. package/package.json +4 -4
  72. package/dist/model/modules/runtime/input/endge-sse.d.ts +0 -46
@@ -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
+ }
@@ -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;
@@ -1,4 +1,4 @@
1
- export type AuthProfileAdapterId = 'oidc' | 'oauth2-client-credentials' | 'basic' | 'bearer' | (string & {});
1
+ export type AuthProfileAdapterId = 'oidc' | 'oauth2-client-credentials' | 'oauth2-password' | 'basic' | 'bearer' | (string & {});
2
2
  export type AuthSessionStorage = 'localStorage' | 'sessionStorage' | 'memory';
3
3
  export interface AuthSessionPolicy {
4
4
  storage: AuthSessionStorage;
@@ -10,7 +10,7 @@ export interface AuthProfileConfig {
10
10
  export interface AuthProfileCredentials {
11
11
  [key: string]: string;
12
12
  }
13
- /** Persisted discriminated contract of the four built-in adapters. */
13
+ /** Persisted discriminated contract of the built-in adapters. */
14
14
  export interface AuthProfileBase {
15
15
  id: string;
16
16
  identity: string;
@@ -44,6 +44,19 @@ export interface OAuth2ClientCredentialsProfile extends AuthProfileBase {
44
44
  };
45
45
  session: AuthSessionPolicy;
46
46
  }
47
+ export interface OAuth2PasswordProfile extends AuthProfileBase {
48
+ adapterId: 'oauth2-password';
49
+ config: {
50
+ tokenEndpoint: string;
51
+ clientId: string;
52
+ scopes: string[];
53
+ };
54
+ credentials: {
55
+ username: string;
56
+ password: string;
57
+ };
58
+ session: AuthSessionPolicy;
59
+ }
47
60
  export interface BasicAuthProfile extends AuthProfileBase {
48
61
  adapterId: 'basic';
49
62
  config: Record<string, never>;
@@ -61,7 +74,7 @@ export interface BearerAuthProfile extends AuthProfileBase {
61
74
  };
62
75
  session?: never;
63
76
  }
64
- export type AuthProfile = OidcAuthProfile | OAuth2ClientCredentialsProfile | BasicAuthProfile | BearerAuthProfile;
77
+ export type AuthProfile = OidcAuthProfile | OAuth2ClientCredentialsProfile | OAuth2PasswordProfile | BasicAuthProfile | BearerAuthProfile;
65
78
  /** Runtime projection also accepts structurally validated registry extensions and legacy numeric IDs. */
66
79
  export interface AuthProfileSchema {
67
80
  id: string | number;
@@ -101,7 +114,7 @@ export type AuthRequestPolicy = {
101
114
  mode: 'inherit';
102
115
  } | {
103
116
  mode: 'profile';
104
- profileIdentity: string;
117
+ profile: string;
105
118
  };
106
119
  export interface AuthResolveOptions {
107
120
  forceRefresh?: boolean;
@@ -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[];
@@ -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;
@@ -133,8 +136,14 @@ export type ComponentSFCEditTriggerEvent = ComponentSFCInteractionTriggerEvent;
133
136
  export interface ComponentSFCEditableBehavior {
134
137
  value: RComponentSFC_IR_Value;
135
138
  triggers: RComponentSFC_IR_Value;
139
+ /** Triggers that discard the active draft. Defaults to Escape and focus leaving Editable. */
140
+ cancelTriggers: RComponentSFC_IR_Value;
141
+ /** Triggers that commit the active draft. Defaults to Enter. */
142
+ commitTriggers: RComponentSFC_IR_Value;
136
143
  /** Static suffix modifiers declared on `:edit-on`. */
137
144
  modifiers?: RComponentSFC_IR_EventModifier[];
145
+ cancelModifiers?: RComponentSFC_IR_EventModifier[];
146
+ commitModifiers?: RComponentSFC_IR_EventModifier[];
138
147
  }
139
148
  /** Нормализованное публичное событие завершённого редактирования. */
140
149
  export interface ComponentSFCEditedEventPayload<T = unknown> {
@@ -144,7 +153,7 @@ export interface ComponentSFCEditedEventPayload<T = unknown> {
144
153
  /** IR узел template после нормализации в Endge primitives. */
145
154
  export type RComponentSFC_IR_Node = RComponentSFC_IR_ElementNode | RComponentSFC_IR_TextNode | RComponentSFC_IR_ExpressionNode;
146
155
  /** Поддерживаемые v1 primitives нового SFC template. */
147
- 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';
148
157
  /** IR element-узел, который renderer-слои могут читать без знания исходного синтаксиса. */
149
158
  export interface RComponentSFC_IR_ElementNode {
150
159
  /** Стабильный id узла внутри IR. */
@@ -235,9 +244,20 @@ export interface RComponentSFC_IR_InteractionRule {
235
244
  reactions: ComponentSFCEventAction[];
236
245
  sourceRange?: RComponentSFC_SourceRange;
237
246
  }
247
+ /** One referenced TriggerSet paired with reactions that stay stable across context layers. */
248
+ export interface RComponentSFC_IR_InteractionTriggerSet {
249
+ triggers: RComponentSFC_IR_Value;
250
+ /** Event names supported by the source tag's compiled event surface. */
251
+ events: string[];
252
+ modifiers: RComponentSFC_IR_EventModifier[];
253
+ reactions: ComponentSFCEventAction[];
254
+ sourceRange?: RComponentSFC_SourceRange;
255
+ }
238
256
  /** One `:on` annotation. Rules inside the group use first-match-wins semantics. */
239
257
  export interface RComponentSFC_IR_InteractionGroup {
240
258
  rules: RComponentSFC_IR_InteractionRule[];
259
+ /** Optional context-backed TriggerSet form `{ triggers, reaction }`. */
260
+ triggerSet?: RComponentSFC_IR_InteractionTriggerSet;
241
261
  sourceRange?: RComponentSFC_SourceRange;
242
262
  }
243
263
  /** IR текстовый узел. */
@@ -295,8 +315,8 @@ export interface RComponentSFC_IR_VocabRead {
295
315
  }
296
316
  /** Реактивное чтение, найденное внутри выражения. */
297
317
  export interface RComponentSFC_IR_Read {
298
- /** Источник чтения: props, Raph/store или локальный binding. */
299
- source: 'props' | 'raph' | 'local';
318
+ /** Источник чтения: props, Raph/store, context или локальный binding. */
319
+ source: 'props' | 'raph' | 'context' | 'local';
300
320
  /** Нормализованный путь чтения. */
301
321
  path: string[];
302
322
  /** Исходный текст чтения. */
@@ -112,10 +112,12 @@ export interface ComponentSFCEventSource {
112
112
  ref: string;
113
113
  event: string;
114
114
  }
115
- /** Renderer-neutral value mapped from an Event payload into Action input. */
115
+ /** Renderer-neutral safe expression mapped into an Event reaction input. */
116
116
  export type ComponentSFCEventInputValue = {
117
117
  kind: 'event';
118
118
  path: string | null;
119
+ } | {
120
+ kind: 'now';
119
121
  } | {
120
122
  kind: 'scope';
121
123
  path: string;
@@ -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[];
@@ -173,6 +173,23 @@ export declare const ENDGE_SFC_TAG_INPUT_CONTRACTS: {
173
173
  readonly type: "boolean";
174
174
  readonly optional: true;
175
175
  }];
176
+ readonly Tooltip: readonly [{
177
+ readonly name: "text";
178
+ readonly type: "string";
179
+ readonly optional: true;
180
+ }, {
181
+ readonly name: "markdown";
182
+ readonly type: "string";
183
+ readonly optional: true;
184
+ }, {
185
+ readonly name: "openDelay";
186
+ readonly type: "number";
187
+ readonly optional: true;
188
+ }, {
189
+ readonly name: "closeDelay";
190
+ readonly type: "number";
191
+ readonly optional: true;
192
+ }];
176
193
  };
177
194
  /** Возвращает публичные data-входы встроенного SFC tag. */
178
195
  export declare function getComponentSFCTagInputContract(tag: RComponentSFC_IR_Tag): readonly ComponentSFCTagInputContract[];
@@ -1,5 +1,6 @@
1
1
  import { RComponentDiagnostic } from '../component-core.types';
2
2
  import { TypeSourceDefinition } from '../../source/type-source.types';
3
+ import { EndgeSFCEditingConfiguration } from '../../configuration/configuration.type';
3
4
  import { RComponentSFC_IR_Tag } from './ir.types';
4
5
  import { RComponentSFC_SourceRange } from './location.types';
5
6
  /** Значение SFC source, подготовленное для безопасного отображения в visual editor. */
@@ -23,8 +24,8 @@ export interface ComponentSFCVisualAttribute {
23
24
  export type ComponentSFCTableCellBindingProjection = ComponentSFCVisualAttribute;
24
25
  export type ComponentSFCTableCellInteractionModifier = 'ctrl' | 'shift' | 'alt' | 'meta' | 'mod' | 'altGraph' | 'exact';
25
26
  export type ComponentSFCTableCellInteractionFlag = 'stop' | 'prevent' | 'self' | 'once' | 'capture' | 'passive';
26
- /** Visual-editor-safe projection of one static Cell `:on` rule. */
27
- export interface ComponentSFCTableCellInteractionRuleProjection {
27
+ /** UI-neutral projection одного статически разбираемого trigger взаимодействия. */
28
+ export interface ComponentSFCInteractionTriggerProjection {
28
29
  event: string;
29
30
  key: string[];
30
31
  code: string[];
@@ -39,9 +40,12 @@ export interface ComponentSFCTableCellInteractionRuleProjection {
39
40
  composing: boolean | null;
40
41
  button: number | null;
41
42
  flags: Partial<Record<ComponentSFCTableCellInteractionFlag, boolean>>;
43
+ }
44
+ /** UI-neutral projection одного статически разбираемого правила Cell `:on`. */
45
+ export interface ComponentSFCTableCellInteractionRuleProjection extends ComponentSFCInteractionTriggerProjection {
42
46
  reactionSource: string;
43
47
  }
44
- /** Source-preserving Cell interaction read-model used by the Table visual editor. */
48
+ /** Source-preserving read-model взаимодействий Cell для visual editor таблицы. */
45
49
  export interface ComponentSFCTableCellInteractionsProjection {
46
50
  editable: boolean;
47
51
  rules: ComponentSFCTableCellInteractionRuleProjection[];
@@ -49,19 +53,65 @@ export interface ComponentSFCTableCellInteractionsProjection {
49
53
  sourceRange?: RComponentSFC_SourceRange;
50
54
  message?: string;
51
55
  }
56
+ /** Source-backed локальная reaction одного semantic Event. */
57
+ export interface ComponentSFCEventReactionProjection {
58
+ editable: boolean;
59
+ source: string | null;
60
+ suffixes: ComponentSFCTableCellInteractionFlag[];
61
+ sourceRange?: RComponentSFC_SourceRange;
62
+ message?: string;
63
+ }
64
+ export interface ComponentSFCEditOutcomeProjection {
65
+ editable: boolean;
66
+ triggers: ComponentSFCInteractionTriggerProjection[];
67
+ usesDefault: boolean;
68
+ suffixes: ComponentSFCTableCellInteractionFlag[];
69
+ message?: string;
70
+ }
71
+ export type ComponentSFCTableVisualCellSyntax = 'cell' | 'direct' | 'editable-default' | 'editable-edit';
72
+ export type ComponentSFCTableEditableElementProjection = {
73
+ kind: 'component';
74
+ identity: string | null;
75
+ syntax: ComponentSFCTableVisualCellSyntax;
76
+ bindings: ComponentSFCTableCellBindingProjection[];
77
+ } | {
78
+ kind: 'tag';
79
+ tag: ComponentSFCTableVisualCellTag;
80
+ syntax: ComponentSFCTableVisualCellSyntax;
81
+ bindings: ComponentSFCTableCellBindingProjection[];
82
+ } | {
83
+ kind: 'source';
84
+ };
85
+ /** Source-backed editable-поведение единственного управляемого корня ячейки Table. */
86
+ export interface ComponentSFCTableCellEditingProjection {
87
+ editable: boolean;
88
+ enabled: boolean;
89
+ mode: 'primitive' | 'custom' | 'component' | 'source' | 'unavailable';
90
+ tag: string | null;
91
+ triggers: ComponentSFCInteractionTriggerProjection[];
92
+ usesDefaultTrigger: boolean;
93
+ suffixes: ComponentSFCTableCellInteractionFlag[];
94
+ reaction: ComponentSFCEventReactionProjection;
95
+ cancel: ComponentSFCEditOutcomeProjection;
96
+ commit: ComponentSFCEditOutcomeProjection;
97
+ editor: ComponentSFCTableEditableElementProjection | null;
98
+ editorImplicit: boolean;
99
+ sourceRange?: RComponentSFC_SourceRange;
100
+ message?: string;
101
+ }
52
102
  /** Способ, которым содержимое ячейки представлено в простом visual editor. */
53
- export type ComponentSFCTableVisualCellTag = Exclude<RComponentSFC_IR_Tag, 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator'>;
103
+ export type ComponentSFCTableVisualCellTag = Exclude<RComponentSFC_IR_Tag, 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator' | 'Editable' | 'Variant'>;
54
104
  export type ComponentSFCTableCellProjection = {
55
105
  kind: 'default';
56
106
  } | {
57
107
  kind: 'component';
58
108
  identity: string | null;
59
- syntax: 'cell' | 'direct';
109
+ syntax: ComponentSFCTableVisualCellSyntax;
60
110
  bindings: ComponentSFCTableCellBindingProjection[];
61
111
  } | {
62
112
  kind: 'tag';
63
113
  tag: ComponentSFCTableVisualCellTag;
64
- syntax: 'cell' | 'direct';
114
+ syntax: ComponentSFCTableVisualCellSyntax;
65
115
  bindings: ComponentSFCTableCellBindingProjection[];
66
116
  } | {
67
117
  kind: 'source';
@@ -72,6 +122,8 @@ export interface ComponentSFCVisualInspectionOptions {
72
122
  resolveTypeDefinition?: (identity: string) => TypeSourceDefinition | null;
73
123
  /** Direct Action identities available to source-authored MenuItem bindings. */
74
124
  actionIdentities?: Iterable<string>;
125
+ /** Effective editing defaults текущего compiler context. */
126
+ sfcEditing?: EndgeSFCEditingConfiguration;
75
127
  }
76
128
  /** Visual read-model одной прямой Column внутри корневого Table. */
77
129
  export interface ComponentSFCTableColumnProjection {
@@ -86,6 +138,7 @@ export interface ComponentSFCTableColumnProjection {
86
138
  pinnable: ComponentSFCVisualSourceValue | null;
87
139
  attributes: ComponentSFCVisualAttribute[];
88
140
  cell: ComponentSFCTableCellProjection;
141
+ editing: ComponentSFCTableCellEditingProjection;
89
142
  interactions: ComponentSFCTableCellInteractionsProjection;
90
143
  hasCustomCell: boolean;
91
144
  cellSource: string | null;
@@ -143,12 +196,12 @@ export type ComponentSFCTableSourcePatch = {
143
196
  type: 'set-column-component';
144
197
  columnIndex: number;
145
198
  identity: string | null;
146
- syntax?: 'cell' | 'direct';
199
+ syntax?: ComponentSFCTableVisualCellSyntax;
147
200
  } | {
148
201
  type: 'set-column-tag';
149
202
  columnIndex: number;
150
203
  tag: ComponentSFCTableVisualCellTag | null;
151
- syntax?: 'cell' | 'direct';
204
+ syntax?: ComponentSFCTableVisualCellSyntax;
152
205
  } | {
153
206
  type: 'set-column-cell-attribute';
154
207
  columnIndex: number;
@@ -160,6 +213,44 @@ export type ComponentSFCTableSourcePatch = {
160
213
  columnIndex: number;
161
214
  /** Complete object/array expression, or null to remove the annotation. */
162
215
  value: string | null;
216
+ } | {
217
+ type: 'set-column-cell-editable';
218
+ columnIndex: number;
219
+ enabled: boolean;
220
+ } | {
221
+ type: 'set-column-cell-edit-triggers';
222
+ columnIndex: number;
223
+ /** Empty list restores the implicit click trigger and removes edit-on from Source. */
224
+ triggers: ComponentSFCInteractionTriggerProjection[];
225
+ } | {
226
+ type: 'set-column-cell-edited-reaction';
227
+ columnIndex: number;
228
+ /** Complete local reaction expression, or null to remove @edited. */
229
+ value: string | null;
230
+ } | {
231
+ type: 'set-column-cell-cancel-triggers';
232
+ columnIndex: number;
233
+ /** Null inherits effective configuration; an empty list explicitly disables automatic cancellation. */
234
+ triggers: ComponentSFCInteractionTriggerProjection[] | null;
235
+ } | {
236
+ type: 'set-column-cell-commit-triggers';
237
+ columnIndex: number;
238
+ /** Null inherits effective configuration; an empty list explicitly disables automatic commit. */
239
+ triggers: ComponentSFCInteractionTriggerProjection[] | null;
240
+ } | {
241
+ type: 'set-column-cell-editor-component';
242
+ columnIndex: number;
243
+ identity: string;
244
+ } | {
245
+ type: 'set-column-cell-editor-tag';
246
+ columnIndex: number;
247
+ tag: ComponentSFCTableVisualCellTag;
248
+ } | {
249
+ type: 'set-column-cell-editor-attribute';
250
+ columnIndex: number;
251
+ name: string;
252
+ value: string | null;
253
+ valueKind: 'expression' | 'literal';
163
254
  } | {
164
255
  type: 'set-menu-mode';
165
256
  menu: ComponentSFCTableVisualMenuKind;
@@ -1,5 +1,9 @@
1
+ import { ComponentSFCInteractionKeyboardCondition, ComponentSFCInteractionTrigger } from '../component/sfc/ir.types';
1
2
  import { DiagnosticsSeverityNumber, DiagnosticsSignal, EndgeDiagnosticsOutputConfiguration, EndgeDiagnosticsConfiguration, EndgeDiagnosticsRoute } from '../diagnostics/diagnostics.types';
2
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>>>;
3
7
  export interface EndgeLocaleDefinition {
4
8
  code: string;
5
9
  displayName: string;
@@ -10,37 +14,73 @@ export interface EndgeThemeDefinition {
10
14
  identity: string;
11
15
  displayName: string;
12
16
  }
13
- export type EndgeSSEAuthMode = 'inherit' | 'profile' | 'none';
17
+ export interface EndgeTimezoneDefinition {
18
+ identity: string;
19
+ displayName: string;
20
+ }
14
21
  export interface EndgeVariableDefinition {
15
22
  name: string;
16
23
  defaultValue: string;
17
24
  }
18
- export interface EndgeSSEConfiguration {
19
- url: string;
20
- authMode?: EndgeSSEAuthMode;
21
- authProfileIdentity?: string | null;
25
+ /** Effective defaults завершения одной SFC edit session. */
26
+ export interface EndgeSFCEditingConfiguration {
27
+ cancelOn: ComponentSFCInteractionTrigger[];
28
+ commitOn: ComponentSFCInteractionTrigger[];
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;
22
40
  }
23
41
  /** Полная конфигурация, с которой компилируется один Endge context. */
24
42
  export interface EndgeConfiguration {
25
43
  vars: EndgeVariableDefinition[];
26
- sse?: EndgeSSEConfiguration;
27
44
  locales: EndgeLocaleDefinition[];
28
45
  defaultLocale: string;
29
46
  fallbackLocale: string;
30
47
  themes: EndgeThemeDefinition[];
31
48
  defaultTheme: string;
49
+ timezones: EndgeTimezoneDefinition[];
50
+ defaultTimezone: string;
32
51
  defaultAuthProfileIdentity: string | null;
33
52
  sfcAdapterIds: string[];
34
53
  defaultSfcAdapterId: string;
54
+ /** Effective triggers, которые наследуют editable-узлы без локальных атрибутов. */
55
+ sfcEditing: EndgeSFCEditingConfiguration;
56
+ /** Effective tooltip behavior. Visual styling is owned by CSS and adapter hooks. */
57
+ tooltips: EndgeTooltipConfiguration;
35
58
  /** Настройки telemetry, output adapters, routing и snapshots. */
36
59
  diagnostics: EndgeDiagnosticsConfiguration;
60
+ /** Persisted/effective values grouped by Configuration document identity. */
61
+ values: EndgeConfigurationValues;
37
62
  }
63
+ /** Deep-readonly, SFC-visible effective configuration projection. */
64
+ export type EndgePublicConfigurationSnapshot = Readonly<Omit<EndgeConfiguration, 'vars' | 'diagnostics' | 'values'> & Record<string, unknown>>;
38
65
  export type EndgeValueOverride<T> = {
39
66
  op: 'set';
40
67
  value: T;
41
68
  } | {
42
69
  op: 'remove';
43
70
  };
71
+ /** Независимые override-операции SFC editing для одного configuration layer. */
72
+ export interface EndgeSFCEditingConfigurationPatch {
73
+ cancelOn?: EndgeValueOverride<ComponentSFCInteractionTrigger[]>;
74
+ commitOn?: EndgeValueOverride<ComponentSFCInteractionTrigger[]>;
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
+ }
44
84
  export type EndgeCollectionPatchEntry<T> = {
45
85
  key: string;
46
86
  op: 'upsert';
@@ -55,17 +95,22 @@ export interface EndgeCollectionPatch<T> {
55
95
  /** Локальные операции inherit-слоя. Отсутствующее поле наследуется без изменений. */
56
96
  export interface EndgeConfigurationPatch {
57
97
  vars?: EndgeCollectionPatch<EndgeVariableDefinition>;
58
- sse?: EndgeValueOverride<EndgeSSEConfiguration>;
59
98
  locales?: EndgeCollectionPatch<EndgeLocaleDefinition>;
60
99
  defaultLocale?: EndgeValueOverride<string>;
61
100
  fallbackLocale?: EndgeValueOverride<string>;
62
101
  themes?: EndgeCollectionPatch<EndgeThemeDefinition>;
63
102
  defaultTheme?: EndgeValueOverride<string>;
103
+ timezones?: EndgeCollectionPatch<EndgeTimezoneDefinition>;
104
+ defaultTimezone?: EndgeValueOverride<string>;
64
105
  defaultAuthProfileIdentity?: EndgeValueOverride<string>;
65
106
  sfcAdapterIds?: EndgeCollectionPatch<string>;
66
107
  defaultSfcAdapterId?: EndgeValueOverride<string>;
108
+ sfcEditing?: EndgeSFCEditingConfigurationPatch;
109
+ tooltips?: EndgeTooltipConfigurationPatch;
67
110
  /** Локальный contribution diagnostics для текущего configuration layer. */
68
111
  diagnostics?: EndgeDiagnosticsConfigurationPatch;
112
+ /** Field-level overrides of source-backed Configuration values. */
113
+ values?: EndgeConfigurationValuePatch;
69
114
  }
70
115
  /** Patch локальной collection policy модуля диагностики. */
71
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;
@@ -2,7 +2,7 @@ export type RQueryAuthMode = 'none' | 'inherit' | 'profile';
2
2
  export interface RQueryAuth {
3
3
  mode: RQueryAuthMode;
4
4
  /** Identity auth-profile для mode=profile. */
5
- profileIdentity?: string;
5
+ profile?: string;
6
6
  /** Схема для заголовка (по умолчанию "Bearer"). */
7
7
  scheme?: string;
8
8
  /** Имя заголовка (по умолчанию "Authorization"). */
@@ -1,12 +1,11 @@
1
- import { EndgeConfiguration, EndgeLocaleDefinition, EndgeSSEAuthMode, EndgeSSEConfiguration, 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 EndgeWorkspaceSSEAuthMode = EndgeSSEAuthMode;
7
+ export type EndgeWorkspaceTimezone = EndgeTimezoneDefinition;
8
8
  export type EndgeWorkspaceVar = EndgeVariableDefinition;
9
- export type EndgeWorkspaceSSEConfig = EndgeSSEConfiguration;
10
9
  export interface WorkspaceIntegrationReference {
11
10
  integrationId: string | number;
12
11
  integrationIdentity: string;