Skip to content

Commit

Permalink
Merge branch 'feature/remix' of https://github.com/conceptadev/mix in…
Browse files Browse the repository at this point in the history
…to feature/remix
  • Loading branch information
leoafarias committed Jul 7, 2024
2 parents 15da0fa + 6dc9980 commit 8c10b1c
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 15 deletions.
33 changes: 33 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env sh

. "$(dirname -- "$0")/_/husky.sh"

# Find the absolute path to the fvm command
FVM_PATH=$(command -v fvm)

# Check if fvm command is found
if [ -n "$FVM_PATH" ]; then
# Add the directory containing the fvm command to PATH
export PATH="$(dirname "$FVM_PATH"):$PATH"
else
echo "FVM not found. Please make sure it is installed and accessible."
exit 1
fi

dart run lint_staged


# dart format --line-length 80 --set-exit-if-changed lib test
# dart analyze --fatal-infos --fatal-warnings lib test
# dart test

# branch_name=$(git rev-parse --abbrev-ref HEAD)

# if ! [[ $branch_name =~ ^(feat/|fix/|docs/|style/|refactor/|perf/|test/|build/|ci/|chore/|revert/).+ ]]; then
# echo "Invalid branch name. Branch names must start with one of the following prefixes followed by a forward slash:"
# echo "feat/, fix/, docs/, style/, refactor/, perf/, test/, build/, ci/, chore/, revert/"
# echo "Example: feat/new-feature"
# exit 1
# fi


Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ final class AnimatedUtility<T extends Attribute>
DurationUtility<T> get duration => DurationUtility((v) => only(duration: v));

CurveUtility<T> get curve => CurveUtility((v) => only(curve: v));

@override
T only({Duration? duration, Curve? curve}) {
return builder(AnimatedDataDto(duration: duration, curve: curve));
Expand Down
1 change: 0 additions & 1 deletion packages/mix/lib/src/attributes/border/border_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ sealed class BoxBorderDto<T extends BoxBorder> extends Dto<T> {
bool get isUniform;

bool get isDirectional => this is BorderDirectionalDto;

@override
BoxBorderDto<T> merge(covariant BoxBorderDto<T>? other);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ sealed class BorderRadiusGeometryDto<T extends BorderRadiusGeometry>
Radius? get topEnd;
Radius? get bottomStart;
Radius? get bottomEnd;

@override
BorderRadiusGeometryDto<T> merge(covariant BorderRadiusGeometryDto<T>? other);

Expand Down
2 changes: 0 additions & 2 deletions packages/mix/lib/src/attributes/border/shape_border_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ sealed class ShapeBorderDto<T extends ShapeBorder> extends Dto<T> {
StadiumBorderDto toStadiumBorder();
StarBorderDto toStar();
LinearBorderDto toLinear();

@override
ShapeBorderDto<T> merge(covariant ShapeBorderDto<T>? other);

Expand Down Expand Up @@ -201,7 +200,6 @@ final class ContinuousRectangleBorderDto

@override
BorderRadiusGeometryDto? get _borderRadius => borderRadius;

@override
ContinuousRectangleBorder get defaultValue =>
const ContinuousRectangleBorder();
Expand Down
1 change: 0 additions & 1 deletion packages/mix/lib/src/attributes/color/color_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ base class FoundationColorUtility<T extends Attribute, C extends Color>
const FoundationColorUtility(super.builder, this.color);

T call() => _buildColor(color);

@override
T directive(ColorDirective directive) =>
builder(ColorDto.raw(value: color, directives: [directive]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ sealed class DecorationDto<T extends Decoration> extends Dto<T> {
bool get isMergeable;

DecorationDto? mergeableDecor(covariant DecorationDto? other);

@override
DecorationDto<T> merge(covariant DecorationDto<T>? other);
}
Expand Down Expand Up @@ -163,7 +162,6 @@ final class ShapeDecorationDto extends DecorationDto<ShapeDecoration>
}) : super(boxShadow: shadows);

List<BoxShadowDto>? get shadows => boxShadow;

@override
ShapeDecorationDto mergeableDecor(BoxDecorationDto? other) {
if (other == null) return this;
Expand Down
1 change: 0 additions & 1 deletion packages/mix/lib/src/core/attribute.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ abstract base class Attribute with MergeableMixin, EqualityMixin {
// Used as the key to determine how
// attributes get merged
Object get mergeKey => runtimeType;

@override
Attribute merge(covariant Attribute? other);
}
Expand Down
1 change: 0 additions & 1 deletion packages/mix/lib/src/core/attributes_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class AttributeMap<T extends Attribute> {
}

Map<Object, T> toMap() => _map?.cast() ?? {};

@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
Expand Down
1 change: 0 additions & 1 deletion packages/mix/lib/src/core/directive.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class TextDirectiveDto extends Dto<TextDirective> {

@visibleForTesting
int get length => _modifiers.length;

@override
TextDirective resolve(MixData mix) {
return TextDirective((String content) {
Expand Down
1 change: 0 additions & 1 deletion packages/mix/lib/src/core/spec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ abstract base class SpecAttribute<Value> extends StyledAttribute {
const SpecAttribute({this.animated});

Value resolve(MixData mix);

@override
SpecAttribute<Value> merge(covariant SpecAttribute<Value>? other);
}
Expand Down
1 change: 0 additions & 1 deletion packages/mix/lib/src/theme/tokens/mix_token.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ abstract class MixToken<T> {
T call();

T resolve(BuildContext context);

@override
operator ==(Object other) {
if (identical(this, other)) return true;
Expand Down
9 changes: 7 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: mix

environment:
sdk: ">=3.0.0 <4.0.0"
sdk: ">=3.0.6 <4.0.0"

dev_dependencies:
melos: ^6.0.0
husky: ^0.1.7
lint_staged: ^0.5.1
melos: ^6.1.0

lint_staged:
'**.dart': dart fix --apply && dcm fix

0 comments on commit 8c10b1c

Please sign in to comment.