Skip to content

Commit

Permalink
chore(ios): add license to all pop files, remove some animation support
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Aug 10, 2023
1 parent bbd34d5 commit 9235bfd
Show file tree
Hide file tree
Showing 53 changed files with 1,148 additions and 24 deletions.
28 changes: 4 additions & 24 deletions ios/sdk/module/animation2/HippyNextAnimation.mm
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,21 @@


// shadow view supported animations
// Note: All non-special value attributes in ShadowView support animation,
// and only a few common ones are specially optimized here.
static NSString *const HippyAnimationPropWidth = @"width";
static NSString *const HippyAnimationPropHeight = @"height";
static NSString *const HippyAnimationPropTop = @"top";
static NSString *const HippyAnimationPropBottom = @"bottom";
static NSString *const HippyAnimationPropLeft = @"left";
static NSString *const HippyAnimationPropRight = @"right";
static NSString *const HippyAnimationPropMinWidth = @"minWidth";
static NSString *const HippyAnimationPropMinHeight = @"minHeight";
static NSString *const HippyAnimationPropMaxWidth = @"maxWidth";
static NSString *const HippyAnimationPropMaxHeight = @"maxHeight";

// view supported animations
static NSString *const HippyAnimationPropOpacity = @"opacity";
static NSString *const HippyAnimationPropBackgroundColor = @"backgroundColor";
static NSString *const HippyAnimationPropBorderColor = @"borderColor";
static NSString *const HippyAnimationPropBorderWidth = @"borderWidth";
static NSString *const HippyAnimationPropCornerRadius = @"cornerRadius";
static NSString *const HippyAnimationPropZPosition = @"zPosition";
static NSString *const HippyAnimationPropShadowColor = @"shadowColor";
static NSString *const HippyAnimationPropShadowOffset = @"shadowOffset";
static NSString *const HippyAnimationPropShadowOpacity = @"shadowOpacity";
static NSString *const HippyAnimationPropShadowRadius = @"shadowRadius";

// transform animations
static NSString *const HippyAnimationPropRotate = @"rotate";
Expand Down Expand Up @@ -221,7 +214,7 @@ static BOOL isTransformAnimationProp(NSString *prop) {
HippyAnimationPropTranslateXY,
HippyAnimationPropSkewX,
HippyAnimationPropSkewY,
@"perspective",
HippyAnimationPropPerspective,
];
});
return [transformConfigProps containsObject:prop];
Expand Down Expand Up @@ -280,15 +273,7 @@ - (BOOL)prepareForShadowView:(HippyShadowView *)shadowView withType:(NSString *)
property = HIPPY_SHADOW_ANIM_PROPERTY(left);
} else if ([type isEqualToString:HippyAnimationPropRight]) {
property = HIPPY_SHADOW_ANIM_PROPERTY(right);
} else if ([type isEqualToString:HippyAnimationPropMinWidth]) {
property = HIPPY_SHADOW_ANIM_PROPERTY(minWidth);
} else if ([type isEqualToString:HippyAnimationPropMinHeight]) {
property = HIPPY_SHADOW_ANIM_PROPERTY(minHeight);
} else if ([type isEqualToString:HippyAnimationPropMaxWidth]) {
property = HIPPY_SHADOW_ANIM_PROPERTY(maxWidth);
} else if ([type isEqualToString:HippyAnimationPropMaxHeight]) {
property = HIPPY_SHADOW_ANIM_PROPERTY(maxHeight);
} else if ([type isEqualToString:@"color"]) {
} if ([type isEqualToString:@"color"]) {
property = [HPOPAnimatableProperty propertyWithName:[NSString stringWithFormat:@"hippy.shadow.anim.%s", "color"]
initializer:^(HPOPMutableAnimatableProperty *p) {
p.readBlock = ^(HippyShadowView *obj, CGFloat values[]) {
Expand Down Expand Up @@ -465,11 +450,6 @@ + (NSDictionary *)animationKeyMap {
kHPOPLayerTranslationY : @[HippyAnimationPropTranslateY],
kHPOPLayerTranslationZ : @[HippyAnimationPropTranslateZ],
kHPOPLayerTranslationXY : @[HippyAnimationPropTranslateXY],
kHPOPLayerZPosition : @[HippyAnimationPropZPosition],
kHPOPLayerShadowColor : @[HippyAnimationPropShadowColor],
kHPOPLayerShadowOffset : @[HippyAnimationPropShadowOffset],
kHPOPLayerShadowOpacity : @[HippyAnimationPropShadowOpacity],
kHPOPLayerShadowRadius : @[HippyAnimationPropShadowRadius],
};
}
});
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOP.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAction.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimatableProperty.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimatableProperty.mm
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimatablePropertyTypes.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimation.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimation.mm
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimationEvent.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimationEvent.mm
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimationEventInternal.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimationExtras.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
22 changes: 22 additions & 0 deletions ios/sdk/module/animation2/pop/HPOPAnimationExtras.mm
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*!
* iOS SDK
*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
Expand Down
Loading

0 comments on commit 9235bfd

Please sign in to comment.