Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a5d0e29
Refactor ScrollAnimation exports
titouanmathis Jan 12, 2026
9b9688b
Update ScrollAnimation documentation and changelog
titouanmathis Jan 12, 2026
cb561d5
Fix shared state mutation in ScrollAnimationTarget damping
titouanmathis Jan 12, 2026
1e3c6be
Add test case for independent damping in ScrollAnimationTimeline
titouanmathis Jan 12, 2026
f925170
Update ScrollAnimation documentation to promote Timeline API
titouanmathis Jan 12, 2026
4081dd9
Add deprecation notes to ScrollAnimation tests and update exports sna…
titouanmathis Jan 26, 2026
82bba35
Fix line highlights in ScrollAnimation documentation
titouanmathis Jan 26, 2026
56f3bec
Improve ScrollAnimation JS API documentation structure
titouanmathis Jan 26, 2026
befc0d4
Add migration guide from v1.0 to v2.0
titouanmathis Jan 26, 2026
82c6222
Add migration guides link to version dropdown menu
titouanmathis Jan 26, 2026
03bbd97
Format MD files
titouanmathis Jan 26, 2026
596f101
Add withScrolledInView decorator reference to ScrollAnimationTimeline…
titouanmathis Jan 26, 2026
6b89c26
Fix playground static files serving in VitePress dev mode
titouanmathis Jan 26, 2026
a539b8f
Update staggered, sequence and parallax examples to use new API
titouanmathis Jan 26, 2026
7888588
Remove old simple, parent and parallax-parent examples
titouanmathis Jan 26, 2026
a78251c
Add from-to example for ScrollAnimation
titouanmathis Jan 26, 2026
3f76d40
Add keyframes example for ScrollAnimation
titouanmathis Jan 26, 2026
56f0d54
Add play-range example for ScrollAnimation
titouanmathis Jan 26, 2026
cd20e0f
Add easing example for ScrollAnimation
titouanmathis Jan 26, 2026
b252b58
Add damp-factor example for ScrollAnimation
titouanmathis Jan 26, 2026
1c05375
Add cards example for ScrollAnimation
titouanmathis Jan 26, 2026
bb7bf7e
Add text example for ScrollAnimation
titouanmathis Jan 26, 2026
2289ede
Add sticky example for ScrollAnimation
titouanmathis Jan 26, 2026
3a28413
Add offset example for ScrollAnimation
titouanmathis Jan 26, 2026
442c6d2
Add withScrollAnimationDebug decorator
titouanmathis Jan 26, 2026
d31893a
Add debug example for ScrollAnimation
titouanmathis Jan 26, 2026
dd1644c
Update ScrollAnimation examples documentation
titouanmathis Jan 26, 2026
1a18297
Update ScrollAnimation JS API documentation
titouanmathis Jan 26, 2026
de418d0
Add scroll down sections between offset examples
titouanmathis Jan 26, 2026
9bac0a0
Add numbered and percentage offset examples
titouanmathis Jan 26, 2026
eb654ac
Remove combined offset example
titouanmathis Jan 26, 2026
500b138
Add offset-default example for ScrollAnimation
titouanmathis Jan 26, 2026
32620ea
Add offset-center example for ScrollAnimation
titouanmathis Jan 26, 2026
4ae128d
Add offset-top example for ScrollAnimation
titouanmathis Jan 26, 2026
90801e2
Add offset-numbered example for ScrollAnimation
titouanmathis Jan 26, 2026
8b5948f
Add offset-percentage example for ScrollAnimation
titouanmathis Jan 26, 2026
c3849ba
Update offset examples documentation with detailed explanations
titouanmathis Jan 26, 2026
47f1606
Add link to offset option in JS API from examples
titouanmathis Jan 26, 2026
479db13
Fix missing offset story reference in ScrollAnimation docs
titouanmathis Jan 26, 2026
f3b316c
Add Codecov configuration to fix missing coverage issue
titouanmathis Jan 26, 2026
f25c55e
Improve types
titouanmathis Jan 27, 2026
d1d1a28
Update changelog
titouanmathis Jan 27, 2026
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Added

- **ScrollAnimation:** add a `withScrollAnimationDebug` decorator ([#494](https://github.com/studiometa/ui/pull/494))

### Changed

- **ScrollAnimation:** refactor components into `ScrollAnimationTimeline` and `ScrollAnimationTarget` ([#441](https://github.com/studiometa/ui/issues/441) [#494](https://github.com/studiometa/ui/pull/494), [a5d0e29](https://github.com/studiometa/ui/commit/a5d0e29))

## [v1.7.0](https://github.com/studiometa/ui/compare/1.6.0..1.7.0) (2025-11-11)

### Added
Expand Down
5 changes: 5 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# @studiometa/ui packages

## Commit messages

- Use English for commit messages
- Use simple verb-first sentences (e.g., "Add...", "Fix...", "Refactor...")

## Project structure

- Monorepo managed by NPM with packages in the `./packages` folder
Expand Down
26 changes: 26 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
coverage:
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true

comment:
layout: "diff, flags, files"
behavior: default
require_changes: false
require_base: false
require_head: true

ignore:
- "packages/docs/**"
- "packages/tests/**"
- "**/node_modules/**"
- "**/*.spec.ts"
- "**/*.test.ts"
7 changes: 5 additions & 2 deletions packages/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs';
import { basename, dirname } from 'node:path';
import { defineConfig } from 'vitepress';
import { transformerTwoslash } from '@shikijs/vitepress-twoslash';
import { withLeadingSlash, withLeadingCharacters } from '@studiometa/js-toolkit/utils';
import { withLeadingSlash } from '@studiometa/js-toolkit/utils';
import glob from 'fast-glob';
import pkg from '../package.json' with { type: 'json' };

Expand Down Expand Up @@ -78,7 +78,10 @@ export default defineConfig({
},
{
text: `<span class="VPBadge font-bold bg-[var(--vp-button-brand-bg)] text-[var(--vp-button-brand-text)]">v${pkg.version}</span>`,
items: [{ text: 'Release Notes', link: 'https://github.com/studiometa/ui/releases' }],
items: [
{ text: 'Release Notes', link: 'https://github.com/studiometa/ui/releases' },
{ text: 'Migration guides', link: '/migration-guides/' },
],
},
],
sidebar: {
Expand Down
1 change: 0 additions & 1 deletion packages/docs/components/Action/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ And specify an additional selector to filter the targeted components:

</llm-only>


### Simple usage with the `Target` component

The `Target` component is a companion of the `Action` component that can be used to easily target other DOM elements without creating specific component.
Expand Down
49 changes: 25 additions & 24 deletions packages/docs/components/Action/js-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ Use this option to change the event that will trigger the [effect callback](#eff

Modifiers can be chained with a `.` as separator:

<!-- prettier-ignore-start -->
```html {3}
<button
data-component="Action"
data-option-on="click.prevent.stop.passive">
Click me
</button>
```
<!-- prettier-ignore-end -->

### `target`

Expand All @@ -53,6 +55,7 @@ class Foo extends Base {
};
}
```

:::

#### No target
Expand All @@ -72,48 +75,37 @@ By not defining the `target` option, the default target will be the current `Act

The following configuration will use all `Foo` components as targets, the effect callback will be triggered for each and every one of them.

<!-- prettier-ignore-start -->
```html {3}
<button
data-component="Action"
data-option-target="Foo">
Click me
</button>
<button data-component="Action" data-option-target="Foo">Click me</button>
```
<!-- prettier-ignore-end -->

#### Multiple targets

<!-- prettier-ignore-start -->
```html {3}
<button
data-component="Action"
data-option-target="Foo Bar">
Click me
</button>
<button data-component="Action" data-option-target="Foo Bar">Click me</button>
```
<!-- prettier-ignore-end -->

#### Reduce the list of target with a selector

In the following example, the effect callback will only be triggered on the `Foo` component with the `foo` id.

```html {3,9}
<!-- prettier-ignore-start -->
```html {3,7}
<button
data-component="Action"
data-option-target="Foo(#foo)">
Click me
</button>

<div
data-component="Foo"
id="foo">
...
</div>

<div
data-component="Foo"
id="bar">
...
</div>
```
<div data-component="Foo" id="foo">...</div>

<div data-component="Foo" id="bar">...</div>
```
<!-- prettier-ignore-end -->

### `effect`

Expand All @@ -135,6 +127,7 @@ The `effect` option must be used to define a small piece of JavaScript that will

The effect can also define an arrow function which will be executed as well. The following examples are similar:

<!-- prettier-ignore-start -->
```html {3,9}
<button
data-component="Action"
Expand All @@ -148,11 +141,13 @@ The effect can also define an arrow function which will be executed as well. The
Click me
</button>
```
<!-- prettier-ignore-end -->

#### Accessing the current element

Use `this` to access the current element:

<!-- prettier-ignore-start -->
```html {3-4}
<button
data-component="Action"
Expand All @@ -161,11 +156,13 @@ Use `this` to access the current element:
Click me
</button>
```
<!-- prettier-ignore-end -->

#### Accessing the target element

Use `$el` to access the current element:

<!-- prettier-ignore-start -->
```html {3-4}
<button
data-component="Action"
Expand All @@ -176,29 +173,33 @@ Use `$el` to access the current element:

<div data-component="Target" class="bg-red">...</div>
```
<!-- prettier-ignore-end -->

#### Accessing the current instances mounted on the current element

Use the name of the component mounted on the current element to get access to its instance.

<!-- prettier-ignore-start -->
```html {3}
<button
data-component="Action Transition"
data-option-effect="Transition.enter()">
Click me
</button>
```
<!-- prettier-ignore-end -->

By default, the `Action` variabl will always refer to the current `Action` instance of the current element. The following example will log `true` when the button is clicked:

<!-- prettier-ignore-start -->
```html {3}
<button
data-component="Action"
data-option-effect="console.log(Action.$el === this)">
Click me
</button>
```

<!-- prettier-ignore-end -->

#### Advanced usage with destructuration

Expand Down
1 change: 1 addition & 0 deletions packages/docs/components/AnchorScrollto/js-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: AnchorScrollTo JS API
---

# JS API

## Getter

### `targetSelector`
Expand Down
1 change: 0 additions & 1 deletion packages/docs/components/Button/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Once the [package installed](/guide/installation/), simply include the template
```twig
{% include '@ui-pkg/Button/Button.twig' %}
```

5 changes: 5 additions & 0 deletions packages/docs/components/CircularMarquee/examples.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Examples

## Default

<llm-exclude>
<PreviewPlayground
:html="() => import('./stories/app.twig')"
Expand All @@ -19,6 +20,7 @@
</llm-only>

## Higher sensitivity

<llm-exclude>
<PreviewPlayground
:html="() => import('./stories/app-2.twig')"
Expand All @@ -37,6 +39,7 @@
</llm-only>

## Negative sensitivity

<llm-exclude>
<PreviewPlayground
:html="() => import('./stories/app-3.twig')"
Expand All @@ -57,8 +60,10 @@
## Exemple with same `outer_radius` and `radius`

:::tip Why is there two radius parameters ?

- `outer_radius` set the size of the **svg viewbox**. `radius` set the size of the `<path>` on which the circular text will be written.
- `outer_radius` needs to be greater in order to **avoid cutting** the text since the `<svg>` will always hide the overflowing content.

:::

<llm-exclude>
Expand Down
3 changes: 2 additions & 1 deletion packages/docs/components/Cursor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ class App extends Base {
name: 'Base',
components: {
Cursor,
}
},
};
}

export default createApp(App);
```

```twig
{% include '@ui/Cursor/Cursor.twig' only %}
```
1 change: 0 additions & 1 deletion packages/docs/components/DataComputed/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ registerComponent(DataComputed);

</llm-only>


### Double computed value

<llm-exclude>
Expand Down
4 changes: 1 addition & 3 deletions packages/docs/components/Draggable/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ export default createApp(App);

```html [index.html]
<div data-component="Draggable">
<div data-ref="target">
...
</div>
<div data-ref="target">...</div>
</div>
```

Expand Down
16 changes: 4 additions & 12 deletions packages/docs/components/Draggable/js-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,16 @@ The values are unitless and in pixels.

```html
<!-- Add a 10px inner margin -->
<div data-component="Draggable"
data-option-margin="10">
</div>
<div data-component="Draggable" data-option-margin="10"></div>

<!-- Add a 10px inner inline margin -->
<div data-component="Draggable"
data-option-margin="0 10">
</div>
<div data-component="Draggable" data-option-margin="0 10"></div>

<!-- Add a 10px inner inline margin and 10px bottom margin -->
<div data-component="Draggable"
data-option-margin="0 10 10">
</div>
<div data-component="Draggable" data-option-margin="0 10 10"></div>

<!-- Add a 10px outer margin -->
<div data-component="Draggable"
data-option-margin="-10 -10 -10 -10">
</div>
<div data-component="Draggable" data-option-margin="-10 -10 -10 -10"></div>
```

### `sensitivity`
Expand Down
1 change: 0 additions & 1 deletion packages/docs/components/Fetch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ registerComponent(Fetch);

:::


See the [cancelling a request example](./examples.md#cancelling-a-request) for detailed usage.

### Handling JSON response
Expand Down
5 changes: 3 additions & 2 deletions packages/docs/components/Figure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ class App extends Base {
name: 'Base',
components: {
Figure,
}
},
};
}

export default createApp(App);
```

```twig
<div class="card">
{% include '@ui/Figure/Figure.twig' with {
Expand Down Expand Up @@ -87,7 +88,7 @@ class App extends Base {
name: 'Base',
components: {
Figure,
}
},
};
}

Expand Down
1 change: 0 additions & 1 deletion packages/docs/components/Figure/js-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ The `Figure` component extends the [`Transition` primitive](/components/Transiti

Use this options to enable lazy loading while reading the source from the `data-src` attribute of the [`img` ref](#img).


## Refs

### `img`
Expand Down
Loading
Loading