@silexlabs/silex-dashboard 1.0.70 → 1.0.72

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.6
2
+ * vue v3.5.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -24,15 +24,7 @@ function _interopNamespaceDefault(e) {
24
24
 
25
25
  var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);
26
26
 
27
- const compileCache = /* @__PURE__ */ new WeakMap();
28
- function getCache(options) {
29
- let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ);
30
- if (!c) {
31
- c = /* @__PURE__ */ Object.create(null);
32
- compileCache.set(options != null ? options : shared.EMPTY_OBJ, c);
33
- }
34
- return c;
35
- }
27
+ const compileCache = /* @__PURE__ */ Object.create(null);
36
28
  function compileToFunction(template, options) {
37
29
  if (!shared.isString(template)) {
38
30
  if (template.nodeType) {
@@ -42,9 +34,8 @@ function compileToFunction(template, options) {
42
34
  return shared.NOOP;
43
35
  }
44
36
  }
45
- const key = template;
46
- const cache = getCache(options);
47
- const cached = cache[key];
37
+ const key = shared.genCacheKey(template, options);
38
+ const cached = compileCache[key];
48
39
  if (cached) {
49
40
  return cached;
50
41
  }
@@ -79,7 +70,7 @@ ${codeFrame}` : message);
79
70
  }
80
71
  const render = new Function("Vue", code)(runtimeDom__namespace);
81
72
  render._rc = true;
82
- return cache[key] = render;
73
+ return compileCache[key] = render;
83
74
  }
84
75
  runtimeDom.registerRuntimeCompiler(compileToFunction);
85
76
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.6
2
+ * vue v3.5.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -24,15 +24,7 @@ function _interopNamespaceDefault(e) {
24
24
 
25
25
  var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);
26
26
 
27
- const compileCache = /* @__PURE__ */ new WeakMap();
28
- function getCache(options) {
29
- let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ);
30
- if (!c) {
31
- c = /* @__PURE__ */ Object.create(null);
32
- compileCache.set(options != null ? options : shared.EMPTY_OBJ, c);
33
- }
34
- return c;
35
- }
27
+ const compileCache = /* @__PURE__ */ Object.create(null);
36
28
  function compileToFunction(template, options) {
37
29
  if (!shared.isString(template)) {
38
30
  if (template.nodeType) {
@@ -41,9 +33,8 @@ function compileToFunction(template, options) {
41
33
  return shared.NOOP;
42
34
  }
43
35
  }
44
- const key = template;
45
- const cache = getCache(options);
46
- const cached = cache[key];
36
+ const key = shared.genCacheKey(template, options);
37
+ const cached = compileCache[key];
47
38
  if (cached) {
48
39
  return cached;
49
40
  }
@@ -65,7 +56,7 @@ function compileToFunction(template, options) {
65
56
  const { code } = compilerDom.compile(template, opts);
66
57
  const render = new Function("Vue", code)(runtimeDom__namespace);
67
58
  render._rc = true;
68
- return cache[key] = render;
59
+ return compileCache[key] = render;
69
60
  }
70
61
  runtimeDom.registerRuntimeCompiler(compileToFunction);
71
62
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.6
2
+ * vue v3.5.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -106,6 +106,12 @@ let _globalThis;
106
106
  const getGlobalThis = () => {
107
107
  return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
108
108
  };
109
+ function genCacheKey(source, options) {
110
+ return source + JSON.stringify(
111
+ options,
112
+ (_, val) => typeof val === "function" ? val.toString() : val
113
+ );
114
+ }
109
115
 
110
116
  const PatchFlagNames = {
111
117
  [1]: `TEXT`,
@@ -639,9 +645,17 @@ function endBatch() {
639
645
  let error;
640
646
  while (batchedSub) {
641
647
  let e = batchedSub;
648
+ let next;
649
+ while (e) {
650
+ if (!(e.flags & 1)) {
651
+ e.flags &= ~8;
652
+ }
653
+ e = e.next;
654
+ }
655
+ e = batchedSub;
642
656
  batchedSub = void 0;
643
657
  while (e) {
644
- const next = e.next;
658
+ next = e.next;
645
659
  e.next = void 0;
646
660
  e.flags &= ~8;
647
661
  if (e.flags & 1) {
@@ -731,7 +745,7 @@ function refreshComputed(computed) {
731
745
  computed.flags &= ~2;
732
746
  }
733
747
  }
734
- function removeSub(link) {
748
+ function removeSub(link, soft = false) {
735
749
  const { dep, prevSub, nextSub } = link;
736
750
  if (prevSub) {
737
751
  prevSub.nextSub = nextSub;
@@ -744,12 +758,18 @@ function removeSub(link) {
744
758
  if (dep.subs === link) {
745
759
  dep.subs = prevSub;
746
760
  }
761
+ if (dep.subsHead === link) {
762
+ dep.subsHead = nextSub;
763
+ }
747
764
  if (!dep.subs && dep.computed) {
748
765
  dep.computed.flags &= ~4;
749
766
  for (let l = dep.computed.deps; l; l = l.nextDep) {
750
- removeSub(l);
767
+ removeSub(l, true);
751
768
  }
752
769
  }
770
+ if (!soft && !--dep.sc && dep.map) {
771
+ dep.map.delete(dep.key);
772
+ }
753
773
  }
754
774
  function removeDep(link) {
755
775
  const { prevDep, nextDep } = link;
@@ -828,6 +848,16 @@ class Dep {
828
848
  * Doubly linked list representing the subscribing effects (tail)
829
849
  */
830
850
  this.subs = void 0;
851
+ /**
852
+ * For object property deps cleanup
853
+ */
854
+ this.target = void 0;
855
+ this.map = void 0;
856
+ this.key = void 0;
857
+ /**
858
+ * Subscriber counter
859
+ */
860
+ this.sc = 0;
831
861
  {
832
862
  this.subsHead = void 0;
833
863
  }
@@ -846,9 +876,7 @@ class Dep {
846
876
  activeSub.depsTail.nextDep = link;
847
877
  activeSub.depsTail = link;
848
878
  }
849
- if (activeSub.flags & 4) {
850
- addSub(link);
851
- }
879
+ addSub(link);
852
880
  } else if (link.version === -1) {
853
881
  link.version = this.version;
854
882
  if (link.nextDep) {
@@ -912,22 +940,25 @@ class Dep {
912
940
  }
913
941
  }
914
942
  function addSub(link) {
915
- const computed = link.dep.computed;
916
- if (computed && !link.dep.subs) {
917
- computed.flags |= 4 | 16;
918
- for (let l = computed.deps; l; l = l.nextDep) {
919
- addSub(l);
943
+ link.dep.sc++;
944
+ if (link.sub.flags & 4) {
945
+ const computed = link.dep.computed;
946
+ if (computed && !link.dep.subs) {
947
+ computed.flags |= 4 | 16;
948
+ for (let l = computed.deps; l; l = l.nextDep) {
949
+ addSub(l);
950
+ }
920
951
  }
952
+ const currentTail = link.dep.subs;
953
+ if (currentTail !== link) {
954
+ link.prevSub = currentTail;
955
+ if (currentTail) currentTail.nextSub = link;
956
+ }
957
+ if (link.dep.subsHead === void 0) {
958
+ link.dep.subsHead = link;
959
+ }
960
+ link.dep.subs = link;
921
961
  }
922
- const currentTail = link.dep.subs;
923
- if (currentTail !== link) {
924
- link.prevSub = currentTail;
925
- if (currentTail) currentTail.nextSub = link;
926
- }
927
- if (link.dep.subsHead === void 0) {
928
- link.dep.subsHead = link;
929
- }
930
- link.dep.subs = link;
931
962
  }
932
963
  const targetMap = /* @__PURE__ */ new WeakMap();
933
964
  const ITERATE_KEY = Symbol(
@@ -948,6 +979,9 @@ function track(target, type, key) {
948
979
  let dep = depsMap.get(key);
949
980
  if (!dep) {
950
981
  depsMap.set(key, dep = new Dep());
982
+ dep.target = target;
983
+ dep.map = depsMap;
984
+ dep.key = key;
951
985
  }
952
986
  {
953
987
  dep.track({
@@ -1028,8 +1062,8 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
1028
1062
  endBatch();
1029
1063
  }
1030
1064
  function getDepFromReactive(object, key) {
1031
- var _a;
1032
- return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
1065
+ const depMap = targetMap.get(object);
1066
+ return depMap && depMap.get(key);
1033
1067
  }
1034
1068
 
1035
1069
  function reactiveReadArray(array) {
@@ -1824,13 +1858,15 @@ class RefImpl {
1824
1858
  }
1825
1859
  }
1826
1860
  function triggerRef(ref2) {
1827
- {
1828
- ref2.dep.trigger({
1829
- target: ref2,
1830
- type: "set",
1831
- key: "value",
1832
- newValue: ref2._value
1833
- });
1861
+ if (ref2.dep) {
1862
+ {
1863
+ ref2.dep.trigger({
1864
+ target: ref2,
1865
+ type: "set",
1866
+ key: "value",
1867
+ newValue: ref2._value
1868
+ });
1869
+ }
1834
1870
  }
1835
1871
  }
1836
1872
  function unref(ref2) {
@@ -1963,6 +1999,10 @@ class ComputedRefImpl {
1963
1999
  * @internal
1964
2000
  */
1965
2001
  this.globalVersion = globalVersion - 1;
2002
+ /**
2003
+ * @internal
2004
+ */
2005
+ this.next = void 0;
1966
2006
  // for backwards compat
1967
2007
  this.effect = this;
1968
2008
  this["__v_isReadonly"] = !setter;
@@ -2578,7 +2618,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2578
2618
  cb.flags &= ~1;
2579
2619
  }
2580
2620
  cb();
2581
- cb.flags &= ~1;
2621
+ if (!(cb.flags & 4)) {
2622
+ cb.flags &= ~1;
2623
+ }
2582
2624
  }
2583
2625
  }
2584
2626
  }
@@ -2634,7 +2676,9 @@ function flushJobs(seen) {
2634
2676
  job.i,
2635
2677
  job.i ? 15 : 14
2636
2678
  );
2637
- job.flags &= ~1;
2679
+ if (!(job.flags & 4)) {
2680
+ job.flags &= ~1;
2681
+ }
2638
2682
  }
2639
2683
  }
2640
2684
  } finally {
@@ -3675,6 +3719,7 @@ function useId() {
3675
3719
  `useId() is called when there is no active component instance to be associated with.`
3676
3720
  );
3677
3721
  }
3722
+ return "";
3678
3723
  }
3679
3724
  function markAsyncBoundary(instance) {
3680
3725
  instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
@@ -4433,6 +4478,11 @@ const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
4433
4478
  const id = requestIdleCallback(hydrate, { timeout });
4434
4479
  return () => cancelIdleCallback(id);
4435
4480
  };
4481
+ function elementIsVisibleInViewport(el) {
4482
+ const { top, left, bottom, right } = el.getBoundingClientRect();
4483
+ const { innerHeight, innerWidth } = window;
4484
+ return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
4485
+ }
4436
4486
  const hydrateOnVisible = (opts) => (hydrate, forEach) => {
4437
4487
  const ob = new IntersectionObserver((entries) => {
4438
4488
  for (const e of entries) {
@@ -4442,7 +4492,15 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
4442
4492
  break;
4443
4493
  }
4444
4494
  }, opts);
4445
- forEach((el) => ob.observe(el));
4495
+ forEach((el) => {
4496
+ if (!(el instanceof Element)) return;
4497
+ if (elementIsVisibleInViewport(el)) {
4498
+ hydrate();
4499
+ ob.disconnect();
4500
+ return false;
4501
+ }
4502
+ ob.observe(el);
4503
+ });
4446
4504
  return () => ob.disconnect();
4447
4505
  };
4448
4506
  const hydrateOnMediaQuery = (query) => (hydrate) => {
@@ -4487,7 +4545,10 @@ function forEachElement(node, cb) {
4487
4545
  let next = node.nextSibling;
4488
4546
  while (next) {
4489
4547
  if (next.nodeType === 1) {
4490
- cb(next);
4548
+ const result = cb(next);
4549
+ if (result === false) {
4550
+ break;
4551
+ }
4491
4552
  } else if (isComment(next)) {
4492
4553
  if (next.data === "]") {
4493
4554
  if (--depth === 0) break;
@@ -9719,7 +9780,7 @@ function normalizeVNode(child) {
9719
9780
  // #3666, avoid reference pollution when reusing vnode
9720
9781
  child.slice()
9721
9782
  );
9722
- } else if (typeof child === "object") {
9783
+ } else if (isVNode(child)) {
9723
9784
  return cloneIfMounted(child);
9724
9785
  } else {
9725
9786
  return createVNode(Text, null, String(child));
@@ -10464,7 +10525,7 @@ function isMemoSame(cached, memo) {
10464
10525
  return true;
10465
10526
  }
10466
10527
 
10467
- const version = "3.5.6";
10528
+ const version = "3.5.10";
10468
10529
  const warn = warn$1 ;
10469
10530
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10470
10531
  const devtools = devtools$1 ;
@@ -10763,7 +10824,7 @@ function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
10763
10824
  resolve();
10764
10825
  }
10765
10826
  };
10766
- if (explicitTimeout) {
10827
+ if (explicitTimeout != null) {
10767
10828
  return setTimeout(resolveIfNotStale, explicitTimeout);
10768
10829
  }
10769
10830
  const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
@@ -11251,6 +11312,11 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
11251
11312
  if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
11252
11313
  patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
11253
11314
  }
11315
+ } else if (
11316
+ // #11081 force set props for possible async custom element
11317
+ el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
11318
+ ) {
11319
+ patchDOMProp(el, camelize(key), nextValue);
11254
11320
  } else {
11255
11321
  if (key === "true-value") {
11256
11322
  el._trueValue = nextValue;
@@ -11291,13 +11357,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
11291
11357
  if (isNativeOn(key) && isString(value)) {
11292
11358
  return false;
11293
11359
  }
11294
- if (key in el) {
11295
- return true;
11296
- }
11297
- if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
11298
- return true;
11299
- }
11300
- return false;
11360
+ return key in el;
11301
11361
  }
11302
11362
 
11303
11363
  const REMOVAL = {};
@@ -11974,7 +12034,7 @@ const vModelCheckbox = {
11974
12034
  setChecked(el, binding, vnode);
11975
12035
  }
11976
12036
  };
11977
- function setChecked(el, { value, oldValue }, vnode) {
12037
+ function setChecked(el, { value }, vnode) {
11978
12038
  el._modelValue = value;
11979
12039
  let checked;
11980
12040
  if (isArray(value)) {
@@ -12024,19 +12084,19 @@ const vModelSelect = {
12024
12084
  },
12025
12085
  // set value in mounted & updated because <select> relies on its children
12026
12086
  // <option>s.
12027
- mounted(el, { value, modifiers: { number } }) {
12087
+ mounted(el, { value }) {
12028
12088
  setSelected(el, value);
12029
12089
  },
12030
12090
  beforeUpdate(el, _binding, vnode) {
12031
12091
  el[assignKey] = getModelAssigner(vnode);
12032
12092
  },
12033
- updated(el, { value, modifiers: { number } }) {
12093
+ updated(el, { value }) {
12034
12094
  if (!el._assigning) {
12035
12095
  setSelected(el, value);
12036
12096
  }
12037
12097
  }
12038
12098
  };
12039
- function setSelected(el, value, number) {
12099
+ function setSelected(el, value) {
12040
12100
  const isMultiple = el.multiple;
12041
12101
  const isArrayValue = isArray(value);
12042
12102
  if (isMultiple && !isArrayValue && !isSet(value)) {
@@ -17290,7 +17350,7 @@ const transformModel$1 = (dir, node, context) => {
17290
17350
  );
17291
17351
  return createTransformProps();
17292
17352
  }
17293
- const rawExp = exp.loc.source;
17353
+ const rawExp = exp.loc.source.trim();
17294
17354
  const expString = exp.type === 4 ? exp.content : rawExp;
17295
17355
  const bindingType = context.bindingMetadata[rawExp];
17296
17356
  if (bindingType === "props" || bindingType === "props-aliased") {
@@ -18077,15 +18137,7 @@ function compile(src, options = {}) {
18077
18137
  {
18078
18138
  initDev();
18079
18139
  }
18080
- const compileCache = /* @__PURE__ */ new WeakMap();
18081
- function getCache(options) {
18082
- let c = compileCache.get(options != null ? options : EMPTY_OBJ);
18083
- if (!c) {
18084
- c = /* @__PURE__ */ Object.create(null);
18085
- compileCache.set(options != null ? options : EMPTY_OBJ, c);
18086
- }
18087
- return c;
18088
- }
18140
+ const compileCache = /* @__PURE__ */ Object.create(null);
18089
18141
  function compileToFunction(template, options) {
18090
18142
  if (!isString(template)) {
18091
18143
  if (template.nodeType) {
@@ -18095,9 +18147,8 @@ function compileToFunction(template, options) {
18095
18147
  return NOOP;
18096
18148
  }
18097
18149
  }
18098
- const key = template;
18099
- const cache = getCache(options);
18100
- const cached = cache[key];
18150
+ const key = genCacheKey(template, options);
18151
+ const cached = compileCache[key];
18101
18152
  if (cached) {
18102
18153
  return cached;
18103
18154
  }
@@ -18132,7 +18183,7 @@ ${codeFrame}` : message);
18132
18183
  }
18133
18184
  const render = new Function("Vue", code)(runtimeDom);
18134
18185
  render._rc = true;
18135
- return cache[key] = render;
18186
+ return compileCache[key] = render;
18136
18187
  }
18137
18188
  registerRuntimeCompiler(compileToFunction);
18138
18189