@jxsuite/runtime 0.19.0 → 0.20.0

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/runtime.js CHANGED
@@ -1,4 +1,4 @@
1
- // ../../node_modules/@vue/shared/dist/shared.esm-bundler.js
1
+ // ../../node_modules/.bun/@vue+shared@3.5.35/node_modules/@vue/shared/dist/shared.esm-bundler.js
2
2
  function makeMap(str) {
3
3
  const map = /* @__PURE__ */ Object.create(null);
4
4
  for (const key of str.split(","))
@@ -46,7 +46,7 @@ var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
46
46
  var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
47
47
  var isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
48
48
 
49
- // ../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
49
+ // ../../node_modules/.bun/@vue+reactivity@3.5.35/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
50
50
  function warn(msg, ...args) {
51
51
  console.warn(`[Vue warn] ${msg}`, ...args);
52
52
  }
@@ -1091,9 +1091,6 @@ function targetTypeMap(rawType) {
1091
1091
  return 0;
1092
1092
  }
1093
1093
  }
1094
- function getTargetType(value) {
1095
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
1096
- }
1097
1094
  function reactive(target) {
1098
1095
  if (/* @__PURE__ */ isReadonly(target)) {
1099
1096
  return target;
@@ -1113,14 +1110,17 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
1113
1110
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1114
1111
  return target;
1115
1112
  }
1116
- const targetType = getTargetType(target);
1117
- if (targetType === 0) {
1113
+ if (target["__v_skip"] || !Object.isExtensible(target)) {
1118
1114
  return target;
1119
1115
  }
1120
1116
  const existingProxy = proxyMap.get(target);
1121
1117
  if (existingProxy) {
1122
1118
  return existingProxy;
1123
1119
  }
1120
+ const targetType = targetTypeMap(toRawType(target));
1121
+ if (targetType === 0) {
1122
+ return target;
1123
+ }
1124
1124
  const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1125
1125
  proxyMap.set(target, proxy);
1126
1126
  return proxy;
@@ -1558,23 +1558,24 @@ function applyProperties(el, def2, state) {
1558
1558
  }
1559
1559
  }
1560
1560
  function bindProperty(el, key, val, state) {
1561
+ const target = el;
1561
1562
  if (isRefObj(val)) {
1562
1563
  if (key === "id") {
1563
- el[key] = resolveRef(val.$ref, state);
1564
+ target[key] = resolveRef(val.$ref, state);
1564
1565
  return;
1565
1566
  }
1566
1567
  effect(() => {
1567
- el[key] = resolveRef(val.$ref, state);
1568
+ target[key] = resolveRef(val.$ref, state);
1568
1569
  });
1569
1570
  return;
1570
1571
  }
1571
1572
  if (isTemplateString(val)) {
1572
1573
  effect(() => {
1573
- el[key] = evaluateTemplate(val, state);
1574
+ target[key] = evaluateTemplate(val, state);
1574
1575
  });
1575
1576
  return;
1576
1577
  }
1577
- el[key] = val;
1578
+ target[key] = val;
1578
1579
  }
1579
1580
  function applyStyle(el, styleDef, mediaQueries = {}, state = {}) {
1580
1581
  const nested = {};
@@ -1760,7 +1761,8 @@ async function resolvePrototype(def2, state, key, base) {
1760
1761
  const controller = new AbortController;
1761
1762
  onEffectCleanup(() => {
1762
1763
  controller.abort();
1763
- clearTimeout(debounceTimer);
1764
+ if (debounceTimer !== null)
1765
+ clearTimeout(debounceTimer);
1764
1766
  });
1765
1767
  const doFetch = () => fetch(url, {
1766
1768
  signal: controller.signal,
@@ -1862,7 +1864,7 @@ async function resolvePrototype(def2, state, key, base) {
1862
1864
  } = def2;
1863
1865
  const req = indexedDB.open(database, version);
1864
1866
  req.onupgradeneeded = (e) => {
1865
- const db = e.target?.result;
1867
+ const db = e.target.result;
1866
1868
  if (!db.objectStoreNames.contains(store)) {
1867
1869
  const os = db.createObjectStore(store, { keyPath, autoIncrement });
1868
1870
  for (const i of indexes)
@@ -1870,7 +1872,7 @@ async function resolvePrototype(def2, state, key, base) {
1870
1872
  }
1871
1873
  };
1872
1874
  req.onsuccess = (e) => {
1873
- const db = e.target?.result;
1875
+ const db = e.target.result;
1874
1876
  idbState.value = {
1875
1877
  database,
1876
1878
  store,
@@ -2066,7 +2068,8 @@ function classFromSchema(classDef) {
2066
2068
  }
2067
2069
  }
2068
2070
  Object.defineProperty(DynClass, "name", { value: classDef.title, configurable: true });
2069
- return DynClass;
2071
+ const dynCtor = DynClass;
2072
+ return dynCtor;
2070
2073
  }
2071
2074
  async function resolveViaDevProxy(def2, state, key, base) {
2072
2075
  const config = {};
@@ -2399,7 +2402,7 @@ async function defineElement(source, base) {
2399
2402
  function renderCustomElementWithProps(def2, state, options, path) {
2400
2403
  const el = document.createElement(def2.tagName);
2401
2404
  if (options?.onNodeCreated)
2402
- options.onNodeCreated(el, path, def2);
2405
+ options.onNodeCreated(el, path ?? [], def2);
2403
2406
  for (const [key, val] of Object.entries(def2.$props ?? {})) {
2404
2407
  if (isRefObj(val)) {
2405
2408
  const resolved = resolveRef(val.$ref, state);
@@ -2470,5 +2473,5 @@ export {
2470
2473
  Jx
2471
2474
  };
2472
2475
 
2473
- //# debugId=985CCEA0A16C595964756E2164756E21
2476
+ //# debugId=E0E588A2ACC641E264756E2164756E21
2474
2477
  //# sourceMappingURL=runtime.js.map