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
30 changes: 6 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
## 1.0.0
# Changelog

* First stable release of SuperDeck
* Roll back experimental setext-heading hero parsing; ATX headers continue to use the shared helper
* Fix image hero-tag parsing to avoid inline parser overruns and keep Flutter/core paths aligned
* Document the shared `{.hero}` helper and scope so future contributions stay consistent
SuperDeck is a monorepo; each package keeps its own changelog:

### 0.0.4

* Fix: Better error handling when external asset tooling is not installed
* Enhancement: Improved asset generation pipeline

### 0.0.3

* Cleaned up dependencies
* Updated example code
* Improved logging
* Fixed and improved asset generation

## 0.0.2

* Added demo and example code

## 0.0.1

* Initial version
- [`superdeck`](packages/superdeck/CHANGELOG.md) — the Flutter presentation framework
- [`superdeck_core`](packages/core/CHANGELOG.md) — parsing, models, and schema validation
- [`superdeck_cli`](packages/cli/CHANGELOG.md) — the `superdeck` command-line tool
- [`superdeck_builder`](packages/builder/CHANGELOG.md) — build_runner integration
22 changes: 12 additions & 10 deletions demo/lib/src/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:superdeck/superdeck.dart';

import 'google_font_helpers.dart';

SlideStyle announcementStyle() {
return SlideStyle(
SlideStyler announcementStyle() {
return SlideStyler(
h1: TextStyler().style(
TextStyleMix(
fontSize: 140,
Expand Down Expand Up @@ -38,18 +38,20 @@ SlideStyle announcementStyle() {
);
}

SlideStyle quoteStyle() {
return SlideStyle(
SlideStyler quoteStyle() {
return SlideStyler(
h1: TextStyler().style(
TextStyleMix(
fontFamily: safeGoogleFontFamily(GoogleFonts.notoSerif),
fontSize: 32,
),
),
blockquote: MarkdownBlockquoteStyle(
textStyle: safeGoogleFont(
() => GoogleFonts.notoSerif(fontSize: 32),
fallback: const TextStyle(fontSize: 32),
blockquote: MarkdownBlockquoteStyler(
textStyle: TextStyleMix.value(
safeGoogleFont(
() => GoogleFonts.notoSerif(fontSize: 32),
fallback: const TextStyle(fontSize: 32),
),
),
decoration: const BoxDecoration(
border: Border(left: BorderSide(color: Colors.red, width: 4)),
Expand All @@ -65,8 +67,8 @@ SlideStyle quoteStyle() {
);
}

SlideStyle borderedStyle() {
return SlideStyle(
SlideStyler borderedStyle() {
return SlideStyler(
modifier: WidgetModifierConfig(
modifiers: [
BoxModifierMix(
Expand Down
6 changes: 3 additions & 3 deletions demo/lib/src/templates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'google_font_helpers.dart';
/// A corporate-style template with a branded header and subtle footer.
SlideTemplate corporateTemplate() {
return SlideTemplate(
baseStyle: SlideStyle(
baseStyle: SlideStyler(
h1: TextStyler().style(
TextStyleMix(
fontFamily: safeGoogleFontFamily(GoogleFonts.poppins),
Expand All @@ -31,7 +31,7 @@ SlideTemplate corporateTemplate() {
),
),
styles: {
'highlight': SlideStyle(
'highlight': SlideStyler(
h1: TextStyler().style(
TextStyleMix(
color: const Color(0xFF1A73E8),
Expand Down Expand Up @@ -63,7 +63,7 @@ SlideTemplate corporateTemplate() {
/// A minimal template with no chrome — just typography.
SlideTemplate minimalTemplate() {
return SlideTemplate(
baseStyle: SlideStyle(
baseStyle: SlideStyler(
h1: TextStyler().style(
TextStyleMix(
fontFamily: safeGoogleFontFamily(GoogleFonts.notoSerif),
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/markdown-authoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Define styles in your app:
```dart
DeckOptions(
styles: {
'recap': SlideStyle(
'recap': SlideStyler(
h1: TextStyler().style(TextStyleMix(fontSize: 64)),
),
},
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/superdeck-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,18 @@ SuperDeck calls the `WidgetFactory` function with the block's arguments to rende

### Comprehensive styling API

Control every aspect of your presentation through the `SlideStyle` system:
Control every aspect of your presentation through the `SlideStyler` system:

```dart
final customStyle = SlideStyle(
final customStyle = SlideStyler(
h1: TextStyler().style(
TextStyleMix(fontSize: 48, color: Colors.purple),
),
p: TextStyler().style(
TextStyleMix(fontSize: 18, height: 1.5),
),
code: MarkdownCodeblockStyle(
textStyle: const TextStyle(fontFamily: 'Fira Code', color: Colors.white),
code: MarkdownCodeblockStyler(
textStyle: TextStyleMix(fontFamily: 'Fira Code', color: Colors.white),
container: BoxStyler(
decoration: BoxDecorationMix(
color: const Color(0xFF1E1E1E),
Expand Down
20 changes: 10 additions & 10 deletions docs/reference/deck-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ description: Complete API reference for configuring SuperDeck presentations

```dart
const DeckOptions({
SlideStyle? baseStyle,
Map<String, SlideStyle> styles = const {},
SlideStyler? baseStyle,
Map<String, SlideStyler> styles = const {},
Map<String, WidgetFactory> widgets = const {},
SlideParts parts = const SlideParts(),
bool debug = false,
Expand All @@ -24,19 +24,19 @@ const DeckOptions({
## Properties

### `baseStyle`
**Type:** `SlideStyle?` | **Default:** `null`
**Type:** `SlideStyler?` | **Default:** `null`

Base style for all slides.

```dart
DeckOptions(
baseStyle: SlideStyle(),
baseStyle: SlideStyler(),
)
```

#### Named widget block styles

Use `BlockVariant` in a `SlideStyle` stylesheet to target every named widget
Use `BlockVariant` in a `SlideStyler` stylesheet to target every named widget
block with an exact, case-sensitive name. The selector applies to the block
container and its complete widget subtree, so container spacing and descendant
Mix styles resolve together.
Expand All @@ -48,7 +48,7 @@ import 'package:superdeck/superdeck.dart';
const webviewBlock = BlockVariant('webview');

final options = DeckOptions(
baseStyle: SlideStyle(
baseStyle: SlideStyler(
blockContainer: BoxStyler(
padding: EdgeInsetsGeometryMix.all(40),
).variants([
Expand Down Expand Up @@ -86,7 +86,7 @@ normal and fullscreen WebView blocks; those two layouts cannot receive
different rules based on `BlockVariant` alone.

### `styles`
**Type:** `Map<String, SlideStyle>` | **Default:** `{}`
**Type:** `Map<String, SlideStyler>` | **Default:** `{}`

Named style variants for specific slides.

Expand All @@ -96,7 +96,7 @@ and `DeckOptions.styles`. There is no separate `styles.yaml` file to load.
```dart
DeckOptions(
styles: {
'title': SlideStyle(),
'title': SlideStyler(),
},
)
```
Expand Down Expand Up @@ -197,7 +197,7 @@ DeckOptions(
header: BrandHeader(),
footer: BrandFooter(),
),
baseStyle: SlideStyle(),
baseStyle: SlideStyler(),
),
},
)
Expand Down Expand Up @@ -302,5 +302,5 @@ class MyApp extends StatelessWidget {
### Development
1. Enable `debug: true` during development
2. Use `dart run superdeck_cli:main build --watch` in one terminal and `flutter run` in another
3. Version control your `SlideStyle` definitions alongside app code
3. Version control your `SlideStyler` definitions alongside app code
4. Document custom components
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class DeckCustomizationStore extends ChangeNotifier {

void _pushOptions() {
_controller.options.value = DeckOptions(
baseStyle: SlideStyle(
baseStyle: SlideStyler(
h1: _stylerFor(TextLevel.h1),
h2: _stylerFor(TextLevel.h2),
h3: _stylerFor(TextLevel.h3),
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/pdf/test/helpers/test_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ List<SlideConfiguration> createTestSlides(int count) {
final slideKey = 'slide-$index';
return SlideConfiguration(
slideIndex: index,
style: SlideStyle(),
style: SlideStyler(),
slide: Slide(
key: slideKey,
sections: [
Expand Down Expand Up @@ -80,7 +80,7 @@ List<Slide> createTestSlidesPayload({List<Slide>? slides}) {
class SlideTestHarness {
static SlideConfiguration createConfiguration(
Slide slide, {
SlideStyle? style,
SlideStyler? style,
Map<String, WidgetFactory> widgets = const {},
bool debug = false,
int slideIndex = 0,
Expand All @@ -89,7 +89,7 @@ class SlideTestHarness {
}) {
return SlideConfiguration(
slideIndex: slideIndex,
style: style ?? SlideStyle(),
style: style ?? SlideStyler(),
slide: slide,
thumbnailKey: 'test-thumbnail.png',
debug: debug,
Expand Down
16 changes: 16 additions & 0 deletions packages/superdeck/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
## Unreleased

- **BREAKING**: Generate the Mix styling layer with `mix_generator` instead of
hand-writing it. Styler classes are now canonically named `*Styler`
(`SlideStyler`, `MarkdownAlertStyler`, ...) following the Mix 2.x convention;
the previous `*Style` names remain available as typedef aliases.
- **BREAKING**: Styler constructor parameters for `TextStyle`-typed fields now
take `TextStyleMix` (e.g. `SlideStyler(strong:)`,
`MarkdownCodeblockStyler(textStyle:)`). Wrap existing values with
`TextStyleMix.value(...)`. These fields also gain Mix merge semantics:
merging styles now combines text-style properties field-wise instead of
replacing the whole `TextStyle`.
- Stylers gain the full generated fluent API: per-field setter methods
(`SlideStyler().h1(...)`, `.strong(...)`), field factories, and widget-state
variant helpers (`onHovered`, `onFocused`, ...).
- Deprecate `MarkdownTextSpec`/`MarkdownTextStyle`: they are not wired into
rendering. Use `SlideStyler` / Mix `TextStyler` (`p`, `h1`–`h6`, `strong`,
`em`, `del`, `link`) instead.
- Add `BlockVariant` for opt-in, name-based `WidgetBlock` styling in Dart
stylesheets.
- Render `@webview` blocks edge-to-edge (zero padding and margin) by default.
Expand Down
32 changes: 32 additions & 0 deletions packages/superdeck/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
targets:
$default:
builders:
# Spec mixins (_$XSpec) for every annotated styling spec.
mix_generator:mix_generator:
enabled: true
generate_for:
- lib/src/styling/components/*.dart
# Full generated stylers for every annotated styling spec. The nested
# styler convention derives each StyleSpec<XSpec> field's XStyler,
# including SuperDeck's same-package generated stylers.
mix_generator:spec_styler_generator:
enabled: true
generate_for:
- lib/src/styling/components/markdown_alert.dart
- lib/src/styling/components/markdown_alert_type.dart
- lib/src/styling/components/markdown_blockquote.dart
- lib/src/styling/components/markdown_checkbox.dart
- lib/src/styling/components/markdown_codeblock.dart
- lib/src/styling/components/markdown_list.dart
- lib/src/styling/components/markdown_table.dart
- lib/src/styling/components/slide.dart
# All styling classes are now generated from @MixableSpec.
mix_generator:styler_generator:
enabled: false
# Unused mix builders — keep them off superdeck sources.
mix_generator:mixable_generator:
enabled: false
mix_generator:mix_widget_generator:
enabled: false
mix_generator:modifier_generator:
enabled: false
6 changes: 3 additions & 3 deletions packages/superdeck/lib/src/deck/deck_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ part 'deck_options.mapper.dart';

@MappableClass()
class DeckOptions with DeckOptionsMappable {
final SlideStyle? baseStyle;
final Map<String, SlideStyle> styles;
final SlideStyler? baseStyle;
final Map<String, SlideStyler> styles;
final Map<String, WidgetFactory> widgets;
final SlideParts parts;
final bool debug;
Expand All @@ -27,7 +27,7 @@ class DeckOptions with DeckOptionsMappable {

DeckOptions({
this.baseStyle,
Map<String, SlideStyle> styles = const <String, SlideStyle>{},
Map<String, SlideStyler> styles = const <String, SlideStyler>{},
Map<String, WidgetFactory> widgets = const <String, WidgetFactory>{},
this.parts = const SlideParts(),
this.debug = false,
Expand Down
24 changes: 12 additions & 12 deletions packages/superdeck/lib/src/deck/deck_options.mapper.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading