<commit_before>/**
 * Welcome to Pebble.js!
 *
 * This is where you write your app.
 */

var UI = require('ui');
var Vector2 = require('vector2');

var wind = new UI.Card({
  title: 'Pebble.js',
  icon: 'images/menu_icon.png',
  body: 'Saying Hello World'
});

wind.show();

wind.on('click', 'up', function(e) {
  var menu = new UI.Menu();
  menu.items(0, [{
    title: 'Hello World!', subtitle: 'Subtitle text'
  }, {
    title: 'Item #2'
  }]);
  menu.show();
});

wind.on('click', 'select', function(e) {
  var stage = new UI.Stage();
  var textfield = new UI.Text({
    text: 'Yo!',
    position: new Vector2(10, 10),
    size: new Vector2(100, 30),
  });
  stage.add(textfield);
  stage.show();
});

wind.on('click', 'down', function(e) {
  var card = new UI.Card();<commit_msg>Update demo app.js to use Window instead of Stage<commit_after>/**
 * Welcome to Pebble.js!
 *
 * This is where you write your app.
 */

var UI = require('ui');
var Vector2 = require('vector2');

var main = new UI.Card({
  title: 'Pebble.js',
  icon: 'images/menu_icon.png',
  body: 'Saying Hello World'
});

main.show();

main.on('click', 'up', function(e) {
  var menu = new UI.Menu();
  menu.items(0, [{
    title: 'Hello World!',
    subtitle: 'Subtitle text'
  }, {
    title: 'Item #2'
  }]);
  menu.on('select', function(e) {
    console.log('Selected item: ' + e.section + ' ' + e.item);
  });
  menu.show();
});

main.on('click', 'select', function(e) {
  var wind = new UI.Window();
  var textfield = new UI.Text({
    text: 'Yo!',
    position: new Vector2(10, 10),
    size: new Vector2(100, 30),
  });
  wind.add(textfield);
  wind.show();
});

main.on('click', 'down', function(e) {
  var card = new UI.Card();
{'fraction_non_alphanumeric': 0.20620972466315174, 'fraction_numerical': 0.01757469244288225, 'mean_word_length': 3.33502538071066, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1145389', 'n_tokens_mistral': 661, 'n_tokens_neox': 642, 'n_words': 169}