Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update template dependency
  • Loading branch information
lisonge committed May 31, 2024
1 parent c8509d3 commit ff82786
Show file tree
Hide file tree
Showing 26 changed files with 236 additions and 230 deletions.
6 changes: 4 additions & 2 deletions packages/create-monkey/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# CHANGELOG
# v1.37.0

CHANGELOG
## Features

- update template dependency
2 changes: 1 addition & 1 deletion packages/create-monkey/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-monkey",
"version": "1.36.0",
"version": "1.37.0",
"description": "create-monkey",
"main": "index.js",
"type": "module",
Expand Down
6 changes: 3 additions & 3 deletions packages/create-monkey/template-empty-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"preview": "vite preview"
},
"devDependencies": {
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vite-plugin-monkey": "^3.5.1"
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vite-plugin-monkey": "^4.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/create-monkey/template-empty/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^5.0.11",
"vite-plugin-monkey": "^3.5.1"
"vite": "^5.2.12",
"vite-plugin-monkey": "^4.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// @author monkey
// @icon https://vitejs.dev/logo.svg
// @match https://www.google.com/
// @require https://cdn.jsdelivr.net/npm/preact@10.19.3/dist/preact.min.js
// @require https://cdn.jsdelivr.net/npm/preact@10.22.0/dist/preact.min.js
// @grant GM_addStyle
// ==/UserScript==

Expand All @@ -14,26 +14,26 @@
(function (preact) {
'use strict';

var t, r, u$1, i, o = 0, f$1 = [], c = [], e = preact.options.__b, a = preact.options.__r, v = preact.options.diffed, l = preact.options.__c, m = preact.options.unmount;
function d(t2, u2) {
preact.options.__h && preact.options.__h(r, t2, o || u2), o = 0;
var i2 = r.__H || (r.__H = { __: [], __h: [] });
return t2 >= i2.__.length && i2.__.push({ __V: c }), i2.__[t2];
var t, r, u$1, i, o = 0, f$1 = [], c = [], e = preact.options, a = e.__b, v = e.__r, l = e.diffed, m = e.__c, s = e.unmount, d = e.__;
function h(n, t2) {
e.__h && e.__h(r, n, o || t2), o = 0;
var u2 = r.__H || (r.__H = { __: [], __h: [] });
return n >= u2.__.length && u2.__.push({ __V: c }), u2.__[n];
}
function h(n) {
return o = 1, s(B, n);
function p(n) {
return o = 1, y(D, n);
}
function s(n, u2, i2) {
var o2 = d(t++, 2);
if (o2.t = n, !o2.__c && (o2.__ = [i2 ? i2(u2) : B(void 0, u2), function(n2) {
function y(n, u2, i2) {
var o2 = h(t++, 2);
if (o2.t = n, !o2.__c && (o2.__ = [D(void 0, u2), function(n2) {
var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n2);
t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
}], o2.__c = r, !r.u)) {
var f2 = function(n2, t2, r2) {
if (!o2.__c.__H)
return true;
var u3 = o2.__c.__H.__.filter(function(n3) {
return n3.__c;
return !!n3.__c;
});
if (u3.every(function(n3) {
return !n3.__N;
Expand All @@ -59,84 +59,88 @@
}
return o2.__N || o2.__;
}
function b() {
for (var t2; t2 = f$1.shift(); )
if (t2.__P && t2.__H)
function j() {
for (var n; n = f$1.shift(); )
if (n.__P && n.__H)
try {
t2.__H.__h.forEach(k), t2.__H.__h.forEach(w), t2.__H.__h = [];
} catch (r2) {
t2.__H.__h = [], preact.options.__e(r2, t2.__v);
n.__H.__h.forEach(z), n.__H.__h.forEach(B), n.__H.__h = [];
} catch (t2) {
n.__H.__h = [], e.__e(t2, n.__v);
}
}
preact.options.__b = function(n) {
r = null, e && e(n);
}, preact.options.__r = function(n) {
a && a(n), t = 0;
e.__b = function(n) {
r = null, a && a(n);
}, e.__ = function(n, t2) {
n && t2.__k && t2.__k.__m && (n.__m = t2.__k.__m), d && d(n, t2);
}, e.__r = function(n) {
v && v(n), t = 0;
var i2 = (r = n.__c).__H;
i2 && (u$1 === r ? (i2.__h = [], r.__h = [], i2.__.forEach(function(n2) {
n2.__N && (n2.__ = n2.__N), n2.__V = c, n2.__N = n2.i = void 0;
})) : (i2.__h.forEach(k), i2.__h.forEach(w), i2.__h = [], t = 0)), u$1 = r;
}, preact.options.diffed = function(t2) {
v && v(t2);
var o2 = t2.__c;
o2 && o2.__H && (o2.__H.__h.length && (1 !== f$1.push(o2) && i === preact.options.requestAnimationFrame || ((i = preact.options.requestAnimationFrame) || j)(b)), o2.__H.__.forEach(function(n) {
n.i && (n.__H = n.i), n.__V !== c && (n.__ = n.__V), n.i = void 0, n.__V = c;
})) : (i2.__h.forEach(z), i2.__h.forEach(B), i2.__h = [], t = 0)), u$1 = r;
}, e.diffed = function(n) {
l && l(n);
var t2 = n.__c;
t2 && t2.__H && (t2.__H.__h.length && (1 !== f$1.push(t2) && i === e.requestAnimationFrame || ((i = e.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n2) {
n2.i && (n2.__H = n2.i), n2.__V !== c && (n2.__ = n2.__V), n2.i = void 0, n2.__V = c;
})), u$1 = r = null;
}, preact.options.__c = function(t2, r2) {
r2.some(function(t3) {
}, e.__c = function(n, t2) {
t2.some(function(n2) {
try {
t3.__h.forEach(k), t3.__h = t3.__h.filter(function(n) {
return !n.__ || w(n);
n2.__h.forEach(z), n2.__h = n2.__h.filter(function(n3) {
return !n3.__ || B(n3);
});
} catch (u2) {
r2.some(function(n) {
n.__h && (n.__h = []);
}), r2 = [], preact.options.__e(u2, t3.__v);
} catch (r2) {
t2.some(function(n3) {
n3.__h && (n3.__h = []);
}), t2 = [], e.__e(r2, n2.__v);
}
}), l && l(t2, r2);
}, preact.options.unmount = function(t2) {
m && m(t2);
var r2, u2 = t2.__c;
u2 && u2.__H && (u2.__H.__.forEach(function(n) {
}), m && m(n, t2);
}, e.unmount = function(n) {
s && s(n);
var t2, r2 = n.__c;
r2 && r2.__H && (r2.__H.__.forEach(function(n2) {
try {
k(n);
} catch (n2) {
r2 = n2;
z(n2);
} catch (n3) {
t2 = n3;
}
}), u2.__H = void 0, r2 && preact.options.__e(r2, u2.__v));
}), r2.__H = void 0, t2 && e.__e(t2, r2.__v));
};
var g = "function" == typeof requestAnimationFrame;
function j(n) {
var k = "function" == typeof requestAnimationFrame;
function w(n) {
var t2, r2 = function() {
clearTimeout(u2), g && cancelAnimationFrame(t2), setTimeout(n);
clearTimeout(u2), k && cancelAnimationFrame(t2), setTimeout(n);
}, u2 = setTimeout(r2, 100);
g && (t2 = requestAnimationFrame(r2));
k && (t2 = requestAnimationFrame(r2));
}
function k(n) {
function z(n) {
var t2 = r, u2 = n.__c;
"function" == typeof u2 && (n.__c = void 0, u2()), r = t2;
}
function w(n) {
function B(n) {
var t2 = r;
n.__c = n.__(), r = t2;
}
function B(n, t2) {
function D(n, t2) {
return "function" == typeof t2 ? t2(n) : t2;
}
const preactLogo = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--logos'%20width='27.68'%20height='32'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%20256%20296'%3e%3cpath%20fill='%23673AB8'%20d='m128%200l128%2073.9v147.8l-128%2073.9L0%20221.7V73.9z'%3e%3c/path%3e%3cpath%20fill='%23FFF'%20d='M34.865%20220.478c17.016%2021.78%2071.095%205.185%20122.15-34.704c51.055-39.888%2080.24-88.345%2063.224-110.126c-17.017-21.78-71.095-5.184-122.15%2034.704c-51.055%2039.89-80.24%2088.346-63.224%20110.126Zm7.27-5.68c-5.644-7.222-3.178-21.402%207.573-39.253c11.322-18.797%2030.541-39.548%2054.06-57.923c23.52-18.375%2048.303-32.004%2069.281-38.442c19.922-6.113%2034.277-5.075%2039.92%202.148c5.644%207.223%203.178%2021.403-7.573%2039.254c-11.322%2018.797-30.541%2039.547-54.06%2057.923c-23.52%2018.375-48.304%2032.004-69.281%2038.441c-19.922%206.114-34.277%205.076-39.92-2.147Z'%3e%3c/path%3e%3cpath%20fill='%23FFF'%20d='M220.239%20220.478c17.017-21.78-12.169-70.237-63.224-110.126C105.96%2070.464%2051.88%2053.868%2034.865%2075.648c-17.017%2021.78%2012.169%2070.238%2063.224%20110.126c51.055%2039.889%20105.133%2056.485%20122.15%2034.704Zm-7.27-5.68c-5.643%207.224-19.998%208.262-39.92%202.148c-20.978-6.437-45.761-20.066-69.28-38.441c-23.52-18.376-42.74-39.126-54.06-57.923c-10.752-17.851-13.218-32.03-7.575-39.254c5.644-7.223%2019.999-8.261%2039.92-2.148c20.978%206.438%2045.762%2020.067%2069.281%2038.442c23.52%2018.375%2042.739%2039.126%2054.06%2057.923c10.752%2017.85%2013.218%2032.03%207.574%2039.254Z'%3e%3c/path%3e%3cpath%20fill='%23FFF'%20d='M127.552%20167.667c10.827%200%2019.603-8.777%2019.603-19.604c0-10.826-8.776-19.603-19.603-19.603c-10.827%200-19.604%208.777-19.604%2019.603c0%2010.827%208.777%2019.604%2019.604%2019.604Z'%3e%3c/path%3e%3c/svg%3e";
var f = 0;
function u(e2, t2, n, o2, i2, u2) {
var a2, c2, p = {};
for (c2 in t2)
"ref" == c2 ? a2 = t2[c2] : p[c2] = t2[c2];
var l2 = { type: e2, props: p, key: n, ref: a2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --f, __i: -1, __u: 0, __source: i2, __self: u2 };
t2 || (t2 = {});
var a2, c2, p2 = t2;
if ("ref" in p2)
for (c2 in p2 = {}, t2)
"ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
var l2 = { type: e2, props: p2, key: n, ref: a2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --f, __i: -1, __u: 0, __source: i2, __self: u2 };
if ("function" == typeof e2 && (a2 = e2.defaultProps))
for (c2 in a2)
void 0 === p[c2] && (p[c2] = a2[c2]);
void 0 === p2[c2] && (p2[c2] = a2[c2]);
return preact.options.vnode && preact.options.vnode(l2), l2;
}
function App() {
const [count, setCount] = h(0);
const [count, setCount] = p(0);
return u(preact.Fragment, {
children: [u("div", {
children: [u("a", {
Expand Down
10 changes: 5 additions & 5 deletions packages/create-monkey/template-preact-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"preview": "vite preview"
},
"dependencies": {
"preact": "10.19.3"
"preact": "10.22.0"
},
"devDependencies": {
"@preact/preset-vite": "^2.8.1",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vite-plugin-monkey": "^3.5.1"
"@preact/preset-vite": "^2.8.2",
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vite-plugin-monkey": "^4.0.0"
}
}
Loading

0 comments on commit ff82786

Please sign in to comment.