@gtkx/animated 2.0.0-beta.13 → 2.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @gtkx/animated
2
2
 
3
- Spring animations for GTKX widgets.
3
+ React Spring animations for GTK widgets in GTKX.
4
4
 
5
5
  Animate widget properties with `animated`, `useSpring`, and `useTransition`. GTKX drives React Spring with the GTK frame clock and skips animations when the desktop disables them. Use `useReducedMotion` to adapt effects to motion preferences.
6
6
 
@@ -12,6 +12,6 @@ npm install @gtkx/animated@beta
12
12
 
13
13
  [Guide](https://gtkx.dev/v2/guide/animations) · [API reference](https://gtkx.dev/v2/reference/@gtkx/animated/) · [GTKX](https://gtkx.dev)
14
14
 
15
- GTKX requires Linux, Node.js, and the [native prerequisites](https://gtkx.dev/v2/guide/getting-started).
15
+ GTKX requires Linux, Node.js, and the [native prerequisites](https://gtkx.dev/v2/guide/getting-started#what-you-need).
16
16
 
17
17
  [MPL-2.0](https://github.com/gtkx-org/gtkx/blob/main/LICENSE).
@@ -4,8 +4,10 @@ import type { AnimatedComponent } from "./types.js";
4
4
  type Animated = <T extends Exclude<ElementType, string>>(component: T) => AnimatedComponent<T>;
5
5
  /**
6
6
  * Wraps a component so its mutable props accept springs and interpolations. Construct-only props
7
- * keep their original types. Animated values are written to the widget on each frame without a
8
- * React render. The wrapper of a given component is created once and reused.
7
+ * keep their original types. Each frame writes animated GObject properties, a label's text children and `style`
8
+ * to the native object through its `ref` without a React render; other animated props, or a component
9
+ * that does not forward its `ref`, re-render with the current values. The wrapper of a given component
10
+ * is created once and reused.
9
11
  */
10
12
  declare const animated: Animated;
11
13
  export { animated, type Animated };
@@ -1 +1 @@
1
- {"version":3,"file":"animated.d.ts","sourceRoot":"","sources":["../src/animated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD,sEAAsE;AACtE,KAAK,QAAQ,GAAG,CAAC,CAAC,SAAS,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAE/F;;;;GAIG;AACH,QAAA,MAAM,QAAQ,EAAE,QAAuB,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"animated.d.ts","sourceRoot":"","sources":["../src/animated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD,sEAAsE;AACtE,KAAK,QAAQ,GAAG,CAAC,CAAC,SAAS,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAE/F;;;;;;GAMG;AACH,QAAA,MAAM,QAAQ,EAAE,QAAuB,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,CAAC"}
package/dist/animated.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import { withAnimated } from "./with-animated.js";
2
2
  /**
3
3
  * Wraps a component so its mutable props accept springs and interpolations. Construct-only props
4
- * keep their original types. Animated values are written to the widget on each frame without a
5
- * React render. The wrapper of a given component is created once and reused.
4
+ * keep their original types. Each frame writes animated GObject properties, a label's text children and `style`
5
+ * to the native object through its `ref` without a React render; other animated props, or a component
6
+ * that does not forward its `ref`, re-render with the current values. The wrapper of a given component
7
+ * is created once and reused.
6
8
  */
7
9
  const animated = withAnimated;
8
10
  export { animated };
@@ -1 +1 @@
1
- {"version":3,"file":"animated.js","sourceRoot":"","sources":["../src/animated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;GAIG;AACH,MAAM,QAAQ,GAAa,YAAY,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAiB,CAAC","sourcesContent":["import type { ElementType } from \"react\";\nimport type { AnimatedComponent } from \"./types.js\";\nimport { withAnimated } from \"./with-animated.js\";\n\n/** Callable entrypoint that wraps a component with animated props. */\ntype Animated = <T extends Exclude<ElementType, string>>(component: T) => AnimatedComponent<T>;\n\n/**\n * Wraps a component so its mutable props accept springs and interpolations. Construct-only props\n * keep their original types. Animated values are written to the widget on each frame without a\n * React render. The wrapper of a given component is created once and reused.\n */\nconst animated: Animated = withAnimated;\n\nexport { animated, type Animated };\n"]}
1
+ {"version":3,"file":"animated.js","sourceRoot":"","sources":["../src/animated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;;;GAMG;AACH,MAAM,QAAQ,GAAa,YAAY,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAiB,CAAC","sourcesContent":["import type { ElementType } from \"react\";\nimport type { AnimatedComponent } from \"./types.js\";\nimport { withAnimated } from \"./with-animated.js\";\n\n/** Callable entrypoint that wraps a component with animated props. */\ntype Animated = <T extends Exclude<ElementType, string>>(component: T) => AnimatedComponent<T>;\n\n/**\n * Wraps a component so its mutable props accept springs and interpolations. Construct-only props\n * keep their original types. Each frame writes animated GObject properties, a label's text children and `style`\n * to the native object through its `ref` without a React render; other animated props, or a component\n * that does not forward its `ref`, re-render with the current values. The wrapper of a given component\n * is created once and reused.\n */\nconst animated: Animated = withAnimated;\n\nexport { animated, type Animated };\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gtkx/animated",
3
- "version": "2.0.0-beta.13",
4
- "description": "Spring animations for GTKX widgets.",
3
+ "version": "2.0.0-beta.14",
4
+ "description": "React Spring animations for GTK widgets in GTKX.",
5
5
  "keywords": [
6
6
  "gtkx",
7
7
  "gtk",
@@ -52,8 +52,8 @@
52
52
  "node": ">=26.7.0"
53
53
  },
54
54
  "dependencies": {
55
- "@gtkx/react": "^2.0.0-beta.13",
56
- "@gtkx/runtime": "^2.0.0-beta.13",
55
+ "@gtkx/react": "^2.0.0-beta.14",
56
+ "@gtkx/runtime": "^2.0.0-beta.14",
57
57
  "@react-spring/core": "^10.1.2",
58
58
  "@react-spring/shared": "^10.1.2",
59
59
  "@react-spring/types": "^10.1.2"
@@ -63,9 +63,9 @@
63
63
  "react": "^19.3"
64
64
  },
65
65
  "devDependencies": {
66
- "@gtkx/config": "2.0.0-beta.13",
67
- "@gtkx/testing": "2.0.0-beta.13",
68
- "@gtkx/vitest": "2.0.0-beta.13",
66
+ "@gtkx/config": "2.0.0-beta.14",
67
+ "@gtkx/testing": "2.0.0-beta.14",
68
+ "@gtkx/vitest": "2.0.0-beta.14",
69
69
  "@types/react": "^19.3.0",
70
70
  "vitest": "5.1.0"
71
71
  },
package/src/animated.ts CHANGED
@@ -7,8 +7,10 @@ type Animated = <T extends Exclude<ElementType, string>>(component: T) => Animat
7
7
 
8
8
  /**
9
9
  * Wraps a component so its mutable props accept springs and interpolations. Construct-only props
10
- * keep their original types. Animated values are written to the widget on each frame without a
11
- * React render. The wrapper of a given component is created once and reused.
10
+ * keep their original types. Each frame writes animated GObject properties, a label's text children and `style`
11
+ * to the native object through its `ref` without a React render; other animated props, or a component
12
+ * that does not forward its `ref`, re-render with the current values. The wrapper of a given component
13
+ * is created once and reused.
12
14
  */
13
15
  const animated: Animated = withAnimated;
14
16