ripple 0.2.60 → 0.2.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ripple is an elegant TypeScript UI framework",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.2.60",
6
+ "version": "0.2.62",
7
7
  "type": "module",
8
8
  "module": "src/runtime/index.js",
9
9
  "main": "src/runtime/index.js",
@@ -454,7 +454,7 @@ const visitors = {
454
454
  if (attr.value === null) {
455
455
  handle_static_attr(name, true);
456
456
  continue;
457
- }
457
+ }
458
458
 
459
459
  if (attr.value.type === 'Literal' && name !== 'class') {
460
460
  handle_static_attr(name, attr.value.value);
@@ -1089,6 +1089,13 @@ const visitors = {
1089
1089
  context.state.init.push(b.block(statements));
1090
1090
  },
1091
1091
 
1092
+ TSAsExpression(node, context) {
1093
+ if (!context.state.to_ts) {
1094
+ return context.visit(node.expression);
1095
+ }
1096
+ return context.next();
1097
+ },
1098
+
1092
1099
  TryStatement(node, context) {
1093
1100
  if (!is_inside_component(context)) {
1094
1101
  context.next();
@@ -1536,7 +1543,9 @@ function transform_children(children, context) {
1536
1543
  const id = state.flush_node();
1537
1544
  state.template.push(' ');
1538
1545
  state.init.push(
1539
- b.stmt(b.assignment('=', b.member(b.member(id, b.id('firstChild')), b.id('nodeValue')), expression)),
1546
+ b.stmt(
1547
+ b.assignment('=', b.member(b.call('$.child', id), b.id('nodeValue')), expression),
1548
+ ),
1540
1549
  );
1541
1550
  }
1542
1551
  } else {