Skip to content

Commit b09885d

Browse files
committed
update engine and editor
1 parent 5f0f9a2 commit b09885d

File tree

5 files changed

+28
-37
lines changed

5 files changed

+28
-37
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
"author": "Luiz Bills",
1818
"license": "MIT",
1919
"devDependencies": {
20-
"esbuild": "^0.25.1"
20+
"esbuild": "^0.25.2"
2121
},
2222
"dependencies": {
23+
"@babel/standalone": "^7.27.0",
2324
"@codemirror/lang-javascript": "^6.2.3",
2425
"@codemirror/theme-one-dark": "^6.1.2",
2526
"@litecanvas/plugin-asset-loader": "latest",
2627
"@litecanvas/utils": "latest",
27-
"babel-standalone": "^6.26.0",
2828
"codemirror": "^6.0.1",
2929
"eslint-linter-browserify": "9.21.0",
3030
"litecanvas": "latest",

public/app.js

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/litecanvas.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@
550550
textalign(align, baseline) {
551551
DEV: assert(
552552
null == align || ["left", "right", "center", "start", "end"].includes(align),
553-
"textalign: 1st param must be a string"
553+
"textalign: 1st param must be null or one of the following values: center, left, right, start or end."
554554
);
555555
DEV: assert(
556556
null == baseline || [
@@ -561,7 +561,7 @@
561561
"alphabetic",
562562
"ideographic"
563563
].includes(baseline),
564-
"textalign: 2nd param must be a string"
564+
"textalign: 2nd param must be null or one of the following values: middle, top, bottom, hanging, alphabetic or ideographic."
565565
);
566566
if (align) _ctx.textAlign = align;
567567
if (baseline) _ctx.textBaseline = baseline;

public/sw.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const cacheName = "luizbills.litecanvas-editor-v1";
2-
const version = "2.79.3";
2+
const version = "2.80.0";
33

44
const precacheResources = [
55
"/",
@@ -29,7 +29,7 @@ const precacheResources = [
2929

3030
self.addEventListener("install", (event) => {
3131
event.waitUntil(
32-
caches.open(cacheName).then((cache) => cache.addAll(precacheResources)),
32+
caches.open(cacheName).then((cache) => cache.addAll(precacheResources))
3333
);
3434
});
3535

@@ -42,7 +42,7 @@ self.addEventListener("fetch", (event) => {
4242
return cachedResponse;
4343
}
4444
return fetch(event.request);
45-
}),
45+
})
4646
);
4747
});
4848

src/utils.js

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Babel from "babel-standalone";
1+
import Babel from "@babel/standalone";
22
import loopProtection from "./loop-protect";
33

44
/**
@@ -41,19 +41,10 @@ export function $$(selector, parent = document) {
4141
*/
4242
export function prepareCode(code) {
4343
return Babel.transform(code, {
44-
presets: [
45-
[Babel.availablePresets["es2017"]],
46-
[Babel.availablePresets["stage-2"]],
47-
],
48-
plugins: [
49-
"loopProtection",
50-
[
51-
Babel.availablePlugins["transform-es2015-modules-commonjs"],
52-
{ strictMode: false },
53-
],
54-
],
44+
presets: [[Babel.availablePresets["env"], { loose: true, modules: false }]],
45+
plugins: ["loopProtection"],
5546
}).code;
5647
}
5748

58-
// window.Babel = Babel;
49+
window.Babel = Babel;
5950
Babel.registerPlugin("loopProtection", loopProtection(500));

0 commit comments

Comments
 (0)