atom-effect-jquery 0.5.0 → 0.6.1

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/dist/index.d.ts CHANGED
@@ -20,12 +20,12 @@ export declare interface BindingOptions<T> {
20
20
  text?: ReactiveValue<T>;
21
21
  html?: ReactiveValue<string>;
22
22
  class?: Record<string, ReactiveValue<boolean>>;
23
- css?: Record<string, ReactiveValue<string | number> | [ReactiveValue<number>, string]>;
23
+ css?: CssBindings;
24
24
  attr?: Record<string, ReactiveValue<string | boolean | null>>;
25
25
  prop?: Record<string, ReactiveValue<T>>;
26
26
  show?: ReactiveValue<boolean>;
27
27
  hide?: ReactiveValue<boolean>;
28
- val?: WritableAtom<T>;
28
+ val?: WritableAtom<T> | [atom: WritableAtom<T>, options: ValOptions<T>];
29
29
  checked?: WritableAtom<boolean>;
30
30
  on?: Record<string, (e: JQuery.Event) => void>;
31
31
  }
@@ -87,6 +87,17 @@ export { computed }
87
87
 
88
88
  export { ComputedAtom }
89
89
 
90
+ /**
91
+ * CSS bindings map property names to CSS values.
92
+ */
93
+ declare type CssBindings = Record<string, CssValue>;
94
+
95
+ /**
96
+ * CSS value: either a direct reactive value or a tuple of [source, unit].
97
+ * Named type provides clear bone structure for CSS binding configurations.
98
+ */
99
+ declare type CssValue = ReactiveValue<string | number> | [source: ReactiveValue<number>, unit: string];
100
+
90
101
  export default default_2;
91
102
 
92
103
  export declare function disableAutoCleanup(): void;
@@ -133,6 +144,16 @@ export declare const registry: BindingRegistry;
133
144
 
134
145
  export { untracked }
135
146
 
147
+ /**
148
+ * Configuration options for `atomVal`.
149
+ */
150
+ declare interface ValOptions<T> {
151
+ debounce?: number;
152
+ event?: string;
153
+ parse?: (v: string) => T;
154
+ format?: (v: T) => string;
155
+ }
156
+
136
157
  export { WritableAtom }
137
158
 
138
159
  export { }