@alchemy.run/sigil 0.0.0-alpha.1 → 0.0.0-alpha.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.
- package/README.md +299 -299
- package/dist/ansi.d.ts +223 -0
- package/dist/ansi.js +2 -0
- package/dist/{devtools-QpCMm9JH.mjs → devtools-BhYGjb7h.js} +1 -1
- package/dist/index-DDVME65c.d.ts +919 -0
- package/dist/index.d.ts +1657 -0
- package/dist/index.js +4643 -0
- package/dist/sgr-CMfEpjSk.d.ts +91 -0
- package/dist/truncate-CBiyyZzw.js +2156 -0
- package/dist/yoga-5jKhYCJC.js +3465 -0
- package/dist/yoga.d.ts +2 -0
- package/dist/yoga.js +2 -0
- package/package.json +37 -17
- package/src/ansi/chalk.ts +179 -0
- package/src/ansi/cursor.ts +48 -0
- package/src/ansi/east-asian-width.ts +215 -0
- package/src/ansi/escapes.ts +128 -0
- package/src/ansi/index.ts +27 -0
- package/src/ansi/sgr.ts +237 -0
- package/src/ansi/slice.ts +43 -0
- package/src/ansi/string-width.ts +236 -0
- package/src/ansi/strip.ts +33 -0
- package/src/ansi/supports-color.ts +213 -0
- package/src/ansi/tokenize.ts +453 -0
- package/src/ansi/truncate.ts +194 -0
- package/src/ansi/widest-line.ts +12 -0
- package/src/ansi/wrap.ts +766 -0
- package/src/ansi-tokenizer.ts +510 -0
- package/src/auto-bind.ts +41 -0
- package/src/boxes.ts +100 -0
- package/src/code-excerpt.ts +39 -0
- package/src/colorize.ts +60 -0
- package/src/components/AccessibilityContext.ts +5 -0
- package/src/components/AnimationContext.ts +24 -0
- package/src/components/App.tsx +781 -0
- package/src/components/AppContext.ts +111 -0
- package/src/components/BackgroundContext.ts +8 -0
- package/src/components/Box.tsx +116 -0
- package/src/components/CursorContext.ts +19 -0
- package/src/components/ErrorBoundary.tsx +38 -0
- package/src/components/ErrorOverview.tsx +133 -0
- package/src/components/FocusContext.ts +30 -0
- package/src/components/Newline.tsx +15 -0
- package/src/components/Spacer.tsx +10 -0
- package/src/components/Static.tsx +59 -0
- package/src/components/StderrContext.ts +26 -0
- package/src/components/StdinContext.ts +49 -0
- package/src/components/StdoutContext.ts +28 -0
- package/src/components/Text.tsx +144 -0
- package/src/components/Transform.tsx +37 -0
- package/src/cursor-position.ts +103 -0
- package/src/devtools-window-polyfill.ts +73 -0
- package/src/devtools.ts +43 -0
- package/src/dom.ts +292 -0
- package/src/get-max-width.ts +11 -0
- package/src/global.d.ts +36 -0
- package/src/hooks/use-animation.ts +142 -0
- package/src/hooks/use-app.ts +8 -0
- package/src/hooks/use-box-metrics.ts +134 -0
- package/src/hooks/use-cursor.ts +33 -0
- package/src/hooks/use-focus-manager.ts +62 -0
- package/src/hooks/use-focus.ts +83 -0
- package/src/hooks/use-input.ts +267 -0
- package/src/hooks/use-is-screen-reader-enabled.ts +12 -0
- package/src/hooks/use-paste.ts +78 -0
- package/src/hooks/use-stderr.ts +8 -0
- package/src/hooks/use-stdin.ts +10 -0
- package/src/hooks/use-stdout.ts +8 -0
- package/src/hooks/use-window-size.ts +41 -0
- package/src/indent-string.ts +16 -0
- package/src/index.ts +44 -0
- package/src/ink.tsx +1506 -0
- package/src/input-parser.ts +283 -0
- package/src/instances.ts +9 -0
- package/src/is-in-ci.ts +7 -0
- package/src/kitty-keyboard.ts +57 -0
- package/src/log-update.ts +370 -0
- package/src/measure-element.ts +62 -0
- package/src/measure-text.ts +31 -0
- package/src/output.ts +308 -0
- package/src/parse-keypress.ts +516 -0
- package/src/parse-stack-line.ts +139 -0
- package/src/patch-console.ts +62 -0
- package/src/quick-lru.ts +85 -0
- package/src/reconciler.ts +451 -0
- package/src/render-background.ts +38 -0
- package/src/render-border.ts +134 -0
- package/src/render-node-to-output.ts +191 -0
- package/src/render-to-string.ts +131 -0
- package/src/render.ts +276 -0
- package/src/renderer.ts +73 -0
- package/src/sanitize-ansi.ts +33 -0
- package/src/signal-exit.ts +107 -0
- package/src/squash-text-nodes.ts +40 -0
- package/src/stream.ts +30 -0
- package/src/styles.ts +748 -0
- package/src/terminal-size.ts +57 -0
- package/src/throttle.ts +73 -0
- package/src/types.ts +15 -0
- package/src/utils.ts +40 -0
- package/src/wrap-text.ts +50 -0
- package/src/write-synchronized.ts +9 -0
- package/src/yoga/config.ts +57 -0
- package/src/yoga/core/absoluteLayout.ts +626 -0
- package/src/yoga/core/baseline.ts +66 -0
- package/src/yoga/core/cache.ts +136 -0
- package/src/yoga/core/calculateLayout.ts +2920 -0
- package/src/yoga/core/config.ts +104 -0
- package/src/yoga/core/flexLine.ts +177 -0
- package/src/yoga/core/helpers.ts +293 -0
- package/src/yoga/core/layoutResults.ts +167 -0
- package/src/yoga/core/node.ts +611 -0
- package/src/yoga/core/numeric.ts +44 -0
- package/src/yoga/core/pixelGrid.ts +151 -0
- package/src/yoga/core/style.ts +887 -0
- package/src/yoga/core/types.ts +224 -0
- package/src/yoga/generated/YGEnums.ts +263 -0
- package/src/yoga/index.ts +19 -0
- package/src/yoga/node.ts +1140 -0
- package/dist/index.d.mts +0 -2379
- package/dist/index.mjs +0 -10072
|
@@ -0,0 +1,919 @@
|
|
|
1
|
+
//#region src/yoga/generated/YGEnums.d.ts
|
|
2
|
+
declare const Align: {
|
|
3
|
+
readonly Auto: 0;
|
|
4
|
+
readonly FlexStart: 1;
|
|
5
|
+
readonly Center: 2;
|
|
6
|
+
readonly FlexEnd: 3;
|
|
7
|
+
readonly Stretch: 4;
|
|
8
|
+
readonly Baseline: 5;
|
|
9
|
+
readonly SpaceBetween: 6;
|
|
10
|
+
readonly SpaceAround: 7;
|
|
11
|
+
readonly SpaceEvenly: 8;
|
|
12
|
+
readonly Start: 9;
|
|
13
|
+
readonly End: 10;
|
|
14
|
+
};
|
|
15
|
+
type Align = (typeof Align)[keyof typeof Align];
|
|
16
|
+
declare const BoxSizing: {
|
|
17
|
+
readonly BorderBox: 0;
|
|
18
|
+
readonly ContentBox: 1;
|
|
19
|
+
};
|
|
20
|
+
type BoxSizing = (typeof BoxSizing)[keyof typeof BoxSizing];
|
|
21
|
+
declare const Dimension: {
|
|
22
|
+
readonly Width: 0;
|
|
23
|
+
readonly Height: 1;
|
|
24
|
+
};
|
|
25
|
+
type Dimension = (typeof Dimension)[keyof typeof Dimension];
|
|
26
|
+
declare const Direction: {
|
|
27
|
+
readonly Inherit: 0;
|
|
28
|
+
readonly LTR: 1;
|
|
29
|
+
readonly RTL: 2;
|
|
30
|
+
};
|
|
31
|
+
type Direction = (typeof Direction)[keyof typeof Direction];
|
|
32
|
+
declare const Display: {
|
|
33
|
+
readonly Flex: 0;
|
|
34
|
+
readonly None: 1;
|
|
35
|
+
readonly Contents: 2;
|
|
36
|
+
readonly Grid: 3;
|
|
37
|
+
};
|
|
38
|
+
type Display = (typeof Display)[keyof typeof Display];
|
|
39
|
+
declare const Edge: {
|
|
40
|
+
readonly Left: 0;
|
|
41
|
+
readonly Top: 1;
|
|
42
|
+
readonly Right: 2;
|
|
43
|
+
readonly Bottom: 3;
|
|
44
|
+
readonly Start: 4;
|
|
45
|
+
readonly End: 5;
|
|
46
|
+
readonly Horizontal: 6;
|
|
47
|
+
readonly Vertical: 7;
|
|
48
|
+
readonly All: 8;
|
|
49
|
+
};
|
|
50
|
+
type Edge = (typeof Edge)[keyof typeof Edge];
|
|
51
|
+
declare const Errata: {
|
|
52
|
+
readonly None: 0;
|
|
53
|
+
readonly StretchFlexBasis: 1;
|
|
54
|
+
readonly AbsolutePositionWithoutInsetsExcludesPadding: 2;
|
|
55
|
+
readonly AbsolutePercentAgainstInnerSize: 4;
|
|
56
|
+
readonly MinSizeUndefinedInsteadOfAuto: 8;
|
|
57
|
+
readonly All: 2147483647;
|
|
58
|
+
readonly Classic: 2147483646;
|
|
59
|
+
};
|
|
60
|
+
type Errata = number;
|
|
61
|
+
declare const ExperimentalFeature: {
|
|
62
|
+
readonly WebFlexBasis: 0;
|
|
63
|
+
readonly FixFlexBasisFitContent: 1;
|
|
64
|
+
};
|
|
65
|
+
type ExperimentalFeature = (typeof ExperimentalFeature)[keyof typeof ExperimentalFeature];
|
|
66
|
+
declare const FlexDirection: {
|
|
67
|
+
readonly Column: 0;
|
|
68
|
+
readonly ColumnReverse: 1;
|
|
69
|
+
readonly Row: 2;
|
|
70
|
+
readonly RowReverse: 3;
|
|
71
|
+
};
|
|
72
|
+
type FlexDirection = (typeof FlexDirection)[keyof typeof FlexDirection];
|
|
73
|
+
declare const GridTrackType: {
|
|
74
|
+
readonly Auto: 0;
|
|
75
|
+
readonly Points: 1;
|
|
76
|
+
readonly Percent: 2;
|
|
77
|
+
readonly Fr: 3;
|
|
78
|
+
readonly Minmax: 4;
|
|
79
|
+
};
|
|
80
|
+
type GridTrackType = (typeof GridTrackType)[keyof typeof GridTrackType];
|
|
81
|
+
declare const Gutter: {
|
|
82
|
+
readonly Column: 0;
|
|
83
|
+
readonly Row: 1;
|
|
84
|
+
readonly All: 2;
|
|
85
|
+
};
|
|
86
|
+
type Gutter = (typeof Gutter)[keyof typeof Gutter];
|
|
87
|
+
declare const Justify: {
|
|
88
|
+
readonly Auto: 0;
|
|
89
|
+
readonly FlexStart: 1;
|
|
90
|
+
readonly Center: 2;
|
|
91
|
+
readonly FlexEnd: 3;
|
|
92
|
+
readonly SpaceBetween: 4;
|
|
93
|
+
readonly SpaceAround: 5;
|
|
94
|
+
readonly SpaceEvenly: 6;
|
|
95
|
+
readonly Stretch: 7;
|
|
96
|
+
readonly Start: 8;
|
|
97
|
+
readonly End: 9;
|
|
98
|
+
};
|
|
99
|
+
type Justify = (typeof Justify)[keyof typeof Justify];
|
|
100
|
+
declare const LogLevel: {
|
|
101
|
+
readonly Error: 0;
|
|
102
|
+
readonly Warn: 1;
|
|
103
|
+
readonly Info: 2;
|
|
104
|
+
readonly Debug: 3;
|
|
105
|
+
readonly Verbose: 4;
|
|
106
|
+
readonly Fatal: 5;
|
|
107
|
+
};
|
|
108
|
+
type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
109
|
+
declare const MeasureMode: {
|
|
110
|
+
readonly Undefined: 0;
|
|
111
|
+
readonly Exactly: 1;
|
|
112
|
+
readonly AtMost: 2;
|
|
113
|
+
};
|
|
114
|
+
type MeasureMode = (typeof MeasureMode)[keyof typeof MeasureMode];
|
|
115
|
+
declare const NodeType: {
|
|
116
|
+
readonly Default: 0;
|
|
117
|
+
readonly Text: 1;
|
|
118
|
+
};
|
|
119
|
+
type NodeType = (typeof NodeType)[keyof typeof NodeType];
|
|
120
|
+
declare const Overflow: {
|
|
121
|
+
readonly Visible: 0;
|
|
122
|
+
readonly Hidden: 1;
|
|
123
|
+
readonly Scroll: 2;
|
|
124
|
+
};
|
|
125
|
+
type Overflow = (typeof Overflow)[keyof typeof Overflow];
|
|
126
|
+
declare const PositionType: {
|
|
127
|
+
readonly Static: 0;
|
|
128
|
+
readonly Relative: 1;
|
|
129
|
+
readonly Absolute: 2;
|
|
130
|
+
};
|
|
131
|
+
type PositionType = (typeof PositionType)[keyof typeof PositionType];
|
|
132
|
+
declare const Unit: {
|
|
133
|
+
readonly Undefined: 0;
|
|
134
|
+
readonly Point: 1;
|
|
135
|
+
readonly Percent: 2;
|
|
136
|
+
readonly Auto: 3;
|
|
137
|
+
readonly MaxContent: 4;
|
|
138
|
+
readonly FitContent: 5;
|
|
139
|
+
readonly Stretch: 6;
|
|
140
|
+
};
|
|
141
|
+
type Unit = (typeof Unit)[keyof typeof Unit];
|
|
142
|
+
declare const Wrap: {
|
|
143
|
+
readonly NoWrap: 0;
|
|
144
|
+
readonly Wrap: 1;
|
|
145
|
+
readonly WrapReverse: 2;
|
|
146
|
+
};
|
|
147
|
+
type Wrap = (typeof Wrap)[keyof typeof Wrap];
|
|
148
|
+
declare const constants: {
|
|
149
|
+
ALIGN_AUTO: 0;
|
|
150
|
+
ALIGN_FLEX_START: 1;
|
|
151
|
+
ALIGN_CENTER: 2;
|
|
152
|
+
ALIGN_FLEX_END: 3;
|
|
153
|
+
ALIGN_STRETCH: 4;
|
|
154
|
+
ALIGN_BASELINE: 5;
|
|
155
|
+
ALIGN_SPACE_BETWEEN: 6;
|
|
156
|
+
ALIGN_SPACE_AROUND: 7;
|
|
157
|
+
ALIGN_SPACE_EVENLY: 8;
|
|
158
|
+
ALIGN_START: 9;
|
|
159
|
+
ALIGN_END: 10;
|
|
160
|
+
BOX_SIZING_BORDER_BOX: 0;
|
|
161
|
+
BOX_SIZING_CONTENT_BOX: 1;
|
|
162
|
+
DIMENSION_WIDTH: 0;
|
|
163
|
+
DIMENSION_HEIGHT: 1;
|
|
164
|
+
DIRECTION_INHERIT: 0;
|
|
165
|
+
DIRECTION_LTR: 1;
|
|
166
|
+
DIRECTION_RTL: 2;
|
|
167
|
+
DISPLAY_FLEX: 0;
|
|
168
|
+
DISPLAY_NONE: 1;
|
|
169
|
+
DISPLAY_CONTENTS: 2;
|
|
170
|
+
DISPLAY_GRID: 3;
|
|
171
|
+
EDGE_LEFT: 0;
|
|
172
|
+
EDGE_TOP: 1;
|
|
173
|
+
EDGE_RIGHT: 2;
|
|
174
|
+
EDGE_BOTTOM: 3;
|
|
175
|
+
EDGE_START: 4;
|
|
176
|
+
EDGE_END: 5;
|
|
177
|
+
EDGE_HORIZONTAL: 6;
|
|
178
|
+
EDGE_VERTICAL: 7;
|
|
179
|
+
EDGE_ALL: 8;
|
|
180
|
+
ERRATA_NONE: 0;
|
|
181
|
+
ERRATA_STRETCH_FLEX_BASIS: 1;
|
|
182
|
+
ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: 2;
|
|
183
|
+
ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: 4;
|
|
184
|
+
ERRATA_MIN_SIZE_UNDEFINED_INSTEAD_OF_AUTO: 8;
|
|
185
|
+
ERRATA_ALL: 2147483647;
|
|
186
|
+
ERRATA_CLASSIC: 2147483646;
|
|
187
|
+
EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 0;
|
|
188
|
+
EXPERIMENTAL_FEATURE_FIX_FLEX_BASIS_FIT_CONTENT: 1;
|
|
189
|
+
FLEX_DIRECTION_COLUMN: 0;
|
|
190
|
+
FLEX_DIRECTION_COLUMN_REVERSE: 1;
|
|
191
|
+
FLEX_DIRECTION_ROW: 2;
|
|
192
|
+
FLEX_DIRECTION_ROW_REVERSE: 3;
|
|
193
|
+
GRID_TRACK_TYPE_AUTO: 0;
|
|
194
|
+
GRID_TRACK_TYPE_POINTS: 1;
|
|
195
|
+
GRID_TRACK_TYPE_PERCENT: 2;
|
|
196
|
+
GRID_TRACK_TYPE_FR: 3;
|
|
197
|
+
GRID_TRACK_TYPE_MINMAX: 4;
|
|
198
|
+
GUTTER_COLUMN: 0;
|
|
199
|
+
GUTTER_ROW: 1;
|
|
200
|
+
GUTTER_ALL: 2;
|
|
201
|
+
JUSTIFY_AUTO: 0;
|
|
202
|
+
JUSTIFY_FLEX_START: 1;
|
|
203
|
+
JUSTIFY_CENTER: 2;
|
|
204
|
+
JUSTIFY_FLEX_END: 3;
|
|
205
|
+
JUSTIFY_SPACE_BETWEEN: 4;
|
|
206
|
+
JUSTIFY_SPACE_AROUND: 5;
|
|
207
|
+
JUSTIFY_SPACE_EVENLY: 6;
|
|
208
|
+
JUSTIFY_STRETCH: 7;
|
|
209
|
+
JUSTIFY_START: 8;
|
|
210
|
+
JUSTIFY_END: 9;
|
|
211
|
+
LOG_LEVEL_ERROR: 0;
|
|
212
|
+
LOG_LEVEL_WARN: 1;
|
|
213
|
+
LOG_LEVEL_INFO: 2;
|
|
214
|
+
LOG_LEVEL_DEBUG: 3;
|
|
215
|
+
LOG_LEVEL_VERBOSE: 4;
|
|
216
|
+
LOG_LEVEL_FATAL: 5;
|
|
217
|
+
MEASURE_MODE_UNDEFINED: 0;
|
|
218
|
+
MEASURE_MODE_EXACTLY: 1;
|
|
219
|
+
MEASURE_MODE_AT_MOST: 2;
|
|
220
|
+
NODE_TYPE_DEFAULT: 0;
|
|
221
|
+
NODE_TYPE_TEXT: 1;
|
|
222
|
+
OVERFLOW_VISIBLE: 0;
|
|
223
|
+
OVERFLOW_HIDDEN: 1;
|
|
224
|
+
OVERFLOW_SCROLL: 2;
|
|
225
|
+
POSITION_TYPE_STATIC: 0;
|
|
226
|
+
POSITION_TYPE_RELATIVE: 1;
|
|
227
|
+
POSITION_TYPE_ABSOLUTE: 2;
|
|
228
|
+
UNIT_UNDEFINED: 0;
|
|
229
|
+
UNIT_POINT: 1;
|
|
230
|
+
UNIT_PERCENT: 2;
|
|
231
|
+
UNIT_AUTO: 3;
|
|
232
|
+
UNIT_MAX_CONTENT: 4;
|
|
233
|
+
UNIT_FIT_CONTENT: 5;
|
|
234
|
+
UNIT_STRETCH: 6;
|
|
235
|
+
WRAP_NO_WRAP: 0;
|
|
236
|
+
WRAP_WRAP: 1;
|
|
237
|
+
WRAP_WRAP_REVERSE: 2;
|
|
238
|
+
};
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/yoga/core/config.d.ts
|
|
241
|
+
declare class Config$1 {
|
|
242
|
+
private useWebDefaults_;
|
|
243
|
+
private version_;
|
|
244
|
+
private experimentalFeatures_;
|
|
245
|
+
private errata_;
|
|
246
|
+
private pointScaleFactor_;
|
|
247
|
+
setUseWebDefaults(useWebDefaults: boolean): void;
|
|
248
|
+
useWebDefaults(): boolean;
|
|
249
|
+
setExperimentalFeatureEnabled(feature: ExperimentalFeature, enabled: boolean): void;
|
|
250
|
+
isExperimentalFeatureEnabled(feature: ExperimentalFeature): boolean;
|
|
251
|
+
getEnabledExperiments(): number;
|
|
252
|
+
setErrata(errata: Errata): void;
|
|
253
|
+
addErrata(errata: Errata): void;
|
|
254
|
+
removeErrata(errata: Errata): void;
|
|
255
|
+
getErrata(): Errata;
|
|
256
|
+
hasErrata(errata: Errata): boolean;
|
|
257
|
+
setPointScaleFactor(pointScaleFactor: number): void;
|
|
258
|
+
getPointScaleFactor(): number;
|
|
259
|
+
getVersion(): number;
|
|
260
|
+
}
|
|
261
|
+
//#endregion
|
|
262
|
+
//#region src/yoga/config.d.ts
|
|
263
|
+
/**
|
|
264
|
+
* Public Config wrapper over the core config, exposing the same surface as
|
|
265
|
+
* the WASM binding's ConfigImpl.
|
|
266
|
+
*/
|
|
267
|
+
declare class Config {
|
|
268
|
+
/** @internal */
|
|
269
|
+
core: Config$1;
|
|
270
|
+
static create(): Config;
|
|
271
|
+
/**
|
|
272
|
+
@deprecated No-op in the TypeScript port: the garbage collector owns this
|
|
273
|
+
config's lifetime. Kept only for yoga-layout binding compatibility.
|
|
274
|
+
*/
|
|
275
|
+
free(): void;
|
|
276
|
+
setExperimentalFeatureEnabled(feature: ExperimentalFeature, enabled: boolean): void;
|
|
277
|
+
isExperimentalFeatureEnabled(feature: ExperimentalFeature): boolean;
|
|
278
|
+
setPointScaleFactor(factor: number): void;
|
|
279
|
+
getErrata(): Errata;
|
|
280
|
+
setErrata(errata: Errata): void;
|
|
281
|
+
useWebDefaults(): boolean;
|
|
282
|
+
setUseWebDefaults(useWebDefaults: boolean): void;
|
|
283
|
+
}
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region src/yoga/core/helpers.d.ts
|
|
286
|
+
declare const PhysicalEdge: {
|
|
287
|
+
readonly Left: 0;
|
|
288
|
+
readonly Top: 1;
|
|
289
|
+
readonly Right: 2;
|
|
290
|
+
readonly Bottom: 3;
|
|
291
|
+
};
|
|
292
|
+
type PhysicalEdge = (typeof PhysicalEdge)[keyof typeof PhysicalEdge];
|
|
293
|
+
declare const SizingMode: {
|
|
294
|
+
readonly StretchFit: 0;
|
|
295
|
+
readonly MaxContent: 1;
|
|
296
|
+
readonly FitContent: 2;
|
|
297
|
+
};
|
|
298
|
+
type SizingMode = (typeof SizingMode)[keyof typeof SizingMode];
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/yoga/core/flexLine.d.ts
|
|
301
|
+
interface FlexLineRunningLayout {
|
|
302
|
+
totalFlexGrowFactors: number;
|
|
303
|
+
totalFlexShrinkScaledFactors: number;
|
|
304
|
+
remainingFreeSpace: number;
|
|
305
|
+
mainDim: number;
|
|
306
|
+
crossDim: number;
|
|
307
|
+
}
|
|
308
|
+
interface FlexLine {
|
|
309
|
+
itemsInFlow: Node$1[];
|
|
310
|
+
sizeConsumed: number;
|
|
311
|
+
numberOfAutoMargins: number;
|
|
312
|
+
endIndex: number;
|
|
313
|
+
layout: FlexLineRunningLayout;
|
|
314
|
+
}
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region src/yoga/core/layoutResults.d.ts
|
|
317
|
+
declare class CachedMeasurement {
|
|
318
|
+
availableWidth: number;
|
|
319
|
+
availableHeight: number;
|
|
320
|
+
widthSizingMode: SizingMode;
|
|
321
|
+
heightSizingMode: SizingMode;
|
|
322
|
+
computedWidth: number;
|
|
323
|
+
computedHeight: number;
|
|
324
|
+
equals(measurement: CachedMeasurement): boolean;
|
|
325
|
+
}
|
|
326
|
+
declare class LayoutResults {
|
|
327
|
+
static readonly MaxCachedMeasurements = 8;
|
|
328
|
+
computedFlexBasisGeneration: number;
|
|
329
|
+
computedFlexBasis: number;
|
|
330
|
+
computedAutoMinMainSize: number;
|
|
331
|
+
generationCount: number;
|
|
332
|
+
configVersion: number;
|
|
333
|
+
lastOwnerDirection: Direction;
|
|
334
|
+
nextCachedMeasurementsIndex: number;
|
|
335
|
+
cachedMeasurements: CachedMeasurement[];
|
|
336
|
+
roundingDirty: boolean;
|
|
337
|
+
roundedAbsLeft: number;
|
|
338
|
+
roundedAbsTop: number;
|
|
339
|
+
roundedScale: number;
|
|
340
|
+
cachedLayout: CachedMeasurement;
|
|
341
|
+
flexLine: FlexLine | null;
|
|
342
|
+
flexLineStarts: number[] | null;
|
|
343
|
+
private direction_;
|
|
344
|
+
private hadOverflow_;
|
|
345
|
+
private values_;
|
|
346
|
+
direction(): Direction;
|
|
347
|
+
setDirection(direction: Direction): void;
|
|
348
|
+
hadOverflow(): boolean;
|
|
349
|
+
setHadOverflow(hadOverflow: boolean): void;
|
|
350
|
+
dimension(axis: Dimension): number;
|
|
351
|
+
setDimension(axis: Dimension, dimension: number): void;
|
|
352
|
+
measuredDimension(axis: Dimension): number;
|
|
353
|
+
rawDimension(axis: Dimension): number;
|
|
354
|
+
setMeasuredDimension(axis: Dimension, dimension: number): void;
|
|
355
|
+
setRawDimension(axis: Dimension, dimension: number): void;
|
|
356
|
+
position(physicalEdge: PhysicalEdge): number;
|
|
357
|
+
setPosition(physicalEdge: PhysicalEdge, dimension: number): void;
|
|
358
|
+
margin(physicalEdge: PhysicalEdge): number;
|
|
359
|
+
setMargin(physicalEdge: PhysicalEdge, dimension: number): void;
|
|
360
|
+
border(physicalEdge: PhysicalEdge): number;
|
|
361
|
+
setBorder(physicalEdge: PhysicalEdge, dimension: number): void;
|
|
362
|
+
padding(physicalEdge: PhysicalEdge): number;
|
|
363
|
+
setPadding(physicalEdge: PhysicalEdge, dimension: number): void;
|
|
364
|
+
}
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/yoga/core/types.d.ts
|
|
367
|
+
/**
|
|
368
|
+
* A CSS <length-percentage> or keyword. `value` is NaN for keyword units.
|
|
369
|
+
* Instances are immutable and may be shared.
|
|
370
|
+
*/
|
|
371
|
+
declare class StyleLength {
|
|
372
|
+
readonly value: number;
|
|
373
|
+
readonly unit: Unit;
|
|
374
|
+
protected constructor(value: number, unit: Unit);
|
|
375
|
+
static points(value: number): StyleLength;
|
|
376
|
+
static percent(value: number): StyleLength;
|
|
377
|
+
static ofAuto(): StyleLength;
|
|
378
|
+
static undefined(): StyleLength;
|
|
379
|
+
isAuto(): boolean;
|
|
380
|
+
isUndefined(): boolean;
|
|
381
|
+
isDefined(): boolean;
|
|
382
|
+
isPoints(): boolean;
|
|
383
|
+
isPercent(): boolean;
|
|
384
|
+
resolve(referenceLength: number): number;
|
|
385
|
+
equals(other: StyleLength): boolean;
|
|
386
|
+
inexactEquals(other: StyleLength): boolean;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* A CSS value for sizes (width, min-width, flex-basis, ...) which additionally
|
|
390
|
+
* allows the auto/max-content/fit-content/stretch keywords.
|
|
391
|
+
*/
|
|
392
|
+
declare class StyleSizeLength {
|
|
393
|
+
readonly value: number;
|
|
394
|
+
readonly unit: Unit;
|
|
395
|
+
protected constructor(value: number, unit: Unit);
|
|
396
|
+
static points(value: number): StyleSizeLength;
|
|
397
|
+
static percent(value: number): StyleSizeLength;
|
|
398
|
+
static ofAuto(): StyleSizeLength;
|
|
399
|
+
static ofMaxContent(): StyleSizeLength;
|
|
400
|
+
static ofFitContent(): StyleSizeLength;
|
|
401
|
+
static ofStretch(): StyleSizeLength;
|
|
402
|
+
static undefined(): StyleSizeLength;
|
|
403
|
+
isAuto(): boolean;
|
|
404
|
+
isMaxContent(): boolean;
|
|
405
|
+
isFitContent(): boolean;
|
|
406
|
+
isStretch(): boolean;
|
|
407
|
+
isUndefined(): boolean;
|
|
408
|
+
isDefined(): boolean;
|
|
409
|
+
isPoints(): boolean;
|
|
410
|
+
isPercent(): boolean;
|
|
411
|
+
resolve(referenceLength: number): number;
|
|
412
|
+
equals(other: StyleSizeLength): boolean;
|
|
413
|
+
inexactEquals(other: StyleSizeLength): boolean;
|
|
414
|
+
}
|
|
415
|
+
interface Size$1 {
|
|
416
|
+
width: number;
|
|
417
|
+
height: number;
|
|
418
|
+
}
|
|
419
|
+
//#endregion
|
|
420
|
+
//#region src/yoga/core/style.d.ts
|
|
421
|
+
declare class Style {
|
|
422
|
+
static readonly DefaultFlexGrow = 0;
|
|
423
|
+
static readonly DefaultFlexShrink = 0;
|
|
424
|
+
static readonly WebDefaultFlexShrink = 1;
|
|
425
|
+
private direction_;
|
|
426
|
+
private flexDirection_;
|
|
427
|
+
private justifyContent_;
|
|
428
|
+
private justifyItems_;
|
|
429
|
+
private justifySelf_;
|
|
430
|
+
private alignContent_;
|
|
431
|
+
private alignItems_;
|
|
432
|
+
private alignSelf_;
|
|
433
|
+
private positionType_;
|
|
434
|
+
private flexWrap_;
|
|
435
|
+
private overflow_;
|
|
436
|
+
private display_;
|
|
437
|
+
private boxSizing_;
|
|
438
|
+
private flex_;
|
|
439
|
+
private flexGrow_;
|
|
440
|
+
private flexShrink_;
|
|
441
|
+
private flexBasis_;
|
|
442
|
+
private margin_;
|
|
443
|
+
private position_;
|
|
444
|
+
private padding_;
|
|
445
|
+
private border_;
|
|
446
|
+
private gap_;
|
|
447
|
+
private marginResolved_;
|
|
448
|
+
private positionResolved_;
|
|
449
|
+
private paddingResolved_;
|
|
450
|
+
private borderResolved_;
|
|
451
|
+
private dimensions_;
|
|
452
|
+
private aspectRatio_;
|
|
453
|
+
direction(): Direction;
|
|
454
|
+
setDirection(value: Direction): void;
|
|
455
|
+
flexDirection(): FlexDirection;
|
|
456
|
+
setFlexDirection(value: FlexDirection): void;
|
|
457
|
+
justifyContent(): Justify;
|
|
458
|
+
setJustifyContent(value: Justify): void;
|
|
459
|
+
justifyItems(): Justify;
|
|
460
|
+
setJustifyItems(value: Justify): void;
|
|
461
|
+
justifySelf(): Justify;
|
|
462
|
+
setJustifySelf(value: Justify): void;
|
|
463
|
+
alignContent(): Align;
|
|
464
|
+
setAlignContent(value: Align): void;
|
|
465
|
+
alignItems(): Align;
|
|
466
|
+
setAlignItems(value: Align): void;
|
|
467
|
+
alignSelf(): Align;
|
|
468
|
+
setAlignSelf(value: Align): void;
|
|
469
|
+
positionType(): PositionType;
|
|
470
|
+
setPositionType(value: PositionType): void;
|
|
471
|
+
flexWrap(): Wrap;
|
|
472
|
+
setFlexWrap(value: Wrap): void;
|
|
473
|
+
overflow(): Overflow;
|
|
474
|
+
setOverflow(value: Overflow): void;
|
|
475
|
+
display(): Display;
|
|
476
|
+
setDisplay(value: Display): void;
|
|
477
|
+
flex(): number;
|
|
478
|
+
setFlex(value: number): void;
|
|
479
|
+
flexGrow(): number;
|
|
480
|
+
setFlexGrow(value: number): void;
|
|
481
|
+
flexShrink(): number;
|
|
482
|
+
setFlexShrink(value: number): void;
|
|
483
|
+
flexBasis(): StyleSizeLength;
|
|
484
|
+
setFlexBasis(value: StyleSizeLength): void;
|
|
485
|
+
margin(edge: Edge): StyleLength;
|
|
486
|
+
setMargin(edge: Edge, value: StyleLength): void;
|
|
487
|
+
position(edge: Edge): StyleLength;
|
|
488
|
+
setPosition(edge: Edge, value: StyleLength): void;
|
|
489
|
+
padding(edge: Edge): StyleLength;
|
|
490
|
+
setPadding(edge: Edge, value: StyleLength): void;
|
|
491
|
+
border(edge: Edge): StyleLength;
|
|
492
|
+
setBorder(edge: Edge, value: StyleLength): void;
|
|
493
|
+
gap(gutter: Gutter): StyleLength;
|
|
494
|
+
setGap(gutter: Gutter, value: StyleLength): void;
|
|
495
|
+
dimension(axis: Dimension): StyleSizeLength;
|
|
496
|
+
setDimension(axis: Dimension, value: StyleSizeLength): void;
|
|
497
|
+
minDimension(axis: Dimension): StyleSizeLength;
|
|
498
|
+
setMinDimension(axis: Dimension, value: StyleSizeLength): void;
|
|
499
|
+
maxDimension(axis: Dimension): StyleSizeLength;
|
|
500
|
+
setMaxDimension(axis: Dimension, value: StyleSizeLength): void;
|
|
501
|
+
resolvedMinDimension(direction: Direction, axis: Dimension, referenceLength: number, ownerWidth: number): number;
|
|
502
|
+
resolvedMaxDimension(direction: Direction, axis: Dimension, referenceLength: number, ownerWidth: number): number;
|
|
503
|
+
aspectRatio(): number;
|
|
504
|
+
setAspectRatio(value: number): void;
|
|
505
|
+
boxSizing(): BoxSizing;
|
|
506
|
+
setBoxSizing(value: BoxSizing): void;
|
|
507
|
+
horizontalInsetsDefined(): boolean;
|
|
508
|
+
verticalInsetsDefined(): boolean;
|
|
509
|
+
hasPositionOrMargin(): boolean;
|
|
510
|
+
hasPaddingOrBorder(): boolean;
|
|
511
|
+
isFlexStartPositionDefined(axis: FlexDirection, direction: Direction): boolean;
|
|
512
|
+
isFlexStartPositionAuto(axis: FlexDirection, direction: Direction): boolean;
|
|
513
|
+
isInlineStartPositionDefined(axis: FlexDirection, direction: Direction): boolean;
|
|
514
|
+
isInlineStartPositionAuto(axis: FlexDirection, direction: Direction): boolean;
|
|
515
|
+
isFlexEndPositionDefined(axis: FlexDirection, direction: Direction): boolean;
|
|
516
|
+
isFlexEndPositionAuto(axis: FlexDirection, direction: Direction): boolean;
|
|
517
|
+
isInlineEndPositionDefined(axis: FlexDirection, direction: Direction): boolean;
|
|
518
|
+
isInlineEndPositionAuto(axis: FlexDirection, direction: Direction): boolean;
|
|
519
|
+
computeFlexStartPosition(axis: FlexDirection, direction: Direction, axisSize: number): number;
|
|
520
|
+
computeInlineStartPosition(axis: FlexDirection, direction: Direction, axisSize: number): number;
|
|
521
|
+
computeFlexEndPosition(axis: FlexDirection, direction: Direction, axisSize: number): number;
|
|
522
|
+
computeInlineEndPosition(axis: FlexDirection, direction: Direction, axisSize: number): number;
|
|
523
|
+
computeFlexStartMargin(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
524
|
+
computeInlineStartMargin(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
525
|
+
computeFlexEndMargin(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
526
|
+
computeInlineEndMargin(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
527
|
+
computeFlexStartBorder(axis: FlexDirection, direction: Direction): number;
|
|
528
|
+
computeInlineStartBorder(axis: FlexDirection, direction: Direction): number;
|
|
529
|
+
computeFlexEndBorder(axis: FlexDirection, direction: Direction): number;
|
|
530
|
+
computeInlineEndBorder(axis: FlexDirection, direction: Direction): number;
|
|
531
|
+
computeFlexStartPadding(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
532
|
+
computeInlineStartPadding(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
533
|
+
computeFlexEndPadding(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
534
|
+
computeInlineEndPadding(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
535
|
+
computeInlineStartPaddingAndBorder(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
536
|
+
computeFlexStartPaddingAndBorder(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
537
|
+
computeInlineEndPaddingAndBorder(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
538
|
+
computeFlexEndPaddingAndBorder(axis: FlexDirection, direction: Direction, widthSize: number): number;
|
|
539
|
+
computePaddingAndBorderForDimension(direction: Direction, dimension: Dimension, widthSize: number): number;
|
|
540
|
+
computeBorderForAxis(axis: FlexDirection): number;
|
|
541
|
+
computeMarginForAxis(axis: FlexDirection, widthSize: number): number;
|
|
542
|
+
computeGapForAxis(axis: FlexDirection, ownerSize: number): number;
|
|
543
|
+
computeGapForDimension(dimension: Dimension, ownerSize: number): number;
|
|
544
|
+
flexStartMarginIsAuto(axis: FlexDirection, direction: Direction): boolean;
|
|
545
|
+
flexEndMarginIsAuto(axis: FlexDirection, direction: Direction): boolean;
|
|
546
|
+
inlineStartMarginIsAuto(axis: FlexDirection, direction: Direction): boolean;
|
|
547
|
+
inlineEndMarginIsAuto(axis: FlexDirection, direction: Direction): boolean;
|
|
548
|
+
equals(other: Style): boolean;
|
|
549
|
+
copyFrom(other: Style): void;
|
|
550
|
+
private computeColumnGap;
|
|
551
|
+
private computeRowGap;
|
|
552
|
+
private computeLeftEdge;
|
|
553
|
+
private computeTopEdge;
|
|
554
|
+
private computeRightEdge;
|
|
555
|
+
private computeBottomEdge;
|
|
556
|
+
private buildResolvedEdges;
|
|
557
|
+
private resolvedPosition;
|
|
558
|
+
private resolvedMargin;
|
|
559
|
+
private resolvedPadding;
|
|
560
|
+
private resolvedBorder;
|
|
561
|
+
computePosition(edge: PhysicalEdge, direction: Direction): StyleLength;
|
|
562
|
+
computeMargin(edge: PhysicalEdge, direction: Direction): StyleLength;
|
|
563
|
+
computePadding(edge: PhysicalEdge, direction: Direction): StyleLength;
|
|
564
|
+
computeBorder(edge: PhysicalEdge, direction: Direction): StyleLength;
|
|
565
|
+
}
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/yoga/core/node.d.ts
|
|
568
|
+
type MeasureFunc = (width: number, widthMode: MeasureMode, height: number, heightMode: MeasureMode) => Size$1;
|
|
569
|
+
type BaselineFunc = (width: number, height: number) => number;
|
|
570
|
+
type DirtiedFunc = () => void;
|
|
571
|
+
declare class Node$1 {
|
|
572
|
+
hasNewLayout_: boolean;
|
|
573
|
+
isReferenceBaseline_: boolean;
|
|
574
|
+
private isDirty_;
|
|
575
|
+
alwaysFormsContainingBlock: boolean;
|
|
576
|
+
nodeType: NodeType;
|
|
577
|
+
private measureFunc_;
|
|
578
|
+
private measureResult_;
|
|
579
|
+
private baselineFunc_;
|
|
580
|
+
private dirtiedFunc_;
|
|
581
|
+
style: Style;
|
|
582
|
+
layout: LayoutResults;
|
|
583
|
+
lineIndex: number;
|
|
584
|
+
private contentsChildrenCount_;
|
|
585
|
+
owner: Node$1 | null;
|
|
586
|
+
children: Node$1[];
|
|
587
|
+
config: Config$1;
|
|
588
|
+
private processedDimensionWidth_;
|
|
589
|
+
private processedDimensionHeight_;
|
|
590
|
+
private dimensionsDirty_;
|
|
591
|
+
constructor(config?: Config$1);
|
|
592
|
+
hasMeasureFunc(): boolean;
|
|
593
|
+
measure(availableWidth: number, widthMode: MeasureMode, availableHeight: number, heightMode: MeasureMode): Size$1;
|
|
594
|
+
hasBaselineFunc(): boolean;
|
|
595
|
+
baseline(width: number, height: number): number;
|
|
596
|
+
getDirtiedFunc(): DirtiedFunc | null;
|
|
597
|
+
dimensionWithMargin(axis: FlexDirection, widthSize: number): number;
|
|
598
|
+
isLayoutDimensionDefined(axis: FlexDirection): boolean;
|
|
599
|
+
/**
|
|
600
|
+
* Whether the node has a "definite length" along the given axis.
|
|
601
|
+
* https://www.w3.org/TR/css-sizing-3/#definite
|
|
602
|
+
*/
|
|
603
|
+
hasDefiniteLength(dim: Dimension, ownerSize: number): boolean;
|
|
604
|
+
hasErrata(errata: number): boolean;
|
|
605
|
+
hasContentsChildren(): boolean;
|
|
606
|
+
getChildCount(): number;
|
|
607
|
+
getChild(index: number): Node$1;
|
|
608
|
+
/**
|
|
609
|
+
* Children for layout purposes: skips display: contents nodes, splicing
|
|
610
|
+
* their children in place. Returns the raw children array when nothing
|
|
611
|
+
* needs splicing — do not mutate the result.
|
|
612
|
+
*/
|
|
613
|
+
getLayoutChildren(): readonly Node$1[];
|
|
614
|
+
getLayoutChildCount(): number;
|
|
615
|
+
isDirty(): boolean;
|
|
616
|
+
getProcessedDimension(dim: Dimension): StyleSizeLength;
|
|
617
|
+
getResolvedDimension(direction: Direction, dim: Dimension, referenceLength: number, ownerWidth: number): number;
|
|
618
|
+
setMeasureFunc(measureFunc: MeasureFunc | null): void;
|
|
619
|
+
setBaselineFunc(baselineFunc: BaselineFunc | null): void;
|
|
620
|
+
setCoreDirtiedFunc(dirtiedFunc: DirtiedFunc | null): void;
|
|
621
|
+
insertChild(child: Node$1, index: number): void;
|
|
622
|
+
setConfig(config: Config$1): void;
|
|
623
|
+
setDirty(isDirty: boolean): void;
|
|
624
|
+
setChildren(children: Node$1[]): void;
|
|
625
|
+
removeChild(child: Node$1): boolean;
|
|
626
|
+
removeChildAtIndex(index: number): void;
|
|
627
|
+
clearChildren(): void;
|
|
628
|
+
syncContentsChildrenCount(): void;
|
|
629
|
+
setLayoutDirection(direction: Direction): void;
|
|
630
|
+
setLayoutMargin(margin: number, edge: PhysicalEdge): void;
|
|
631
|
+
setLayoutBorder(border: number, edge: PhysicalEdge): void;
|
|
632
|
+
setLayoutPadding(padding: number, edge: PhysicalEdge): void;
|
|
633
|
+
setLayoutLastOwnerDirection(direction: Direction): void;
|
|
634
|
+
setLayoutComputedFlexBasis(computedFlexBasis: number): void;
|
|
635
|
+
markLayoutWritten(): void;
|
|
636
|
+
setLayoutPosition(position: number, edge: PhysicalEdge): void;
|
|
637
|
+
setLayoutComputedFlexBasisGeneration(computedFlexBasisGeneration: number): void;
|
|
638
|
+
setLayoutMeasuredDimension(measuredDimension: number, dim: Dimension): void;
|
|
639
|
+
setLayoutHadOverflow(hadOverflow: boolean): void;
|
|
640
|
+
setLayoutDimension(lengthValue: number, dim: Dimension): void;
|
|
641
|
+
relativePosition(axis: FlexDirection, direction: Direction, axisSize: number): number;
|
|
642
|
+
setPositionFromStyle(direction: Direction, ownerWidth: number, ownerHeight: number): void;
|
|
643
|
+
processFlexBasis(): StyleSizeLength;
|
|
644
|
+
resolveFlexBasis(direction: Direction, flexDirection: FlexDirection, referenceLength: number, ownerWidth: number): number;
|
|
645
|
+
processDimensions(): void;
|
|
646
|
+
invalidateProcessedDimensions(): void;
|
|
647
|
+
resolveDirection(ownerDirection: Direction): Direction;
|
|
648
|
+
cloneChildrenIfNeeded(): void;
|
|
649
|
+
cloneContentsChildrenIfNeeded(): void;
|
|
650
|
+
markDirtyAndPropagate(): void;
|
|
651
|
+
resolveFlexGrow(): number;
|
|
652
|
+
resolveFlexShrink(): number;
|
|
653
|
+
isNodeFlexible(): boolean;
|
|
654
|
+
reset(): void;
|
|
655
|
+
}
|
|
656
|
+
//#endregion
|
|
657
|
+
//#region src/yoga/node.d.ts
|
|
658
|
+
type Layout = {
|
|
659
|
+
left: number;
|
|
660
|
+
right: number;
|
|
661
|
+
top: number;
|
|
662
|
+
bottom: number;
|
|
663
|
+
width: number;
|
|
664
|
+
height: number;
|
|
665
|
+
hadOverflow: boolean;
|
|
666
|
+
};
|
|
667
|
+
type Size = {
|
|
668
|
+
width: number;
|
|
669
|
+
height: number;
|
|
670
|
+
};
|
|
671
|
+
type Value = {
|
|
672
|
+
unit: Unit;
|
|
673
|
+
value: number;
|
|
674
|
+
};
|
|
675
|
+
type DirtiedFunction = (node: Node) => void;
|
|
676
|
+
type MeasureFunction = (width: number, widthMode: MeasureMode, height: number, heightMode: MeasureMode) => Size;
|
|
677
|
+
declare class Node extends Node$1 {
|
|
678
|
+
private constructor();
|
|
679
|
+
static create(config?: Config): Node;
|
|
680
|
+
static createDefault(): Node;
|
|
681
|
+
static createWithConfig(config: Config): Node;
|
|
682
|
+
/**
|
|
683
|
+
@deprecated No-op in the TypeScript port: the garbage collector owns this
|
|
684
|
+
node's lifetime. Kept only for yoga-layout binding compatibility (WASM
|
|
685
|
+
nodes require explicit destruction).
|
|
686
|
+
*/
|
|
687
|
+
free(): void;
|
|
688
|
+
/**
|
|
689
|
+
@deprecated No-op in the TypeScript port: garbage collection handles
|
|
690
|
+
object graphs and cycles. Kept only for yoga-layout binding compatibility.
|
|
691
|
+
*/
|
|
692
|
+
freeRecursive(): void;
|
|
693
|
+
insertChild(child: Node, index: number): void;
|
|
694
|
+
removeChild(child: Node): boolean;
|
|
695
|
+
getChildCount(): number;
|
|
696
|
+
getChild(index: number): Node;
|
|
697
|
+
getParent(): Node | null;
|
|
698
|
+
setChildren(children: Node[]): void;
|
|
699
|
+
reset(): void;
|
|
700
|
+
copyStyle(other: Node): void;
|
|
701
|
+
private updateStyleLength;
|
|
702
|
+
private updateStyleSize;
|
|
703
|
+
private updateStyleEnum;
|
|
704
|
+
private setDimensionValue;
|
|
705
|
+
private setMinDimensionValue;
|
|
706
|
+
private setMaxDimensionValue;
|
|
707
|
+
setPositionType(positionType: PositionType): void;
|
|
708
|
+
setPosition(edge: Edge, position: number | `${number}%` | undefined): void;
|
|
709
|
+
setPositionPercent(edge: Edge, position: number | undefined): void;
|
|
710
|
+
setPositionAuto(edge: Edge): void;
|
|
711
|
+
setAlignContent(alignContent: Align): void;
|
|
712
|
+
setAlignItems(alignItems: Align): void;
|
|
713
|
+
setAlignSelf(alignSelf: Align): void;
|
|
714
|
+
setFlexDirection(flexDirection: FlexDirection): void;
|
|
715
|
+
setFlexWrap(flexWrap: Wrap): void;
|
|
716
|
+
setJustifyContent(justifyContent: Justify): void;
|
|
717
|
+
setDirection(direction: Direction): void;
|
|
718
|
+
setMargin(edge: Edge, margin: number | "auto" | `${number}%` | undefined): void;
|
|
719
|
+
setMarginPercent(edge: Edge, margin: number | undefined): void;
|
|
720
|
+
setMarginAuto(edge: Edge): void;
|
|
721
|
+
setOverflow(overflow: Overflow): void;
|
|
722
|
+
setDisplay(display: Display): void;
|
|
723
|
+
setFlex(flex: number | undefined): void;
|
|
724
|
+
setFlexBasis(flexBasis: number | "auto" | "fit-content" | "max-content" | "stretch" | `${number}%` | undefined): void;
|
|
725
|
+
setFlexBasisPercent(flexBasis: number | undefined): void;
|
|
726
|
+
setFlexBasisAuto(): void;
|
|
727
|
+
setFlexBasisMaxContent(): void;
|
|
728
|
+
setFlexBasisFitContent(): void;
|
|
729
|
+
setFlexBasisStretch(): void;
|
|
730
|
+
setFlexGrow(flexGrow: number | undefined): void;
|
|
731
|
+
setFlexShrink(flexShrink: number | undefined): void;
|
|
732
|
+
setWidth(width: number | "auto" | "fit-content" | "max-content" | "stretch" | `${number}%` | undefined): void;
|
|
733
|
+
setWidthPercent(width: number | undefined): void;
|
|
734
|
+
setWidthAuto(): void;
|
|
735
|
+
setWidthMaxContent(): void;
|
|
736
|
+
setWidthFitContent(): void;
|
|
737
|
+
setWidthStretch(): void;
|
|
738
|
+
setHeight(height: number | "auto" | "fit-content" | "max-content" | "stretch" | `${number}%` | undefined): void;
|
|
739
|
+
setHeightPercent(height: number | undefined): void;
|
|
740
|
+
setHeightAuto(): void;
|
|
741
|
+
setHeightMaxContent(): void;
|
|
742
|
+
setHeightFitContent(): void;
|
|
743
|
+
setHeightStretch(): void;
|
|
744
|
+
setMinWidth(minWidth: number | "fit-content" | "max-content" | "stretch" | `${number}%` | undefined): void;
|
|
745
|
+
setMinWidthPercent(minWidth: number | undefined): void;
|
|
746
|
+
setMinWidthMaxContent(): void;
|
|
747
|
+
setMinWidthFitContent(): void;
|
|
748
|
+
setMinWidthStretch(): void;
|
|
749
|
+
setMinHeight(minHeight: number | "fit-content" | "max-content" | "stretch" | `${number}%` | undefined): void;
|
|
750
|
+
setMinHeightPercent(minHeight: number | undefined): void;
|
|
751
|
+
setMinHeightMaxContent(): void;
|
|
752
|
+
setMinHeightFitContent(): void;
|
|
753
|
+
setMinHeightStretch(): void;
|
|
754
|
+
setMaxWidth(maxWidth: number | "fit-content" | "max-content" | "stretch" | `${number}%` | undefined): void;
|
|
755
|
+
setMaxWidthPercent(maxWidth: number | undefined): void;
|
|
756
|
+
setMaxWidthMaxContent(): void;
|
|
757
|
+
setMaxWidthFitContent(): void;
|
|
758
|
+
setMaxWidthStretch(): void;
|
|
759
|
+
setMaxHeight(maxHeight: number | "fit-content" | "max-content" | "stretch" | `${number}%` | undefined): void;
|
|
760
|
+
setMaxHeightPercent(maxHeight: number | undefined): void;
|
|
761
|
+
setMaxHeightMaxContent(): void;
|
|
762
|
+
setMaxHeightFitContent(): void;
|
|
763
|
+
setMaxHeightStretch(): void;
|
|
764
|
+
setAspectRatio(aspectRatio: number | undefined): void;
|
|
765
|
+
setBorder(edge: Edge, borderWidth: number | undefined): void;
|
|
766
|
+
setPadding(edge: Edge, padding: number | `${number}%` | undefined): void;
|
|
767
|
+
setPaddingPercent(edge: Edge, padding: number | undefined): void;
|
|
768
|
+
setGap(gutter: Gutter, gapLength: number | `${number}%` | undefined): void;
|
|
769
|
+
setGapPercent(gutter: Gutter, gapLength: number | undefined): void;
|
|
770
|
+
setBoxSizing(boxSizing: BoxSizing): void;
|
|
771
|
+
setIsReferenceBaseline(isReferenceBaseline: boolean): void;
|
|
772
|
+
setAlwaysFormsContainingBlock(alwaysFormsContainingBlock: boolean): void;
|
|
773
|
+
getPositionType(): PositionType;
|
|
774
|
+
getPosition(edge: Edge): Value;
|
|
775
|
+
getAlignContent(): Align;
|
|
776
|
+
getAlignItems(): Align;
|
|
777
|
+
getAlignSelf(): Align;
|
|
778
|
+
getFlexDirection(): FlexDirection;
|
|
779
|
+
getFlexWrap(): Wrap;
|
|
780
|
+
getJustifyContent(): Justify;
|
|
781
|
+
getDirection(): Direction;
|
|
782
|
+
getMargin(edge: Edge): Value;
|
|
783
|
+
getOverflow(): Overflow;
|
|
784
|
+
getDisplay(): Display;
|
|
785
|
+
getFlexBasis(): Value;
|
|
786
|
+
getFlexGrow(): number;
|
|
787
|
+
getFlexShrink(): number;
|
|
788
|
+
getWidth(): Value;
|
|
789
|
+
getHeight(): Value;
|
|
790
|
+
getMinWidth(): Value;
|
|
791
|
+
getMinHeight(): Value;
|
|
792
|
+
getMaxWidth(): Value;
|
|
793
|
+
getMaxHeight(): Value;
|
|
794
|
+
getAspectRatio(): number;
|
|
795
|
+
getBorder(edge: Edge): number;
|
|
796
|
+
getPadding(edge: Edge): Value;
|
|
797
|
+
getGap(gutter: Gutter): Value;
|
|
798
|
+
getBoxSizing(): BoxSizing;
|
|
799
|
+
isReferenceBaseline(): boolean;
|
|
800
|
+
setMeasureFunc(measureFunc: MeasureFunction | null): void;
|
|
801
|
+
unsetMeasureFunc(): void;
|
|
802
|
+
setDirtiedFunc(dirtiedFunc: DirtiedFunction | null): void;
|
|
803
|
+
unsetDirtiedFunc(): void;
|
|
804
|
+
markDirty(): void;
|
|
805
|
+
isDirty(): boolean;
|
|
806
|
+
markLayoutSeen(): void;
|
|
807
|
+
hasNewLayout(): boolean;
|
|
808
|
+
calculateLayout(width?: number | "auto" | undefined, height?: number | "auto" | undefined, direction?: Direction): void;
|
|
809
|
+
getComputedLeft(): number;
|
|
810
|
+
getComputedRight(): number;
|
|
811
|
+
getComputedTop(): number;
|
|
812
|
+
getComputedBottom(): number;
|
|
813
|
+
getComputedWidth(): number;
|
|
814
|
+
getComputedHeight(): number;
|
|
815
|
+
getComputedHadOverflow(): boolean;
|
|
816
|
+
getComputedLayout(): Layout;
|
|
817
|
+
private resolvedLayoutProperty;
|
|
818
|
+
getComputedMargin(edge: Edge): number;
|
|
819
|
+
getComputedBorder(edge: Edge): number;
|
|
820
|
+
getComputedPadding(edge: Edge): number;
|
|
821
|
+
}
|
|
822
|
+
//#endregion
|
|
823
|
+
//#region src/yoga/index.d.ts
|
|
824
|
+
declare const Yoga: {
|
|
825
|
+
ALIGN_AUTO: 0;
|
|
826
|
+
ALIGN_FLEX_START: 1;
|
|
827
|
+
ALIGN_CENTER: 2;
|
|
828
|
+
ALIGN_FLEX_END: 3;
|
|
829
|
+
ALIGN_STRETCH: 4;
|
|
830
|
+
ALIGN_BASELINE: 5;
|
|
831
|
+
ALIGN_SPACE_BETWEEN: 6;
|
|
832
|
+
ALIGN_SPACE_AROUND: 7;
|
|
833
|
+
ALIGN_SPACE_EVENLY: 8;
|
|
834
|
+
ALIGN_START: 9;
|
|
835
|
+
ALIGN_END: 10;
|
|
836
|
+
BOX_SIZING_BORDER_BOX: 0;
|
|
837
|
+
BOX_SIZING_CONTENT_BOX: 1;
|
|
838
|
+
DIMENSION_WIDTH: 0;
|
|
839
|
+
DIMENSION_HEIGHT: 1;
|
|
840
|
+
DIRECTION_INHERIT: 0;
|
|
841
|
+
DIRECTION_LTR: 1;
|
|
842
|
+
DIRECTION_RTL: 2;
|
|
843
|
+
DISPLAY_FLEX: 0;
|
|
844
|
+
DISPLAY_NONE: 1;
|
|
845
|
+
DISPLAY_CONTENTS: 2;
|
|
846
|
+
DISPLAY_GRID: 3;
|
|
847
|
+
EDGE_LEFT: 0;
|
|
848
|
+
EDGE_TOP: 1;
|
|
849
|
+
EDGE_RIGHT: 2;
|
|
850
|
+
EDGE_BOTTOM: 3;
|
|
851
|
+
EDGE_START: 4;
|
|
852
|
+
EDGE_END: 5;
|
|
853
|
+
EDGE_HORIZONTAL: 6;
|
|
854
|
+
EDGE_VERTICAL: 7;
|
|
855
|
+
EDGE_ALL: 8;
|
|
856
|
+
ERRATA_NONE: 0;
|
|
857
|
+
ERRATA_STRETCH_FLEX_BASIS: 1;
|
|
858
|
+
ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: 2;
|
|
859
|
+
ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: 4;
|
|
860
|
+
ERRATA_MIN_SIZE_UNDEFINED_INSTEAD_OF_AUTO: 8;
|
|
861
|
+
ERRATA_ALL: 2147483647;
|
|
862
|
+
ERRATA_CLASSIC: 2147483646;
|
|
863
|
+
EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 0;
|
|
864
|
+
EXPERIMENTAL_FEATURE_FIX_FLEX_BASIS_FIT_CONTENT: 1;
|
|
865
|
+
FLEX_DIRECTION_COLUMN: 0;
|
|
866
|
+
FLEX_DIRECTION_COLUMN_REVERSE: 1;
|
|
867
|
+
FLEX_DIRECTION_ROW: 2;
|
|
868
|
+
FLEX_DIRECTION_ROW_REVERSE: 3;
|
|
869
|
+
GRID_TRACK_TYPE_AUTO: 0;
|
|
870
|
+
GRID_TRACK_TYPE_POINTS: 1;
|
|
871
|
+
GRID_TRACK_TYPE_PERCENT: 2;
|
|
872
|
+
GRID_TRACK_TYPE_FR: 3;
|
|
873
|
+
GRID_TRACK_TYPE_MINMAX: 4;
|
|
874
|
+
GUTTER_COLUMN: 0;
|
|
875
|
+
GUTTER_ROW: 1;
|
|
876
|
+
GUTTER_ALL: 2;
|
|
877
|
+
JUSTIFY_AUTO: 0;
|
|
878
|
+
JUSTIFY_FLEX_START: 1;
|
|
879
|
+
JUSTIFY_CENTER: 2;
|
|
880
|
+
JUSTIFY_FLEX_END: 3;
|
|
881
|
+
JUSTIFY_SPACE_BETWEEN: 4;
|
|
882
|
+
JUSTIFY_SPACE_AROUND: 5;
|
|
883
|
+
JUSTIFY_SPACE_EVENLY: 6;
|
|
884
|
+
JUSTIFY_STRETCH: 7;
|
|
885
|
+
JUSTIFY_START: 8;
|
|
886
|
+
JUSTIFY_END: 9;
|
|
887
|
+
LOG_LEVEL_ERROR: 0;
|
|
888
|
+
LOG_LEVEL_WARN: 1;
|
|
889
|
+
LOG_LEVEL_INFO: 2;
|
|
890
|
+
LOG_LEVEL_DEBUG: 3;
|
|
891
|
+
LOG_LEVEL_VERBOSE: 4;
|
|
892
|
+
LOG_LEVEL_FATAL: 5;
|
|
893
|
+
MEASURE_MODE_UNDEFINED: 0;
|
|
894
|
+
MEASURE_MODE_EXACTLY: 1;
|
|
895
|
+
MEASURE_MODE_AT_MOST: 2;
|
|
896
|
+
NODE_TYPE_DEFAULT: 0;
|
|
897
|
+
NODE_TYPE_TEXT: 1;
|
|
898
|
+
OVERFLOW_VISIBLE: 0;
|
|
899
|
+
OVERFLOW_HIDDEN: 1;
|
|
900
|
+
OVERFLOW_SCROLL: 2;
|
|
901
|
+
POSITION_TYPE_STATIC: 0;
|
|
902
|
+
POSITION_TYPE_RELATIVE: 1;
|
|
903
|
+
POSITION_TYPE_ABSOLUTE: 2;
|
|
904
|
+
UNIT_UNDEFINED: 0;
|
|
905
|
+
UNIT_POINT: 1;
|
|
906
|
+
UNIT_PERCENT: 2;
|
|
907
|
+
UNIT_AUTO: 3;
|
|
908
|
+
UNIT_MAX_CONTENT: 4;
|
|
909
|
+
UNIT_FIT_CONTENT: 5;
|
|
910
|
+
UNIT_STRETCH: 6;
|
|
911
|
+
WRAP_NO_WRAP: 0;
|
|
912
|
+
WRAP_WRAP: 1;
|
|
913
|
+
WRAP_WRAP_REVERSE: 2;
|
|
914
|
+
Config: typeof Config;
|
|
915
|
+
Node: typeof Node;
|
|
916
|
+
};
|
|
917
|
+
type Yoga = typeof Yoga;
|
|
918
|
+
//#endregion
|
|
919
|
+
export { Unit as C, PositionType as S, constants as T, Justify as _, Config as a, NodeType as b, Dimension as c, Edge as d, Errata as f, Gutter as g, GridTrackType as h, Node as i, Direction as l, FlexDirection as m, DirtiedFunction as n, Align as o, ExperimentalFeature as p, MeasureFunction as r, BoxSizing as s, Yoga as t, Display as u, LogLevel as v, Wrap as w, Overflow as x, MeasureMode as y };
|