@arkcit/engine-render-layer 0.3.0

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.
@@ -0,0 +1,185 @@
1
+ import { ResolvedNodeChildDescriptor, ResolvedNodeContentDescriptor, ResolvedNodeBase, ResolvedNode } from '@arkcit/engine-core';
2
+ import { UINode } from '@arkcit/engine-schema';
3
+ import { UIRuntime } from '@arkcit/engine-runtime';
4
+
5
+ declare const resolveChildContentDescriptor: ({ childDescriptors, }: {
6
+ childDescriptors: ResolvedNodeChildDescriptor[];
7
+ }) => ResolvedNodeContentDescriptor;
8
+
9
+ declare const resolveChildDescriptors: ({ node, internalStudioNodeTypes, }: {
10
+ node: UINode;
11
+ internalStudioNodeTypes: Set<string>;
12
+ }) => ResolvedNodeChildDescriptor[];
13
+
14
+ type CoverContentDescriptor = {
15
+ actionNodes: UINode[];
16
+ contentNodes: UINode[];
17
+ };
18
+ declare const resolveCoverContentDescriptor: ({ rawChildren, }: {
19
+ rawChildren: UINode[];
20
+ }) => CoverContentDescriptor;
21
+
22
+ type ButtonTogglePlan = {
23
+ kind: "button-toggle";
24
+ disableOnClick: boolean;
25
+ };
26
+ type FormFieldPlan = {
27
+ kind: "form-field";
28
+ };
29
+ type StudioFormPlan = {
30
+ kind: "studio-form";
31
+ visibleChildren: UINode[];
32
+ };
33
+ type CoverContentPlan = {
34
+ kind: "cover-content";
35
+ rawChildren: UINode[];
36
+ descriptor: CoverContentDescriptor;
37
+ };
38
+ type ScrollRevealPlan = {
39
+ kind: "scroll-reveal";
40
+ rawChildren: UINode[];
41
+ };
42
+ type ContentCompositionPlan = ButtonTogglePlan | FormFieldPlan | StudioFormPlan | CoverContentPlan | ScrollRevealPlan;
43
+ declare const resolveContentCompositionPlan: ({ node, isStudioRendererContext, internalStudioNodeTypes, }: {
44
+ node: UINode;
45
+ isStudioRendererContext: boolean;
46
+ internalStudioNodeTypes: Set<string>;
47
+ }) => ContentCompositionPlan[];
48
+
49
+ type StyleSizingPlan = {
50
+ kind: "style-sizing";
51
+ style: Record<string, unknown>;
52
+ };
53
+ type ConfigureStudioLinkPlan = {
54
+ kind: "configure-studio-link";
55
+ };
56
+ type CleanupStudioPropsPlan = {
57
+ kind: "cleanup-studio-props";
58
+ };
59
+ type TableFallbackPlan = {
60
+ kind: "table-fallback";
61
+ };
62
+ type FinalRenderPlan = StyleSizingPlan | ConfigureStudioLinkPlan | CleanupStudioPropsPlan | TableFallbackPlan;
63
+ declare const resolveFinalRenderPlan: ({ node, componentProps, isStudioRendererContext, studioSizing, }: {
64
+ node: UINode;
65
+ componentProps: Record<string, unknown>;
66
+ isStudioRendererContext: boolean;
67
+ studioSizing?: {
68
+ widthPct: number | null;
69
+ heightPct: number | null;
70
+ heightPx: number | null;
71
+ };
72
+ }) => FinalRenderPlan[];
73
+
74
+ declare const resolveNodeBase: ({ node, runtime, internalStudioNodeTypes, }: {
75
+ node: UINode;
76
+ runtime: UIRuntime;
77
+ internalStudioNodeTypes: Set<string>;
78
+ }) => ResolvedNodeBase;
79
+
80
+ type AccordionItemDescriptor = {
81
+ id: string;
82
+ title: string;
83
+ disabled: boolean;
84
+ contentKind: "text" | "nodes";
85
+ contentText: string | null;
86
+ contentNodes: UINode[];
87
+ };
88
+ type ExpandablePanelContentDescriptor = {
89
+ kind: "empty" | "nodes";
90
+ nodes: UINode[];
91
+ };
92
+ declare const resolveAccordionItemDescriptors: ({ accordionChildren, }: {
93
+ accordionChildren: UINode[];
94
+ }) => AccordionItemDescriptor[];
95
+ declare const resolveExpandablePanelContentDescriptor: ({ panelChildren, }: {
96
+ panelChildren: UINode[];
97
+ }) => ExpandablePanelContentDescriptor;
98
+
99
+ type TabsContentDescriptor = {
100
+ id: string;
101
+ title: unknown;
102
+ label: unknown;
103
+ contentKind: "nodes" | "fallback";
104
+ contentNodes: UINode[];
105
+ fallbackContent: unknown;
106
+ };
107
+ declare const resolveTabsContentDescriptors: ({ tabItems, rawChildren, runtime, }: {
108
+ tabItems: Array<Record<string, unknown>>;
109
+ rawChildren: UINode[];
110
+ runtime: UIRuntime;
111
+ }) => TabsContentDescriptor[];
112
+
113
+ type FormWizardPlan = {
114
+ kind: "form-wizard";
115
+ };
116
+ type AccordionPlan = {
117
+ kind: "accordion";
118
+ accordionChildren: UINode[];
119
+ itemDescriptors: AccordionItemDescriptor[];
120
+ };
121
+ type ExpandablePanelPlan = {
122
+ kind: "expandable-panel";
123
+ panelChildren: UINode[];
124
+ contentDescriptor: ExpandablePanelContentDescriptor;
125
+ };
126
+ type TabsPlan = {
127
+ kind: "tabs";
128
+ normalizedComponentProps: Record<string, unknown>;
129
+ rawChildren: UINode[];
130
+ tabDescriptors: TabsContentDescriptor[];
131
+ };
132
+ type NavigationCompositionPlan = FormWizardPlan | AccordionPlan | ExpandablePanelPlan | TabsPlan;
133
+ declare const resolveNavigationCompositionPlan: ({ node, componentProps, internalStudioNodeTypes, runtime, }: {
134
+ node: UINode;
135
+ componentProps: Record<string, unknown>;
136
+ internalStudioNodeTypes: Set<string>;
137
+ runtime: UIRuntime;
138
+ }) => NavigationCompositionPlan[];
139
+
140
+ type RowColumnBindingDirective = {
141
+ kind: "rows-columns-binding";
142
+ rowsBindingKey: string;
143
+ columnsBindingKey: string;
144
+ };
145
+ type ObjectBindingDirective = {
146
+ kind: "object-binding";
147
+ bindingKey: string;
148
+ };
149
+ type TranslationBindingDirective = {
150
+ kind: "decode-translation-binding";
151
+ tagContentTranslationKey: string;
152
+ tagContentTranslationValue: string;
153
+ hrefTranslationKey: string;
154
+ hrefTranslationValue: string;
155
+ };
156
+ type CoverMediaDirective = {
157
+ kind: "cover-media";
158
+ mediaSource: string;
159
+ mediaSrc: string;
160
+ mediaAlt: string;
161
+ };
162
+ type FilterRowsDirective = {
163
+ kind: "filter-rows-by-query";
164
+ nodeId: string;
165
+ };
166
+ type RenderDirectivePlan = RowColumnBindingDirective | ObjectBindingDirective | TranslationBindingDirective | CoverMediaDirective | FilterRowsDirective;
167
+ declare const resolveRenderDirectivePlan: ({ node, renderBindingProps, }: {
168
+ node: UINode;
169
+ renderBindingProps: Record<string, unknown>;
170
+ }) => RenderDirectivePlan[];
171
+
172
+ type ResolvedEngineNode = ResolvedNode<ContentCompositionPlan, NavigationCompositionPlan, RenderDirectivePlan, FinalRenderPlan>;
173
+ declare const resolveResolvedNode: ({ node, runtime, internalStudioNodeTypes, isStudioRendererContext, studioSizing, }: {
174
+ node: UINode;
175
+ runtime: UIRuntime;
176
+ internalStudioNodeTypes: Set<string>;
177
+ isStudioRendererContext: boolean;
178
+ studioSizing?: {
179
+ widthPct: number | null;
180
+ heightPct: number | null;
181
+ heightPx: number | null;
182
+ };
183
+ }) => ResolvedEngineNode;
184
+
185
+ export { type AccordionItemDescriptor, type ContentCompositionPlan, type CoverContentDescriptor, type ExpandablePanelContentDescriptor, type FinalRenderPlan, type NavigationCompositionPlan, type RenderDirectivePlan, type ResolvedEngineNode, type TabsContentDescriptor, resolveAccordionItemDescriptors, resolveChildContentDescriptor, resolveChildDescriptors, resolveContentCompositionPlan, resolveCoverContentDescriptor, resolveExpandablePanelContentDescriptor, resolveFinalRenderPlan, resolveNavigationCompositionPlan, resolveNodeBase, resolveRenderDirectivePlan, resolveResolvedNode, resolveTabsContentDescriptors };