Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Dec 25, 2024
1 parent 1e88a81 commit 517428b
Show file tree
Hide file tree
Showing 20 changed files with 71 additions and 69 deletions.
2 changes: 1 addition & 1 deletion packages/create-monkey/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.38.0
# v1.39.0

## Features

Expand Down
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.38.0",
"version": "1.39.0",
"description": "create-monkey",
"main": "index.js",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-monkey/template-empty-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
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": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
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/[email protected].2/dist/preact.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected].3/dist/preact.min.js
// @grant GM_addStyle
// ==/UserScript==

Expand All @@ -17,11 +17,11 @@
var f$1 = 0;
function u$1(e2, t2, n, o2, i2, u2) {
t2 || (t2 = {});
var a2, c2, l2 = t2;
"ref" in t2 && (a2 = t2.ref, delete t2.ref);
var p2 = { type: e2, props: l2, key: n, ref: a2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f$1, __i: -1, __u: 0, __source: i2, __self: u2 };
if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === l2[c2] && (l2[c2] = a2[c2]);
return preact.options.vnode && preact.options.vnode(p2), p2;
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, __c: null, constructor: void 0, __v: --f$1, __i: -1, __u: 0, __source: i2, __self: u2 };
if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
return preact.options.vnode && preact.options.vnode(l2), l2;
}
var t, r, u, i, o = 0, f = [], c = preact.options, e = c.__b, a = c.__r, v = c.diffed, l = c.__c, m = c.unmount, s = c.__;
function d(n, t2) {
Expand Down
6 changes: 3 additions & 3 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.25.2"
"preact": "^10.25.3"
},
"devDependencies": {
"@preact/preset-vite": "^2.9.3",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
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/[email protected].2/dist/preact.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected].3/dist/preact.min.js
// @grant GM_addStyle
// ==/UserScript==

Expand All @@ -17,11 +17,11 @@
var f$1 = 0;
function u$1(e2, t2, n, o2, i2, u2) {
t2 || (t2 = {});
var a2, c2, l2 = t2;
"ref" in t2 && (a2 = t2.ref, delete t2.ref);
var p2 = { type: e2, props: l2, key: n, ref: a2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f$1, __i: -1, __u: 0, __source: i2, __self: u2 };
if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === l2[c2] && (l2[c2] = a2[c2]);
return preact.options.vnode && preact.options.vnode(p2), p2;
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, __c: null, constructor: void 0, __v: --f$1, __i: -1, __u: 0, __source: i2, __self: u2 };
if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
return preact.options.vnode && preact.options.vnode(l2), l2;
}
var t, r, u, i, o = 0, f = [], c = preact.options, e = c.__b, a = c.__r, v = c.diffed, l = c.__c, m = c.unmount, s = c.__;
function d(n, t2) {
Expand Down
6 changes: 3 additions & 3 deletions packages/create-monkey/template-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"preview": "vite preview"
},
"dependencies": {
"preact": "^10.25.2"
"preact": "^10.25.3"
},
"devDependencies": {
"@preact/preset-vite": "^2.9.3",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-monkey/template-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-monkey/template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/react": "^18.3.16",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-monkey/template-solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"devDependencies": {
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0",
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3",
"vite-plugin-solid": "^2.11.0"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/create-monkey/template-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0",
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3",
"vite-plugin-solid": "^2.11.0"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@
function enable_legacy_mode_flag() {
legacy_mode_flag = true;
}
function source(v) {
return {
const TEMPLATE_USE_IMPORT_NODE = 1 << 1;
function source(v, stack) {
var signal = {
f: 0,
// TODO ideally we could skip this altogether, but it causes type errors
v,
reactions: null,
equals,
version: 0
};
return signal;
}
function state(v) {
return /* @__PURE__ */ push_derived_source(source(v));
Expand Down Expand Up @@ -139,7 +141,6 @@
}
}
}
const TEMPLATE_USE_IMPORT_NODE = 1 << 1;
var $window;
var first_child_getter;
var next_sibling_getter;
Expand Down Expand Up @@ -423,7 +424,7 @@
pause_children(effect2, transitions, true);
run_out_transitions(transitions, () => {
destroy_effect(effect2);
if (callback) callback();
callback();
});
}
function run_out_transitions(transitions, fn) {
Expand Down Expand Up @@ -482,7 +483,7 @@
function set_untracked_writes(value) {
untracked_writes = value;
}
let current_version = 0;
let current_version = 1;
let skip_reaction = false;
let component_context = null;
function increment_version() {
Expand Down Expand Up @@ -527,7 +528,7 @@
}
}
}
if (!is_unowned) {
if (!is_unowned || active_effect !== null && !skip_reaction) {
set_signal_status(reaction, CLEAN);
}
}
Expand Down Expand Up @@ -953,6 +954,10 @@
{}
);
}
const PASSIVE_EVENTS = ["touchstart", "touchmove"];
function is_passive_event(name) {
return PASSIVE_EVENTS.includes(name);
}
const all_registered_events = /* @__PURE__ */ new Set();
const root_event_handles = /* @__PURE__ */ new Set();
function delegate(events) {
Expand Down Expand Up @@ -1095,10 +1100,6 @@
dom
);
}
const PASSIVE_EVENTS = ["touchstart", "touchmove"];
function is_passive_event(name) {
return PASSIVE_EVENTS.includes(name);
}
function set_text(text, value) {
var str = value == null ? "" : typeof value === "object" ? value + "" : value;
if (str !== (text.__t ?? (text.__t = text.nodeValue))) {
Expand Down
8 changes: 4 additions & 4 deletions packages/create-monkey/template-svelte-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^5.0.2",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^5.11.2",
"svelte": "^5.16.0",
"svelte-check": "^4.1.1",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@
function enable_legacy_mode_flag() {
legacy_mode_flag = true;
}
function source(v) {
return {
const TEMPLATE_USE_IMPORT_NODE = 1 << 1;
function source(v, stack) {
var signal = {
f: 0,
// TODO ideally we could skip this altogether, but it causes type errors
v,
reactions: null,
equals,
version: 0
};
return signal;
}
function state(v) {
return /* @__PURE__ */ push_derived_source(source(v));
Expand Down Expand Up @@ -139,7 +141,6 @@
}
}
}
const TEMPLATE_USE_IMPORT_NODE = 1 << 1;
var $window;
var first_child_getter;
var next_sibling_getter;
Expand Down Expand Up @@ -423,7 +424,7 @@
pause_children(effect2, transitions, true);
run_out_transitions(transitions, () => {
destroy_effect(effect2);
if (callback) callback();
callback();
});
}
function run_out_transitions(transitions, fn) {
Expand Down Expand Up @@ -482,7 +483,7 @@
function set_untracked_writes(value) {
untracked_writes = value;
}
let current_version = 0;
let current_version = 1;
let skip_reaction = false;
let component_context = null;
function increment_version() {
Expand Down Expand Up @@ -527,7 +528,7 @@
}
}
}
if (!is_unowned) {
if (!is_unowned || active_effect !== null && !skip_reaction) {
set_signal_status(reaction, CLEAN);
}
}
Expand Down Expand Up @@ -953,6 +954,10 @@
{}
);
}
const PASSIVE_EVENTS = ["touchstart", "touchmove"];
function is_passive_event(name) {
return PASSIVE_EVENTS.includes(name);
}
const all_registered_events = /* @__PURE__ */ new Set();
const root_event_handles = /* @__PURE__ */ new Set();
function delegate(events) {
Expand Down Expand Up @@ -1095,10 +1100,6 @@
dom
);
}
const PASSIVE_EVENTS = ["touchstart", "touchmove"];
function is_passive_event(name) {
return PASSIVE_EVENTS.includes(name);
}
function set_text(text, value) {
var str = value == null ? "" : typeof value === "object" ? value + "" : value;
if (str !== (text.__t ?? (text.__t = text.nodeValue))) {
Expand Down
8 changes: 4 additions & 4 deletions packages/create-monkey/template-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "5.0.2",
"svelte": "^5.11.2",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"svelte": "^5.16.0",
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-monkey/template-vanilla-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-monkey/template-vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}
6 changes: 3 additions & 3 deletions packages/create-monkey/template-vue-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0",
"vue-tsc": "^2.1.10"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3",
"vue-tsc": "^2.2.0"
}
}
4 changes: 2 additions & 2 deletions packages/create-monkey/template-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
"vite": "^6.0.3",
"vite-plugin-monkey": "^5.0.0"
"vite": "^6.0.5",
"vite-plugin-monkey": "^5.0.3"
}
}

0 comments on commit 517428b

Please sign in to comment.