<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

$(document).ready( function () {
	Ceci.commencer()
	_.each(Ceci._components, function (value, tag) {
	console.log(value)
	var thumb = $('<div class="row clearfix"><div class="input"></div><div class="draggable" value="' + tag + '">' + tag + '</div><div class="output"></div></div>')
	$('.tray').append(thumb)  
	})

	$( ".draggable" ).draggable({
	  appendTo: ".phone-canvas",
	  helper: "clone",
	  addClass: "clone",
	  snap: true,
	  snapTolerance: 5
	});

	$('.phone-canvas').droppable({
	  accept: '.draggable',
	  drop: function (event, ui) {
	    var component = $('<' + $(ui.helper).attr('value') + '></' + $(ui.helper).attr('value') + '>')
	    $(this).append(component)
	    Ceci.faire(component[0])
	  }
	})

})<commit_msg>Update so tray now pulls in components from Heroku<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


$(document).ready( function () {
	Ceci.commencer(loadComponents)

})


var loadComponents = function () {
	_.each(Ceci._components, function (value, tag) {
	console.log(value)
	var thumb = $('<div class="row clearfix"><div class="input"></div><div class="draggable" value="' + tag + '">' + tag + '</div><div class="output"></div></div>')
	$('.tray').append(thumb)  
	})

	$( ".draggable" ).draggable({
	  appendTo: ".phone-canvas",
	  helper: "clone",
	  addClass: "clone",
	  snap: true,
	  snapTolerance: 5
	});

	$('.phone-canvas').droppable({
	  accept: '.draggable',
	  drop: function (event, ui) {
	    var component = $('<' + $(ui.helper).attr('value') + '></' + $(ui.helper).attr('value') + '>')
	    $(this).append(component)
	    Ceci.faire(component[0])
	  }
	})
}
{'fraction_non_alphanumeric': 0.20939530234882558, 'fraction_numerical': 0.005997001499250375, 'mean_word_length': 3.7105882352941175, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '1190818', 'n_tokens_mistral': 726, 'n_tokens_neox': 683, 'n_words': 173}