@but212/atom-effect-jquery 0.18.0 → 0.19.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
@@ -74,7 +74,7 @@ declare type CssBindings = Record<string, CssValue>;
74
74
  * CSS value: either a direct reactive value or a tuple of [source, unit].
75
75
  * Named type provides clear bone structure for CSS binding configurations.
76
76
  */
77
- declare type CssValue = ReactiveValue<string | number> | [source: ReactiveValue<number>, unit: string];
77
+ declare type CssValue = ReactiveValue<string | number> | [source: ReactiveValue<string | number>, unit: string];
78
78
 
79
79
  export default default_2;
80
80
 
@@ -117,6 +117,15 @@ export { ReadonlyAtom }
117
117
 
118
118
  export declare const registry: BindingRegistry;
119
119
 
120
+ /**
121
+ * Route using a custom render function.
122
+ */
123
+ declare interface RenderRoute extends RouteLifecycle {
124
+ /** Custom render function */
125
+ render: (container: HTMLElement, route: string, params: Record<string, string>) => void;
126
+ template?: never;
127
+ }
128
+
120
129
  /**
121
130
  * Configuration for $.route()
122
131
  */
@@ -141,12 +150,14 @@ export declare interface RouteConfig {
141
150
 
142
151
  /**
143
152
  * Route definition for a single route.
153
+ * Either template OR render must be provided, but not both.
144
154
  */
145
- export declare interface RouteDefinition {
146
- /** Template selector (e.g., '#tmpl-home') */
147
- template?: string;
148
- /** Custom render function */
149
- render?: (container: HTMLElement, route: string, params: Record<string, string>) => void;
155
+ export declare type RouteDefinition = TemplateRoute | RenderRoute;
156
+
157
+ /**
158
+ * Shared route lifecycle hooks.
159
+ */
160
+ declare interface RouteLifecycle {
150
161
  /** Called when entering this route. Can return additional params. */
151
162
  onEnter?: (params: Record<string, string>) => Record<string, string> | undefined;
152
163
  /** Called when leaving this route. Return false to prevent navigation. */
@@ -165,6 +176,15 @@ export declare interface Router {
165
176
  destroy: () => void;
166
177
  }
167
178
 
179
+ /**
180
+ * Route using a template selector.
181
+ */
182
+ declare interface TemplateRoute extends RouteLifecycle {
183
+ /** Template selector (e.g., '#tmpl-home') */
184
+ template: string;
185
+ render?: never;
186
+ }
187
+
168
188
  export { untracked }
169
189
 
170
190
  /**