Skip to content

Commit db69c0e

Browse files
author
RSamaium
committed
chore: release v2.0.0-beta.50
1 parent 83a8d2d commit db69c0e

File tree

7 files changed

+14
-6
lines changed

7 files changed

+14
-6
lines changed

packages/compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@canvasengine/compiler",
3-
"version": "2.0.0-beta.49",
3+
"version": "2.0.0-beta.50",
44
"description": "",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

packages/compiler/tests/compiler2.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,12 @@ describe('DOM', () => {
14251425
expect(output).toBe('h(DOMElement, { element: "div", attrs: { class: [\'container\', { active: true }] } })');
14261426
});
14271427

1428+
test('reactive class attributes', () => {
1429+
const input = `<div class={{ active: active() }} />`;
1430+
const output = parser.parse(input);
1431+
expect(output).toBe('h(DOMElement, { element: "div", attrs: { class: computed(() => ({ active: active() })) } })');
1432+
});
1433+
14281434
test('should compile button DOM', () => {
14291435
const input = `<button type="submit" />`;
14301436
const output = parser.parse(input);

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "canvasengine",
3-
"version": "2.0.0-beta.49",
3+
"version": "2.0.0-beta.50",
44
"type": "module",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

packages/core/testing/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ export class TestBed {
3030
const comp = () => h(Canvas, {
3131
tickStart: false
3232
}, h(component, props, children))
33+
const enableLayout = options.enableLayout ?? true;
3334
const { canvasElement, app } = await bootstrapCanvas(root, comp, {
34-
enableLayout: options.enableLayout ?? true
35+
enableLayout,
36+
...(enableLayout ? { layout: { throttle: 0 } } : {})
3537
})
3638
app.render()
3739
TestBed.lastApp = app as Application;

packages/presets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@canvasengine/presets",
3-
"version": "2.0.0-beta.49",
3+
"version": "2.0.0-beta.50",
44
"type": "module",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

packages/testing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@canvasengine/testing",
3-
"version": "2.0.0-beta.49",
3+
"version": "2.0.0-beta.50",
44
"description": "Testing utilities and mocks for CanvasEngine",
55
"type": "module",
66
"main": "dist/index.js",

packages/tiled/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@canvasengine/tiled",
3-
"version": "2.0.0-beta.49",
3+
"version": "2.0.0-beta.50",
44
"description": "",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)