@txstate-mws/svelte-components 1.2.0 → 1.2.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/actions/elementqueries.js +5 -10
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
|
-
var _ElementQueries_instances, _ElementQueries_watchlist, _ElementQueries_busy, _ElementQueries_hasInit, _ElementQueries_mutationobserver, _ElementQueries_boundRefresh,
|
|
12
|
+
var _ElementQueries_instances, _ElementQueries_watchlist, _ElementQueries_busy, _ElementQueries_hasInit, _ElementQueries_mutationobserver, _ElementQueries_boundRefresh, _ElementQueries_subscribers, _ElementQueries_stores, _ElementQueries_processwidths, _ElementQueries_finddepth, _ElementQueries_collecttargets, _ElementQueries_gotoanchor, _ElementQueries_activate, _ElementQueries_activateRaw, _ElementQueries_deactivate;
|
|
13
13
|
class ElementQueries {
|
|
14
14
|
constructor() {
|
|
15
15
|
_ElementQueries_instances.add(this);
|
|
@@ -18,7 +18,6 @@ class ElementQueries {
|
|
|
18
18
|
_ElementQueries_hasInit.set(this, false);
|
|
19
19
|
_ElementQueries_mutationobserver.set(this, void 0);
|
|
20
20
|
_ElementQueries_boundRefresh.set(this, this.refresh.bind(this));
|
|
21
|
-
_ElementQueries_lastw.set(this, void 0);
|
|
22
21
|
_ElementQueries_subscribers.set(this, 0);
|
|
23
22
|
_ElementQueries_stores.set(this, new Map());
|
|
24
23
|
}
|
|
@@ -47,10 +46,7 @@ class ElementQueries {
|
|
|
47
46
|
__classPrivateFieldGet(this, _ElementQueries_stores, "f").set(el, store);
|
|
48
47
|
else
|
|
49
48
|
__classPrivateFieldGet(this, _ElementQueries_stores, "f").delete(el);
|
|
50
|
-
|
|
51
|
-
__classPrivateFieldSet(this, _ElementQueries_hasInit, true, "f");
|
|
52
|
-
__classPrivateFieldGet(this, _ElementQueries_instances, "m", _ElementQueries_activateRaw).call(this);
|
|
53
|
-
}
|
|
49
|
+
__classPrivateFieldGet(this, _ElementQueries_instances, "m", _ElementQueries_activateRaw).call(this);
|
|
54
50
|
return () => {
|
|
55
51
|
var _a;
|
|
56
52
|
if (__classPrivateFieldSet(this, _ElementQueries_subscribers, (_a = __classPrivateFieldGet(this, _ElementQueries_subscribers, "f"), --_a), "f") === 0)
|
|
@@ -58,7 +54,7 @@ class ElementQueries {
|
|
|
58
54
|
};
|
|
59
55
|
}
|
|
60
56
|
}
|
|
61
|
-
_ElementQueries_watchlist = new WeakMap(), _ElementQueries_busy = new WeakMap(), _ElementQueries_hasInit = new WeakMap(), _ElementQueries_mutationobserver = new WeakMap(), _ElementQueries_boundRefresh = new WeakMap(),
|
|
57
|
+
_ElementQueries_watchlist = new WeakMap(), _ElementQueries_busy = new WeakMap(), _ElementQueries_hasInit = new WeakMap(), _ElementQueries_mutationobserver = new WeakMap(), _ElementQueries_boundRefresh = new WeakMap(), _ElementQueries_subscribers = new WeakMap(), _ElementQueries_stores = new WeakMap(), _ElementQueries_instances = new WeakSet(), _ElementQueries_processwidths = function _ElementQueries_processwidths() {
|
|
62
58
|
for (let i = 0; i < __classPrivateFieldGet(this, _ElementQueries_watchlist, "f").length; i++) {
|
|
63
59
|
const widths = [];
|
|
64
60
|
const attrs = [];
|
|
@@ -81,9 +77,8 @@ _ElementQueries_watchlist = new WeakMap(), _ElementQueries_busy = new WeakMap(),
|
|
|
81
77
|
}
|
|
82
78
|
if (attrstr !== attrs[j])
|
|
83
79
|
el.setAttribute('data-eq', attrstr);
|
|
84
|
-
if (__classPrivateFieldGet(this,
|
|
85
|
-
__classPrivateFieldGet(this, _ElementQueries_stores, "f").get(el).update(v =>
|
|
86
|
-
__classPrivateFieldSet(this, _ElementQueries_lastw, finalw, "f");
|
|
80
|
+
if (__classPrivateFieldGet(this, _ElementQueries_stores, "f").has(el)) {
|
|
81
|
+
__classPrivateFieldGet(this, _ElementQueries_stores, "f").get(el).update(v => v.width === finalw ? v : { ...v, width: finalw });
|
|
87
82
|
}
|
|
88
83
|
}
|
|
89
84
|
}
|