@base-framework/base 3.7.34 → 3.7.36

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.
@@ -222,6 +222,17 @@ export class Router {
222
222
  * @param {string} [path]
223
223
  */
224
224
  protected checkActiveRoutes(path?: string): void;
225
+ /**
226
+ * Reset scroll intent before checking routes.
227
+ * Routes will set this during select().
228
+ */
229
+ scrollIntent: {
230
+ type: string;
231
+ selector: any;
232
+ } | {
233
+ type: string;
234
+ selector?: undefined;
235
+ };
225
236
  /**
226
237
  * Checks all switch groups against the given path.
227
238
  * Activates the first matching route or falls back to the first route in the group if none match.
@@ -265,6 +276,22 @@ export class Router {
265
276
  * @returns {void}
266
277
  */
267
278
  select(route: object): void;
279
+ /**
280
+ * This will apply the collected scroll intent after all
281
+ * routes and switches have been processed.
282
+ *
283
+ * @returns {void}
284
+ */
285
+ applyScrollIntent(): void;
286
+ /**
287
+ * This will scroll to a target element by CSS selector.
288
+ * If the current scroll position is at or below the target,
289
+ * it scrolls the target to the top of the viewport.
290
+ *
291
+ * @param {string} selector
292
+ * @returns {void}
293
+ */
294
+ scrollToTarget(selector: string): void;
268
295
  /**
269
296
  * This will check to scroll to the top of the page.
270
297
  *
@@ -35,6 +35,7 @@ export class Route extends BasicData {
35
35
  callBack: any;
36
36
  title: any;
37
37
  preventScroll: any;
38
+ scrollTo: any;
38
39
  /**
39
40
  * This will setup the route settings.
40
41
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.7.34",
3
+ "version": "3.7.36",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",