@gtkx/animated 1.4.0 → 1.6.0
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 +1 -1
- package/dist/animated.d.ts +6 -4
- package/dist/animated.d.ts.map +1 -1
- package/dist/animated.js +4 -2
- package/dist/animated.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +3 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +3 -0
- package/dist/internal.js.map +1 -0
- package/dist/types.d.ts +8 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +12 -6
- package/src/animated.ts +6 -4
- package/src/index.ts +2 -0
- package/src/internal.ts +3 -0
- package/src/types.ts +19 -2
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ GTK4 is mature, and GtkBuilder XML can lay out a static interface, but nothing r
|
|
|
98
98
|
- a React reconciler that exposes every GObject as a JSX element,
|
|
99
99
|
- a CLI for scaffolding, development, and production builds,
|
|
100
100
|
- a dev server with Fast Refresh that patches your running UI in place,
|
|
101
|
-
- CSS-in-JS styling, React Spring animations, React Navigation stack, tab, drawer, and split view navigators, and high-level list, grid, and dialog components,
|
|
101
|
+
- CSS-in-JS styling, React Hook Form-powered Adwaita controls, gettext-backed react-i18next localization, React Spring animations, React Navigation stack, tab, drawer, and split view navigators, and high-level list, grid, and dialog components,
|
|
102
102
|
- a Testing Library-style API for querying and driving your widgets in tests,
|
|
103
103
|
- and a Model Context Protocol (MCP) server that exposes your live app to AI agents.
|
|
104
104
|
|
package/dist/animated.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ElementType } from "react";
|
|
2
|
-
import type { AnimatedComponent,
|
|
2
|
+
import type { AnimatedComponent, AnimatedElementMap } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The `animated` entrypoint: callable to wrap any component, and exposing every generated widget
|
|
5
5
|
* component as a property, so `animated.GtkLabel` is the animated form of `GtkLabel`.
|
|
6
6
|
*/
|
|
7
|
-
type Animated = (<T extends Exclude<ElementType, string>>(component: T) => AnimatedComponent<T>) &
|
|
7
|
+
type Animated = (<T extends Exclude<ElementType, string>>(component: T) => AnimatedComponent<T>) & AnimatedElementMap;
|
|
8
8
|
/**
|
|
9
9
|
* Wraps a component so that its props accept springs and interpolations: `animated(GtkLabel)` is
|
|
10
10
|
* `GtkLabel` with every prop also taking a `SpringValue` or an `Interpolation`. Animated values are
|
|
@@ -12,8 +12,10 @@ type Animated = (<T extends Exclude<ElementType, string>>(component: T) => Anima
|
|
|
12
12
|
* created once and reused, so repeated lookups render the same component.
|
|
13
13
|
*
|
|
14
14
|
* Every widget component of the generated `@gtkx/jsx` store is also available as a property:
|
|
15
|
-
* `animated.GtkLabel` is `animated(GtkLabel)` without the import.
|
|
16
|
-
*
|
|
15
|
+
* `animated.GtkLabel` is `animated(GtkLabel)` without the import. **Deprecated: property access is
|
|
16
|
+
* removed in GTKX 2.0**, where `animated` is only callable; import the component and call
|
|
17
|
+
* `animated(GtkLabel)` instead, which also lets a production bundle drop the widgets an
|
|
18
|
+
* application never animates.
|
|
17
19
|
*/
|
|
18
20
|
declare const animated: Animated;
|
|
19
21
|
export { animated, type Animated };
|
package/dist/animated.d.ts.map
CHANGED
|
@@ -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;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"animated.d.ts","sourceRoot":"","sources":["../src/animated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIxE;;;GAGG;AACH,KAAK,QAAQ,GAAG,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC;AAEtH;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,QAAQ,EAAE,QAuBF,CAAC;AAgBf,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,CAAC"}
|
package/dist/animated.js
CHANGED
|
@@ -7,8 +7,10 @@ import { withAnimated } from "./with-animated.js";
|
|
|
7
7
|
* created once and reused, so repeated lookups render the same component.
|
|
8
8
|
*
|
|
9
9
|
* Every widget component of the generated `@gtkx/jsx` store is also available as a property:
|
|
10
|
-
* `animated.GtkLabel` is `animated(GtkLabel)` without the import.
|
|
11
|
-
*
|
|
10
|
+
* `animated.GtkLabel` is `animated(GtkLabel)` without the import. **Deprecated: property access is
|
|
11
|
+
* removed in GTKX 2.0**, where `animated` is only callable; import the component and call
|
|
12
|
+
* `animated(GtkLabel)` instead, which also lets a production bundle drop the widgets an
|
|
13
|
+
* application never animates.
|
|
12
14
|
*/
|
|
13
15
|
const animated = new Proxy(wrapComponent, {
|
|
14
16
|
get(target, property, receiver) {
|
package/dist/animated.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animated.js","sourceRoot":"","sources":["../src/animated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AASlD
|
|
1
|
+
{"version":3,"file":"animated.js","sourceRoot":"","sources":["../src/animated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AASlD;;;;;;;;;;;GAWG;AACH,MAAM,QAAQ,GAAa,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GAAY,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEvD,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7C,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACvC,CAAC;AAED,SAAS,aAAa,CAAsB,SAAY;IACpD,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACnC,CAAC;AAED,OAAO,EAAE,QAAQ,EAAiB,CAAC","sourcesContent":["import type { ElementType } from \"react\";\nimport * as elements from \"@gtkx/jsx\";\nimport type { AnimatedComponent, AnimatedElementMap } from \"./types.js\";\nimport { withAnimated } from \"./with-animated.js\";\n\ntype Wrappable = Exclude<ElementType, string>;\n/**\n * The `animated` entrypoint: callable to wrap any component, and exposing every generated widget\n * component as a property, so `animated.GtkLabel` is the animated form of `GtkLabel`.\n */\ntype Animated = (<T extends Exclude<ElementType, string>>(component: T) => AnimatedComponent<T>) & AnimatedElementMap;\n\n/**\n * Wraps a component so that its props accept springs and interpolations: `animated(GtkLabel)` is\n * `GtkLabel` with every prop also taking a `SpringValue` or an `Interpolation`. Animated values are\n * written to the widget on each frame without a React render. The wrapper of a given component is\n * created once and reused, so repeated lookups render the same component.\n *\n * Every widget component of the generated `@gtkx/jsx` store is also available as a property:\n * `animated.GtkLabel` is `animated(GtkLabel)` without the import. **Deprecated: property access is\n * removed in GTKX 2.0**, where `animated` is only callable; import the component and call\n * `animated(GtkLabel)` instead, which also lets a production bundle drop the widgets an\n * application never animates.\n */\nconst animated: Animated = new Proxy(wrapComponent, {\n get(target, property, receiver): unknown {\n const component = componentFor(property);\n\n return component === null ? Reflect.get(target, property, receiver) : withAnimated(component);\n },\n getOwnPropertyDescriptor(target, property): PropertyDescriptor | undefined {\n const component = componentFor(property);\n\n if (component === null) {\n return Reflect.getOwnPropertyDescriptor(target, property);\n }\n\n return { configurable: true, enumerable: true, writable: false, value: withAnimated(component) };\n },\n has(target, property): boolean {\n return componentFor(property) !== null || Reflect.has(target, property);\n },\n ownKeys(target): (string | symbol)[] {\n const names = Object.keys(elements).filter((name) => componentFor(name) !== null);\n\n return [...new Set([...Reflect.ownKeys(target), ...names])];\n },\n}) as Animated;\n\nfunction componentFor(property: string | symbol): Wrappable | null {\n const value: unknown = Reflect.get(elements, property);\n\n return isComponent(value) ? value : null;\n}\n\nfunction isComponent(value: unknown): value is Wrappable {\n return typeof value === \"function\";\n}\n\nfunction wrapComponent<T extends Wrappable>(component: T): AnimatedComponent<T> {\n return withAnimated(component);\n}\n\nexport { animated, type Animated };\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./bootstrap.js";
|
|
2
2
|
export { animated, type Animated } from "./animated.js";
|
|
3
3
|
export { useReducedMotion } from "./reduced-motion.js";
|
|
4
|
-
export type { AnimatedComponent, AnimatedElements, AnimatedItems, AnimatedProp, AnimatedProps, AnimatedStyle, } from "./types.js";
|
|
4
|
+
export type { AnimatedComponent, AnimatedElementMap, AnimatedElements, AnimatedItems, AnimatedProp, AnimatedProps, AnimatedStyle, } from "./types.js";
|
|
5
5
|
export { BailSignal, config, Controller, createInterpolator, easings, FrameValue, Globals, inferTo, Interpolation, Spring, SpringContext, SpringRef, SpringValue, to, Trail, Transition, update, useChain, useSpring, useSpringRef, useSprings, useSpringValue, useTrail, useTransition, } from "@react-spring/core";
|
|
6
6
|
export type { AnimationConfig, AnimationProps, AnimationResult, AsyncResult, Change, ControllerFlushFn, ControllerProps, ControllerUpdate, EventProp, ForwardProps, GoalProp, GoalValue, GoalValues, InferTo, InlineToProps, Interpolated, Interpolator, ItemKeys, LoopProp, MatchProp, OnChange, OnPause, OnProps, OnResolve, OnRest, OnResume, OnStart, PickAnimated, ReservedEventProps, ReservedProps, SpringChain, SpringComponentProps, SpringConfig, SpringProps, SpringsUpdate, SpringTo, SpringToFn, SpringUpdate, SpringUpdateFn, SpringValues, Springify, ToProps, ToValues, TrailComponentProps, TransitionComponentProps, TransitionFn, TransitionFrom, TransitionKey, TransitionRenderFn, TransitionState, TransitionTo, TransitionValues, UseSpringProps, UseSpringsProps, UseTrailProps, UseTransitionProps, VelocityProp, } from "@react-spring/core";
|
|
7
7
|
export type { FluidValue } from "@react-spring/shared";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EACR,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACH,UAAU,EACV,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,OAAO,EACP,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,MAAM,EACN,aAAa,EACb,SAAS,EACT,WAAW,EACX,EAAE,EACF,KAAK,EACL,UAAU,EACV,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,cAAc,EACd,QAAQ,EACR,aAAa,GAChB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACR,eAAe,EACf,cAAc,EACd,eAAe,EACf,WAAW,EACX,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,OAAO,EACP,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,SAAS,EACT,OAAO,EACP,QAAQ,EACR,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,YAAY,GACf,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,MAAM,EACN,SAAS,EACT,YAAY,GACf,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EACR,iBAAiB,EACjB,kBAAkB,EAElB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACH,UAAU,EACV,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,OAAO,EACP,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,MAAM,EACN,aAAa,EACb,SAAS,EACT,WAAW,EACX,EAAE,EACF,KAAK,EACL,UAAU,EACV,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,cAAc,EACd,QAAQ,EACR,aAAa,GAChB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACR,eAAe,EACf,cAAc,EACd,eAAe,EACf,WAAW,EACX,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,OAAO,EACP,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,SAAS,EACT,OAAO,EACP,QAAQ,EACR,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,YAAY,GACf,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,MAAM,EACN,SAAS,EACT,YAAY,GACf,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAiB,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAiB,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAWvD,OAAO,EACH,UAAU,EACV,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,OAAO,EACP,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,MAAM,EACN,aAAa,EACb,SAAS,EACT,WAAW,EACX,EAAE,EACF,KAAK,EACL,UAAU,EACV,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,cAAc,EACd,QAAQ,EACR,aAAa,GAChB,MAAM,oBAAoB,CAAC","sourcesContent":["import \"./bootstrap.js\";\n\nexport { animated, type Animated } from \"./animated.js\";\nexport { useReducedMotion } from \"./reduced-motion.js\";\nexport type {\n AnimatedComponent,\n AnimatedElementMap,\n /* eslint-disable-next-line @typescript-eslint/no-deprecated -- exported until 2.0 removes it */\n AnimatedElements,\n AnimatedItems,\n AnimatedProp,\n AnimatedProps,\n AnimatedStyle,\n} from \"./types.js\";\nexport {\n BailSignal,\n config,\n Controller,\n createInterpolator,\n easings,\n FrameValue,\n Globals,\n inferTo,\n Interpolation,\n Spring,\n SpringContext,\n SpringRef,\n SpringValue,\n to,\n Trail,\n Transition,\n update,\n useChain,\n useSpring,\n useSpringRef,\n useSprings,\n useSpringValue,\n useTrail,\n useTransition,\n} from \"@react-spring/core\";\nexport type {\n AnimationConfig,\n AnimationProps,\n AnimationResult,\n AsyncResult,\n Change,\n ControllerFlushFn,\n ControllerProps,\n ControllerUpdate,\n EventProp,\n ForwardProps,\n GoalProp,\n GoalValue,\n GoalValues,\n InferTo,\n InlineToProps,\n Interpolated,\n Interpolator,\n ItemKeys,\n LoopProp,\n MatchProp,\n OnChange,\n OnPause,\n OnProps,\n OnResolve,\n OnRest,\n OnResume,\n OnStart,\n PickAnimated,\n ReservedEventProps,\n ReservedProps,\n SpringChain,\n SpringComponentProps,\n SpringConfig,\n SpringProps,\n SpringsUpdate,\n SpringTo,\n SpringToFn,\n SpringUpdate,\n SpringUpdateFn,\n SpringValues,\n Springify,\n ToProps,\n ToValues,\n TrailComponentProps,\n TransitionComponentProps,\n TransitionFn,\n TransitionFrom,\n TransitionKey,\n TransitionRenderFn,\n TransitionState,\n TransitionTo,\n TransitionValues,\n UseSpringProps,\n UseSpringsProps,\n UseTrailProps,\n UseTransitionProps,\n VelocityProp,\n} from \"@react-spring/core\";\nexport type { FluidValue } from \"@react-spring/shared\";\nexport type {\n Animatable,\n EasingFunction,\n ExtrapolateType,\n InterpolatorArgs,\n InterpolatorConfig,\n InterpolatorFactory,\n InterpolatorFn,\n Lookup,\n OneOrMore,\n UnknownProps,\n} from \"@react-spring/types\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/internal.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["import \"./bootstrap.js\";\n\nexport { withAnimated } from \"./with-animated.js\";\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -29,10 +29,16 @@ type AnimatedComponent<T extends Exclude<ElementType, string>> = FunctionCompone
|
|
|
29
29
|
* included, so `animated.GtkLabel` is available while non-widget elements such as `GtkAdjustment`
|
|
30
30
|
* are wrapped explicitly through the `animated(...)` call instead.
|
|
31
31
|
*/
|
|
32
|
-
type
|
|
32
|
+
type AnimatedElementMap = {
|
|
33
33
|
readonly [K in keyof typeof elements as (typeof elements)[K] extends Exclude<ElementType, string> ? ComponentPropsWithRef<(typeof elements)[K]> extends {
|
|
34
34
|
ref?: Ref<infer Instance> | undefined;
|
|
35
35
|
} ? [NonNullable<Instance>] extends [never] ? never : NonNullable<Instance> extends Gtk.Widget ? K : never : never : never]: (typeof elements)[K] extends Exclude<ElementType, string> ? AnimatedComponent<(typeof elements)[K]> : never;
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
/**
|
|
38
|
+
* The widget components of the generated `@gtkx/jsx` store, exposed as properties of `animated`.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated Since 1.6. Use `AnimatedElementMap` instead. Removed in v2.
|
|
41
|
+
*/
|
|
42
|
+
type AnimatedElements = AnimatedElementMap;
|
|
43
|
+
export type { AnimatedComponent, AnimatedElementMap, AnimatedElements, AnimatedItems, AnimatedProp, AnimatedProps, AnimatedStyle, };
|
|
38
44
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,KAAK,QAAQ,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAExF,8GAA8G;AAC9G,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAClF,KAAK,GACL,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,SAAS,QAAQ,CAAC,MAAM,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B,kBAAkB,EAElB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,GAChB,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as Gtk from \"@gtkx/gi/gtk\";\nimport type * as elements from \"@gtkx/jsx\";\nimport type { FluidValue } from \"@react-spring/shared\";\nimport type { ComponentPropsWithRef, ElementType, FunctionComponent, Ref } from \"react\";\n\n/** An array-valued prop whose items may each be a spring or an interpolation, such as mixed text children. */\ntype AnimatedItems<T> = [Exclude<Extract<T, Iterable<unknown>>, string>] extends [never]\n ? never\n : Exclude<Extract<T, Iterable<unknown>>, string> extends Iterable<infer Item>\n ? Iterable<AnimatedProp<Item>>\n : never;\n\n/** A prop value that an animated component also accepts as a spring or an interpolation. */\ntype AnimatedProp<T> = T | FluidValue<Exclude<T, undefined>> | AnimatedItems<Exclude<T, undefined>>;\n\n/**\n * A `style` object whose declarations may each be a spring or an interpolation, nested blocks\n * included, so the object a spring hook returns can be handed to `style` as it is.\n */\ntype AnimatedStyle<T> = {\n [K in keyof T]: T[K] extends string | number | undefined | null\n ? AnimatedProp<T[K]>\n : AnimatedProp<T[K]> | AnimatedStyle<NonNullable<T[K]>>;\n};\n\n/**\n * The props of an animated component: every prop of the wrapped component, each also accepting a\n * {@link FluidValue} such as a `SpringValue` or an `Interpolation`, while `ref` and `key` keep\n * their original types.\n */\ntype AnimatedProps<Props extends object> = {\n [P in keyof Props]: P extends \"key\" | \"ref\"\n ? Props[P]\n : P extends \"style\"\n ? AnimatedProp<Props[P]> | AnimatedStyle<NonNullable<Props[P]>>\n : AnimatedProp<Props[P]>;\n};\n\n/** A component returned by {@link animated}: the wrapped component with animated props. */\ntype AnimatedComponent<T extends Exclude<ElementType, string>> = FunctionComponent<\n AnimatedProps<ComponentPropsWithRef<T>>\n>;\n\n/**\n * The widget components of the generated `@gtkx/jsx` store, keyed by element name, each wrapped as\n * an {@link AnimatedComponent}. Only components whose `ref` exposes a `Gtk.Widget` subclass are\n * included, so `animated.GtkLabel` is available while non-widget elements such as `GtkAdjustment`\n * are wrapped explicitly through the `animated(...)` call instead.\n */\ntype
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as Gtk from \"@gtkx/gi/gtk\";\nimport type * as elements from \"@gtkx/jsx\";\nimport type { FluidValue } from \"@react-spring/shared\";\nimport type { ComponentPropsWithRef, ElementType, FunctionComponent, Ref } from \"react\";\n\n/** An array-valued prop whose items may each be a spring or an interpolation, such as mixed text children. */\ntype AnimatedItems<T> = [Exclude<Extract<T, Iterable<unknown>>, string>] extends [never]\n ? never\n : Exclude<Extract<T, Iterable<unknown>>, string> extends Iterable<infer Item>\n ? Iterable<AnimatedProp<Item>>\n : never;\n\n/** A prop value that an animated component also accepts as a spring or an interpolation. */\ntype AnimatedProp<T> = T | FluidValue<Exclude<T, undefined>> | AnimatedItems<Exclude<T, undefined>>;\n\n/**\n * A `style` object whose declarations may each be a spring or an interpolation, nested blocks\n * included, so the object a spring hook returns can be handed to `style` as it is.\n */\ntype AnimatedStyle<T> = {\n [K in keyof T]: T[K] extends string | number | undefined | null\n ? AnimatedProp<T[K]>\n : AnimatedProp<T[K]> | AnimatedStyle<NonNullable<T[K]>>;\n};\n\n/**\n * The props of an animated component: every prop of the wrapped component, each also accepting a\n * {@link FluidValue} such as a `SpringValue` or an `Interpolation`, while `ref` and `key` keep\n * their original types.\n */\ntype AnimatedProps<Props extends object> = {\n [P in keyof Props]: P extends \"key\" | \"ref\"\n ? Props[P]\n : P extends \"style\"\n ? AnimatedProp<Props[P]> | AnimatedStyle<NonNullable<Props[P]>>\n : AnimatedProp<Props[P]>;\n};\n\n/** A component returned by {@link animated}: the wrapped component with animated props. */\ntype AnimatedComponent<T extends Exclude<ElementType, string>> = FunctionComponent<\n AnimatedProps<ComponentPropsWithRef<T>>\n>;\n\n/**\n * The widget components of the generated `@gtkx/jsx` store, keyed by element name, each wrapped as\n * an {@link AnimatedComponent}. Only components whose `ref` exposes a `Gtk.Widget` subclass are\n * included, so `animated.GtkLabel` is available while non-widget elements such as `GtkAdjustment`\n * are wrapped explicitly through the `animated(...)` call instead.\n */\ntype AnimatedElementMap = {\n readonly [K in keyof typeof elements as (typeof elements)[K] extends Exclude<ElementType, string>\n ? ComponentPropsWithRef<(typeof elements)[K]> extends { ref?: Ref<infer Instance> | undefined }\n ? [NonNullable<Instance>] extends [never]\n ? never\n : NonNullable<Instance> extends Gtk.Widget\n ? K\n : never\n : never\n : never]: (typeof elements)[K] extends Exclude<ElementType, string>\n ? AnimatedComponent<(typeof elements)[K]>\n : never;\n};\n\n/**\n * The widget components of the generated `@gtkx/jsx` store, exposed as properties of `animated`.\n *\n * @deprecated Since 1.6. Use `AnimatedElementMap` instead. Removed in v2.\n */\n/* eslint-disable-next-line sonarjs/redundant-type-aliases -- deprecated alias kept until 2.0 removes it */\ntype AnimatedElements = AnimatedElementMap;\n\nexport type {\n AnimatedComponent,\n AnimatedElementMap,\n /* eslint-disable-next-line @typescript-eslint/no-deprecated -- exported until 2.0 removes it */\n AnimatedElements,\n AnimatedItems,\n AnimatedProp,\n AnimatedProps,\n AnimatedStyle,\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gtkx/animated",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Spring animations for GTK widgets, driven by the GTK4 frame clock.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gtkx",
|
|
@@ -30,11 +30,17 @@
|
|
|
30
30
|
".": {
|
|
31
31
|
"types": "./dist/index.d.ts",
|
|
32
32
|
"default": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./internal": {
|
|
35
|
+
"types": "./dist/internal.d.ts",
|
|
36
|
+
"default": "./dist/internal.js"
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
"sideEffects": [
|
|
36
40
|
"./src/index.ts",
|
|
37
41
|
"./dist/index.js",
|
|
42
|
+
"./src/internal.ts",
|
|
43
|
+
"./dist/internal.js",
|
|
38
44
|
"./src/bootstrap.ts",
|
|
39
45
|
"./dist/bootstrap.js"
|
|
40
46
|
],
|
|
@@ -59,17 +65,17 @@
|
|
|
59
65
|
"@react-spring/core": "^10.1.2",
|
|
60
66
|
"@react-spring/shared": "^10.1.2",
|
|
61
67
|
"@react-spring/types": "^10.1.2",
|
|
62
|
-
"@gtkx/react": "1.
|
|
63
|
-
"@gtkx/runtime": "1.
|
|
68
|
+
"@gtkx/react": "1.6.0",
|
|
69
|
+
"@gtkx/runtime": "1.6.0"
|
|
64
70
|
},
|
|
65
71
|
"peerDependencies": {
|
|
66
72
|
"react": "^19.2"
|
|
67
73
|
},
|
|
68
74
|
"devDependencies": {
|
|
69
75
|
"vitest": "^4.1.11",
|
|
70
|
-
"@gtkx/config": "1.
|
|
71
|
-
"@gtkx/
|
|
72
|
-
"@gtkx/
|
|
76
|
+
"@gtkx/config": "1.6.0",
|
|
77
|
+
"@gtkx/vitest": "1.6.0",
|
|
78
|
+
"@gtkx/testing": "1.6.0"
|
|
73
79
|
},
|
|
74
80
|
"scripts": {
|
|
75
81
|
"release": "tsx ../../scripts/release-package.ts"
|
package/src/animated.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ElementType } from "react";
|
|
2
2
|
import * as elements from "@gtkx/jsx";
|
|
3
|
-
import type { AnimatedComponent,
|
|
3
|
+
import type { AnimatedComponent, AnimatedElementMap } from "./types.js";
|
|
4
4
|
import { withAnimated } from "./with-animated.js";
|
|
5
5
|
|
|
6
6
|
type Wrappable = Exclude<ElementType, string>;
|
|
@@ -8,7 +8,7 @@ type Wrappable = Exclude<ElementType, string>;
|
|
|
8
8
|
* The `animated` entrypoint: callable to wrap any component, and exposing every generated widget
|
|
9
9
|
* component as a property, so `animated.GtkLabel` is the animated form of `GtkLabel`.
|
|
10
10
|
*/
|
|
11
|
-
type Animated = (<T extends Exclude<ElementType, string>>(component: T) => AnimatedComponent<T>) &
|
|
11
|
+
type Animated = (<T extends Exclude<ElementType, string>>(component: T) => AnimatedComponent<T>) & AnimatedElementMap;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Wraps a component so that its props accept springs and interpolations: `animated(GtkLabel)` is
|
|
@@ -17,8 +17,10 @@ type Animated = (<T extends Exclude<ElementType, string>>(component: T) => Anima
|
|
|
17
17
|
* created once and reused, so repeated lookups render the same component.
|
|
18
18
|
*
|
|
19
19
|
* Every widget component of the generated `@gtkx/jsx` store is also available as a property:
|
|
20
|
-
* `animated.GtkLabel` is `animated(GtkLabel)` without the import.
|
|
21
|
-
*
|
|
20
|
+
* `animated.GtkLabel` is `animated(GtkLabel)` without the import. **Deprecated: property access is
|
|
21
|
+
* removed in GTKX 2.0**, where `animated` is only callable; import the component and call
|
|
22
|
+
* `animated(GtkLabel)` instead, which also lets a production bundle drop the widgets an
|
|
23
|
+
* application never animates.
|
|
22
24
|
*/
|
|
23
25
|
const animated: Animated = new Proxy(wrapComponent, {
|
|
24
26
|
get(target, property, receiver): unknown {
|
package/src/index.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { animated, type Animated } from "./animated.js";
|
|
|
4
4
|
export { useReducedMotion } from "./reduced-motion.js";
|
|
5
5
|
export type {
|
|
6
6
|
AnimatedComponent,
|
|
7
|
+
AnimatedElementMap,
|
|
8
|
+
/* eslint-disable-next-line @typescript-eslint/no-deprecated -- exported until 2.0 removes it */
|
|
7
9
|
AnimatedElements,
|
|
8
10
|
AnimatedItems,
|
|
9
11
|
AnimatedProp,
|
package/src/internal.ts
ADDED
package/src/types.ts
CHANGED
|
@@ -47,7 +47,7 @@ type AnimatedComponent<T extends Exclude<ElementType, string>> = FunctionCompone
|
|
|
47
47
|
* included, so `animated.GtkLabel` is available while non-widget elements such as `GtkAdjustment`
|
|
48
48
|
* are wrapped explicitly through the `animated(...)` call instead.
|
|
49
49
|
*/
|
|
50
|
-
type
|
|
50
|
+
type AnimatedElementMap = {
|
|
51
51
|
readonly [K in keyof typeof elements as (typeof elements)[K] extends Exclude<ElementType, string>
|
|
52
52
|
? ComponentPropsWithRef<(typeof elements)[K]> extends { ref?: Ref<infer Instance> | undefined }
|
|
53
53
|
? [NonNullable<Instance>] extends [never]
|
|
@@ -61,4 +61,21 @@ type AnimatedElements = {
|
|
|
61
61
|
: never;
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
/**
|
|
65
|
+
* The widget components of the generated `@gtkx/jsx` store, exposed as properties of `animated`.
|
|
66
|
+
*
|
|
67
|
+
* @deprecated Since 1.6. Use `AnimatedElementMap` instead. Removed in v2.
|
|
68
|
+
*/
|
|
69
|
+
/* eslint-disable-next-line sonarjs/redundant-type-aliases -- deprecated alias kept until 2.0 removes it */
|
|
70
|
+
type AnimatedElements = AnimatedElementMap;
|
|
71
|
+
|
|
72
|
+
export type {
|
|
73
|
+
AnimatedComponent,
|
|
74
|
+
AnimatedElementMap,
|
|
75
|
+
/* eslint-disable-next-line @typescript-eslint/no-deprecated -- exported until 2.0 removes it */
|
|
76
|
+
AnimatedElements,
|
|
77
|
+
AnimatedItems,
|
|
78
|
+
AnimatedProp,
|
|
79
|
+
AnimatedProps,
|
|
80
|
+
AnimatedStyle,
|
|
81
|
+
};
|