ezh 0.1.3 → 0.1.5

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/lib/router.js CHANGED
@@ -78,13 +78,13 @@ const Router = ({ routes, notFound, checkAuth }) => {
78
78
  return;
79
79
  }
80
80
  }
81
- return $s($k(key), $c('_', route.com, param, undefined, param));
81
+ return $s($k(key), $c('_', route.com, param, undefined, -1));
82
82
  }
83
83
  }
84
84
  return notFound ? $s($k('404'), $c('_', notFound, {})) : undefined;
85
85
  };
86
- const h = (x, url, replace) => {
87
- x.preventDefault();
86
+ const h = (v, url, replace) => {
87
+ v.preventDefault();
88
88
  const { pathname, search, hash } = window.location;
89
89
  const a = `${pathname}${search}${hash}`;
90
90
  if (url !== a) {
@@ -99,13 +99,13 @@ const h = (x, url, replace) => {
99
99
  };
100
100
  const Link = (props, children) => {
101
101
  const { href, className, style, title, replace } = props;
102
- const onclick = href ? (x) => h(x, href, replace) : undefined;
102
+ const onclick = href ? (v) => h(v, href, replace) : undefined;
103
103
  return $ezh.$('_', 'a', { className, style, title, href, onclick }, children, -1, 1);
104
104
  };
105
105
  const RouteLink = (props, children) => {
106
106
  const { route, params, className, style, title, replace } = props;
107
107
  const href = route.buildUrl(params);
108
- const onclick = (x) => h(x, href, replace);
108
+ const onclick = (v) => h(v, href, replace);
109
109
  return $ezh.$('_', 'a', { className, style, title, href, onclick }, children, -1, 1);
110
110
  };
111
111
  //# sourceMappingURL=router.js.map
package/lib/state.js CHANGED
@@ -1,4 +1,4 @@
1
- import { addComReader, q, refreshComReaders } from './elements';
1
+ import { addComReader, p, refreshComReaders } from './elements';
2
2
  const f = Symbol();
3
3
  const j = Array.prototype;
4
4
  const x = addComReader;
@@ -8,7 +8,7 @@ let l = (readerRecord, key) => {
8
8
  };
9
9
  export let t = false;
10
10
  export const y = new WeakMap();
11
- const o = (_) => {
11
+ const q = (_) => {
12
12
  return function (...m) {
13
13
  const i = this.length;
14
14
  let begin, c, k;
@@ -71,16 +71,16 @@ const o = (_) => {
71
71
  }
72
72
  const h = _.bind(this)(...m);
73
73
  const n = this[f];
74
- let p;
74
+ let o;
75
75
  for (let b = begin; b < c; b++) {
76
- p = this[b];
77
- switch (typeof p) {
76
+ o = this[b];
77
+ switch (typeof o) {
78
78
  case 'object':
79
- if (p) {
79
+ if (o) {
80
80
  while (b < c) {
81
- p = this[b];
82
- if (p && !p[f]) {
83
- this[b] = r(p);
81
+ o = this[b];
82
+ if (o && !o[f]) {
83
+ this[b] = r(o);
84
84
  }
85
85
  b++;
86
86
  }
@@ -98,15 +98,15 @@ const o = (_) => {
98
98
  return h;
99
99
  };
100
100
  };
101
- const C = {
102
- 'push': o(j.push),
103
- 'unshift': o(j.unshift),
104
- 'fill': o(j.fill),
105
- 'sort': o(j.sort),
106
- 'reverse': o(j.reverse),
107
- 'pop': o(j.pop),
108
- 'shift': o(j.shift),
109
- 'splice': o(j.splice),
101
+ const D = {
102
+ 'push': q(j.push),
103
+ 'unshift': q(j.unshift),
104
+ 'fill': q(j.fill),
105
+ 'sort': q(j.sort),
106
+ 'reverse': q(j.reverse),
107
+ 'pop': q(j.pop),
108
+ 'shift': q(j.shift),
109
+ 'splice': q(j.splice),
110
110
  };
111
111
  const E = (target, d) => {
112
112
  const v = d.length;
@@ -179,9 +179,9 @@ const G = {
179
179
  if (key !== f) {
180
180
  let h = target[key];
181
181
  if (h && h === j[key]) {
182
- const B = C[key];
183
- if (B) {
184
- return B.bind(target);
182
+ const C = D[key];
183
+ if (C) {
184
+ return C.bind(target);
185
185
  }
186
186
  h = h.bind(target);
187
187
  }
@@ -295,19 +295,19 @@ const r = (e) => {
295
295
  target[f] = {};
296
296
  return e;
297
297
  };
298
- const $ = (D, a6) => {
299
- if (a6) {
300
- D.w = true;
298
+ const $ = (B, a2) => {
299
+ if (a2) {
300
+ B.w = true;
301
301
  }
302
302
  else {
303
- D.com.watchMountChange('s', $, D);
303
+ B.com.watchMountChange('s', $, B);
304
304
  }
305
305
  };
306
306
  export const bindData = (data, key) => {
307
307
  return [data, key, data[key]];
308
308
  };
309
309
  export const useState = (initial, resetOnUnmount) => {
310
- const com = q;
310
+ const com = p;
311
311
  if (com.id) {
312
312
  let s = y.get(com);
313
313
  if (s) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezh",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "scripts": {
5
5
  "start": "webpack serve"
6
6
  },
@@ -36,7 +36,8 @@
36
36
  "eslint-plugin-import": "^2.31.0",
37
37
  "ezh-trans": "^0.2.0",
38
38
  "globals": "^15.14.0",
39
- "minify-ts": "^1.2.3",
39
+ "log-class": "^1.0.2",
40
+ "minify-ts": "^1.2.4",
40
41
  "sass": "^1.86.0",
41
42
  "sass-loader": "^16.0.5",
42
43
  "style-loader": "^4.0.0",
@@ -49,4 +50,4 @@
49
50
  "dependencies": {
50
51
  "path-parser": "^6.1.0"
51
52
  }
52
- }
53
+ }