<commit_before>utils = require "./utils"
{config} = require "./config"

exports.errorWarning = (e) ->
	errorView = new View x:20, y:20, width:350, height:60
	errorView.html = "<b>Javascript Error</b>
		<br>Inspect the error console for more info."
	errorView.style =
		font: "13px/1.3em Menlo, Monaco"
		backgroundColor: "rgba(255,0,0,0.5)"
		padding: "12px"
		border: "1px solid rgba(255,0,0,0.5)"
		borderRadius: "5px"
	errorView.scale = 0.5
	errorView.animate
		properties: {scale:1.0}
		curve: "spring(150,8,1500)"

exports.debugView = ->
	
	# Safari bug: https://bugs.webkit.org/show_bug.cgi?id=78206
	if window.Framer._togglingDebug is true
		return
	
	window.Framer._togglingDebug = true
	
	View.Views.map (view, i) ->
			
		if view._debug
			view._element.removeChild view._debug.node
			view.style = view._debug.style
			# view.clip = view._debug.clip<commit_msg>Tighten up the springs<commit_after>utils = require "./utils"
{config} = require "./config"

exports.errorWarning = (e) ->
	errorView = new View x:20, y:20, width:350, height:60
	errorView.html = "<b>Javascript Error</b>
		<br>Inspect the error console for more info."
	errorView.style =
		font: "13px/1.3em Menlo, Monaco"
		backgroundColor: "rgba(255,0,0,0.5)"
		padding: "12px"
		border: "1px solid rgba(255,0,0,0.5)"
		borderRadius: "5px"
	errorView.scale = 0.5
	errorView.animate
		properties: {scale:1.0}
		curve: "spring(2500,30,1500)"

exports.debugView = ->
	
	# Safari bug: https://bugs.webkit.org/show_bug.cgi?id=78206
	if window.Framer._togglingDebug is true
		return
	
	window.Framer._togglingDebug = true
	
	View.Views.map (view, i) ->
			
		if view._debug
			view._element.removeChild view._debug.node
			view.style = view._debug.style
			# view.clip = view._debug.clip
{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.05584045584045584, 'mean_word_length': 3.8777777777777778, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '3989106', 'n_tokens_mistral': 767, 'n_tokens_neox': 655, 'n_words': 140}