Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Flutter developers commonly face these challenges when building custom UIs:
### The Solution

```dart
final style = RemixButtonStyler()
final style = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand All @@ -38,7 +38,7 @@ RemixButton(

Or using callable styles:
```dart
final button = RemixButtonStyler()
final button = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand Down Expand Up @@ -85,7 +85,7 @@ import 'package:remix/remix.dart';

class MyApp extends StatelessWidget {

final button = RemixButtonStyler()
final button = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand Down Expand Up @@ -113,7 +113,7 @@ class MyApp extends StatelessWidget {
Easily define how components should look in different interaction states.

```dart
final button = RemixButtonStyler()
final button = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand All @@ -128,7 +128,7 @@ final button = RemixButtonStyler()
Make your button style smoothly animate when its state changes by chaining `.animate()` with your state-specific styles. You can use `AnimationConfig.spring` to get natural, spring-based motion.

```dart
final style = RemixButtonStyler()
final style = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand All @@ -147,7 +147,7 @@ This example animates both the color on hover and the scale on press, creating a
Create base styles and extend them to build variants:

```dart
final baseButtonStyle = RemixButtonStyler()
final baseButtonStyle = ButtonStyler()
.paddingX(16)
.paddingY(10)
.borderRadiusAll(const Radius.circular(8));
Expand Down Expand Up @@ -217,7 +217,7 @@ Fortal styles are built on a robust token system that includes:
You can use these tokens directly in your custom styles:

```dart
final style = RemixButtonStyler()
final style = ButtonStyler()
.color(FortalTokens.accent9())
.paddingAll(FortalTokens.space4())
.borderRadiusAll(FortalTokens.radius3())
Expand Down
2 changes: 1 addition & 1 deletion atlas/fortal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The capture covers five Button variants, four sizes, and default, hovered,
pressed, focused, disabled, and loading scenarios in light and dark themes:
240 cells total, 200 non-loading cells, and 40 loading cells.

The producer adapter walks the real `RemixButtonStyler` sources and variants,
The producer adapter walks the real `ButtonStyler` sources and variants,
then uses each built-in leaf styler's normal merge semantics. It does not copy
the Fortal recipe. It calls `RemixButton.composeStyle` first so widget-owned
defaults and tooling share one source of truth. Container, label, and icon
Expand Down
4 changes: 2 additions & 2 deletions atlas/fortal/capture.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
},
{
"path": "protocol/coverage.json",
"sha256": "bd34c03c2ff05bc2a540071edca2c2d1885fefbb074bb5e3d772607af098d96b",
"bytes": 7886
"sha256": "7b1615f04774c6a1ec3bbc80b703fa4557a5a6371680e1da686bd15937c01abb",
"bytes": 7836
},
{
"path": "protocol/fixtures/fortal-tokenized-flex-box.mix.json",
Expand Down
20 changes: 10 additions & 10 deletions atlas/fortal/protocol/coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
},
{
"id": "fortal-button-portable",
"runtimeType": "RemixButtonStyler projection",
"runtimeType": "ButtonStyler projection",
"status": "partial",
"recipeCount": 20,
"totalMatrixCells": 240,
Expand All @@ -165,56 +165,56 @@
},
{
"id": "fortal-button",
"runtimeType": "RemixButtonStyler",
"runtimeType": "ButtonStyler",
"status": "unsupported",
"diagnostics": [
{
"code": "unsupported_encode_value",
"severity": "error",
"path": "",
"message": "Expected box, got RemixButtonStyler."
"message": "Expected box, got ButtonStyler."
},
{
"code": "unsupported_encode_value",
"severity": "error",
"path": "",
"message": "Expected text, got RemixButtonStyler."
"message": "Expected text, got ButtonStyler."
},
{
"code": "unsupported_encode_value",
"severity": "error",
"path": "",
"message": "Expected flex, got RemixButtonStyler."
"message": "Expected flex, got ButtonStyler."
},
{
"code": "unsupported_encode_value",
"severity": "error",
"path": "",
"message": "Expected stack, got RemixButtonStyler."
"message": "Expected stack, got ButtonStyler."
},
{
"code": "unsupported_encode_value",
"severity": "error",
"path": "",
"message": "Expected icon, got RemixButtonStyler."
"message": "Expected icon, got ButtonStyler."
},
{
"code": "unsupported_encode_value",
"severity": "error",
"path": "",
"message": "Expected image, got RemixButtonStyler."
"message": "Expected image, got ButtonStyler."
},
{
"code": "unsupported_encode_value",
"severity": "error",
"path": "",
"message": "Expected flex_box, got RemixButtonStyler."
"message": "Expected flex_box, got ButtonStyler."
},
{
"code": "unsupported_encode_value",
"severity": "error",
"path": "",
"message": "Expected stack_box, got RemixButtonStyler."
"message": "Expected stack_box, got ButtonStyler."
}
]
}
Expand Down
10 changes: 5 additions & 5 deletions docs/components/button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class ButtonExample extends StatelessWidget {
);
}

RemixButtonStyler get destructiveStyle {
return RemixButtonStyler()
ButtonStyler get destructiveStyle {
return ButtonStyler()
.paddingX(16)
.paddingY(10)
.backgroundColor(const Color(0xFF4D1919))
Expand Down Expand Up @@ -75,7 +75,7 @@ class ButtonExample extends StatelessWidget {
);
}

RemixButtonStyler get successStyle {
ButtonStyler get successStyle {
return destructiveStyle
.backgroundColor(const Color.fromARGB(255, 15, 61, 15))
.label(TextStyler().uppercase().color(Colors.greenAccent))
Expand Down Expand Up @@ -175,7 +175,7 @@ const RemixButton({
String? semanticHint,
bool excludeSemantics = false,
MouseCursor mouseCursor = SystemMouseCursors.click,
RemixButtonStyler style = const RemixButtonStyler.create(),
ButtonStyler style = const ButtonStyler.create(),
RemixButtonSpec? styleSpec,
})
```
Expand All @@ -185,7 +185,7 @@ const RemixButton({
## Properties
### Widget Properties

#### `style` → `RemixButtonStyler`
#### `style` → `ButtonStyler`

Optional. The style configuration for the button. Customize colors, sizing, spacing, and state-based styling.

Expand Down
14 changes: 7 additions & 7 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Flutter developers commonly face these challenges when building custom UIs:
### The Solution

```dart
final style = RemixButtonStyler()
final style = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand All @@ -40,7 +40,7 @@ RemixButton(

Or using callable styles:
```dart
final button = RemixButtonStyler()
final button = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand Down Expand Up @@ -87,7 +87,7 @@ import 'package:remix/remix.dart';

class MyApp extends StatelessWidget {

final button = RemixButtonStyler()
final button = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand Down Expand Up @@ -115,7 +115,7 @@ class MyApp extends StatelessWidget {
Easily define how components should look in different interaction states.

```dart
final style = RemixButtonStyler()
final style = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand All @@ -130,7 +130,7 @@ final style = RemixButtonStyler()
Make your button style smoothly animate when its state changes by chaining `.animate()` with your state-specific styles. You can use `AnimationConfig.spring` to get natural, spring-based motion.

```dart
final style = RemixButtonStyler()
final style = ButtonStyler()
.paddingX(16)
.paddingY(10)
.color(Colors.blue)
Expand All @@ -149,7 +149,7 @@ This example animates both the color on hover and the scale on press, creating a
Create base styles and extend them to build variants:

```dart
final baseButtonStyle = RemixButtonStyler()
final baseButtonStyle = ButtonStyler()
.paddingX(16)
.paddingY(10)
.borderRadiusAll(const Radius.circular(8));
Expand Down Expand Up @@ -219,7 +219,7 @@ Fortal styles are built on a robust token system that includes:
You can use these tokens directly in your custom styles:

```dart
final style = RemixButtonStyler()
final style = ButtonStyler()
.color(FortalTokens.accent9())
.paddingAll(FortalTokens.space4())
.borderRadiusAll(FortalTokens.radius3())
Expand Down
9 changes: 6 additions & 3 deletions docs/styler-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ Remix stylers expose matching named factories and fluent methods for canonical
style operations. This symmetry lets a state variant use Dart's contextual dot
shorthand without constructing another styler explicitly:

For buttons, use `ButtonStyler`. `RemixButtonStyler` is retained as a
deprecated compatibility alias.

```dart
final style = RemixButtonStyler()
final style = ButtonStyler()
.color(Colors.blue)
.onHovered(.color(Colors.indigo))
.onPressed(.scale(0.97));
Expand Down Expand Up @@ -116,15 +119,15 @@ names:
| Styler | Canonical generated API | Component-specific helper |
| --- | --- | --- |
| `RemixTextFieldStyler` | `color` styles the container | `textColor` styles editable text |
| `RemixButtonStyler` | `rotate` transforms the container | `modifierRotate` rotates the complete widget with a modifier |
| `ButtonStyler` | `rotate` transforms the container | `modifierRotate` rotates the complete widget with a modifier |
| `RemixCalloutStyler` | `textStyle(TextStyler)` applies the container text style | `contentTextStyle(TextStyleMix)` styles callout content |

This keeps contextual shorthand predictable while preserving each specialized
operation without ambiguous overloads.

## Generation boundary

`Remix*Styler` classes are generated from `@MixableSpec`. Fortal widget wrapper
Component stylers are generated from `@MixableSpec`. Fortal widget wrapper
classes are source-authored even though they were previously emitted by
`@MixWidget`. Both upstream generators write shared parts for the same library;
during a clean build, the widget generator cannot resolve a Styler that the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'support/fortal_button_component_artifact.dart';
void main() {
group('Fortal Button protocol adapter', () {
test('projects real composite sources without restating the recipe', () {
final projection = projectRemixButtonStyler(
final projection = projectButtonStyler(
fortalButtonStyler(
variant: FortalButtonVariant.surface,
size: FortalButtonSize.size3,
Expand All @@ -38,7 +38,7 @@ void main() {
test('all projected slots encode as built-in protocol styles', () {
for (final variant in FortalButtonVariant.values) {
for (final size in FortalButtonSize.values) {
final projection = projectRemixButtonStyler(
final projection = projectButtonStyler(
fortalButtonStyler(variant: variant, size: size),
);

Expand All @@ -64,7 +64,7 @@ void main() {
test(
'keeps spinner support explicit instead of projecting custom code',
() {
final projection = projectRemixButtonStyler(fortalButtonStyler());
final projection = projectButtonStyler(fortalButtonStyler());

expect(projection.spinnerSupported, isFalse);
expect(projection.spinnerDiagnostic.code, 'unsupported_slot_primitive');
Expand Down
6 changes: 3 additions & 3 deletions packages/demo/test/atlas/fortal_protocol_probe_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void main() {
});
});

test('custom RemixButtonStyler fails with a structured diagnostic', () {
test('custom ButtonStyler fails with a structured diagnostic', () {
final errors = _expectFailure(
mixProtocol.encodeStyle(fortalButtonStyler()),
);
Expand Down Expand Up @@ -240,7 +240,7 @@ void main() {
},
{
'id': 'fortal-button-portable',
'runtimeType': 'RemixButtonStyler projection',
'runtimeType': 'ButtonStyler projection',
'status': componentArtifacts.supportedContainerRecipes == 20
? 'partial'
: 'unsupported',
Expand All @@ -255,7 +255,7 @@ void main() {
},
{
'id': 'fortal-button',
'runtimeType': 'RemixButtonStyler',
'runtimeType': 'ButtonStyler',
'status': 'unsupported',
'diagnostics': [for (final error in customErrors) error.toJson()],
},
Expand Down
Loading
Loading