<commit_before>class PreviewPane extends Pane

  constructor: (options = {}, data) ->

    options.cssClass = "preview-pane"

    super options, data

    @container = new KDView

    if options.url then @setIframe()
    else
      @placeholder = new KDView
        cssClass : "placeholder"
        partial  : "Your result will be displayed here"
      @container.addSubView @placeholder

  setIframe: ->
    options = @getOptions()

    @container.addSubView new KDCustomHTMLView
      tagName       : "iframe"
      attributes    :
        type        : "text/html"
        width       : options.width  or "100%"
        height      : options.height or "100%"
        frameborder : 0
        src         : @getProperty "url"

  pistachio: ->
    """
      {{> @header}}
      {{> @container}}
    """<commit_msg>Workspace: Now PreviewPane is using internal Viewer.<commit_after>class PreviewPane extends Pane

  constructor: (options = {}, data) ->

    options.cssClass = "preview-pane"

    super options, data

    @container    = new KDView
      cssClass    : "workspace-viewer"

    {url}         = @getOptions()
    viewerOptions =
      delegate    : this
      params      : {}

    viewerOptions.params.path = url  if url

    @container.addSubView @previewer = new PreviewerView viewerOptions

  pistachio: ->
    """
      {{> @header}}
      {{> @container}}
    """
{'fraction_non_alphanumeric': 0.11078928312816799, 'fraction_numerical': 0.005068790731354091, 'mean_word_length': 2.133786848072562, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '5828543', 'n_tokens_mistral': 423, 'n_tokens_neox': 398, 'n_words': 102}