mvframe 1.1.14 → 1.1.15

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.
@@ -48,7 +48,7 @@ const G = "lang", Se = (e, t) => {
48
48
  s(), n && (window.addEventListener("resize", s, { passive: !0 }), (a = (i = window.visualViewport) == null ? void 0 : i.addEventListener) == null || a.call(i, "resize", s, {
49
49
  passive: !0
50
50
  }));
51
- }, $e = (e, t) => {
51
+ }, Ae = (e, t) => {
52
52
  var l, u, m;
53
53
  const n = t || {}, r = Array.isArray(n.use) && n.use.length > 0 ? n.use : q;
54
54
  globalThis.$config = globalThis.$config || {}, globalThis.$config.langUse = r.filter(
@@ -76,7 +76,7 @@ const G = "lang", Se = (e, t) => {
76
76
  }, globalThis.$l = o, e.config.globalProperties.$l = o, e.config.globalProperties.$patchLangMaps = globalThis.$patchLangMaps, String.prototype.$l = function() {
77
77
  return $l(this);
78
78
  };
79
- }, Le = (e, t) => {
79
+ }, $e = (e, t) => {
80
80
  if (!e || !t) return !1;
81
81
  const n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), s = r.right > n.left && r.left < n.right, i = r.bottom > n.top && r.top < n.bottom;
82
82
  return s && i;
@@ -89,8 +89,8 @@ const G = "lang", Se = (e, t) => {
89
89
  for (const s of n)
90
90
  if (!r.includes(s) || !Y(e[s], t[s])) return !1;
91
91
  return !0;
92
- }, k = "download", K = 150, X = (e, t = k) => {
93
- const n = t || k, r = String(e ?? "").trim();
92
+ }, x = "download", K = 150, X = (e, t = x) => {
93
+ const n = t || x, r = String(e ?? "").trim();
94
94
  if (!r) return n;
95
95
  const i = r.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || n, a = 200;
96
96
  return i.length > a ? i.slice(0, a) : i;
@@ -124,7 +124,7 @@ const G = "lang", Se = (e, t) => {
124
124
  expectExcel: !0,
125
125
  filename: u
126
126
  } : e;
127
- }, Ae = async (e = {}) => {
127
+ }, Le = async (e = {}) => {
128
128
  const t = Q(e), {
129
129
  source: n = "inline",
130
130
  content: r,
@@ -242,7 +242,7 @@ function Pe(e, t, n = {}) {
242
242
  }
243
243
  });
244
244
  }
245
- const C = "mvframe_primary", V = "mvframe_theme", I = "mvframe_theme_name", ee = "dark", $ = "main", L = "mv-theme-", T = { r: 255, g: 255, b: 255 }, te = { r: 0, g: 0, b: 0 }, j = [1, 3, 5, 7, 9], ne = [
245
+ const C = "mvframe_primary", V = "mvframe_theme", I = "mvframe_theme_name", ee = "dark", A = "main", $ = "mv-theme-", T = { r: 255, g: 255, b: 255 }, te = { r: 0, g: 0, b: 0 }, j = [1, 3, 5, 7, 9], ne = [
246
246
  "--el-color-primary-light-3",
247
247
  "--el-color-primary-light-5",
248
248
  "--el-color-primary-light-7",
@@ -252,7 +252,7 @@ const C = "mvframe_primary", V = "mvframe_theme", I = "mvframe_theme_name", ee =
252
252
  ], re = j.map(
253
253
  (e) => `--color-primary${e}`
254
254
  );
255
- function A(e) {
255
+ function L(e) {
256
256
  let t = String(e).trim().replace(/^#/, "");
257
257
  if (t.length === 3 && (t = t.split("").map((r) => r + r).join("")), t.length >= 8 && (t = t.slice(0, 6)), t.length !== 6 || Number.isNaN(parseInt(t, 16)))
258
258
  return null;
@@ -287,7 +287,7 @@ function b(e, t, n) {
287
287
  };
288
288
  }
289
289
  function oe(e, t = "light") {
290
- const n = A(e);
290
+ const n = L(e);
291
291
  if (!n)
292
292
  return null;
293
293
  const r = b(T, n, 30), s = b(T, n, 50), i = b(T, n, 70), a = b(T, n, 80), o = b(T, n, 90), l = b(te, n, 20);
@@ -301,7 +301,7 @@ function oe(e, t = "light") {
301
301
  };
302
302
  }
303
303
  function ie(e) {
304
- const t = A(e);
304
+ const t = L(e);
305
305
  return t ? Object.fromEntries(
306
306
  j.map((n) => [
307
307
  `--color-primary${n}`,
@@ -318,26 +318,26 @@ function ae(e) {
318
318
  }
319
319
  function N(e) {
320
320
  const t = String(e ?? "").trim().toLowerCase();
321
- return t && t.replace(/[^a-z0-9_-]/g, "-").replace(/-+/g, "-") || $;
321
+ return t && t.replace(/[^a-z0-9_-]/g, "-").replace(/-+/g, "-") || A;
322
322
  }
323
323
  function le(e) {
324
324
  const t = [...e.classList].find(
325
- (n) => n.startsWith(L)
325
+ (n) => n.startsWith($)
326
326
  );
327
- return t ? t.slice(L.length) : $;
327
+ return t ? t.slice($.length) : A;
328
328
  }
329
329
  function ce(e) {
330
- [...e.classList].filter((t) => t.startsWith(L)).forEach((t) => e.classList.remove(t));
330
+ [...e.classList].filter((t) => t.startsWith($)).forEach((t) => e.classList.remove(t));
331
331
  }
332
332
  function ue(e) {
333
333
  return e.classList.contains("light") ? "light" : e.classList.contains("dark") ? "dark" : ee;
334
334
  }
335
335
  function he(e, t) {
336
336
  const n = N(t);
337
- return ce(e), e.classList.add(`${L}${n}`), n;
337
+ return ce(e), e.classList.add(`${$}${n}`), n;
338
338
  }
339
339
  function de(e, t, n = "light") {
340
- const r = A(t.startsWith("#") ? t : `#${t}`);
340
+ const r = L(t.startsWith("#") ? t : `#${t}`);
341
341
  if (!r)
342
342
  return !1;
343
343
  const s = y(r.r, r.g, r.b);
@@ -353,7 +353,7 @@ function me(e = {}) {
353
353
  const s = String(e.primary).trim();
354
354
  if (!de(t, s, n)) {
355
355
  t.style.setProperty("--color-primary", s), t.style.setProperty("--el-color-primary", s);
356
- const i = A(s.startsWith("#") ? s : `#${s}`);
356
+ const i = L(s.startsWith("#") ? s : `#${s}`);
357
357
  i && t.style.setProperty("--color-on-primary-text", B(i));
358
358
  }
359
359
  } else (e.primary === null || e.primary === "") && (t.style.removeProperty("--color-primary"), ae(t));
@@ -367,7 +367,7 @@ function Ce(e) {
367
367
  }
368
368
  function Ie() {
369
369
  var s;
370
- const e = localStorage.getItem(C), t = localStorage.getItem(V), n = localStorage.getItem(I) || ((s = globalThis.$config) == null ? void 0 : s.theme) || $, r = t === "light" ? "light" : "dark";
370
+ const e = localStorage.getItem(C), t = localStorage.getItem(V), n = localStorage.getItem(I) || ((s = globalThis.$config) == null ? void 0 : s.theme) || A, r = t === "light" ? "light" : "dark";
371
371
  me({
372
372
  primary: e != null && e !== "" ? e : null,
373
373
  mode: r,
@@ -379,7 +379,7 @@ let w = null;
379
379
  function O(e) {
380
380
  z("error", e);
381
381
  }
382
- function xe(e) {
382
+ function ke(e) {
383
383
  w = e && typeof e == "object" ? e : null;
384
384
  }
385
385
  function P(e) {
@@ -415,11 +415,11 @@ const ge = H.CancelToken, pe = (e) => {
415
415
  _.interceptors.request.use(
416
416
  (e) => {
417
417
  e.headers = e.headers || {};
418
- const { login: t, accountInfo: n = {} } = window.$store.launch(), { access_token: r } = t.info;
419
- return r && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${r}`), n.partner_org_id && noaccount !== !0 && (e.data ? e.method.toLowerCase() === "get" ? e.params.accountId = n.partner_org_id : e.data.accountId = n.partner_org_id : e.method.toLowerCase() === "get" ? e.params = { accountId: n.partner_org_id } : e.data = { accountId: n.partner_org_id }), pe(e), e.cancelToken = new ge((s) => {
418
+ const { login: t, accountInfo: n = {} } = window.$store.launch(), { access_token: r } = t.info, s = e.noaccount === !0 || e.noAccount === !0;
419
+ return r && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${r}`), n.partner_org_id && !s && (e.data ? e.method.toLowerCase() === "get" ? e.params.accountId = n.partner_org_id : e.data.accountId = n.partner_org_id : e.method.toLowerCase() === "get" ? e.params = { accountId: n.partner_org_id } : e.data = { accountId: n.partner_org_id }), pe(e), e.cancelToken = new ge((i) => {
420
420
  g.push({
421
421
  v: e.url + "_" + e.headers["Content-HI"] + "_" + e.ex,
422
- cb: s
422
+ cb: i
423
423
  });
424
424
  }), e;
425
425
  },
@@ -500,7 +500,7 @@ function Ee(e) {
500
500
  }
501
501
  return e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", _(e);
502
502
  }
503
- function x({
503
+ function k({
504
504
  data: e,
505
505
  url: t,
506
506
  ex: n,
@@ -524,25 +524,25 @@ function x({
524
524
  ex: n
525
525
  });
526
526
  }
527
- const ke = x;
527
+ const xe = k;
528
528
  function Oe(e) {
529
- globalThis.$login = ye, globalThis.$get = be, globalThis.$post = Ee, globalThis.$form = x, globalThis.$xform = x;
529
+ globalThis.$login = ye, globalThis.$get = be, globalThis.$post = Ee, globalThis.$form = k, globalThis.$xform = k;
530
530
  }
531
531
  export {
532
532
  ee as MVFRAME_DEFAULT_THEME_MODE,
533
- $ as MVFRAME_DEFAULT_THEME_NAME,
533
+ A as MVFRAME_DEFAULT_THEME_NAME,
534
534
  G as MVFRAME_STORAGE_LANG,
535
535
  C as MVFRAME_STORAGE_PRIMARY,
536
536
  V as MVFRAME_STORAGE_THEME,
537
537
  I as MVFRAME_STORAGE_THEME_NAME,
538
- L as MVFRAME_THEME_CLASS_PREFIX,
538
+ $ as MVFRAME_THEME_CLASS_PREFIX,
539
539
  me as applyMvframeTheme,
540
540
  Y as deepEqual,
541
- Ae as download,
541
+ Le as download,
542
542
  Z as formatSummaryCell,
543
543
  je as getMaps,
544
544
  Oe as installRq,
545
- Le as isInView,
545
+ $e as isInView,
546
546
  Ie as loadMvframeTheme,
547
547
  Ue as mapLang,
548
548
  Be as mapLangPath,
@@ -550,14 +550,14 @@ export {
550
550
  Fe as patchMaps,
551
551
  Ce as persistMvframeTheme,
552
552
  X as sanitizeDownloadFileName,
553
- xe as setMvframeRqEnv,
554
- x as useForm,
553
+ ke as setMvframeRqEnv,
554
+ k as useForm,
555
555
  be as useGet,
556
- $e as useLang,
556
+ Ae as useLang,
557
557
  ye as useLogin,
558
558
  We as useMap,
559
559
  Se as useOptions,
560
560
  Ee as usePost,
561
561
  Pe as useRemoteSummary,
562
- ke as useXform
562
+ xe as useXform
563
563
  };
package/dist/vendor.js CHANGED
@@ -13917,7 +13917,7 @@ const Hr = (a, o = {}) => {
13917
13917
  }, Jr = {
13918
13918
  name: "Matt Avias Frame",
13919
13919
  copyright: "©2026",
13920
- version: "1.1.14",
13920
+ version: "1.1.15",
13921
13921
  author: "Matt Avias",
13922
13922
  date: "2026-02-26",
13923
13923
  /** 默认语言 key,与 `$getLang`、localStorage `lang` 一致;业务在 app.use(mvframe, { config }) 里覆盖 */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mvframe",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.1.14",
4
+ "version": "1.1.15",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",