@base-framework/base 3.7.61 → 3.7.63

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.
@@ -107,6 +107,26 @@ export class DataBinder {
107
107
  * @returns {this}
108
108
  */
109
109
  watch(element: object, data: object, prop: string, callBack: Function): this;
110
+ /**
111
+ * Sets up a one-way watcher across multiple properties on the same
112
+ * data source, sharing a single connection, source, and outer
113
+ * callback. Used by `WatcherHelper.addDataWatcher` to avoid
114
+ * allocating one `OneWayConnection` + `OneWaySource` per property
115
+ * for multi-token watchers like `'[[a]] - [[b]]'`.
116
+ *
117
+ * The shared `callBack` is invoked once during setup (matches the
118
+ * per-prop `watch()` behaviour for the first prop) and then on each
119
+ * subsequent change to any watched prop. Per-prop guards skip the
120
+ * first batched event when its value matches the value read at
121
+ * setup time, mirroring the double-fire guard in `watch()`.
122
+ *
123
+ * @param {object} element
124
+ * @param {object} data
125
+ * @param {Array<string>} props
126
+ * @param {function} callBack
127
+ * @returns {this}
128
+ */
129
+ watchMany(element: object, data: object, props: Array<string>, callBack: Function): this;
110
130
  /**
111
131
  * This will remove a watcher from an element.
112
132
  *
@@ -23,6 +23,19 @@ export class OneWaySource extends Source {
23
23
  * @returns {void}
24
24
  */
25
25
  subscribe(msg: string, callBack: Function): void;
26
+ /**
27
+ * Subscribes to multiple messages on the same data source with a
28
+ * shared callback. Used by `DataBinder.watchMany` to collapse
29
+ * multi-property watchers (e.g. `'[[a]] - [[b]]'`) into a single
30
+ * connection/source pair instead of N.
31
+ *
32
+ * @param {Array<string>} msgs
33
+ * @param {function} callBack The shared callback. It receives
34
+ * `(value, committer, msg)` when invoked via the per-prop wrapper.
35
+ * @returns {void}
36
+ */
37
+ subscribeMany(msgs: Array<string>, callBack: Function): void;
38
+ subscriptions: any[];
26
39
  /**
27
40
  * This will unsubscribe from the message.
28
41
  *
@@ -24,6 +24,20 @@ export class Router {
24
24
  * @type {object|null} lastMatchedRoute
25
25
  */
26
26
  lastMatchedRoute: object | null;
27
+ /**
28
+ * Tracks the most recently applied scrollTo selector so we can
29
+ * detect when navigation moves to a different scroll target
30
+ * (a fresh page) versus staying within the same target group
31
+ * (e.g. switching sibling tabs that share a sticky header).
32
+ * @type {string|null}
33
+ */
34
+ lastScrollTarget: string | null;
35
+ /**
36
+ * Monotonic token used to cancel pending scroll-target waits
37
+ * when a newer navigation begins.
38
+ * @type {number}
39
+ */
40
+ scrollWaitToken: number;
27
41
  /**
28
42
  * This will be used to access our history object.
29
43
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.7.61",
3
+ "version": "3.7.63",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",