Skip to content

Commit aa16799

Browse files
committed
Merge branch 'master' of github.com:AimWhy/js-framework-benchmark
2 parents 0a64b00 + a376f49 commit aa16799

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2636
-2209
lines changed

frameworks/keyed/gxt/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/gxt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@glint/environment-ember-template-imports": "^1.2.2",
2323
"@glint/environment-glimmerx": "^1.2.2",
2424
"@glint/template": "^1.2.2",
25-
"@lifeart/gxt": "0.0.16",
25+
"@lifeart/gxt": "0.0.21",
2626
"prettier": "^3.1.1",
2727
"prettier-plugin-ember-template-tag": "^2.0.0",
2828
"terser": "^5.26.0"

frameworks/keyed/gxt/src/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { renderComponent } from '@lifeart/gxt';
22
import { Application } from './App.gts';
3-
43
// @ts-expect-error app is unknown
5-
renderComponent(new Application().template(), window['app']);
4+
renderComponent(new Application({}), window['app']);

frameworks/keyed/gxt/vite.config.mts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ export default defineConfig(({ mode }) => ({
2727
mangle: {
2828
module: true,
2929
toplevel: true,
30-
properties: {
31-
builtins: false,
32-
},
30+
properties: false,
3331
},
3432
},
3533
},

frameworks/keyed/mikado-proxy/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<head>
44
<meta charset="utf-8"/>
55
<meta name="viewport" content="width=device-width">
6+
<link rel="preload" href="/css/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2" as="font" type="font/woff2" crossorigin>
7+
<link href="/css/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" media="screen">
8+
<link href="/css/main.css" rel="stylesheet" media="screen">
9+
<script src="dist/main.js" async></script>
610
<title>Mikado-Proxy-"keyed"</title>
7-
<link rel="preload" href="dist/main.js" as="script">
8-
<link href="/css/currentStyle.css" rel="stylesheet"/>
911
</head>
10-
<body>
11-
<script src="dist/main.js"></script>
12-
</body>
12+
<body></body>
1313
</html>

frameworks/keyed/mikado-proxy/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/mikado-proxy/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
},
1818
"scripts": {
1919
"compile": "npx mikado-compile --src src/template --type module -i -f && echo Compile Complete. && exit 0",
20-
"build": "npm run compile && node task/build RELEASE=custom DEBUG=false POLYFILL=false SUPPORT_CACHE=true SUPPORT_EVENTS=true SUPPORT_DOM_HELPERS=false SUPPORT_ASYNC=false SUPPORT_TRANSPORT=false SUPPORT_TEMPLATE_EXTENSION=false SUPPORT_REACTIVE=true REACTIVE_ONLY=true SUPPORT_CACHE_HELPERS=false SUPPORT_KEYED=true SUPPORT_POOLS=false SUPPORT_CALLBACKS=false SUPPORT_COMPILE=false && exit 0",
20+
"build": "npm run compile && node task/build RELEASE=custom DEBUG=false POLYFILL=false SUPPORT_CACHE=true SUPPORT_EVENTS=true SUPPORT_DOM_HELPERS=false SUPPORT_ASYNC=false SUPPORT_TRANSPORT=false SUPPORT_TEMPLATE_EXTENSION=false SUPPORT_REACTIVE=true REACTIVE_ONLY=true SUPPORT_CACHE_HELPERS=false SUPPORT_KEYED=true SUPPORT_POOLS=false SUPPORT_CALLBACKS=false SUPPORT_COMPILE=false SUPPORT_WEB_COMPONENTS=false && exit 0",
2121
"build-prod": "npm run build"
2222
},
2323
"dependencies": {
24-
"mikado": "^0.8.134"
24+
"mikado": "^0.8.213"
2525
},
2626
"devDependencies": {
2727
"google-closure-compiler": "^20230802.0.0"

frameworks/keyed/mikado-proxy/src/main.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
import Mikado from "../node_modules/mikado/src/mikado.js";
1+
import Mikado, { once } from "../node_modules/mikado/src/mikado.js";
22
import Array from "../node_modules/mikado/src/array.js";
33
import { route } from "../node_modules/mikado/src/event.js";
44
import tpl_app from "./template/app.js";
55
import tpl_item from "./template/item.js";
66
import assignData from "./data.js";
77

8-
Mikado.once(document.body, tpl_app).eventCache = true;
8+
once(document.body, tpl_app).eventCache = true;
99

1010
// This implementation is using a full reactive paradigm.
1111
// It just applies changes to the store like an Array.
1212

13-
const state = {};
1413
const store = new Array();
15-
const view = new Mikado(tpl_item, { mount: document.getElementById("tbody"), observe: store, state });
16-
const event = { stop: true };
14+
const view = new Mikado(tpl_item, { mount: document.getElementById("tbody"), observe: store });
15+
const event = { stop: true, cancel: true };
1716

1817
route("run", () => assignData(store, 1000), event);
1918
route("runlots", () => assignData(store, 10000), event);
20-
route("add", () => assignData(store, 1000, true), event);
19+
route("add", () => assignData(store, 1000, /* append */ true), event);
2120
route("update", () => {
2221
for(let i = 0, len = store.length; i < len; i += 10)
2322
store[i].label += " !!!"
@@ -30,6 +29,7 @@ route("swaprows", () => {
3029
}, event);
3130
route("remove", target => store.splice(view.index(target), 1), event);
3231
route("select", target => {
32+
const state = view.state;
3333
const current = state.selected;
3434
state.selected = view.index(target);
3535
current >= 0 && view.update(current, store[current]);

frameworks/keyed/mikado-proxy/src/template/item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<tr key="id" cache="true" class="{{ state.selected === index ? 'danger' : '' }}" root>
1+
<tr key="data.id" cache="true" class="{{ state.selected === index ? 'danger' : '' }}" root>
22
<td class="col-md-1">{{=data.id}}</td>
33
<td class="col-md-4">
44
<a class="lbl" click="select:root">{{=data.label}}</a>

frameworks/keyed/mikado/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<head>
44
<meta charset="utf-8"/>
55
<meta name="viewport" content="width=device-width">
6+
<link rel="preload" href="/css/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2" as="font" type="font/woff2" crossorigin>
7+
<link href="/css/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" media="screen">
8+
<link href="/css/main.css" rel="stylesheet" media="screen">
9+
<script src="dist/main.js" async></script>
610
<title>Mikado-"keyed"</title>
7-
<link rel="preload" href="dist/main.js" as="script">
8-
<link href="/css/currentStyle.css" rel="stylesheet"/>
911
</head>
10-
<body>
11-
<script src="dist/main.js"></script>
12-
</body>
12+
<body></body>
1313
</html>

0 commit comments

Comments
 (0)