@solidtv/solid 1.0.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.
Files changed (237) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +95 -0
  4. package/dist/jsx-runtime.d.ts +14 -0
  5. package/dist/src/activeElement.d.ts +2 -0
  6. package/dist/src/activeElement.js +3 -0
  7. package/dist/src/activeElement.js.map +1 -0
  8. package/dist/src/core/config.d.ts +51 -0
  9. package/dist/src/core/config.js +37 -0
  10. package/dist/src/core/config.js.map +1 -0
  11. package/dist/src/core/dom-renderer/domRenderer.d.ts +138 -0
  12. package/dist/src/core/dom-renderer/domRenderer.js +1844 -0
  13. package/dist/src/core/dom-renderer/domRenderer.js.map +1 -0
  14. package/dist/src/core/dom-renderer/domRendererTypes.d.ts +110 -0
  15. package/dist/src/core/dom-renderer/domRendererTypes.js +2 -0
  16. package/dist/src/core/dom-renderer/domRendererTypes.js.map +1 -0
  17. package/dist/src/core/dom-renderer/domRendererUtils.d.ts +23 -0
  18. package/dist/src/core/dom-renderer/domRendererUtils.js +232 -0
  19. package/dist/src/core/dom-renderer/domRendererUtils.js.map +1 -0
  20. package/dist/src/core/elementNode.d.ts +508 -0
  21. package/dist/src/core/elementNode.js +928 -0
  22. package/dist/src/core/elementNode.js.map +1 -0
  23. package/dist/src/core/flex.d.ts +2 -0
  24. package/dist/src/core/flex.js +284 -0
  25. package/dist/src/core/flex.js.map +1 -0
  26. package/dist/src/core/flexLayout.d.ts +2 -0
  27. package/dist/src/core/flexLayout.js +360 -0
  28. package/dist/src/core/flexLayout.js.map +1 -0
  29. package/dist/src/core/focusKeyTypes.d.ts +42 -0
  30. package/dist/src/core/focusKeyTypes.js +2 -0
  31. package/dist/src/core/focusKeyTypes.js.map +1 -0
  32. package/dist/src/core/focusManager.d.ts +13 -0
  33. package/dist/src/core/focusManager.js +270 -0
  34. package/dist/src/core/focusManager.js.map +1 -0
  35. package/dist/src/core/index.d.ts +14 -0
  36. package/dist/src/core/index.js +11 -0
  37. package/dist/src/core/index.js.map +1 -0
  38. package/dist/src/core/intrinsicTypes.d.ts +106 -0
  39. package/dist/src/core/intrinsicTypes.js +2 -0
  40. package/dist/src/core/intrinsicTypes.js.map +1 -0
  41. package/dist/src/core/lightningInit.d.ts +9 -0
  42. package/dist/src/core/lightningInit.js +34 -0
  43. package/dist/src/core/lightningInit.js.map +1 -0
  44. package/dist/src/core/nodeTypes.d.ts +6 -0
  45. package/dist/src/core/nodeTypes.js +6 -0
  46. package/dist/src/core/nodeTypes.js.map +1 -0
  47. package/dist/src/core/shaders.d.ts +52 -0
  48. package/dist/src/core/shaders.js +86 -0
  49. package/dist/src/core/shaders.js.map +1 -0
  50. package/dist/src/core/states.d.ts +12 -0
  51. package/dist/src/core/states.js +84 -0
  52. package/dist/src/core/states.js.map +1 -0
  53. package/dist/src/core/utils.d.ts +39 -0
  54. package/dist/src/core/utils.js +164 -0
  55. package/dist/src/core/utils.js.map +1 -0
  56. package/dist/src/devtools/index.d.ts +6 -0
  57. package/dist/src/devtools/index.js +65 -0
  58. package/dist/src/devtools/index.js.map +1 -0
  59. package/dist/src/index.d.ts +9 -0
  60. package/dist/src/index.js +7 -0
  61. package/dist/src/index.js.map +1 -0
  62. package/dist/src/primitives/Column.d.ts +3 -0
  63. package/dist/src/primitives/Column.jsx +25 -0
  64. package/dist/src/primitives/Column.jsx.map +1 -0
  65. package/dist/src/primitives/FPSCounter.d.ts +4 -0
  66. package/dist/src/primitives/FPSCounter.jsx +188 -0
  67. package/dist/src/primitives/FPSCounter.jsx.map +1 -0
  68. package/dist/src/primitives/FadeInOut.d.ts +18 -0
  69. package/dist/src/primitives/FadeInOut.jsx +39 -0
  70. package/dist/src/primitives/FadeInOut.jsx.map +1 -0
  71. package/dist/src/primitives/Grid.d.ts +23 -0
  72. package/dist/src/primitives/Grid.jsx +100 -0
  73. package/dist/src/primitives/Grid.jsx.map +1 -0
  74. package/dist/src/primitives/Image.d.ts +8 -0
  75. package/dist/src/primitives/Image.jsx +42 -0
  76. package/dist/src/primitives/Image.jsx.map +1 -0
  77. package/dist/src/primitives/KeepAlive.d.ts +42 -0
  78. package/dist/src/primitives/KeepAlive.jsx +160 -0
  79. package/dist/src/primitives/KeepAlive.jsx.map +1 -0
  80. package/dist/src/primitives/Lazy.d.ts +15 -0
  81. package/dist/src/primitives/Lazy.jsx +95 -0
  82. package/dist/src/primitives/Lazy.jsx.map +1 -0
  83. package/dist/src/primitives/LazyImport.d.ts +8 -0
  84. package/dist/src/primitives/LazyImport.js +40 -0
  85. package/dist/src/primitives/LazyImport.js.map +1 -0
  86. package/dist/src/primitives/Marquee.d.ts +64 -0
  87. package/dist/src/primitives/Marquee.jsx +86 -0
  88. package/dist/src/primitives/Marquee.jsx.map +1 -0
  89. package/dist/src/primitives/Preserve.d.ts +4 -0
  90. package/dist/src/primitives/Preserve.jsx +11 -0
  91. package/dist/src/primitives/Preserve.jsx.map +1 -0
  92. package/dist/src/primitives/Row.d.ts +3 -0
  93. package/dist/src/primitives/Row.jsx +24 -0
  94. package/dist/src/primitives/Row.jsx.map +1 -0
  95. package/dist/src/primitives/Suspense.d.ts +22 -0
  96. package/dist/src/primitives/Suspense.jsx +33 -0
  97. package/dist/src/primitives/Suspense.jsx.map +1 -0
  98. package/dist/src/primitives/Virtual.d.ts +18 -0
  99. package/dist/src/primitives/Virtual.jsx +495 -0
  100. package/dist/src/primitives/Virtual.jsx.map +1 -0
  101. package/dist/src/primitives/VirtualGrid.d.ts +13 -0
  102. package/dist/src/primitives/VirtualGrid.jsx +160 -0
  103. package/dist/src/primitives/VirtualGrid.jsx.map +1 -0
  104. package/dist/src/primitives/Visible.d.ts +6 -0
  105. package/dist/src/primitives/Visible.jsx +37 -0
  106. package/dist/src/primitives/Visible.jsx.map +1 -0
  107. package/dist/src/primitives/announcer/announcer.d.ts +40 -0
  108. package/dist/src/primitives/announcer/announcer.js +125 -0
  109. package/dist/src/primitives/announcer/announcer.js.map +1 -0
  110. package/dist/src/primitives/announcer/index.d.ts +6 -0
  111. package/dist/src/primitives/announcer/index.js +15 -0
  112. package/dist/src/primitives/announcer/index.js.map +1 -0
  113. package/dist/src/primitives/announcer/speech.d.ts +10 -0
  114. package/dist/src/primitives/announcer/speech.js +281 -0
  115. package/dist/src/primitives/announcer/speech.js.map +1 -0
  116. package/dist/src/primitives/borderBox.d.ts +8 -0
  117. package/dist/src/primitives/borderBox.jsx +47 -0
  118. package/dist/src/primitives/borderBox.jsx.map +1 -0
  119. package/dist/src/primitives/createFocusStack.d.ts +31 -0
  120. package/dist/src/primitives/createFocusStack.jsx +62 -0
  121. package/dist/src/primitives/createFocusStack.jsx.map +1 -0
  122. package/dist/src/primitives/createInfiniteItems.d.ts +27 -0
  123. package/dist/src/primitives/createInfiniteItems.js +46 -0
  124. package/dist/src/primitives/createInfiniteItems.js.map +1 -0
  125. package/dist/src/primitives/createTag.d.ts +8 -0
  126. package/dist/src/primitives/createTag.jsx +20 -0
  127. package/dist/src/primitives/createTag.jsx.map +1 -0
  128. package/dist/src/primitives/index.d.ts +32 -0
  129. package/dist/src/primitives/index.js +31 -0
  130. package/dist/src/primitives/index.js.map +1 -0
  131. package/dist/src/primitives/portal.d.ts +5 -0
  132. package/dist/src/primitives/portal.jsx +21 -0
  133. package/dist/src/primitives/portal.jsx.map +1 -0
  134. package/dist/src/primitives/router.d.ts +20 -0
  135. package/dist/src/primitives/router.js +90 -0
  136. package/dist/src/primitives/router.js.map +1 -0
  137. package/dist/src/primitives/types.d.ts +79 -0
  138. package/dist/src/primitives/types.js +2 -0
  139. package/dist/src/primitives/types.js.map +1 -0
  140. package/dist/src/primitives/useFocusManager.d.ts +5 -0
  141. package/dist/src/primitives/useFocusManager.js +21 -0
  142. package/dist/src/primitives/useFocusManager.js.map +1 -0
  143. package/dist/src/primitives/useHold.d.ts +27 -0
  144. package/dist/src/primitives/useHold.js +54 -0
  145. package/dist/src/primitives/useHold.js.map +1 -0
  146. package/dist/src/primitives/useMouse.d.ts +18 -0
  147. package/dist/src/primitives/useMouse.js +240 -0
  148. package/dist/src/primitives/useMouse.js.map +1 -0
  149. package/dist/src/primitives/utils/chainFunctions.d.ts +30 -0
  150. package/dist/src/primitives/utils/chainFunctions.js +32 -0
  151. package/dist/src/primitives/utils/chainFunctions.js.map +1 -0
  152. package/dist/src/primitives/utils/createBlurredImage.d.ts +56 -0
  153. package/dist/src/primitives/utils/createBlurredImage.js +223 -0
  154. package/dist/src/primitives/utils/createBlurredImage.js.map +1 -0
  155. package/dist/src/primitives/utils/createSpriteMap.d.ts +9 -0
  156. package/dist/src/primitives/utils/createSpriteMap.js +18 -0
  157. package/dist/src/primitives/utils/createSpriteMap.js.map +1 -0
  158. package/dist/src/primitives/utils/handleNavigation.d.ts +103 -0
  159. package/dist/src/primitives/utils/handleNavigation.js +300 -0
  160. package/dist/src/primitives/utils/handleNavigation.js.map +1 -0
  161. package/dist/src/primitives/utils/withScrolling.d.ts +22 -0
  162. package/dist/src/primitives/utils/withScrolling.js +186 -0
  163. package/dist/src/primitives/utils/withScrolling.js.map +1 -0
  164. package/dist/src/render.d.ts +28 -0
  165. package/dist/src/render.js +107 -0
  166. package/dist/src/render.js.map +1 -0
  167. package/dist/src/solidOpts.d.ts +15 -0
  168. package/dist/src/solidOpts.js +93 -0
  169. package/dist/src/solidOpts.js.map +1 -0
  170. package/dist/src/types.d.ts +11 -0
  171. package/dist/src/types.js +2 -0
  172. package/dist/src/types.js.map +1 -0
  173. package/dist/src/utils.d.ts +19 -0
  174. package/dist/src/utils.js +94 -0
  175. package/dist/src/utils.js.map +1 -0
  176. package/dist/tsconfig.tsbuildinfo +1 -0
  177. package/docs/AI_CODING_GUIDELINES.md +108 -0
  178. package/docs/README.md +35 -0
  179. package/jsx-runtime.d.ts +14 -0
  180. package/package.json +125 -0
  181. package/src/activeElement.ts +5 -0
  182. package/src/core/config.ts +101 -0
  183. package/src/core/dom-renderer/domRenderer.ts +2066 -0
  184. package/src/core/dom-renderer/domRendererTypes.ts +148 -0
  185. package/src/core/dom-renderer/domRendererUtils.ts +292 -0
  186. package/src/core/elementNode.ts +1623 -0
  187. package/src/core/flex.ts +331 -0
  188. package/src/core/flexLayout.ts +414 -0
  189. package/src/core/focusKeyTypes.ts +90 -0
  190. package/src/core/focusManager.ts +374 -0
  191. package/src/core/index.ts +15 -0
  192. package/src/core/intrinsicTypes.ts +216 -0
  193. package/src/core/lightningInit.ts +45 -0
  194. package/src/core/nodeTypes.ts +6 -0
  195. package/src/core/shaders.ts +187 -0
  196. package/src/core/states.ts +91 -0
  197. package/src/core/utils.ts +222 -0
  198. package/src/devtools/index.ts +77 -0
  199. package/src/index.ts +18 -0
  200. package/src/primitives/Column.tsx +59 -0
  201. package/src/primitives/FPSCounter.tsx +209 -0
  202. package/src/primitives/FadeInOut.tsx +58 -0
  203. package/src/primitives/Grid.tsx +151 -0
  204. package/src/primitives/Image.tsx +56 -0
  205. package/src/primitives/KeepAlive.tsx +268 -0
  206. package/src/primitives/Lazy.tsx +128 -0
  207. package/src/primitives/LazyImport.ts +53 -0
  208. package/src/primitives/Marquee.tsx +149 -0
  209. package/src/primitives/Preserve.tsx +18 -0
  210. package/src/primitives/Row.tsx +58 -0
  211. package/src/primitives/Suspense.tsx +39 -0
  212. package/src/primitives/Virtual.tsx +602 -0
  213. package/src/primitives/VirtualGrid.tsx +220 -0
  214. package/src/primitives/Visible.tsx +59 -0
  215. package/src/primitives/announcer/announcer.ts +198 -0
  216. package/src/primitives/announcer/index.ts +20 -0
  217. package/src/primitives/announcer/speech.ts +334 -0
  218. package/src/primitives/borderBox.tsx +69 -0
  219. package/src/primitives/createFocusStack.tsx +79 -0
  220. package/src/primitives/createInfiniteItems.ts +66 -0
  221. package/src/primitives/createTag.tsx +33 -0
  222. package/src/primitives/index.ts +37 -0
  223. package/src/primitives/portal.tsx +25 -0
  224. package/src/primitives/router.ts +147 -0
  225. package/src/primitives/types.ts +109 -0
  226. package/src/primitives/useFocusManager.ts +47 -0
  227. package/src/primitives/useHold.ts +69 -0
  228. package/src/primitives/useMouse.ts +417 -0
  229. package/src/primitives/utils/chainFunctions.ts +60 -0
  230. package/src/primitives/utils/createBlurredImage.ts +366 -0
  231. package/src/primitives/utils/createSpriteMap.ts +32 -0
  232. package/src/primitives/utils/handleNavigation.ts +373 -0
  233. package/src/primitives/utils/withScrolling.ts +238 -0
  234. package/src/render.ts +164 -0
  235. package/src/solidOpts.ts +107 -0
  236. package/src/types.ts +22 -0
  237. package/src/utils.ts +129 -0
@@ -0,0 +1,508 @@
1
+ import { type BorderRadius, type BorderStyle, type StyleEffects, type AnimationSettings, type ElementText, type Styles, AddColorString, TextNode, type OnEvent, NewOmit, SingleBorderStyle, type DollarString } from './intrinsicTypes.js';
2
+ import States, { type NodeStates } from './states.js';
3
+ import type { RendererMain, INode, INodeAnimateProps, IAnimationController, LinearGradientProps, RadialGradientProps, CoreShaderNode } from '@solidtv/renderer';
4
+ import { ForwardFocusHandler, FocusNode } from './focusManager.js';
5
+ import { IRendererNode, IRendererShader, IRendererShaderProps, IRendererTextNode } from './dom-renderer/domRendererTypes.js';
6
+ export declare function convertToShader(_node: ElementNode, v: StyleEffects): IRendererShader;
7
+ export declare const LightningRendererNumberProps: string[];
8
+ declare global {
9
+ interface HTMLElement {
10
+ /** Assigned for development, to quickly get ElementNode from selected HTMLElement */
11
+ element?: ElementNode;
12
+ }
13
+ }
14
+ export type RendererNode = AddColorString<Partial<NewOmit<INode, 'parent' | 'shader' | 'src' | 'children' | 'id' | 'removeChild'>>>;
15
+ export interface ElementNode extends RendererNode, FocusNode {
16
+ [key: string]: unknown;
17
+ /** @internal for managing series of insertions and deletions */
18
+ _queueDelete?: number;
19
+ preserve?: boolean;
20
+ _animationQueue?: Array<{
21
+ props: Partial<INodeAnimateProps<CoreShaderNode>>;
22
+ animationSettings?: AnimationSettings;
23
+ }> | undefined;
24
+ _animationQueueSettings?: AnimationSettings;
25
+ _animationRunning?: boolean;
26
+ _animationSettings?: AnimationSettings;
27
+ _autofocus?: boolean;
28
+ _containsFlexGrow?: boolean | null;
29
+ _hasRenderedChildren?: boolean;
30
+ _effects?: Record<string, any>;
31
+ _fontFamily?: string;
32
+ _id: string | undefined;
33
+ _parent: ElementNode | undefined;
34
+ _rendererProps?: any;
35
+ _states?: States;
36
+ _style?: Styles;
37
+ _theme?: Styles;
38
+ _lastAnyKeyPressTime?: number;
39
+ _type: 'element' | 'textNode';
40
+ _undoStyles?: string[];
41
+ autosize?: boolean;
42
+ /**
43
+ * The distance from the bottom edge of the parent element.
44
+ * When `bottom` is set, `mountY` is automatically set to 1.
45
+ *
46
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
47
+ */
48
+ bottom?: number;
49
+ /**
50
+ * An array of child `ElementNode` or `ElementText` nodes.
51
+ */
52
+ children: Array<ElementNode | ElementText>;
53
+ /**
54
+ * Enable debug logging for this specific node.
55
+ */
56
+ debug?: boolean;
57
+ /**
58
+ * Specifies how much a flex item should grow relative to the rest of the flex items.
59
+ *
60
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex-grow
61
+ */
62
+ flexGrow?: number;
63
+ /**
64
+ * Specifies whether flex items are forced onto one line or can wrap onto multiple lines.
65
+ *
66
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
67
+ */
68
+ flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
69
+ /**
70
+ * Determines if an element is a flex item. If set to `false`, the element will be ignored by the flexbox layout.
71
+ * @default false
72
+ */
73
+ flexItem?: boolean;
74
+ /**
75
+ * Specifies the order of a flex item relative to the rest of the flex items.
76
+ *
77
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
78
+ */
79
+ flexOrder?: number;
80
+ /**
81
+ * Defines the ability for a flex item to shrink if necessary.
82
+ * Defaults to 0 since existing legacy implementations did not shrink layout boxes.
83
+ * Only available in NEW flex layout.
84
+ */
85
+ flexShrink?: number;
86
+ /**
87
+ * Defines the default size of an element before the remaining space is distributed.
88
+ * Only available in NEW flex layout.
89
+ */
90
+ flexBasis?: number | string;
91
+ /**
92
+ * Forwards focus to a child element. It can be a numeric index of the child or a handler function.
93
+ *
94
+ * @see https://lightning-tv.github.io/solid/#/essentials/focus?id=forwardfocus
95
+ */
96
+ forwardFocus?: number | ForwardFocusHandler;
97
+ /**
98
+ * If `true`, the states of this node will be propagated to its children.
99
+ *
100
+ * @see https://lightning-tv.github.io/solid/#/essentials/states?id=forwardstates
101
+ */
102
+ forwardStates?: boolean;
103
+ /**
104
+ * The underlying Lightning Renderer node object. This is where the properties are ultimately set for rendering.
105
+ */
106
+ lng: INode | IRendererNode | Partial<ElementNode> | (IRendererTextNode & {
107
+ shader?: any;
108
+ });
109
+ /**
110
+ * A reference to the `ElementNode` instance. Can be an object or a callback function.
111
+ */
112
+ ref?: ElementNode | ((node: ElementNode) => void) | undefined;
113
+ /**
114
+ * A boolean indicating whether the node has been rendered.
115
+ */
116
+ rendered: boolean;
117
+ /**
118
+ * The main renderer instance.
119
+ */
120
+ renderer?: RendererMain;
121
+ /**
122
+ * The distance from the right edge of the parent element.
123
+ * When `right` is set, `mountX` is automatically set to 1.
124
+ *
125
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=layout-and-positioning-elements
126
+ */
127
+ right?: number;
128
+ /**
129
+ * The index of the currently selected child element, used for focus management for Column and Row components.
130
+ */
131
+ selected?: number;
132
+ /**
133
+ * The width of the element before flexbox layout is applied. Used internally for layout calculations.
134
+ */
135
+ preFlexwidth?: number;
136
+ /**
137
+ * The height of the element before flexbox layout is applied. Used internally for layout calculations.
138
+ */
139
+ preFlexheight?: number;
140
+ /**
141
+ * The text content of a text node.
142
+ */
143
+ text?: string;
144
+ /**
145
+ * Aligns flex items along the cross axis of the current line of the flex container.
146
+ *
147
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex-properties
148
+ */
149
+ alignItems?: 'flexStart' | 'flexEnd' | 'center';
150
+ /**
151
+ * Aligns a flex item along the cross axis, overriding the `alignItems` value of the flex container.
152
+ *
153
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex-properties
154
+ */
155
+ alignSelf?: 'flexStart' | 'flexEnd' | 'center';
156
+ /**
157
+ * The border style for all sides of the element. Takes an object with width and color properties.
158
+ *
159
+ * @see https://lightning-tv.github.io/solid/#/essentials/effects?id=border-and-borderradius
160
+ */
161
+ border?: BorderStyle;
162
+ /**
163
+ * The border style for the bottom side of the element.
164
+ *
165
+ * @see https://lightning-tv.github.io/solid/#/essentials/effects?id=border-and-borderradius
166
+ */
167
+ borderBottom?: SingleBorderStyle;
168
+ /**
169
+ * The border style for the left side of the element.
170
+ *
171
+ * @see https://lightning-tv.github.io/solid/#/essentials/effects?id=border-and-borderradius
172
+ */
173
+ borderLeft?: SingleBorderStyle;
174
+ /**
175
+ * The radius of the element's corners.
176
+ *
177
+ * @see https://lightning-tv.github.io/solid/#/essentials/effects?id=border-and-borderradius
178
+ */
179
+ borderRadius?: BorderRadius;
180
+ /**
181
+ * The border style for the right side of the element.
182
+ *
183
+ * @see https://lightning-tv.github.io/solid/#/essentials/effects?id=border-and-borderradius
184
+ */
185
+ borderRight?: SingleBorderStyle;
186
+ /**
187
+ * The border style for the top side of the element.
188
+ *
189
+ * @see https://lightning-tv.github.io/solid/#/essentials/effects?id=border-and-borderradius
190
+ */
191
+ borderTop?: SingleBorderStyle;
192
+ /**
193
+ * A shorthand to set both `centerX` and `centerY` to true.
194
+ *
195
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=layout-and-positioning-elements
196
+ */
197
+ center?: boolean;
198
+ /**
199
+ * If `true`, centers the element horizontally within its parent.
200
+ *
201
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=layout-and-positioning-elements
202
+ */
203
+ centerX?: boolean;
204
+ /**
205
+ * If `true`, centers the element vertically within its parent.
206
+ *
207
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=layout-and-positioning-elements
208
+ */
209
+ centerY?: boolean;
210
+ /**
211
+ * Specifies the direction of the flex items.
212
+ *
213
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
214
+ */
215
+ direction?: 'ltr' | 'rtl';
216
+ /**
217
+ * Specifies the display behavior of an element. 'flex' enables flexbox layout.
218
+ *
219
+ * @default 'block'
220
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
221
+ */
222
+ display?: 'flex' | 'block';
223
+ /**
224
+ * Defines how the flex container's size is determined. 'contain' allows it to grow with its content, 'fixed' keeps it at its specified size.
225
+ *
226
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
227
+ */
228
+ flexBoundary?: 'contain' | 'fixed';
229
+ /**
230
+ * Defines how the flex container's cross-axis size is determined. 'fixed' keeps it at its specified size. Default is 'contain'.
231
+ *
232
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
233
+ */
234
+ flexCrossBoundary?: 'fixed';
235
+ /**
236
+ * Specifies the direction of the main axis for flex items.
237
+ *
238
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
239
+ */
240
+ flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
241
+ /**
242
+ * The gap between flex items.
243
+ *
244
+ * @see @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
245
+ */
246
+ gap?: number;
247
+ /**
248
+ * The gap between flex rows.
249
+ *
250
+ * @see @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
251
+ */
252
+ rowGap?: number;
253
+ /**
254
+ * The gap between flex columns.
255
+ *
256
+ * @see @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
257
+ */
258
+ columnGap?: number;
259
+ /**
260
+ * Defines the alignment of flex items along the main axis.
261
+ *
262
+ * @see @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
263
+ */
264
+ justifyContent?: 'flexStart' | 'flexEnd' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly';
265
+ /**
266
+ * Applies a linear gradient effect to the element.
267
+ *
268
+ * @see https://lightning-tv.github.io/solid/#/essentials/effects
269
+ */
270
+ linearGradient?: LinearGradientProps;
271
+ /**
272
+ * Applies a radial gradient effect to the element.
273
+ *
274
+ * @see https://lightning-tv.github.io/solid/#/essentials/effects
275
+ */
276
+ radialGradient?: RadialGradientProps;
277
+ /**
278
+ * The margin on the bottom side of the element for a flexItem.
279
+ *
280
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
281
+ */
282
+ marginBottom?: number;
283
+ /**
284
+ * The margin on the left side of the element for a flexItem.
285
+ *
286
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
287
+ */
288
+ marginLeft?: number;
289
+ /**
290
+ * The margin on the right side of the element for a flexItem.
291
+ *
292
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
293
+ */
294
+ marginRight?: number;
295
+ /**
296
+ * The margin on the top side of the element for a flexItem.
297
+ *
298
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
299
+ */
300
+ marginTop?: number;
301
+ /**
302
+ * The padding on all sides of the flex element, or an array defining [Top, Right, Bottom, Left] padding.
303
+ *
304
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
305
+ */
306
+ padding?: number | [number, number] | [number, number, number] | [number, number, number, number];
307
+ /**
308
+ * The margin on all sides of the flex element, or an array defining [Top, Right, Bottom, Left] margins.
309
+ *
310
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
311
+ */
312
+ margin?: number | [number, number] | [number, number, number] | [number, number, number, number];
313
+ /**
314
+ * The x-coordinate of the element's position.
315
+ *
316
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
317
+ */
318
+ x: number;
319
+ /**
320
+ * The y-coordinate of the element's position.
321
+ *
322
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
323
+ */
324
+ y: number;
325
+ /**
326
+ * Throttles key press events by the specified number of milliseconds.
327
+ *
328
+ * @see https://lightning-tv.github.io/solid/#/primitives/useFocusManager?id=input-throttling-available-core-212
329
+ */
330
+ throttleInput?: number;
331
+ /**
332
+ * The width of the element.
333
+ *
334
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
335
+ */
336
+ w: number;
337
+ /**
338
+ * The height of the element.
339
+ *
340
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
341
+ */
342
+ h: number;
343
+ /**
344
+ * The maximum width of the element.
345
+ */
346
+ maxWidth?: number;
347
+ /**
348
+ * The maximum height of the element.
349
+ */
350
+ maxHeight?: number;
351
+ /**
352
+ * The minimum width of the element.
353
+ */
354
+ minWidth?: number;
355
+ /**
356
+ * The minimum height of the element.
357
+ */
358
+ minHeight?: number;
359
+ /**
360
+ * The z-index of the element, which affects its stacking order.
361
+ *
362
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
363
+ */
364
+ zIndex?: number;
365
+ /**
366
+ * Defines transitions for animatable properties.
367
+ *
368
+ * @see https://lightning-tv.github.io/solid/#/essentials/transitions?id=transitions-animations
369
+ */
370
+ transition?: Record<string, AnimationSettings | undefined | true | false> | true | false;
371
+ /** Optional handler for when the element is created and rendered.
372
+ *
373
+ * @see https://lightning-tv.github.io/solid/#/flow/ondestroy
374
+ */
375
+ onCreate?: (this: ElementNode, el: ElementNode) => void;
376
+ /**
377
+ * Optional handler for when the element is destroyed.
378
+ * It can return a promise to wait for the cleanup to finish before the element is destroyed.
379
+ *
380
+ * @see https://lightning-tv.github.io/solid/#/flow/ondestroy
381
+ */
382
+ onDestroy?: (this: ElementNode, el: ElementNode) => Promise<any> | void;
383
+ /**
384
+ * Optional handlers for when the element is rendered—after creation and when switching parents.
385
+ *
386
+ * @see https://lightning-tv.github.io/solid/#/primitives/KeepAlive
387
+ */
388
+ onRender?: (this: ElementNode, el: ElementNode) => void;
389
+ /**
390
+ * Optional handlers for when the element is removed from a parent element.
391
+ *
392
+ * @see https://lightning-tv.github.io/solid/#/primitives/KeepAlive
393
+ */
394
+ onRemove?: (this: ElementNode, el: ElementNode) => void;
395
+ /**
396
+ * Listen to Events coming from the renderer
397
+ * @param NodeEvents
398
+ *
399
+ * Available events:
400
+ * - 'loaded'
401
+ * - 'failed'
402
+ * - 'freed'
403
+ * - 'inBounds'
404
+ * - 'outOfBounds'
405
+ * - 'inViewport'
406
+ * - 'outOfViewport'
407
+ *
408
+ * @typedef {'loaded' | 'failed' | 'freed' | 'inBounds' | 'outOfBounds' | 'inViewport' | 'outOfViewport'} NodeEvents
409
+ *
410
+ * @param {Partial<Record<NodeEvents, EventHandler>>} events - An object where the keys are event names from NodeEvents and the values are the respective event handlers.
411
+ * @returns {void}
412
+ *
413
+ * @see https://lightning-tv.github.io/solid/#/essentials/events
414
+ */
415
+ onEvent?: OnEvent;
416
+ /**
417
+ * Callback run after flex layout is calculated on flex elements
418
+ *
419
+ * @see https://lightning-tv.github.io/solid/#/flow/layout
420
+ */
421
+ onLayout?: (this: ElementNode, target: ElementNode) => void;
422
+ /**
423
+ * The individual padding on each side of an element, acting as an override to the `padding` array property.
424
+ * `paddingTop`, `paddingRight`, `paddingBottom`, `paddingLeft`.
425
+ * Only in the new flex engine.
426
+ *
427
+ * @see https://lightning-tv.github.io/solid/#/flow/layout?id=flex
428
+ */
429
+ paddingTop?: number;
430
+ paddingRight?: number;
431
+ paddingBottom?: number;
432
+ paddingLeft?: number;
433
+ /**
434
+ * Defines the order in which state styles are applied for this element.
435
+ * Overrides the global `Config.stateOrder`.
436
+ */
437
+ stateOrder?: DollarString[];
438
+ }
439
+ export declare class ElementNode extends Object {
440
+ constructor(name: string);
441
+ get effects(): StyleEffects | undefined;
442
+ set effects(v: StyleEffects);
443
+ set id(id: string);
444
+ get id(): string | undefined;
445
+ get parent(): ElementNode | undefined;
446
+ set parent(p: ElementNode | undefined);
447
+ get height(): number;
448
+ set height(h: number);
449
+ get width(): number;
450
+ set width(w: number);
451
+ set fontWeight(v: unknown);
452
+ get fontWeight(): unknown;
453
+ set fontFamily(v: string | undefined);
454
+ get fontFamily(): string | undefined;
455
+ insertChild(node: ElementNode | ElementText | TextNode, beforeNode?: ElementNode | ElementText | TextNode | null): void;
456
+ removeChild(node: ElementNode | ElementText | TextNode): void;
457
+ get selectedNode(): ElementNode | undefined;
458
+ set shader(shaderProps: IRendererShader | [kind: string, props: IRendererShaderProps]);
459
+ _sendToLightningAnimatable(name: string, value: number): any;
460
+ animate(props: Partial<INodeAnimateProps<CoreShaderNode>>, animationSettings?: AnimationSettings): IAnimationController;
461
+ chain(props: Partial<INodeAnimateProps<CoreShaderNode>>, animationSettings?: AnimationSettings): this;
462
+ start(): Promise<void>;
463
+ emit(event: string, ...args: any[]): boolean;
464
+ setFocus(): void;
465
+ _layoutOnLoad(): void;
466
+ getText(this: ElementText): string;
467
+ destroy(): void;
468
+ _destroy(): void;
469
+ set style(style: Styles | undefined);
470
+ get style(): Styles;
471
+ set theme(styles: Styles | undefined);
472
+ get theme(): Styles;
473
+ get hasChildren(): boolean;
474
+ set src(src: string | null | undefined);
475
+ get src(): string | null | undefined;
476
+ getChildById(id: string): ElementNode | ElementText | undefined;
477
+ searchChildrenById(id: string): ElementNode | undefined;
478
+ set states(states: NodeStates);
479
+ get states(): States;
480
+ get animationSettings(): AnimationSettings | undefined;
481
+ set animationSettings(animationSettings: AnimationSettings | undefined);
482
+ set hidden(val: boolean);
483
+ get hidden(): boolean;
484
+ /**
485
+ * Sets the autofocus state of the element.
486
+ * When set to a truthy value, the element will automatically gain focus.
487
+ * You can also set it to a signal to recalculate
488
+ *
489
+ * @param val - A value to determine if the element should autofocus.
490
+ * A truthy value enables autofocus, otherwise disables it.
491
+ */
492
+ set autofocus(val: any);
493
+ get autofocus(): any;
494
+ requiresLayout(): true | ((this: ElementNode, target: ElementNode) => void) | undefined;
495
+ set updateLayoutOn(v: any);
496
+ get updateLayoutOn(): any;
497
+ updateLayout(): void;
498
+ _stateChanged(): void;
499
+ render(topNode?: boolean): void;
500
+ }
501
+ export declare function createRawShaderAccessor<T>(key: keyof StyleEffects): {
502
+ set(this: ElementNode, value: T): void;
503
+ get(this: ElementNode): IRendererShader | [kind: string, props: IRendererShaderProps];
504
+ };
505
+ export declare function shaderAccessor<T extends Record<string, any> | number>(key: 'border' | 'shadow' | 'rounded' | 'borderBottom' | 'borderLeft' | 'borderRight' | 'borderTop'): {
506
+ set(this: ElementNode, value: T): void;
507
+ get(this: ElementNode): any;
508
+ };