<commit_before>import Data3dView from './aframe/three/data3d-view.js'
import createFileDrop from './aframe/ui/create-file-drop.js'
import data3dComponent from './aframe/component/data3d.js'
import furnitureComponent from './aframe/component/furniture.js'

// initialize aframe components

if (typeof window !== 'undefined' && window.AFRAME) registerComponents()

// helpers

function registerComponents () {
  if (typeof window === 'undefined' || !window.AFRAME) {
    console.error('AFRAME not found')
    return
  }
  AFRAME.registerComponent('3dio-data3d', data3dComponent)
  AFRAME.registerComponent('3dio-furniture', furnitureComponent)
}

// export

var aframe = {
  registerComponents: registerComponents,
  three: {
    Data3dView: Data3dView,
  },
  ui: {
    createFileDrop: createFileDrop
  }
}

export default aframe<commit_msg>Register aframe components only if AFRAME is available<commit_after>import runtime from './core/runtime.js'
import Data3dView from './aframe/three/data3d-view.js'
import createFileDrop from './aframe/ui/create-file-drop.js'
import data3dComponent from './aframe/component/data3d.js'
import furnitureComponent from './aframe/component/furniture.js'

// initialize aframe components

if (runtime.has.aFrame) registerComponents()

// helpers

function registerComponents () {
  if (typeof window === 'undefined' || !window.AFRAME) {
    console.warn('AFRAME not found. 3dio components not registered')
    return
  }
  AFRAME.registerComponent('3dio-data3d', data3dComponent)
  AFRAME.registerComponent('3dio-furniture', furnitureComponent)
}

// export

var aframe = {
  three: {
    Data3dView: Data3dView,
  },
  ui: {
    createFileDrop: createFileDrop
  }
}

export default aframe
{'fraction_non_alphanumeric': 0.11904761904761904, 'fraction_numerical': 0.012195121951219513, 'mean_word_length': 4.50479233226837, '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': '7607965', 'n_tokens_mistral': 547, 'n_tokens_neox': 540, 'n_words': 119}