react-native-tvos 0.84.0-0rc0 → 0.84.1-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.
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/README.md +16 -54
- package/React/Base/RCTVersion.m +2 -2
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +12 -12
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +14 -16
- package/React/Views/RCTTVView.h +6 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +101 -22
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +1 -1
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +0 -4
- package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +0 -4
- package/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +0 -4
- package/ReactCommon/cmake-utils/react-native-flags.cmake +3 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +3 -3
- package/ReactCommon/hermes/executor/CMakeLists.txt +0 -4
- package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +2 -0
- package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +0 -4
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.cpp +44 -3
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropSerializer.cpp +408 -0
- package/ReactCommon/react/renderer/animationbackend/AnimatedProps.h +66 -1
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropsBuilder.h +58 -2
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropsRegistry.h +52 -0
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp +6 -9
- package/ReactCommon/react/runtime/CMakeLists.txt +0 -4
- package/ReactCommon/react/runtime/hermes/CMakeLists.txt +0 -4
- package/package.json +11 -10
- package/react-native.config.js +17 -0
- package/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js +5 -5
- package/scripts/ios-configure-glog.sh +18 -0
- package/scripts/react_native_pods.rb +5 -0
- package/sdks/.hermesv1version +1 -1
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +15 -6
- package/sdks/hermes-engine/hermes-utils.rb +1 -1
- package/sdks/hermes-engine/version.properties +2 -2
- package/settings.gradle.kts +21 -1
- package/third-party-podspecs/glog.podspec +1 -0
- package/tvosCommands.js +51 -0
- package/types/public/ReactNativeTVTypes.d.ts +7 -0
|
@@ -74,6 +74,34 @@ void packTransform(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
|
74
74
|
folly::dynamic::array(folly::dynamic::object("matrix", matrixArray)));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
std::string unitTypeToString(UnitType unit) {
|
|
78
|
+
switch (unit) {
|
|
79
|
+
case UnitType::Undefined:
|
|
80
|
+
return "undefined";
|
|
81
|
+
case UnitType::Point:
|
|
82
|
+
return "point";
|
|
83
|
+
case UnitType::Percent:
|
|
84
|
+
return "percent";
|
|
85
|
+
default:
|
|
86
|
+
throw std::runtime_error("Unknown unit type");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
void packTransformOrigin(
|
|
91
|
+
folly::dynamic& dyn,
|
|
92
|
+
const AnimatedPropBase& animatedProp) {
|
|
93
|
+
const auto& transformOrigin = get<TransformOrigin>(animatedProp);
|
|
94
|
+
auto originArray = folly::dynamic::array();
|
|
95
|
+
for (const auto& xyValue : transformOrigin.xy) {
|
|
96
|
+
folly::dynamic valueObj = folly::dynamic::object();
|
|
97
|
+
valueObj["value"] = xyValue.value;
|
|
98
|
+
valueObj["unit"] = unitTypeToString(xyValue.unit);
|
|
99
|
+
originArray.push_back(valueObj);
|
|
100
|
+
}
|
|
101
|
+
originArray.push_back(transformOrigin.z);
|
|
102
|
+
dyn.insert("transformOrigin", originArray);
|
|
103
|
+
}
|
|
104
|
+
|
|
77
105
|
void packBackgroundColor(
|
|
78
106
|
folly::dynamic& dyn,
|
|
79
107
|
const AnimatedPropBase& animatedProp) {
|
|
@@ -198,6 +226,346 @@ void packOutlineWidth(
|
|
|
198
226
|
dyn.insert("outlineWidth", get<Float>(animatedProp));
|
|
199
227
|
}
|
|
200
228
|
|
|
229
|
+
void packBorderCurveEdge(
|
|
230
|
+
folly::dynamic& dyn,
|
|
231
|
+
const std::string& propName,
|
|
232
|
+
const std::optional<BorderCurve>& curveValue) {
|
|
233
|
+
if (curveValue.has_value()) {
|
|
234
|
+
std::string curveStr;
|
|
235
|
+
switch (curveValue.value()) {
|
|
236
|
+
case BorderCurve::Circular:
|
|
237
|
+
curveStr = "circular";
|
|
238
|
+
break;
|
|
239
|
+
case BorderCurve::Continuous:
|
|
240
|
+
curveStr = "continuous";
|
|
241
|
+
break;
|
|
242
|
+
default:
|
|
243
|
+
throw std::runtime_error("Unknown border curve");
|
|
244
|
+
}
|
|
245
|
+
dyn.insert(propName, curveStr);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
void packBorderCurves(
|
|
250
|
+
folly::dynamic& dyn,
|
|
251
|
+
const AnimatedPropBase& animatedProp) {
|
|
252
|
+
const auto& borderCurves = get<CascadedBorderCurves>(animatedProp);
|
|
253
|
+
|
|
254
|
+
packBorderCurveEdge(dyn, "borderTopLeftCurve", borderCurves.topLeft);
|
|
255
|
+
packBorderCurveEdge(dyn, "borderTopRightCurve", borderCurves.topRight);
|
|
256
|
+
packBorderCurveEdge(dyn, "borderBottomLeftCurve", borderCurves.bottomLeft);
|
|
257
|
+
packBorderCurveEdge(dyn, "borderBottomRightCurve", borderCurves.bottomRight);
|
|
258
|
+
|
|
259
|
+
if (borderCurves.all.has_value()) {
|
|
260
|
+
std::string curveStr;
|
|
261
|
+
switch (borderCurves.all.value()) {
|
|
262
|
+
case BorderCurve::Circular:
|
|
263
|
+
curveStr = "circular";
|
|
264
|
+
break;
|
|
265
|
+
case BorderCurve::Continuous:
|
|
266
|
+
curveStr = "continuous";
|
|
267
|
+
break;
|
|
268
|
+
default:
|
|
269
|
+
throw std::runtime_error("Unknown border curve");
|
|
270
|
+
}
|
|
271
|
+
dyn.insert("borderCurve", curveStr);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
std::string borderStyleToString(BorderStyle style) {
|
|
276
|
+
switch (style) {
|
|
277
|
+
case BorderStyle::Solid:
|
|
278
|
+
return "solid";
|
|
279
|
+
case BorderStyle::Dotted:
|
|
280
|
+
return "dotted";
|
|
281
|
+
case BorderStyle::Dashed:
|
|
282
|
+
return "dashed";
|
|
283
|
+
default:
|
|
284
|
+
throw std::runtime_error("Unknown border style");
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
void packBorderStyleEdge(
|
|
289
|
+
folly::dynamic& dyn,
|
|
290
|
+
const std::string& propName,
|
|
291
|
+
const std::optional<BorderStyle>& styleValue) {
|
|
292
|
+
if (styleValue.has_value()) {
|
|
293
|
+
dyn.insert(propName, borderStyleToString(styleValue.value()));
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
void packBorderStyles(
|
|
298
|
+
folly::dynamic& dyn,
|
|
299
|
+
const AnimatedPropBase& animatedProp) {
|
|
300
|
+
const auto& borderStyles = get<CascadedBorderStyles>(animatedProp);
|
|
301
|
+
|
|
302
|
+
packBorderStyleEdge(dyn, "borderLeftStyle", borderStyles.left);
|
|
303
|
+
packBorderStyleEdge(dyn, "borderTopStyle", borderStyles.top);
|
|
304
|
+
packBorderStyleEdge(dyn, "borderRightStyle", borderStyles.right);
|
|
305
|
+
packBorderStyleEdge(dyn, "borderBottomStyle", borderStyles.bottom);
|
|
306
|
+
packBorderStyleEdge(dyn, "borderStartStyle", borderStyles.start);
|
|
307
|
+
packBorderStyleEdge(dyn, "borderEndStyle", borderStyles.end);
|
|
308
|
+
|
|
309
|
+
if (borderStyles.all.has_value()) {
|
|
310
|
+
dyn.insert("borderStyle", borderStyleToString(borderStyles.all.value()));
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
void packPointerEvents(
|
|
315
|
+
folly::dynamic& dyn,
|
|
316
|
+
const AnimatedPropBase& animatedProp) {
|
|
317
|
+
const auto& pointerEvents = get<PointerEventsMode>(animatedProp);
|
|
318
|
+
std::string pointerEventsStr;
|
|
319
|
+
switch (pointerEvents) {
|
|
320
|
+
case PointerEventsMode::Auto:
|
|
321
|
+
pointerEventsStr = "auto";
|
|
322
|
+
break;
|
|
323
|
+
case PointerEventsMode::None:
|
|
324
|
+
pointerEventsStr = "none";
|
|
325
|
+
break;
|
|
326
|
+
case PointerEventsMode::BoxNone:
|
|
327
|
+
pointerEventsStr = "box-none";
|
|
328
|
+
break;
|
|
329
|
+
case PointerEventsMode::BoxOnly:
|
|
330
|
+
pointerEventsStr = "box-only";
|
|
331
|
+
break;
|
|
332
|
+
default:
|
|
333
|
+
throw std::runtime_error("Unknown pointer events mode");
|
|
334
|
+
}
|
|
335
|
+
dyn.insert("pointerEvents", pointerEventsStr);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
void packIsolation(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
339
|
+
const auto& isolation = get<Isolation>(animatedProp);
|
|
340
|
+
std::string isolationStr;
|
|
341
|
+
switch (isolation) {
|
|
342
|
+
case Isolation::Auto:
|
|
343
|
+
isolationStr = "auto";
|
|
344
|
+
break;
|
|
345
|
+
case Isolation::Isolate:
|
|
346
|
+
isolationStr = "isolate";
|
|
347
|
+
break;
|
|
348
|
+
default:
|
|
349
|
+
throw std::runtime_error("Unknown isolation mode");
|
|
350
|
+
}
|
|
351
|
+
dyn.insert("isolation", isolationStr);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
void packCursor(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
355
|
+
const auto& cursor = get<Cursor>(animatedProp);
|
|
356
|
+
std::string cursorStr;
|
|
357
|
+
switch (cursor) {
|
|
358
|
+
case Cursor::Auto:
|
|
359
|
+
cursorStr = "auto";
|
|
360
|
+
break;
|
|
361
|
+
case Cursor::Alias:
|
|
362
|
+
cursorStr = "alias";
|
|
363
|
+
break;
|
|
364
|
+
case Cursor::AllScroll:
|
|
365
|
+
cursorStr = "all-scroll";
|
|
366
|
+
break;
|
|
367
|
+
case Cursor::Cell:
|
|
368
|
+
cursorStr = "cell";
|
|
369
|
+
break;
|
|
370
|
+
case Cursor::ColResize:
|
|
371
|
+
cursorStr = "col-resize";
|
|
372
|
+
break;
|
|
373
|
+
case Cursor::ContextMenu:
|
|
374
|
+
cursorStr = "context-menu";
|
|
375
|
+
break;
|
|
376
|
+
case Cursor::Copy:
|
|
377
|
+
cursorStr = "copy";
|
|
378
|
+
break;
|
|
379
|
+
case Cursor::Crosshair:
|
|
380
|
+
cursorStr = "crosshair";
|
|
381
|
+
break;
|
|
382
|
+
case Cursor::Default:
|
|
383
|
+
cursorStr = "default";
|
|
384
|
+
break;
|
|
385
|
+
case Cursor::EResize:
|
|
386
|
+
cursorStr = "e-resize";
|
|
387
|
+
break;
|
|
388
|
+
case Cursor::EWResize:
|
|
389
|
+
cursorStr = "ew-resize";
|
|
390
|
+
break;
|
|
391
|
+
case Cursor::Grab:
|
|
392
|
+
cursorStr = "grab";
|
|
393
|
+
break;
|
|
394
|
+
case Cursor::Grabbing:
|
|
395
|
+
cursorStr = "grabbing";
|
|
396
|
+
break;
|
|
397
|
+
case Cursor::Help:
|
|
398
|
+
cursorStr = "help";
|
|
399
|
+
break;
|
|
400
|
+
case Cursor::Move:
|
|
401
|
+
cursorStr = "move";
|
|
402
|
+
break;
|
|
403
|
+
case Cursor::NResize:
|
|
404
|
+
cursorStr = "n-resize";
|
|
405
|
+
break;
|
|
406
|
+
case Cursor::NEResize:
|
|
407
|
+
cursorStr = "ne-resize";
|
|
408
|
+
break;
|
|
409
|
+
case Cursor::NESWResize:
|
|
410
|
+
cursorStr = "nesw-resize";
|
|
411
|
+
break;
|
|
412
|
+
case Cursor::NSResize:
|
|
413
|
+
cursorStr = "ns-resize";
|
|
414
|
+
break;
|
|
415
|
+
case Cursor::NWResize:
|
|
416
|
+
cursorStr = "nw-resize";
|
|
417
|
+
break;
|
|
418
|
+
case Cursor::NWSEResize:
|
|
419
|
+
cursorStr = "nwse-resize";
|
|
420
|
+
break;
|
|
421
|
+
case Cursor::NoDrop:
|
|
422
|
+
cursorStr = "no-drop";
|
|
423
|
+
break;
|
|
424
|
+
case Cursor::None:
|
|
425
|
+
cursorStr = "none";
|
|
426
|
+
break;
|
|
427
|
+
case Cursor::NotAllowed:
|
|
428
|
+
cursorStr = "not-allowed";
|
|
429
|
+
break;
|
|
430
|
+
case Cursor::Pointer:
|
|
431
|
+
cursorStr = "pointer";
|
|
432
|
+
break;
|
|
433
|
+
case Cursor::Progress:
|
|
434
|
+
cursorStr = "progress";
|
|
435
|
+
break;
|
|
436
|
+
case Cursor::RowResize:
|
|
437
|
+
cursorStr = "row-resize";
|
|
438
|
+
break;
|
|
439
|
+
case Cursor::SResize:
|
|
440
|
+
cursorStr = "s-resize";
|
|
441
|
+
break;
|
|
442
|
+
case Cursor::SEResize:
|
|
443
|
+
cursorStr = "se-resize";
|
|
444
|
+
break;
|
|
445
|
+
case Cursor::SWResize:
|
|
446
|
+
cursorStr = "sw-resize";
|
|
447
|
+
break;
|
|
448
|
+
case Cursor::Text:
|
|
449
|
+
cursorStr = "text";
|
|
450
|
+
break;
|
|
451
|
+
case Cursor::Url:
|
|
452
|
+
cursorStr = "url";
|
|
453
|
+
break;
|
|
454
|
+
case Cursor::WResize:
|
|
455
|
+
cursorStr = "w-resize";
|
|
456
|
+
break;
|
|
457
|
+
case Cursor::Wait:
|
|
458
|
+
cursorStr = "wait";
|
|
459
|
+
break;
|
|
460
|
+
case Cursor::ZoomIn:
|
|
461
|
+
cursorStr = "zoom-in";
|
|
462
|
+
break;
|
|
463
|
+
case Cursor::ZoomOut:
|
|
464
|
+
cursorStr = "zoom-out";
|
|
465
|
+
break;
|
|
466
|
+
default:
|
|
467
|
+
throw std::runtime_error("Unknown cursor type");
|
|
468
|
+
}
|
|
469
|
+
dyn.insert("cursor", cursorStr);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
void packBoxShadow(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
473
|
+
const auto& boxShadows = get<std::vector<BoxShadow>>(animatedProp);
|
|
474
|
+
auto shadowArray = folly::dynamic::array();
|
|
475
|
+
for (const auto& shadow : boxShadows) {
|
|
476
|
+
folly::dynamic shadowObj = folly::dynamic::object();
|
|
477
|
+
shadowObj["offsetX"] = shadow.offsetX;
|
|
478
|
+
shadowObj["offsetY"] = shadow.offsetY;
|
|
479
|
+
shadowObj["blurRadius"] = shadow.blurRadius;
|
|
480
|
+
shadowObj["spreadDistance"] = shadow.spreadDistance;
|
|
481
|
+
shadowObj["inset"] = shadow.inset;
|
|
482
|
+
if (shadow.color) {
|
|
483
|
+
shadowObj["color"] = static_cast<int32_t>(*shadow.color);
|
|
484
|
+
}
|
|
485
|
+
shadowArray.push_back(shadowObj);
|
|
486
|
+
}
|
|
487
|
+
dyn.insert("boxShadow", shadowArray);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
void packMixBlendMode(
|
|
491
|
+
folly::dynamic& dyn,
|
|
492
|
+
const AnimatedPropBase& animatedProp) {
|
|
493
|
+
const auto& mixBlendMode = get<BlendMode>(animatedProp);
|
|
494
|
+
std::string blendModeStr;
|
|
495
|
+
switch (mixBlendMode) {
|
|
496
|
+
case BlendMode::Normal:
|
|
497
|
+
blendModeStr = "normal";
|
|
498
|
+
break;
|
|
499
|
+
case BlendMode::Multiply:
|
|
500
|
+
blendModeStr = "multiply";
|
|
501
|
+
break;
|
|
502
|
+
case BlendMode::Screen:
|
|
503
|
+
blendModeStr = "screen";
|
|
504
|
+
break;
|
|
505
|
+
case BlendMode::Overlay:
|
|
506
|
+
blendModeStr = "overlay";
|
|
507
|
+
break;
|
|
508
|
+
case BlendMode::Darken:
|
|
509
|
+
blendModeStr = "darken";
|
|
510
|
+
break;
|
|
511
|
+
case BlendMode::Lighten:
|
|
512
|
+
blendModeStr = "lighten";
|
|
513
|
+
break;
|
|
514
|
+
case BlendMode::ColorDodge:
|
|
515
|
+
blendModeStr = "color-dodge";
|
|
516
|
+
break;
|
|
517
|
+
case BlendMode::ColorBurn:
|
|
518
|
+
blendModeStr = "color-burn";
|
|
519
|
+
break;
|
|
520
|
+
case BlendMode::HardLight:
|
|
521
|
+
blendModeStr = "hard-light";
|
|
522
|
+
break;
|
|
523
|
+
case BlendMode::SoftLight:
|
|
524
|
+
blendModeStr = "soft-light";
|
|
525
|
+
break;
|
|
526
|
+
case BlendMode::Difference:
|
|
527
|
+
blendModeStr = "difference";
|
|
528
|
+
break;
|
|
529
|
+
case BlendMode::Exclusion:
|
|
530
|
+
blendModeStr = "exclusion";
|
|
531
|
+
break;
|
|
532
|
+
case BlendMode::Hue:
|
|
533
|
+
blendModeStr = "hue";
|
|
534
|
+
break;
|
|
535
|
+
case BlendMode::Saturation:
|
|
536
|
+
blendModeStr = "saturation";
|
|
537
|
+
break;
|
|
538
|
+
case BlendMode::Color:
|
|
539
|
+
blendModeStr = "color";
|
|
540
|
+
break;
|
|
541
|
+
case BlendMode::Luminosity:
|
|
542
|
+
blendModeStr = "luminosity";
|
|
543
|
+
break;
|
|
544
|
+
default:
|
|
545
|
+
throw std::runtime_error("Unknown blend mode");
|
|
546
|
+
}
|
|
547
|
+
dyn.insert("mixBlendMode", blendModeStr);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
void packBackfaceVisibility(
|
|
551
|
+
folly::dynamic& dyn,
|
|
552
|
+
const AnimatedPropBase& animatedProp) {
|
|
553
|
+
const auto& backfaceVisibility = get<BackfaceVisibility>(animatedProp);
|
|
554
|
+
std::string visibilityStr;
|
|
555
|
+
switch (backfaceVisibility) {
|
|
556
|
+
case BackfaceVisibility::Auto:
|
|
557
|
+
visibilityStr = "auto";
|
|
558
|
+
break;
|
|
559
|
+
case BackfaceVisibility::Visible:
|
|
560
|
+
visibilityStr = "visible";
|
|
561
|
+
break;
|
|
562
|
+
case BackfaceVisibility::Hidden:
|
|
563
|
+
visibilityStr = "hidden";
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
dyn.insert("backfaceVisibility", visibilityStr);
|
|
567
|
+
}
|
|
568
|
+
|
|
201
569
|
void packAnimatedProp(
|
|
202
570
|
folly::dynamic& dyn,
|
|
203
571
|
const std::unique_ptr<AnimatedPropBase>& animatedProp) {
|
|
@@ -210,6 +578,10 @@ void packAnimatedProp(
|
|
|
210
578
|
packTransform(dyn, *animatedProp);
|
|
211
579
|
break;
|
|
212
580
|
|
|
581
|
+
case TRANSFORM_ORIGIN:
|
|
582
|
+
packTransformOrigin(dyn, *animatedProp);
|
|
583
|
+
break;
|
|
584
|
+
|
|
213
585
|
case BACKGROUND_COLOR:
|
|
214
586
|
packBackgroundColor(dyn, *animatedProp);
|
|
215
587
|
break;
|
|
@@ -258,6 +630,38 @@ void packAnimatedProp(
|
|
|
258
630
|
packOutlineWidth(dyn, *animatedProp);
|
|
259
631
|
break;
|
|
260
632
|
|
|
633
|
+
case BORDER_CURVES:
|
|
634
|
+
packBorderCurves(dyn, *animatedProp);
|
|
635
|
+
break;
|
|
636
|
+
|
|
637
|
+
case BORDER_STYLES:
|
|
638
|
+
packBorderStyles(dyn, *animatedProp);
|
|
639
|
+
break;
|
|
640
|
+
|
|
641
|
+
case POINTER_EVENTS:
|
|
642
|
+
packPointerEvents(dyn, *animatedProp);
|
|
643
|
+
break;
|
|
644
|
+
|
|
645
|
+
case ISOLATION:
|
|
646
|
+
packIsolation(dyn, *animatedProp);
|
|
647
|
+
break;
|
|
648
|
+
|
|
649
|
+
case CURSOR:
|
|
650
|
+
packCursor(dyn, *animatedProp);
|
|
651
|
+
break;
|
|
652
|
+
|
|
653
|
+
case BOX_SHADOW:
|
|
654
|
+
packBoxShadow(dyn, *animatedProp);
|
|
655
|
+
break;
|
|
656
|
+
|
|
657
|
+
case MIX_BLEND_MODE:
|
|
658
|
+
packMixBlendMode(dyn, *animatedProp);
|
|
659
|
+
break;
|
|
660
|
+
|
|
661
|
+
case BACKFACE_VISIBILITY:
|
|
662
|
+
packBackfaceVisibility(dyn, *animatedProp);
|
|
663
|
+
break;
|
|
664
|
+
|
|
261
665
|
case WIDTH:
|
|
262
666
|
case HEIGHT:
|
|
263
667
|
case FLEX:
|
|
@@ -283,6 +687,10 @@ void packAnimatedProp(
|
|
|
283
687
|
case MAX_WIDTH:
|
|
284
688
|
case MIN_HEIGHT:
|
|
285
689
|
case MIN_WIDTH:
|
|
690
|
+
case STYLE_OVERFLOW:
|
|
691
|
+
case POSITION_TYPE:
|
|
692
|
+
case Z_INDEX:
|
|
693
|
+
case DIRECTION:
|
|
286
694
|
throw std::runtime_error("Tried to synchronously update layout props");
|
|
287
695
|
}
|
|
288
696
|
}
|
|
@@ -24,6 +24,7 @@ enum PropName {
|
|
|
24
24
|
POSITION,
|
|
25
25
|
FLEX,
|
|
26
26
|
TRANSFORM,
|
|
27
|
+
TRANSFORM_ORIGIN,
|
|
27
28
|
BACKGROUND_COLOR,
|
|
28
29
|
SHADOW_COLOR,
|
|
29
30
|
SHADOW_OFFSET,
|
|
@@ -51,7 +52,19 @@ enum PropName {
|
|
|
51
52
|
MAX_HEIGHT,
|
|
52
53
|
MAX_WIDTH,
|
|
53
54
|
MIN_HEIGHT,
|
|
54
|
-
MIN_WIDTH
|
|
55
|
+
MIN_WIDTH,
|
|
56
|
+
STYLE_OVERFLOW,
|
|
57
|
+
POSITION_TYPE,
|
|
58
|
+
Z_INDEX,
|
|
59
|
+
DIRECTION,
|
|
60
|
+
BORDER_CURVES,
|
|
61
|
+
BORDER_STYLES,
|
|
62
|
+
POINTER_EVENTS,
|
|
63
|
+
ISOLATION,
|
|
64
|
+
CURSOR,
|
|
65
|
+
BOX_SHADOW,
|
|
66
|
+
MIX_BLEND_MODE,
|
|
67
|
+
BACKFACE_VISIBILITY
|
|
55
68
|
};
|
|
56
69
|
|
|
57
70
|
struct AnimatedPropBase {
|
|
@@ -243,6 +256,10 @@ inline void cloneProp(BaseViewProps &viewProps, const AnimatedPropBase &animated
|
|
|
243
256
|
viewProps.transform = get<Transform>(animatedProp);
|
|
244
257
|
break;
|
|
245
258
|
|
|
259
|
+
case TRANSFORM_ORIGIN:
|
|
260
|
+
viewProps.transformOrigin = get<TransformOrigin>(animatedProp);
|
|
261
|
+
break;
|
|
262
|
+
|
|
246
263
|
case BACKGROUND_COLOR:
|
|
247
264
|
viewProps.backgroundColor = get<SharedColor>(animatedProp);
|
|
248
265
|
break;
|
|
@@ -355,6 +372,54 @@ inline void cloneProp(BaseViewProps &viewProps, const AnimatedPropBase &animated
|
|
|
355
372
|
viewProps.yogaStyle.setMinDimension(yoga::Dimension::Width, get<yoga::Style::SizeLength>(animatedProp));
|
|
356
373
|
break;
|
|
357
374
|
|
|
375
|
+
case STYLE_OVERFLOW:
|
|
376
|
+
viewProps.yogaStyle.setOverflow(get<yoga::Overflow>(animatedProp));
|
|
377
|
+
break;
|
|
378
|
+
|
|
379
|
+
case POSITION_TYPE:
|
|
380
|
+
viewProps.yogaStyle.setPositionType(get<yoga::PositionType>(animatedProp));
|
|
381
|
+
break;
|
|
382
|
+
|
|
383
|
+
case Z_INDEX:
|
|
384
|
+
viewProps.zIndex = get<std::optional<int>>(animatedProp);
|
|
385
|
+
break;
|
|
386
|
+
|
|
387
|
+
case DIRECTION:
|
|
388
|
+
viewProps.yogaStyle.setDirection(get<yoga::Direction>(animatedProp));
|
|
389
|
+
break;
|
|
390
|
+
|
|
391
|
+
case BORDER_CURVES:
|
|
392
|
+
viewProps.borderCurves = get<CascadedBorderCurves>(animatedProp);
|
|
393
|
+
break;
|
|
394
|
+
|
|
395
|
+
case BORDER_STYLES:
|
|
396
|
+
viewProps.borderStyles = get<CascadedBorderStyles>(animatedProp);
|
|
397
|
+
break;
|
|
398
|
+
|
|
399
|
+
case POINTER_EVENTS:
|
|
400
|
+
viewProps.pointerEvents = get<PointerEventsMode>(animatedProp);
|
|
401
|
+
break;
|
|
402
|
+
|
|
403
|
+
case ISOLATION:
|
|
404
|
+
viewProps.isolation = get<Isolation>(animatedProp);
|
|
405
|
+
break;
|
|
406
|
+
|
|
407
|
+
case CURSOR:
|
|
408
|
+
viewProps.cursor = get<Cursor>(animatedProp);
|
|
409
|
+
break;
|
|
410
|
+
|
|
411
|
+
case BOX_SHADOW:
|
|
412
|
+
viewProps.boxShadow = get<std::vector<BoxShadow>>(animatedProp);
|
|
413
|
+
break;
|
|
414
|
+
|
|
415
|
+
case MIX_BLEND_MODE:
|
|
416
|
+
viewProps.mixBlendMode = get<BlendMode>(animatedProp);
|
|
417
|
+
break;
|
|
418
|
+
|
|
419
|
+
case BACKFACE_VISIBILITY:
|
|
420
|
+
viewProps.backfaceVisibility = get<BackfaceVisibility>(animatedProp);
|
|
421
|
+
break;
|
|
422
|
+
|
|
358
423
|
default:
|
|
359
424
|
break;
|
|
360
425
|
}
|
|
@@ -52,9 +52,17 @@ struct AnimatedPropsBuilder {
|
|
|
52
52
|
{
|
|
53
53
|
props.push_back(std::make_unique<AnimatedProp<CascadedRectangleEdges<yoga::StyleLength>>>(POSITION, value));
|
|
54
54
|
}
|
|
55
|
-
void
|
|
55
|
+
void setFlex(yoga::FloatOptional value)
|
|
56
56
|
{
|
|
57
|
-
props.push_back(std::make_unique<AnimatedProp<
|
|
57
|
+
props.push_back(std::make_unique<AnimatedProp<yoga::FloatOptional>>(FLEX, value));
|
|
58
|
+
}
|
|
59
|
+
void setTransform(const Transform &t)
|
|
60
|
+
{
|
|
61
|
+
props.push_back(std::make_unique<AnimatedProp<Transform>>(TRANSFORM, t));
|
|
62
|
+
}
|
|
63
|
+
void setTransformOrigin(const TransformOrigin &value)
|
|
64
|
+
{
|
|
65
|
+
props.push_back(std::make_unique<AnimatedProp<TransformOrigin>>(TRANSFORM_ORIGIN, value));
|
|
58
66
|
}
|
|
59
67
|
void setBackgroundColor(SharedColor value)
|
|
60
68
|
{
|
|
@@ -168,6 +176,54 @@ struct AnimatedPropsBuilder {
|
|
|
168
176
|
{
|
|
169
177
|
props.push_back(std::make_unique<AnimatedProp<yoga::Style::SizeLength>>(MIN_WIDTH, value));
|
|
170
178
|
}
|
|
179
|
+
void setOverflow(yoga::Overflow value)
|
|
180
|
+
{
|
|
181
|
+
props.push_back(std::make_unique<AnimatedProp<yoga::Overflow>>(STYLE_OVERFLOW, value));
|
|
182
|
+
}
|
|
183
|
+
void setPositionType(yoga::PositionType value)
|
|
184
|
+
{
|
|
185
|
+
props.push_back(std::make_unique<AnimatedProp<yoga::PositionType>>(POSITION_TYPE, value));
|
|
186
|
+
}
|
|
187
|
+
void setZIndex(std::optional<int> value)
|
|
188
|
+
{
|
|
189
|
+
props.push_back(std::make_unique<AnimatedProp<std::optional<int>>>(Z_INDEX, value));
|
|
190
|
+
}
|
|
191
|
+
void setDirection(yoga::Direction value)
|
|
192
|
+
{
|
|
193
|
+
props.push_back(std::make_unique<AnimatedProp<yoga::Direction>>(DIRECTION, value));
|
|
194
|
+
}
|
|
195
|
+
void setBorderCurves(CascadedBorderCurves &value)
|
|
196
|
+
{
|
|
197
|
+
props.push_back(std::make_unique<AnimatedProp<CascadedBorderCurves>>(BORDER_CURVES, value));
|
|
198
|
+
}
|
|
199
|
+
void setBorderStyles(CascadedBorderStyles &value)
|
|
200
|
+
{
|
|
201
|
+
props.push_back(std::make_unique<AnimatedProp<CascadedBorderStyles>>(BORDER_STYLES, value));
|
|
202
|
+
}
|
|
203
|
+
void setPointerEvents(PointerEventsMode value)
|
|
204
|
+
{
|
|
205
|
+
props.push_back(std::make_unique<AnimatedProp<PointerEventsMode>>(POINTER_EVENTS, value));
|
|
206
|
+
}
|
|
207
|
+
void setIsolation(Isolation value)
|
|
208
|
+
{
|
|
209
|
+
props.push_back(std::make_unique<AnimatedProp<Isolation>>(ISOLATION, value));
|
|
210
|
+
}
|
|
211
|
+
void setCursor(Cursor value)
|
|
212
|
+
{
|
|
213
|
+
props.push_back(std::make_unique<AnimatedProp<Cursor>>(CURSOR, value));
|
|
214
|
+
}
|
|
215
|
+
void setBoxShadow(const std::vector<BoxShadow> &value)
|
|
216
|
+
{
|
|
217
|
+
props.push_back(std::make_unique<AnimatedProp<std::vector<BoxShadow>>>(BOX_SHADOW, value));
|
|
218
|
+
}
|
|
219
|
+
void setMixBlendMode(BlendMode value)
|
|
220
|
+
{
|
|
221
|
+
props.push_back(std::make_unique<AnimatedProp<BlendMode>>(MIX_BLEND_MODE, value));
|
|
222
|
+
}
|
|
223
|
+
void setBackfaceVisibility(BackfaceVisibility value)
|
|
224
|
+
{
|
|
225
|
+
props.push_back(std::make_unique<AnimatedProp<BackfaceVisibility>>(BACKFACE_VISIBILITY, value));
|
|
226
|
+
}
|
|
171
227
|
void storeDynamic(folly::dynamic &d)
|
|
172
228
|
{
|
|
173
229
|
rawProps = std::make_unique<RawProps>(std::move(d));
|
|
@@ -68,6 +68,10 @@ inline void updateProp(const PropName propName, BaseViewProps &viewProps, const
|
|
|
68
68
|
viewProps.transform = snapshot.props.transform;
|
|
69
69
|
break;
|
|
70
70
|
|
|
71
|
+
case TRANSFORM_ORIGIN:
|
|
72
|
+
viewProps.transformOrigin = snapshot.props.transformOrigin;
|
|
73
|
+
break;
|
|
74
|
+
|
|
71
75
|
case BORDER_RADII:
|
|
72
76
|
viewProps.borderRadii = snapshot.props.borderRadii;
|
|
73
77
|
break;
|
|
@@ -240,6 +244,54 @@ inline void updateProp(const PropName propName, BaseViewProps &viewProps, const
|
|
|
240
244
|
viewProps.yogaStyle.setMinDimension(
|
|
241
245
|
yoga::Dimension::Width, snapshot.props.yogaStyle.minDimension(yoga::Dimension::Width));
|
|
242
246
|
break;
|
|
247
|
+
|
|
248
|
+
case STYLE_OVERFLOW:
|
|
249
|
+
viewProps.yogaStyle.setOverflow(snapshot.props.yogaStyle.overflow());
|
|
250
|
+
break;
|
|
251
|
+
|
|
252
|
+
case POSITION_TYPE:
|
|
253
|
+
viewProps.yogaStyle.setPositionType(snapshot.props.yogaStyle.positionType());
|
|
254
|
+
break;
|
|
255
|
+
|
|
256
|
+
case Z_INDEX:
|
|
257
|
+
viewProps.zIndex = snapshot.props.zIndex;
|
|
258
|
+
break;
|
|
259
|
+
|
|
260
|
+
case DIRECTION:
|
|
261
|
+
viewProps.yogaStyle.setDirection(snapshot.props.yogaStyle.direction());
|
|
262
|
+
break;
|
|
263
|
+
|
|
264
|
+
case BORDER_CURVES:
|
|
265
|
+
viewProps.borderCurves = snapshot.props.borderCurves;
|
|
266
|
+
break;
|
|
267
|
+
|
|
268
|
+
case BORDER_STYLES:
|
|
269
|
+
viewProps.borderStyles = snapshot.props.borderStyles;
|
|
270
|
+
break;
|
|
271
|
+
|
|
272
|
+
case POINTER_EVENTS:
|
|
273
|
+
viewProps.pointerEvents = snapshot.props.pointerEvents;
|
|
274
|
+
break;
|
|
275
|
+
|
|
276
|
+
case ISOLATION:
|
|
277
|
+
viewProps.isolation = snapshot.props.isolation;
|
|
278
|
+
break;
|
|
279
|
+
|
|
280
|
+
case CURSOR:
|
|
281
|
+
viewProps.cursor = snapshot.props.cursor;
|
|
282
|
+
break;
|
|
283
|
+
|
|
284
|
+
case BOX_SHADOW:
|
|
285
|
+
viewProps.boxShadow = snapshot.props.boxShadow;
|
|
286
|
+
break;
|
|
287
|
+
|
|
288
|
+
case MIX_BLEND_MODE:
|
|
289
|
+
viewProps.mixBlendMode = snapshot.props.mixBlendMode;
|
|
290
|
+
break;
|
|
291
|
+
|
|
292
|
+
case BACKFACE_VISIBILITY:
|
|
293
|
+
viewProps.backfaceVisibility = snapshot.props.backfaceVisibility;
|
|
294
|
+
break;
|
|
243
295
|
}
|
|
244
296
|
}
|
|
245
297
|
|
|
@@ -16,15 +16,12 @@
|
|
|
16
16
|
namespace facebook::react {
|
|
17
17
|
|
|
18
18
|
static const auto layoutProps = std::set<PropName>{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
PropName::FLEX_SHRINK, PropName::FLEX_WRAP, PropName::JUSTIFY_CONTENT,
|
|
26
|
-
PropName::MAX_HEIGHT, PropName::MAX_WIDTH, PropName::MIN_HEIGHT,
|
|
27
|
-
PropName::MIN_WIDTH,
|
|
19
|
+
WIDTH, HEIGHT, FLEX, MARGIN, PADDING,
|
|
20
|
+
POSITION, BORDER_WIDTH, ALIGN_CONTENT, ALIGN_ITEMS, ALIGN_SELF,
|
|
21
|
+
ASPECT_RATIO, BOX_SIZING, DISPLAY, FLEX_BASIS, FLEX_DIRECTION,
|
|
22
|
+
ROW_GAP, COLUMN_GAP, FLEX_GROW, FLEX_SHRINK, FLEX_WRAP,
|
|
23
|
+
JUSTIFY_CONTENT, MAX_HEIGHT, MAX_WIDTH, MIN_HEIGHT, MIN_WIDTH,
|
|
24
|
+
STYLE_OVERFLOW, POSITION_TYPE, DIRECTION, Z_INDEX,
|
|
28
25
|
};
|
|
29
26
|
|
|
30
27
|
UIManagerNativeAnimatedDelegateBackendImpl::
|
|
@@ -18,10 +18,6 @@ add_library(bridgeless
|
|
|
18
18
|
target_compile_reactnative_options(bridgeless PRIVATE)
|
|
19
19
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
20
20
|
target_compile_options(bridgeless PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
|
|
21
|
-
|
|
22
|
-
if (HERMES_V1_ENABLED)
|
|
23
|
-
target_compile_options(bridgeless PRIVATE -DHERMES_V1_ENABLED=1)
|
|
24
|
-
endif()
|
|
25
21
|
endif ()
|
|
26
22
|
target_include_directories(bridgeless PUBLIC .)
|
|
27
23
|
|