solvas-jsduck 6.0.0.beta.1888

Sign up to get free protection for your applications and to get access to all the features.
Files changed (659) hide show
  1. checksums.yaml +7 -0
  2. data/COPYING +674 -0
  3. data/README.md +115 -0
  4. data/bin/solvas-jsduck +27 -0
  5. data/js-classes/Array.js +1054 -0
  6. data/js-classes/Boolean.js +110 -0
  7. data/js-classes/Date.js +1022 -0
  8. data/js-classes/Function.js +336 -0
  9. data/js-classes/Number.js +308 -0
  10. data/js-classes/Object.js +1042 -0
  11. data/js-classes/RegExp.js +415 -0
  12. data/js-classes/String.js +1052 -0
  13. data/lib/jsduck/aggregator.rb +200 -0
  14. data/lib/jsduck/app.rb +63 -0
  15. data/lib/jsduck/assets.rb +54 -0
  16. data/lib/jsduck/base_type.rb +53 -0
  17. data/lib/jsduck/batch_parser.rb +46 -0
  18. data/lib/jsduck/batch_processor.rb +83 -0
  19. data/lib/jsduck/cache.rb +137 -0
  20. data/lib/jsduck/categories/auto.rb +83 -0
  21. data/lib/jsduck/categories/class_name.rb +39 -0
  22. data/lib/jsduck/categories/factory.rb +75 -0
  23. data/lib/jsduck/categories/file.rb +69 -0
  24. data/lib/jsduck/class.rb +218 -0
  25. data/lib/jsduck/class_doc_expander.rb +132 -0
  26. data/lib/jsduck/class_name.rb +23 -0
  27. data/lib/jsduck/class_writer.rb +53 -0
  28. data/lib/jsduck/columns.rb +56 -0
  29. data/lib/jsduck/css/parser.rb +90 -0
  30. data/lib/jsduck/css/type.rb +57 -0
  31. data/lib/jsduck/doc/comment.rb +40 -0
  32. data/lib/jsduck/doc/delimited_parser.rb +105 -0
  33. data/lib/jsduck/doc/map.rb +23 -0
  34. data/lib/jsduck/doc/parser.rb +135 -0
  35. data/lib/jsduck/doc/processor.rb +52 -0
  36. data/lib/jsduck/doc/scanner.rb +83 -0
  37. data/lib/jsduck/doc/standard_tag_parser.rb +125 -0
  38. data/lib/jsduck/doc/subproperties.rb +71 -0
  39. data/lib/jsduck/examples.rb +63 -0
  40. data/lib/jsduck/export_writer.rb +63 -0
  41. data/lib/jsduck/exporter/app.rb +80 -0
  42. data/lib/jsduck/exporter/examples.rb +58 -0
  43. data/lib/jsduck/exporter/full.rb +60 -0
  44. data/lib/jsduck/external_classes.rb +362 -0
  45. data/lib/jsduck/format/batch.rb +58 -0
  46. data/lib/jsduck/format/class.rb +62 -0
  47. data/lib/jsduck/format/doc.rb +172 -0
  48. data/lib/jsduck/format/html_stack.rb +108 -0
  49. data/lib/jsduck/format/shortener.rb +55 -0
  50. data/lib/jsduck/format/subproperties.rb +64 -0
  51. data/lib/jsduck/grouped_asset.rb +59 -0
  52. data/lib/jsduck/guide_anchors.rb +39 -0
  53. data/lib/jsduck/guide_toc.rb +68 -0
  54. data/lib/jsduck/guide_toc_entry.rb +54 -0
  55. data/lib/jsduck/guide_writer.rb +58 -0
  56. data/lib/jsduck/guides.rb +188 -0
  57. data/lib/jsduck/img/dir.rb +94 -0
  58. data/lib/jsduck/img/dir_set.rb +39 -0
  59. data/lib/jsduck/img/writer.rb +23 -0
  60. data/lib/jsduck/inline/auto_link.rb +106 -0
  61. data/lib/jsduck/inline/example.rb +44 -0
  62. data/lib/jsduck/inline/img.rb +63 -0
  63. data/lib/jsduck/inline/link.rb +100 -0
  64. data/lib/jsduck/inline/link_renderer.rb +70 -0
  65. data/lib/jsduck/inline/video.rb +61 -0
  66. data/lib/jsduck/inline_examples.rb +94 -0
  67. data/lib/jsduck/js/associator.rb +224 -0
  68. data/lib/jsduck/js/ast.rb +69 -0
  69. data/lib/jsduck/js/class.rb +248 -0
  70. data/lib/jsduck/js/evaluator.rb +70 -0
  71. data/lib/jsduck/js/event.rb +34 -0
  72. data/lib/jsduck/js/ext_define.rb +46 -0
  73. data/lib/jsduck/js/ext_patterns.rb +75 -0
  74. data/lib/jsduck/js/fires.rb +42 -0
  75. data/lib/jsduck/js/listener.rb +35 -0
  76. data/lib/jsduck/js/method.rb +99 -0
  77. data/lib/jsduck/js/method_calls.rb +40 -0
  78. data/lib/jsduck/js/node.rb +267 -0
  79. data/lib/jsduck/js/node_array.rb +36 -0
  80. data/lib/jsduck/js/parser.rb +44 -0
  81. data/lib/jsduck/js/property.rb +81 -0
  82. data/lib/jsduck/js/returns.rb +211 -0
  83. data/lib/jsduck/js/rkelly_adapter.rb +587 -0
  84. data/lib/jsduck/js/scoped_traverser.rb +42 -0
  85. data/lib/jsduck/js/serializer.rb +263 -0
  86. data/lib/jsduck/js/utils.rb +21 -0
  87. data/lib/jsduck/logger.rb +186 -0
  88. data/lib/jsduck/member_registry.rb +41 -0
  89. data/lib/jsduck/members_index.rb +141 -0
  90. data/lib/jsduck/merger.rb +83 -0
  91. data/lib/jsduck/news.rb +149 -0
  92. data/lib/jsduck/options/config.rb +35 -0
  93. data/lib/jsduck/options/helpful_parser.rb +111 -0
  94. data/lib/jsduck/options/input_files.rb +60 -0
  95. data/lib/jsduck/options/jsb.rb +25 -0
  96. data/lib/jsduck/options/parser.rb +968 -0
  97. data/lib/jsduck/options/processor.rb +47 -0
  98. data/lib/jsduck/options/record.rb +51 -0
  99. data/lib/jsduck/output_dir.rb +29 -0
  100. data/lib/jsduck/params_merger.rb +47 -0
  101. data/lib/jsduck/parser.rb +76 -0
  102. data/lib/jsduck/process/accessors.rb +152 -0
  103. data/lib/jsduck/process/circular_deps.rb +58 -0
  104. data/lib/jsduck/process/components.rb +19 -0
  105. data/lib/jsduck/process/enums.rb +90 -0
  106. data/lib/jsduck/process/ext4_events.rb +46 -0
  107. data/lib/jsduck/process/fires.rb +71 -0
  108. data/lib/jsduck/process/global_members.rb +35 -0
  109. data/lib/jsduck/process/ignored_classes.rb +16 -0
  110. data/lib/jsduck/process/importer.rb +75 -0
  111. data/lib/jsduck/process/inherit_class.rb +58 -0
  112. data/lib/jsduck/process/inherit_doc.rb +32 -0
  113. data/lib/jsduck/process/inherit_members.rb +259 -0
  114. data/lib/jsduck/process/lint.rb +118 -0
  115. data/lib/jsduck/process/no_doc.rb +50 -0
  116. data/lib/jsduck/process/overrides.rb +99 -0
  117. data/lib/jsduck/process/return_values.rb +72 -0
  118. data/lib/jsduck/process/versions.rb +137 -0
  119. data/lib/jsduck/relations.rb +95 -0
  120. data/lib/jsduck/render/class.rb +152 -0
  121. data/lib/jsduck/render/sidebar.rb +97 -0
  122. data/lib/jsduck/render/signature_util.rb +14 -0
  123. data/lib/jsduck/render/subproperties.rb +117 -0
  124. data/lib/jsduck/render/tags.rb +50 -0
  125. data/lib/jsduck/source/file.rb +89 -0
  126. data/lib/jsduck/tag/abstract.rb +11 -0
  127. data/lib/jsduck/tag/accessor.rb +10 -0
  128. data/lib/jsduck/tag/alias.rb +42 -0
  129. data/lib/jsduck/tag/alternate_class_names.rb +13 -0
  130. data/lib/jsduck/tag/aside.rb +71 -0
  131. data/lib/jsduck/tag/author.rb +30 -0
  132. data/lib/jsduck/tag/boolean_tag.rb +24 -0
  133. data/lib/jsduck/tag/cfg.rb +79 -0
  134. data/lib/jsduck/tag/chainable.rb +12 -0
  135. data/lib/jsduck/tag/class.rb +77 -0
  136. data/lib/jsduck/tag/class_list_tag.rb +40 -0
  137. data/lib/jsduck/tag/component.rb +19 -0
  138. data/lib/jsduck/tag/constructor.rb +24 -0
  139. data/lib/jsduck/tag/css_mixin.rb +31 -0
  140. data/lib/jsduck/tag/css_var.rb +50 -0
  141. data/lib/jsduck/tag/default.rb +25 -0
  142. data/lib/jsduck/tag/deprecated.rb +23 -0
  143. data/lib/jsduck/tag/deprecated_tag.rb +60 -0
  144. data/lib/jsduck/tag/doc.rb +32 -0
  145. data/lib/jsduck/tag/docauthor.rb +12 -0
  146. data/lib/jsduck/tag/enum.rb +67 -0
  147. data/lib/jsduck/tag/event.rb +36 -0
  148. data/lib/jsduck/tag/evented.rb +10 -0
  149. data/lib/jsduck/tag/experimental.rb +28 -0
  150. data/lib/jsduck/tag/extends.rb +39 -0
  151. data/lib/jsduck/tag/fires.rb +55 -0
  152. data/lib/jsduck/tag/ftype.rb +19 -0
  153. data/lib/jsduck/tag/hide.rb +11 -0
  154. data/lib/jsduck/tag/icons/cfg.png +0 -0
  155. data/lib/jsduck/tag/icons/class-large.png +0 -0
  156. data/lib/jsduck/tag/icons/class-redirect.png +0 -0
  157. data/lib/jsduck/tag/icons/class.png +0 -0
  158. data/lib/jsduck/tag/icons/component-large.png +0 -0
  159. data/lib/jsduck/tag/icons/component-redirect.png +0 -0
  160. data/lib/jsduck/tag/icons/component.png +0 -0
  161. data/lib/jsduck/tag/icons/css_mixin.png +0 -0
  162. data/lib/jsduck/tag/icons/css_var.png +0 -0
  163. data/lib/jsduck/tag/icons/event.png +0 -0
  164. data/lib/jsduck/tag/icons/listener.png +0 -0
  165. data/lib/jsduck/tag/icons/method.png +0 -0
  166. data/lib/jsduck/tag/icons/property.png +0 -0
  167. data/lib/jsduck/tag/icons/singleton-large.png +0 -0
  168. data/lib/jsduck/tag/icons/singleton-redirect.png +0 -0
  169. data/lib/jsduck/tag/icons/singleton.png +0 -0
  170. data/lib/jsduck/tag/ignore.rb +12 -0
  171. data/lib/jsduck/tag/inheritable.rb +10 -0
  172. data/lib/jsduck/tag/inheritdoc.rb +48 -0
  173. data/lib/jsduck/tag/listener.rb +36 -0
  174. data/lib/jsduck/tag/localdoc.rb +33 -0
  175. data/lib/jsduck/tag/markdown.rb +14 -0
  176. data/lib/jsduck/tag/member.rb +24 -0
  177. data/lib/jsduck/tag/member_tag.rb +131 -0
  178. data/lib/jsduck/tag/method.rb +75 -0
  179. data/lib/jsduck/tag/mixins.rb +27 -0
  180. data/lib/jsduck/tag/new.rb +32 -0
  181. data/lib/jsduck/tag/override.rb +37 -0
  182. data/lib/jsduck/tag/overrides.rb +29 -0
  183. data/lib/jsduck/tag/param.rb +46 -0
  184. data/lib/jsduck/tag/preventable.rb +37 -0
  185. data/lib/jsduck/tag/private.rb +35 -0
  186. data/lib/jsduck/tag/property.rb +67 -0
  187. data/lib/jsduck/tag/protected.rb +12 -0
  188. data/lib/jsduck/tag/ptype.rb +19 -0
  189. data/lib/jsduck/tag/readonly.rb +11 -0
  190. data/lib/jsduck/tag/removed.rb +32 -0
  191. data/lib/jsduck/tag/required.rb +23 -0
  192. data/lib/jsduck/tag/requires.rb +13 -0
  193. data/lib/jsduck/tag/return.rb +48 -0
  194. data/lib/jsduck/tag/since.rb +30 -0
  195. data/lib/jsduck/tag/singleton.rb +28 -0
  196. data/lib/jsduck/tag/static.rb +12 -0
  197. data/lib/jsduck/tag/subproperties.rb +23 -0
  198. data/lib/jsduck/tag/tag.rb +164 -0
  199. data/lib/jsduck/tag/template.rb +29 -0
  200. data/lib/jsduck/tag/throws.rb +39 -0
  201. data/lib/jsduck/tag/type.rb +38 -0
  202. data/lib/jsduck/tag/uses.rb +13 -0
  203. data/lib/jsduck/tag/xtype.rb +31 -0
  204. data/lib/jsduck/tag_loader.rb +50 -0
  205. data/lib/jsduck/tag_registry.rb +95 -0
  206. data/lib/jsduck/type_parser.rb +388 -0
  207. data/lib/jsduck/util/html.rb +27 -0
  208. data/lib/jsduck/util/io.rb +49 -0
  209. data/lib/jsduck/util/json.rb +60 -0
  210. data/lib/jsduck/util/md5.rb +32 -0
  211. data/lib/jsduck/util/null_object.rb +36 -0
  212. data/lib/jsduck/util/os.rb +14 -0
  213. data/lib/jsduck/util/parallel.rb +38 -0
  214. data/lib/jsduck/util/singleton.rb +35 -0
  215. data/lib/jsduck/util/stdout.rb +33 -0
  216. data/lib/jsduck/version.rb +5 -0
  217. data/lib/jsduck/videos.rb +40 -0
  218. data/lib/jsduck/warning/all.rb +36 -0
  219. data/lib/jsduck/warning/basic.rb +57 -0
  220. data/lib/jsduck/warning/deprecated.rb +40 -0
  221. data/lib/jsduck/warning/nodoc.rb +79 -0
  222. data/lib/jsduck/warning/parser.rb +168 -0
  223. data/lib/jsduck/warning/registry.rb +108 -0
  224. data/lib/jsduck/warning/tag.rb +57 -0
  225. data/lib/jsduck/warning/warn_exception.rb +10 -0
  226. data/lib/jsduck/web/class_icons.rb +76 -0
  227. data/lib/jsduck/web/css.rb +40 -0
  228. data/lib/jsduck/web/data.rb +52 -0
  229. data/lib/jsduck/web/index_html.rb +105 -0
  230. data/lib/jsduck/web/member_icons.rb +43 -0
  231. data/lib/jsduck/web/search.rb +153 -0
  232. data/lib/jsduck/web/source.rb +89 -0
  233. data/lib/jsduck/web/template.rb +51 -0
  234. data/lib/jsduck/web/tree.rb +22 -0
  235. data/lib/jsduck/web/writer.rb +100 -0
  236. data/lib/jsduck/welcome.rb +31 -0
  237. data/template-min/README.md +14 -0
  238. data/template-min/app-0f524ddd276c4019a11a6128932a9c96.js +1 -0
  239. data/template-min/eg-iframe.html +26 -0
  240. data/template-min/extjs/ext-all.js +38 -0
  241. data/template-min/extjs/resources/themes/images/default/boundlist/trigger-arrow.png +0 -0
  242. data/template-min/extjs/resources/themes/images/default/box/corners-blue.gif +0 -0
  243. data/template-min/extjs/resources/themes/images/default/box/corners.gif +0 -0
  244. data/template-min/extjs/resources/themes/images/default/box/l-blue.gif +0 -0
  245. data/template-min/extjs/resources/themes/images/default/box/l.gif +0 -0
  246. data/template-min/extjs/resources/themes/images/default/box/r-blue.gif +0 -0
  247. data/template-min/extjs/resources/themes/images/default/box/r.gif +0 -0
  248. data/template-min/extjs/resources/themes/images/default/box/tb-blue.gif +0 -0
  249. data/template-min/extjs/resources/themes/images/default/box/tb.gif +0 -0
  250. data/template-min/extjs/resources/themes/images/default/btn-group/btn-group-default-framed-corners.gif +0 -0
  251. data/template-min/extjs/resources/themes/images/default/btn-group/btn-group-default-framed-notitle-corners.gif +0 -0
  252. data/template-min/extjs/resources/themes/images/default/btn-group/btn-group-default-framed-notitle-sides.gif +0 -0
  253. data/template-min/extjs/resources/themes/images/default/btn-group/btn-group-default-framed-sides.gif +0 -0
  254. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-bg.gif +0 -0
  255. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-corners.gif +0 -0
  256. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-disabled-bg.gif +0 -0
  257. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-disabled-corners.gif +0 -0
  258. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-disabled-sides.gif +0 -0
  259. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-focus-bg.gif +0 -0
  260. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-focus-corners.gif +0 -0
  261. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-focus-sides.gif +0 -0
  262. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-over-bg.gif +0 -0
  263. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-over-corners.gif +0 -0
  264. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-over-sides.gif +0 -0
  265. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-pressed-bg.gif +0 -0
  266. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-pressed-corners.gif +0 -0
  267. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-pressed-sides.gif +0 -0
  268. data/template-min/extjs/resources/themes/images/default/btn/btn-default-large-sides.gif +0 -0
  269. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-bg.gif +0 -0
  270. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-corners.gif +0 -0
  271. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-disabled-bg.gif +0 -0
  272. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-disabled-corners.gif +0 -0
  273. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-disabled-sides.gif +0 -0
  274. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-focus-bg.gif +0 -0
  275. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-focus-corners.gif +0 -0
  276. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-focus-sides.gif +0 -0
  277. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-over-bg.gif +0 -0
  278. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-over-corners.gif +0 -0
  279. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-over-sides.gif +0 -0
  280. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-pressed-bg.gif +0 -0
  281. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-pressed-corners.gif +0 -0
  282. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-pressed-sides.gif +0 -0
  283. data/template-min/extjs/resources/themes/images/default/btn/btn-default-medium-sides.gif +0 -0
  284. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-bg.gif +0 -0
  285. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-corners.gif +0 -0
  286. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-disabled-bg.gif +0 -0
  287. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-disabled-corners.gif +0 -0
  288. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-disabled-sides.gif +0 -0
  289. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-focus-bg.gif +0 -0
  290. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-focus-corners.gif +0 -0
  291. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-focus-sides.gif +0 -0
  292. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-over-bg.gif +0 -0
  293. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-over-corners.gif +0 -0
  294. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-over-sides.gif +0 -0
  295. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-pressed-bg.gif +0 -0
  296. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-pressed-corners.gif +0 -0
  297. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-pressed-sides.gif +0 -0
  298. data/template-min/extjs/resources/themes/images/default/btn/btn-default-small-sides.gif +0 -0
  299. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-corners.gif +0 -0
  300. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-corners.gif +0 -0
  301. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-sides.gif +0 -0
  302. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-bg.gif +0 -0
  303. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-corners.gif +0 -0
  304. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-sides.gif +0 -0
  305. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-bg.gif +0 -0
  306. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-corners.gif +0 -0
  307. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-sides.gif +0 -0
  308. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-bg.gif +0 -0
  309. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-corners.gif +0 -0
  310. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-sides.gif +0 -0
  311. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-large-sides.gif +0 -0
  312. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-corners.gif +0 -0
  313. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-corners.gif +0 -0
  314. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-sides.gif +0 -0
  315. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-bg.gif +0 -0
  316. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-corners.gif +0 -0
  317. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-sides.gif +0 -0
  318. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-bg.gif +0 -0
  319. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-corners.gif +0 -0
  320. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-sides.gif +0 -0
  321. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-bg.gif +0 -0
  322. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-corners.gif +0 -0
  323. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-sides.gif +0 -0
  324. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-sides.gif +0 -0
  325. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-corners.gif +0 -0
  326. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-corners.gif +0 -0
  327. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-sides.gif +0 -0
  328. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-bg.gif +0 -0
  329. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-corners.gif +0 -0
  330. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-sides.gif +0 -0
  331. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-bg.gif +0 -0
  332. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-corners.gif +0 -0
  333. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-sides.gif +0 -0
  334. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-bg.gif +0 -0
  335. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-corners.gif +0 -0
  336. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-sides.gif +0 -0
  337. data/template-min/extjs/resources/themes/images/default/btn/btn-default-toolbar-small-sides.gif +0 -0
  338. data/template-min/extjs/resources/themes/images/default/button/arrow.gif +0 -0
  339. data/template-min/extjs/resources/themes/images/default/button/btn.gif +0 -0
  340. data/template-min/extjs/resources/themes/images/default/button/group-cs.gif +0 -0
  341. data/template-min/extjs/resources/themes/images/default/button/group-lr.gif +0 -0
  342. data/template-min/extjs/resources/themes/images/default/button/group-tb.gif +0 -0
  343. data/template-min/extjs/resources/themes/images/default/button/s-arrow-b-noline.gif +0 -0
  344. data/template-min/extjs/resources/themes/images/default/button/s-arrow-b.gif +0 -0
  345. data/template-min/extjs/resources/themes/images/default/button/s-arrow-bo.gif +0 -0
  346. data/template-min/extjs/resources/themes/images/default/button/s-arrow-light.gif +0 -0
  347. data/template-min/extjs/resources/themes/images/default/button/s-arrow-noline.gif +0 -0
  348. data/template-min/extjs/resources/themes/images/default/button/s-arrow-o.gif +0 -0
  349. data/template-min/extjs/resources/themes/images/default/button/s-arrow.gif +0 -0
  350. data/template-min/extjs/resources/themes/images/default/datepicker/datepicker-footer-bg.gif +0 -0
  351. data/template-min/extjs/resources/themes/images/default/datepicker/datepicker-footer-bg.png +0 -0
  352. data/template-min/extjs/resources/themes/images/default/datepicker/datepicker-header-bg.gif +0 -0
  353. data/template-min/extjs/resources/themes/images/default/datepicker/datepicker-header-bg.png +0 -0
  354. data/template-min/extjs/resources/themes/images/default/dd/drop-add.gif +0 -0
  355. data/template-min/extjs/resources/themes/images/default/dd/drop-no.gif +0 -0
  356. data/template-min/extjs/resources/themes/images/default/dd/drop-yes.gif +0 -0
  357. data/template-min/extjs/resources/themes/images/default/editor/tb-sprite.gif +0 -0
  358. data/template-min/extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-corners.gif +0 -0
  359. data/template-min/extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-corners.gif +0 -0
  360. data/template-min/extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-sides.gif +0 -0
  361. data/template-min/extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-sides.gif +0 -0
  362. data/template-min/extjs/resources/themes/images/default/form/checkbox.gif +0 -0
  363. data/template-min/extjs/resources/themes/images/default/form/clear-trigger.gif +0 -0
  364. data/template-min/extjs/resources/themes/images/default/form/date-trigger.gif +0 -0
  365. data/template-min/extjs/resources/themes/images/default/form/error-tip-corners.gif +0 -0
  366. data/template-min/extjs/resources/themes/images/default/form/exclamation.gif +0 -0
  367. data/template-min/extjs/resources/themes/images/default/form/radio.gif +0 -0
  368. data/template-min/extjs/resources/themes/images/default/form/search-trigger.gif +0 -0
  369. data/template-min/extjs/resources/themes/images/default/form/spinner-small.gif +0 -0
  370. data/template-min/extjs/resources/themes/images/default/form/spinner.gif +0 -0
  371. data/template-min/extjs/resources/themes/images/default/form/text-bg.gif +0 -0
  372. data/template-min/extjs/resources/themes/images/default/form/trigger-square.gif +0 -0
  373. data/template-min/extjs/resources/themes/images/default/form/trigger-tpl.gif +0 -0
  374. data/template-min/extjs/resources/themes/images/default/form/trigger.gif +0 -0
  375. data/template-min/extjs/resources/themes/images/default/grid/arrow-left-white.gif +0 -0
  376. data/template-min/extjs/resources/themes/images/default/grid/arrow-right-white.gif +0 -0
  377. data/template-min/extjs/resources/themes/images/default/grid/cell-special-bg.gif +0 -0
  378. data/template-min/extjs/resources/themes/images/default/grid/cell-special-bg.png +0 -0
  379. data/template-min/extjs/resources/themes/images/default/grid/cell-special-selected-bg.gif +0 -0
  380. data/template-min/extjs/resources/themes/images/default/grid/cell-special-selected-bg.png +0 -0
  381. data/template-min/extjs/resources/themes/images/default/grid/checked.gif +0 -0
  382. data/template-min/extjs/resources/themes/images/default/grid/col-move-bottom.gif +0 -0
  383. data/template-min/extjs/resources/themes/images/default/grid/col-move-top.gif +0 -0
  384. data/template-min/extjs/resources/themes/images/default/grid/column-header-bg.gif +0 -0
  385. data/template-min/extjs/resources/themes/images/default/grid/column-header-bg.png +0 -0
  386. data/template-min/extjs/resources/themes/images/default/grid/column-header-over-bg.gif +0 -0
  387. data/template-min/extjs/resources/themes/images/default/grid/column-header-over-bg.png +0 -0
  388. data/template-min/extjs/resources/themes/images/default/grid/columns.gif +0 -0
  389. data/template-min/extjs/resources/themes/images/default/grid/dd-insert-arrow-left.gif +0 -0
  390. data/template-min/extjs/resources/themes/images/default/grid/dd-insert-arrow-left.png +0 -0
  391. data/template-min/extjs/resources/themes/images/default/grid/dd-insert-arrow-right.gif +0 -0
  392. data/template-min/extjs/resources/themes/images/default/grid/dd-insert-arrow-right.png +0 -0
  393. data/template-min/extjs/resources/themes/images/default/grid/dirty.gif +0 -0
  394. data/template-min/extjs/resources/themes/images/default/grid/done.gif +0 -0
  395. data/template-min/extjs/resources/themes/images/default/grid/drop-no.gif +0 -0
  396. data/template-min/extjs/resources/themes/images/default/grid/drop-yes.gif +0 -0
  397. data/template-min/extjs/resources/themes/images/default/grid/footer-bg.gif +0 -0
  398. data/template-min/extjs/resources/themes/images/default/grid/grid-blue-hd.gif +0 -0
  399. data/template-min/extjs/resources/themes/images/default/grid/grid-blue-split.gif +0 -0
  400. data/template-min/extjs/resources/themes/images/default/grid/grid-hrow.gif +0 -0
  401. data/template-min/extjs/resources/themes/images/default/grid/grid-loading.gif +0 -0
  402. data/template-min/extjs/resources/themes/images/default/grid/grid-split.gif +0 -0
  403. data/template-min/extjs/resources/themes/images/default/grid/grid-vista-hd.gif +0 -0
  404. data/template-min/extjs/resources/themes/images/default/grid/grid3-hd-btn.gif +0 -0
  405. data/template-min/extjs/resources/themes/images/default/grid/grid3-hrow-over.gif +0 -0
  406. data/template-min/extjs/resources/themes/images/default/grid/grid3-hrow.gif +0 -0
  407. data/template-min/extjs/resources/themes/images/default/grid/grid3-rowheader.gif +0 -0
  408. data/template-min/extjs/resources/themes/images/default/grid/group-by.gif +0 -0
  409. data/template-min/extjs/resources/themes/images/default/grid/group-collapse.gif +0 -0
  410. data/template-min/extjs/resources/themes/images/default/grid/group-expand-sprite.gif +0 -0
  411. data/template-min/extjs/resources/themes/images/default/grid/group-expand.gif +0 -0
  412. data/template-min/extjs/resources/themes/images/default/grid/hd-pop.gif +0 -0
  413. data/template-min/extjs/resources/themes/images/default/grid/hmenu-asc.gif +0 -0
  414. data/template-min/extjs/resources/themes/images/default/grid/hmenu-desc.gif +0 -0
  415. data/template-min/extjs/resources/themes/images/default/grid/hmenu-lock.gif +0 -0
  416. data/template-min/extjs/resources/themes/images/default/grid/hmenu-lock.png +0 -0
  417. data/template-min/extjs/resources/themes/images/default/grid/hmenu-unlock.gif +0 -0
  418. data/template-min/extjs/resources/themes/images/default/grid/hmenu-unlock.png +0 -0
  419. data/template-min/extjs/resources/themes/images/default/grid/invalid_line.gif +0 -0
  420. data/template-min/extjs/resources/themes/images/default/grid/loading.gif +0 -0
  421. data/template-min/extjs/resources/themes/images/default/grid/mso-hd.gif +0 -0
  422. data/template-min/extjs/resources/themes/images/default/grid/nowait.gif +0 -0
  423. data/template-min/extjs/resources/themes/images/default/grid/page-first-disabled.gif +0 -0
  424. data/template-min/extjs/resources/themes/images/default/grid/page-first.gif +0 -0
  425. data/template-min/extjs/resources/themes/images/default/grid/page-last-disabled.gif +0 -0
  426. data/template-min/extjs/resources/themes/images/default/grid/page-last.gif +0 -0
  427. data/template-min/extjs/resources/themes/images/default/grid/page-next-disabled.gif +0 -0
  428. data/template-min/extjs/resources/themes/images/default/grid/page-next.gif +0 -0
  429. data/template-min/extjs/resources/themes/images/default/grid/page-prev-disabled.gif +0 -0
  430. data/template-min/extjs/resources/themes/images/default/grid/page-prev.gif +0 -0
  431. data/template-min/extjs/resources/themes/images/default/grid/pick-button.gif +0 -0
  432. data/template-min/extjs/resources/themes/images/default/grid/property-cell-bg.gif +0 -0
  433. data/template-min/extjs/resources/themes/images/default/grid/property-cell-selected-bg.gif +0 -0
  434. data/template-min/extjs/resources/themes/images/default/grid/refresh-disabled.gif +0 -0
  435. data/template-min/extjs/resources/themes/images/default/grid/refresh.gif +0 -0
  436. data/template-min/extjs/resources/themes/images/default/grid/row-check-sprite.gif +0 -0
  437. data/template-min/extjs/resources/themes/images/default/grid/row-expand-sprite.gif +0 -0
  438. data/template-min/extjs/resources/themes/images/default/grid/row-over.gif +0 -0
  439. data/template-min/extjs/resources/themes/images/default/grid/row-sel.gif +0 -0
  440. data/template-min/extjs/resources/themes/images/default/grid/sort-hd.gif +0 -0
  441. data/template-min/extjs/resources/themes/images/default/grid/sort_asc.gif +0 -0
  442. data/template-min/extjs/resources/themes/images/default/grid/sort_desc.gif +0 -0
  443. data/template-min/extjs/resources/themes/images/default/grid/unchecked.gif +0 -0
  444. data/template-min/extjs/resources/themes/images/default/grid/wait.gif +0 -0
  445. data/template-min/extjs/resources/themes/images/default/layout/mini-bottom.gif +0 -0
  446. data/template-min/extjs/resources/themes/images/default/layout/mini-left.gif +0 -0
  447. data/template-min/extjs/resources/themes/images/default/layout/mini-right.gif +0 -0
  448. data/template-min/extjs/resources/themes/images/default/layout/mini-top.gif +0 -0
  449. data/template-min/extjs/resources/themes/images/default/menu/checked.gif +0 -0
  450. data/template-min/extjs/resources/themes/images/default/menu/group-checked.gif +0 -0
  451. data/template-min/extjs/resources/themes/images/default/menu/item-over.gif +0 -0
  452. data/template-min/extjs/resources/themes/images/default/menu/menu-item-active-bg.gif +0 -0
  453. data/template-min/extjs/resources/themes/images/default/menu/menu-item-active-corners.gif +0 -0
  454. data/template-min/extjs/resources/themes/images/default/menu/menu-item-active-sides.gif +0 -0
  455. data/template-min/extjs/resources/themes/images/default/menu/menu-parent.gif +0 -0
  456. data/template-min/extjs/resources/themes/images/default/menu/menu.gif +0 -0
  457. data/template-min/extjs/resources/themes/images/default/menu/unchecked.gif +0 -0
  458. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-bottom-bg.gif +0 -0
  459. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-bg.gif +0 -0
  460. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-corners.gif +0 -0
  461. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-sides.gif +0 -0
  462. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-bg.gif +0 -0
  463. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-corners.gif +0 -0
  464. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-sides.gif +0 -0
  465. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-bg.gif +0 -0
  466. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-corners.gif +0 -0
  467. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-sides.gif +0 -0
  468. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-bg.gif +0 -0
  469. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-corners.gif +0 -0
  470. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-sides.gif +0 -0
  471. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-bg.gif +0 -0
  472. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-corners.gif +0 -0
  473. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-sides.gif +0 -0
  474. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-bg.gif +0 -0
  475. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-corners.gif +0 -0
  476. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-sides.gif +0 -0
  477. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-bg.gif +0 -0
  478. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-corners.gif +0 -0
  479. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-sides.gif +0 -0
  480. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-bg.gif +0 -0
  481. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-corners.gif +0 -0
  482. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-sides.gif +0 -0
  483. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-left-bg.gif +0 -0
  484. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-right-bg.gif +0 -0
  485. data/template-min/extjs/resources/themes/images/default/panel-header/panel-header-default-top-bg.gif +0 -0
  486. data/template-min/extjs/resources/themes/images/default/panel/panel-default-framed-corners.gif +0 -0
  487. data/template-min/extjs/resources/themes/images/default/panel/panel-default-framed-sides.gif +0 -0
  488. data/template-min/extjs/resources/themes/images/default/progress/progress-default-bg.gif +0 -0
  489. data/template-min/extjs/resources/themes/images/default/shared/blue-loading.gif +0 -0
  490. data/template-min/extjs/resources/themes/images/default/shared/calendar.gif +0 -0
  491. data/template-min/extjs/resources/themes/images/default/shared/glass-bg.gif +0 -0
  492. data/template-min/extjs/resources/themes/images/default/shared/hd-sprite.gif +0 -0
  493. data/template-min/extjs/resources/themes/images/default/shared/icon-error.gif +0 -0
  494. data/template-min/extjs/resources/themes/images/default/shared/icon-info.gif +0 -0
  495. data/template-min/extjs/resources/themes/images/default/shared/icon-question.gif +0 -0
  496. data/template-min/extjs/resources/themes/images/default/shared/icon-warning.gif +0 -0
  497. data/template-min/extjs/resources/themes/images/default/shared/large-loading.gif +0 -0
  498. data/template-min/extjs/resources/themes/images/default/shared/left-btn.gif +0 -0
  499. data/template-min/extjs/resources/themes/images/default/shared/loading-balls.gif +0 -0
  500. data/template-min/extjs/resources/themes/images/default/shared/right-btn.gif +0 -0
  501. data/template-min/extjs/resources/themes/images/default/shared/shadow-c.png +0 -0
  502. data/template-min/extjs/resources/themes/images/default/shared/shadow-lr.png +0 -0
  503. data/template-min/extjs/resources/themes/images/default/shared/shadow.png +0 -0
  504. data/template-min/extjs/resources/themes/images/default/shared/warning.gif +0 -0
  505. data/template-min/extjs/resources/themes/images/default/sizer/e-handle-dark.gif +0 -0
  506. data/template-min/extjs/resources/themes/images/default/sizer/e-handle.gif +0 -0
  507. data/template-min/extjs/resources/themes/images/default/sizer/ne-handle-dark.gif +0 -0
  508. data/template-min/extjs/resources/themes/images/default/sizer/ne-handle.gif +0 -0
  509. data/template-min/extjs/resources/themes/images/default/sizer/nw-handle-dark.gif +0 -0
  510. data/template-min/extjs/resources/themes/images/default/sizer/nw-handle.gif +0 -0
  511. data/template-min/extjs/resources/themes/images/default/sizer/s-handle-dark.gif +0 -0
  512. data/template-min/extjs/resources/themes/images/default/sizer/s-handle.gif +0 -0
  513. data/template-min/extjs/resources/themes/images/default/sizer/se-handle-dark.gif +0 -0
  514. data/template-min/extjs/resources/themes/images/default/sizer/se-handle.gif +0 -0
  515. data/template-min/extjs/resources/themes/images/default/sizer/square.gif +0 -0
  516. data/template-min/extjs/resources/themes/images/default/sizer/sw-handle-dark.gif +0 -0
  517. data/template-min/extjs/resources/themes/images/default/sizer/sw-handle.gif +0 -0
  518. data/template-min/extjs/resources/themes/images/default/slider/slider-bg.gif +0 -0
  519. data/template-min/extjs/resources/themes/images/default/slider/slider-bg.png +0 -0
  520. data/template-min/extjs/resources/themes/images/default/slider/slider-thumb.gif +0 -0
  521. data/template-min/extjs/resources/themes/images/default/slider/slider-thumb.png +0 -0
  522. data/template-min/extjs/resources/themes/images/default/slider/slider-v-bg.gif +0 -0
  523. data/template-min/extjs/resources/themes/images/default/slider/slider-v-bg.png +0 -0
  524. data/template-min/extjs/resources/themes/images/default/slider/slider-v-thumb.gif +0 -0
  525. data/template-min/extjs/resources/themes/images/default/slider/slider-v-thumb.png +0 -0
  526. data/template-min/extjs/resources/themes/images/default/tab-bar/scroll-left.gif +0 -0
  527. data/template-min/extjs/resources/themes/images/default/tab-bar/scroll-right.gif +0 -0
  528. data/template-min/extjs/resources/themes/images/default/tab-bar/tab-bar-default-bg.gif +0 -0
  529. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-active-bg.gif +0 -0
  530. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-active-corners.gif +0 -0
  531. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-active-sides.gif +0 -0
  532. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-bg.gif +0 -0
  533. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-corners.gif +0 -0
  534. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-bg.gif +0 -0
  535. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-corners.gif +0 -0
  536. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-sides.gif +0 -0
  537. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-over-bg.gif +0 -0
  538. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-over-corners.gif +0 -0
  539. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-over-sides.gif +0 -0
  540. data/template-min/extjs/resources/themes/images/default/tab/tab-default-bottom-sides.gif +0 -0
  541. data/template-min/extjs/resources/themes/images/default/tab/tab-default-close.gif +0 -0
  542. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-active-bg.gif +0 -0
  543. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-active-corners.gif +0 -0
  544. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-active-sides.gif +0 -0
  545. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-bg.gif +0 -0
  546. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-corners.gif +0 -0
  547. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-disabled-bg.gif +0 -0
  548. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-disabled-corners.gif +0 -0
  549. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-disabled-sides.gif +0 -0
  550. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-over-bg.gif +0 -0
  551. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-over-corners.gif +0 -0
  552. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-over-sides.gif +0 -0
  553. data/template-min/extjs/resources/themes/images/default/tab/tab-default-top-sides.gif +0 -0
  554. data/template-min/extjs/resources/themes/images/default/tip/tip-corners.gif +0 -0
  555. data/template-min/extjs/resources/themes/images/default/tip/tip-sides.gif +0 -0
  556. data/template-min/extjs/resources/themes/images/default/toolbar/more.gif +0 -0
  557. data/template-min/extjs/resources/themes/images/default/toolbar/scroll-left.gif +0 -0
  558. data/template-min/extjs/resources/themes/images/default/toolbar/scroll-right.gif +0 -0
  559. data/template-min/extjs/resources/themes/images/default/toolbar/toolbar-default-bg.gif +0 -0
  560. data/template-min/extjs/resources/themes/images/default/tools/tool-sprite-tpl.gif +0 -0
  561. data/template-min/extjs/resources/themes/images/default/tools/tool-sprites.gif +0 -0
  562. data/template-min/extjs/resources/themes/images/default/tools/tools-sprites-trans.gif +0 -0
  563. data/template-min/extjs/resources/themes/images/default/tree/arrows.gif +0 -0
  564. data/template-min/extjs/resources/themes/images/default/tree/drop-above.gif +0 -0
  565. data/template-min/extjs/resources/themes/images/default/tree/drop-add.gif +0 -0
  566. data/template-min/extjs/resources/themes/images/default/tree/drop-append.gif +0 -0
  567. data/template-min/extjs/resources/themes/images/default/tree/drop-below.gif +0 -0
  568. data/template-min/extjs/resources/themes/images/default/tree/drop-between.gif +0 -0
  569. data/template-min/extjs/resources/themes/images/default/tree/drop-no.gif +0 -0
  570. data/template-min/extjs/resources/themes/images/default/tree/drop-over.gif +0 -0
  571. data/template-min/extjs/resources/themes/images/default/tree/drop-under.gif +0 -0
  572. data/template-min/extjs/resources/themes/images/default/tree/drop-yes.gif +0 -0
  573. data/template-min/extjs/resources/themes/images/default/tree/elbow-end-minus-nl.gif +0 -0
  574. data/template-min/extjs/resources/themes/images/default/tree/elbow-end-minus.gif +0 -0
  575. data/template-min/extjs/resources/themes/images/default/tree/elbow-end-plus-nl.gif +0 -0
  576. data/template-min/extjs/resources/themes/images/default/tree/elbow-end-plus.gif +0 -0
  577. data/template-min/extjs/resources/themes/images/default/tree/elbow-end.gif +0 -0
  578. data/template-min/extjs/resources/themes/images/default/tree/elbow-line.gif +0 -0
  579. data/template-min/extjs/resources/themes/images/default/tree/elbow-minus-nl.gif +0 -0
  580. data/template-min/extjs/resources/themes/images/default/tree/elbow-minus.gif +0 -0
  581. data/template-min/extjs/resources/themes/images/default/tree/elbow-plus-nl.gif +0 -0
  582. data/template-min/extjs/resources/themes/images/default/tree/elbow-plus.gif +0 -0
  583. data/template-min/extjs/resources/themes/images/default/tree/elbow.gif +0 -0
  584. data/template-min/extjs/resources/themes/images/default/tree/folder-open.gif +0 -0
  585. data/template-min/extjs/resources/themes/images/default/tree/folder.gif +0 -0
  586. data/template-min/extjs/resources/themes/images/default/tree/leaf.gif +0 -0
  587. data/template-min/extjs/resources/themes/images/default/tree/loading.gif +0 -0
  588. data/template-min/extjs/resources/themes/images/default/tree/s.gif +0 -0
  589. data/template-min/extjs/resources/themes/images/default/util/splitter/mini-bottom.gif +0 -0
  590. data/template-min/extjs/resources/themes/images/default/util/splitter/mini-left.gif +0 -0
  591. data/template-min/extjs/resources/themes/images/default/util/splitter/mini-right.gif +0 -0
  592. data/template-min/extjs/resources/themes/images/default/util/splitter/mini-top.gif +0 -0
  593. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-bottom-corners.gif +0 -0
  594. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-bottom-sides.gif +0 -0
  595. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-bottom-corners.gif +0 -0
  596. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-bottom-sides.gif +0 -0
  597. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-left-corners.gif +0 -0
  598. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-left-sides.gif +0 -0
  599. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-right-corners.gif +0 -0
  600. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-right-sides.gif +0 -0
  601. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-top-corners.gif +0 -0
  602. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-collapsed-top-sides.gif +0 -0
  603. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-left-corners.gif +0 -0
  604. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-left-sides.gif +0 -0
  605. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-right-corners.gif +0 -0
  606. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-right-sides.gif +0 -0
  607. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-top-corners.gif +0 -0
  608. data/template-min/extjs/resources/themes/images/default/window-header/window-header-default-top-sides.gif +0 -0
  609. data/template-min/extjs/resources/themes/images/default/window/window-default-corners.gif +0 -0
  610. data/template-min/extjs/resources/themes/images/default/window/window-default-sides.gif +0 -0
  611. data/template-min/favicon.ico +0 -0
  612. data/template-min/index-template.html +35 -0
  613. data/template-min/index.php +95 -0
  614. data/template-min/mobile-redirect.js +1 -0
  615. data/template-min/print-template.html +52 -0
  616. data/template-min/resources/css/app-de670120f43fdad3091a0cc2c10daadb.css +1 -0
  617. data/template-min/resources/images/ajax-loader.gif +0 -0
  618. data/template-min/resources/images/arrows.png +0 -0
  619. data/template-min/resources/images/comment-bubble.png +0 -0
  620. data/template-min/resources/images/comment.png +0 -0
  621. data/template-min/resources/images/default-guide.png +0 -0
  622. data/template-min/resources/images/doc-m.png +0 -0
  623. data/template-min/resources/images/down-arr.png +0 -0
  624. data/template-min/resources/images/elbow-end.gif +0 -0
  625. data/template-min/resources/images/example-icons.png +0 -0
  626. data/template-min/resources/images/expandcollapse.png +0 -0
  627. data/template-min/resources/images/group-expand-sprite.gif +0 -0
  628. data/template-min/resources/images/header.png +0 -0
  629. data/template-min/resources/images/hero-extjs4-alt.png +0 -0
  630. data/template-min/resources/images/icons.png +0 -0
  631. data/template-min/resources/images/icons.xcf +0 -0
  632. data/template-min/resources/images/link-green-standard-over.png +0 -0
  633. data/template-min/resources/images/link-green-standard.png +0 -0
  634. data/template-min/resources/images/loading.gif +0 -0
  635. data/template-min/resources/images/logo-screen-noglow.png +0 -0
  636. data/template-min/resources/images/logo.png +0 -0
  637. data/template-min/resources/images/member-collapsed.gif +0 -0
  638. data/template-min/resources/images/member-expanded.gif +0 -0
  639. data/template-min/resources/images/member-hover.gif +0 -0
  640. data/template-min/resources/images/more.png +0 -0
  641. data/template-min/resources/images/phone-l.jpg +0 -0
  642. data/template-min/resources/images/phone-p.jpg +0 -0
  643. data/template-min/resources/images/phone-small-l.jpg +0 -0
  644. data/template-min/resources/images/phone-small-p.jpg +0 -0
  645. data/template-min/resources/images/print.png +0 -0
  646. data/template-min/resources/images/sample-over.gif +0 -0
  647. data/template-min/resources/images/search-box.png +0 -0
  648. data/template-min/resources/images/tablet-l.jpg +0 -0
  649. data/template-min/resources/images/tablet-p.jpg +0 -0
  650. data/template-min/resources/images/tabs.png +0 -0
  651. data/template-min/resources/images/text-bg.gif +0 -0
  652. data/template-min/resources/images/vote-arrows.png +0 -0
  653. data/template-min/resources/images/welcome-bg-js4.gif +0 -0
  654. data/template-min/resources/images/x.png +0 -0
  655. data/template-min/resources/images/x12.png +0 -0
  656. data/template-min/resources/prettify/prettify.css +1 -0
  657. data/template-min/resources/prettify/prettify.js +30 -0
  658. data/template-min/template.html +44 -0
  659. metadata +828 -0
@@ -0,0 +1,36 @@
1
+ require "jsduck/js/node"
2
+
3
+ module JsDuck
4
+ module Js
5
+
6
+ # Wraps around array of AST nodes.
7
+ class NodeArray
8
+ # Initialized with array of AST Hashes from Esprima.
9
+ def initialize(nodes)
10
+ @nodes = nodes || []
11
+ end
12
+
13
+ # Returns a child AST node as AstNode class.
14
+ def [](i)
15
+ Js::Node.create(@nodes[i])
16
+ end
17
+
18
+ # The length of array
19
+ def length
20
+ @nodes.length
21
+ end
22
+
23
+ # Iterates over all the AstNodes in array.
24
+ def each
25
+ @nodes.each {|p| yield(Js::Node.create(p)) }
26
+ end
27
+
28
+ # Maps over all the AstNodes in array.
29
+ def map
30
+ @nodes.map {|p| yield(Js::Node.create(p)) }
31
+ end
32
+
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,44 @@
1
+ require 'jsduck/js/rkelly_adapter'
2
+ require 'jsduck/js/associator'
3
+ require 'rkelly'
4
+
5
+ module JsDuck
6
+ module Js
7
+
8
+ # A JavaScript parser implementation that uses RKelly and adapts
9
+ # its output to be the same as the old Esprima parser used to
10
+ # produce.
11
+ class Parser
12
+ ADAPTER = Js::RKellyAdapter.new
13
+
14
+ def initialize(input, options={})
15
+ @input = input
16
+ end
17
+
18
+ # Parses JavaScript source code with RKelly, turns RKelly AST
19
+ # into Esprima AST, and associate comments with syntax nodes.
20
+ def parse
21
+ parser = RKelly::Parser.new
22
+ ast = parser.parse(@input)
23
+ unless ast
24
+ raise syntax_error(parser)
25
+ end
26
+
27
+ ast = ADAPTER.adapt(ast)
28
+ # Adjust Program node range
29
+ ast["range"] = [0, @input.length-1]
30
+ return Js::Associator.new(@input).associate(ast)
31
+ end
32
+
33
+ def syntax_error(parser)
34
+ token = parser.stopped_at
35
+ if token
36
+ "Invalid JavaScript syntax: Unexpected '#{token.value}' on line #{token.range.from.line}"
37
+ else
38
+ "Invalid JavaScript syntax: Unexpected end of file"
39
+ end
40
+ end
41
+ end
42
+
43
+ end
44
+ end
@@ -0,0 +1,81 @@
1
+ require "jsduck/util/singleton"
2
+
3
+ module JsDuck
4
+ module Js
5
+
6
+ # Auto-detection of properties.
7
+ class Property
8
+ include Util::Singleton
9
+
10
+ # Checks if AST node is a property, and if so, returns doc-hash
11
+ # with property name and various auto-detected attributes.
12
+ # When not a property returns nil.
13
+ def detect(ast)
14
+ exp = ast.expression_statement? ? ast["expression"] : nil
15
+ var = ast.variable_declaration? ? ast["declarations"][0] : nil
16
+
17
+ # foo = ...
18
+ if exp && exp.assignment_expression?
19
+ make(exp["left"].to_s, exp["right"])
20
+
21
+ # var foo = ...
22
+ elsif var
23
+ make(var["id"].to_s, var["init"])
24
+
25
+ # foo: ...
26
+ elsif ast.property?
27
+ make(ast["key"].key_value, ast["value"])
28
+
29
+ # foo;
30
+ elsif exp && exp.identifier?
31
+ make(exp.to_s)
32
+
33
+ # "foo" (inside some expression)
34
+ elsif ast.string?
35
+ make(ast.to_value)
36
+
37
+ # "foo"; (as a statement of it's own)
38
+ elsif exp && exp.string?
39
+ make(exp.to_value)
40
+
41
+ # Object.defineProperty(obj, "prop", {value: x})
42
+ elsif exp && exp.define_property?
43
+ name = exp["arguments"][1].to_value
44
+
45
+ if exp.object_descriptor("set")
46
+ # Object with a setter is not readonly
47
+ make(name)
48
+ elsif exp.object_descriptor("get")
49
+ # Object with a getter and no setter is readonly
50
+ make(name, nil, true)
51
+ else
52
+ writable = exp.object_descriptor("writable")
53
+ readonly = writable ? !writable.to_value : true
54
+ make(name, exp.object_descriptor("value"), readonly)
55
+ end
56
+
57
+ else
58
+ nil
59
+ end
60
+ end
61
+
62
+ # Produces a doc-hash for a property.
63
+ def make(name=nil, ast=nil, readonly=nil)
64
+ return {
65
+ :tagname => :property,
66
+ :name => name,
67
+ :type => ast && ast.value_type,
68
+ :default => ast && default(ast),
69
+ :readonly => readonly,
70
+ }
71
+ end
72
+
73
+ private
74
+
75
+ def default(ast)
76
+ ast.to_value != nil ? ast.to_s : nil
77
+ end
78
+
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,211 @@
1
+ require "jsduck/util/singleton"
2
+
3
+ module JsDuck
4
+ module Js
5
+
6
+ # Analyzes the AST of a Function for possible return values.
7
+ class Returns
8
+ include Util::Singleton
9
+
10
+ # True when function always finishes with returning this.
11
+ def chainable?(ast)
12
+ detect(ast) == [:this]
13
+ end
14
+
15
+ # Detects possible return types of the given function.
16
+ #
17
+ # For now there are three possible detected return values:
18
+ #
19
+ # * :this - the code contins 'return this;'
20
+ #
21
+ # * "undefined" - the code finishes by returning undefined or
22
+ # without explicitly returning anything
23
+ #
24
+ # * :other - some other value is returned.
25
+ #
26
+ def detect(ast)
27
+ h = return_types_hash(ast["body"]["body"])
28
+
29
+ # Replace the special :void value that signifies possibility of
30
+ # exiting without explicitly returning anything
31
+ if h[:void]
32
+ h["undefined"] = true
33
+ h.delete(:void)
34
+ end
35
+
36
+ h.keys
37
+ end
38
+
39
+ private
40
+
41
+ def return_types_hash(body)
42
+ rvalues = {}
43
+ body.each do |ast|
44
+ if return?(ast)
45
+ type = value_type(ast["argument"])
46
+ rvalues[type] = true
47
+ return rvalues
48
+ elsif possibly_blocking?(ast)
49
+ extract_bodies(ast).each do |b|
50
+ rvalues.merge!(return_types_hash(b))
51
+ end
52
+ if !rvalues[:void]
53
+ return rvalues
54
+ else
55
+ rvalues.delete(:void)
56
+ end
57
+ elsif control_flow?(ast)
58
+ extract_bodies(ast).each do |b|
59
+ rvalues.merge!(return_types_hash(b))
60
+ end
61
+ rvalues.delete(:void)
62
+ end
63
+ end
64
+
65
+ rvalues[:void] = true
66
+ return rvalues
67
+ end
68
+
69
+ def return?(ast)
70
+ ast["type"] == "ReturnStatement"
71
+ end
72
+
73
+ def value_type(ast)
74
+ if !ast
75
+ :void
76
+ elsif undefined?(ast) || void?(ast)
77
+ "undefined"
78
+ elsif this?(ast)
79
+ :this
80
+ elsif boolean?(ast)
81
+ "Boolean"
82
+ elsif regexp?(ast)
83
+ "RegExp"
84
+ elsif string?(ast)
85
+ "String"
86
+ else
87
+ :other
88
+ end
89
+ end
90
+
91
+ def undefined?(ast)
92
+ ast["type"] == "Identifier" && ast["name"] == "undefined"
93
+ end
94
+
95
+ def void?(ast)
96
+ ast["type"] == "UnaryExpression" && ast["operator"] == "void"
97
+ end
98
+
99
+ def this?(ast)
100
+ ast["type"] == "ThisExpression"
101
+ end
102
+
103
+ def boolean?(ast)
104
+ if boolean_literal?(ast)
105
+ true
106
+ elsif ast["type"] == "UnaryExpression" || ast["type"] == "BinaryExpression"
107
+ !!BOOLEAN_RETURNING_OPERATORS[ast["operator"]]
108
+ elsif ast["type"] == "LogicalExpression"
109
+ boolean?(ast["left"]) && boolean?(ast["right"])
110
+ elsif ast["type"] == "ConditionalExpression"
111
+ boolean?(ast["consequent"]) && boolean?(ast["alternate"])
112
+ elsif ast["type"] == "AssignmentExpression" && ast["operator"] == "="
113
+ boolean?(ast["right"])
114
+ else
115
+ false
116
+ end
117
+ end
118
+
119
+ def boolean_literal?(ast)
120
+ ast["type"] == "Literal" && (ast["value"] == true || ast["value"] == false)
121
+ end
122
+
123
+ def string?(ast)
124
+ if string_literal?(ast)
125
+ true
126
+ elsif ast["type"] == "BinaryExpression" && ast["operator"] == "+"
127
+ string?(ast["left"]) || string?(ast["right"])
128
+ elsif ast["type"] == "UnaryExpression" && ast["operator"] == "typeof"
129
+ true
130
+ else
131
+ false
132
+ end
133
+ end
134
+
135
+ def string_literal?(ast)
136
+ ast["type"] == "Literal" && ast["value"].is_a?(String)
137
+ end
138
+
139
+ def regexp?(ast)
140
+ ast["type"] == "Literal" && ast["raw"] =~ /^\//
141
+ end
142
+
143
+ def control_flow?(ast)
144
+ CONTROL_FLOW[ast["type"]]
145
+ end
146
+
147
+ def extract_bodies(ast)
148
+ body = []
149
+ CONTROL_FLOW[ast["type"]].each do |name|
150
+ statements = ast[name]
151
+ if statements.is_a?(Hash)
152
+ body << [statements]
153
+ else
154
+ body << Array(statements)
155
+ end
156
+ end
157
+ body
158
+ end
159
+
160
+ # True if the node is a control structure which will block further
161
+ # program flow when all its branches finish with a return
162
+ # statement.
163
+ def possibly_blocking?(ast)
164
+ if POSSIBLY_BLOCKING[ast["type"]]
165
+ CONTROL_FLOW[ast["type"]].all? {|key| ast[key] }
166
+ else
167
+ false
168
+ end
169
+ end
170
+
171
+ BOOLEAN_RETURNING_OPERATORS = {
172
+ "!" => true,
173
+ ">" => true,
174
+ ">=" => true,
175
+ "<" => true,
176
+ "<=" => true,
177
+ "==" => true,
178
+ "!=" => true,
179
+ "===" => true,
180
+ "!==" => true,
181
+ "in" => true,
182
+ "instanceof" => true,
183
+ "delete" => true,
184
+ }
185
+
186
+ POSSIBLY_BLOCKING = {
187
+ "IfStatement" => true,
188
+ "DoWhileStatement" => true,
189
+ "WithStatement" => true,
190
+ "LabeledStatement" => true,
191
+ "BlockStatement" => true,
192
+ }
193
+
194
+ CONTROL_FLOW = {
195
+ "IfStatement" => ["consequent", "alternate"],
196
+ "SwitchStatement" => ["cases"],
197
+ "SwitchCase" => ["consequent"],
198
+ "ForStatement" => ["body"],
199
+ "ForInStatement" => ["body"],
200
+ "WhileStatement" => ["body"],
201
+ "DoWhileStatement" => ["body"],
202
+ "TryStatement" => ["block", "handlers", "finalizer"],
203
+ "CatchClause" => ["body"],
204
+ "WithStatement" => ["body"],
205
+ "LabeledStatement" => ["body"],
206
+ "BlockStatement" => ["body"],
207
+ }
208
+ end
209
+
210
+ end
211
+ end
@@ -0,0 +1,587 @@
1
+ require 'rkelly'
2
+
3
+ module JsDuck
4
+ module Js
5
+
6
+ # Converts RKelly AST into Esprima AST.
7
+ class RKellyAdapter
8
+ def adapt(node)
9
+ ast = adapt_root(node)
10
+ ast["comments"] = node.comments.map {|c| adapt_comment(c) }
11
+ ast
12
+ end
13
+
14
+ private
15
+
16
+ def adapt_comment(comment)
17
+ if comment.value =~ /\A\/\*/
18
+ {
19
+ "type" => "Block",
20
+ "value" => comment.value.sub(/\A\/\*/, "").sub(/\*\/\z/, ""),
21
+ "range" => [comment.range.from.index, comment.range.to.index+1],
22
+ }
23
+ else
24
+ {
25
+ "type" => "Line",
26
+ "value" => comment.value.sub(/\A\/\//, ""),
27
+ "range" => [comment.range.from.index, comment.range.to.index+1],
28
+ }
29
+ end
30
+ end
31
+
32
+ def adapt_root(node)
33
+ make(node, {
34
+ "type" => "Program",
35
+ "body" => adapt_node(node),
36
+ })
37
+ end
38
+
39
+ def adapt_node(node)
40
+ case
41
+ # Empty node
42
+ when node.nil?
43
+ nil
44
+
45
+ # Fall-through nodes
46
+ when FALL_THROUGH_NODES[node.class]
47
+ adapt_node(node.value)
48
+ when FALL_THROUGH_ARRAY_NODES[node.class]
49
+ node.value.map {|v| adapt_node(v) }
50
+
51
+ # Identifiers
52
+ when RKelly::Nodes::ResolveNode == node.class
53
+ make(node, {
54
+ "type" => "Identifier",
55
+ "name" => node.value,
56
+ })
57
+
58
+ # Literals
59
+ when RKelly::Nodes::NumberNode == node.class
60
+ make(node, {
61
+ "type" => "Literal",
62
+ "value" => node.value,
63
+ "raw" => node.value.to_s,
64
+ })
65
+ when RKelly::Nodes::StringNode == node.class
66
+ make(node, {
67
+ "type" => "Literal",
68
+ "value" => string_value(node.value),
69
+ "raw" => node.value,
70
+ })
71
+ when RKelly::Nodes::RegexpNode == node.class
72
+ make(node, {
73
+ "type" => "Literal",
74
+ "value" => node.value,
75
+ "raw" => node.value,
76
+ })
77
+ when RKelly::Nodes::TrueNode == node.class
78
+ make(node, {
79
+ "type" => "Literal",
80
+ "value" => true,
81
+ "raw" => "true",
82
+ })
83
+ when RKelly::Nodes::FalseNode == node.class
84
+ make(node, {
85
+ "type" => "Literal",
86
+ "value" => false,
87
+ "raw" => "false",
88
+ })
89
+ when RKelly::Nodes::NullNode == node.class
90
+ make(node, {
91
+ "type" => "Literal",
92
+ "value" => nil,
93
+ "raw" => "null",
94
+ })
95
+
96
+ # Expressions
97
+ when BINARY_NODES[node.class]
98
+ make(node, {
99
+ "type" => "BinaryExpression",
100
+ "operator" => BINARY_NODES[node.class],
101
+ "left" => adapt_node(node.left),
102
+ "right" => adapt_node(node.value),
103
+ })
104
+ when LOGICAL_NODES[node.class]
105
+ make(node, {
106
+ "type" => "LogicalExpression",
107
+ "operator" => LOGICAL_NODES[node.class],
108
+ "left" => adapt_node(node.left),
109
+ "right" => adapt_node(node.value),
110
+ })
111
+ when UNARY_NODES[node.class]
112
+ make(node, {
113
+ "type" => "UnaryExpression",
114
+ "operator" => UNARY_NODES[node.class],
115
+ "argument" => adapt_node(node.value),
116
+ })
117
+ when ASSIGNMENT_NODES[node.class]
118
+ make(node, {
119
+ "type" => "AssignmentExpression",
120
+ "operator" => ASSIGNMENT_NODES[node.class],
121
+ "left" => adapt_node(node.left),
122
+ "right" => adapt_node(node.value),
123
+ })
124
+ when RKelly::Nodes::FunctionExprNode == node.class
125
+ make(node, {
126
+ "type" => "FunctionExpression",
127
+ "id" => node.value == "function" ? nil : {
128
+ "type" => "Identifier",
129
+ "name" => node.value,
130
+ "range" => offset_range(node, :value, "function "),
131
+ },
132
+ "params" => node.arguments.map {|a| adapt_node(a) },
133
+ "body" => adapt_node(node.function_body),
134
+ })
135
+ when RKelly::Nodes::ThisNode == node.class
136
+ make(node, {
137
+ "type" => "ThisExpression",
138
+ })
139
+ when RKelly::Nodes::DotAccessorNode == node.class
140
+ make(node, {
141
+ "type" => "MemberExpression",
142
+ "computed" => false,
143
+ "object" => adapt_node(node.value),
144
+ "property" => {
145
+ "type" => "Identifier",
146
+ "name" => node.accessor,
147
+ "range" => offset_range(node, :accessor),
148
+ },
149
+ })
150
+ when RKelly::Nodes::BracketAccessorNode == node.class
151
+ make(node, {
152
+ "type" => "MemberExpression",
153
+ "computed" => true,
154
+ "object" => adapt_node(node.value),
155
+ "property" => adapt_node(node.accessor),
156
+ })
157
+ when RKelly::Nodes::FunctionCallNode == node.class
158
+ make(node, {
159
+ "type" => "CallExpression",
160
+ "callee" => adapt_node(node.value),
161
+ "arguments" => adapt_node(node.arguments),
162
+ })
163
+ when RKelly::Nodes::NewExprNode == node.class
164
+ make(node, {
165
+ "type" => "NewExpression",
166
+ "callee" => adapt_node(node.value),
167
+ "arguments" => adapt_node(node.arguments),
168
+ })
169
+ when RKelly::Nodes::PrefixNode == node.class
170
+ make(node, {
171
+ "type" => "UpdateExpression",
172
+ "operator" => node.value,
173
+ "argument" => adapt_node(node.operand),
174
+ "prefix" => true,
175
+ })
176
+ when RKelly::Nodes::PostfixNode == node.class
177
+ make(node, {
178
+ "type" => "UpdateExpression",
179
+ "operator" => node.value,
180
+ "argument" => adapt_node(node.operand),
181
+ "prefix" => false,
182
+ })
183
+ when RKelly::Nodes::ParameterNode == node.class
184
+ make(node, {
185
+ "type" => "Identifier",
186
+ "name" => node.value,
187
+ })
188
+ when RKelly::Nodes::ConditionalNode == node.class
189
+ make(node, {
190
+ "type" => "ConditionalExpression",
191
+ "test" => adapt_node(node.conditions),
192
+ "consequent" => adapt_node(node.value),
193
+ "alternate" => adapt_node(node.else),
194
+ })
195
+ when RKelly::Nodes::CaseClauseNode == node.class
196
+ make(node, {
197
+ "type" => "SwitchCase",
198
+ "test" => adapt_node(node.left),
199
+ "consequent" => adapt_node(node.value),
200
+ })
201
+ when RKelly::Nodes::CommaNode == node.class
202
+ make(node, {
203
+ "type" => "SequenceExpression",
204
+ "expressions" => flatten_sequence(node).map {|v| adapt_node(v) },
205
+ })
206
+ when RKelly::Nodes::ArrayNode == node.class
207
+ make(node, {
208
+ "type" => "ArrayExpression",
209
+ "elements" => node.value.map {|v| adapt_node(v) },
210
+ })
211
+ when RKelly::Nodes::ObjectLiteralNode == node.class
212
+ make(node, {
213
+ "type" => "ObjectExpression",
214
+ "properties" => node.value.map {|v| adapt_node(v) },
215
+ })
216
+ when RKelly::Nodes::PropertyNode == node.class
217
+ make(node, {
218
+ "type" => "Property",
219
+ "key" => property_key(node),
220
+ "value" => adapt_node(node.value),
221
+ "kind" => "init",
222
+ })
223
+ when RKelly::Nodes::GetterPropertyNode == node.class
224
+ make(node, {
225
+ "type" => "Property",
226
+ "key" => property_key(node),
227
+ "value" => adapt_node(node.value),
228
+ "kind" => "get",
229
+ })
230
+ when RKelly::Nodes::SetterPropertyNode == node.class
231
+ make(node, {
232
+ "type" => "Property",
233
+ "key" => property_key(node),
234
+ "value" => adapt_node(node.value),
235
+ "kind" => "set",
236
+ })
237
+ # Statements
238
+ when RKelly::Nodes::ExpressionStatementNode == node.class
239
+ make(node, {
240
+ "type" => "ExpressionStatement",
241
+ "expression" => adapt_node(node.value),
242
+ })
243
+ when RKelly::Nodes::IfNode == node.class
244
+ make(node, {
245
+ "type" => "IfStatement",
246
+ "test" => adapt_node(node.conditions),
247
+ "consequent" => adapt_node(node.value),
248
+ "alternate" => adapt_node(node.else),
249
+ })
250
+ when RKelly::Nodes::WhileNode == node.class
251
+ make(node, {
252
+ "type" => "WhileStatement",
253
+ "test" => adapt_node(node.left),
254
+ "body" => adapt_node(node.value),
255
+ })
256
+ when RKelly::Nodes::DoWhileNode == node.class
257
+ make(node, {
258
+ "type" => "DoWhileStatement",
259
+ "test" => adapt_node(node.value),
260
+ "body" => adapt_node(node.left),
261
+ })
262
+ when RKelly::Nodes::ForNode == node.class
263
+ make(node, {
264
+ "type" => "ForStatement",
265
+ "init" => adapt_node(node.init),
266
+ "test" => adapt_node(node.test),
267
+ "update" => adapt_node(node.counter),
268
+ "body" => adapt_node(node.value),
269
+ })
270
+ when RKelly::Nodes::ForInNode == node.class
271
+ make(node, {
272
+ "type" => "ForInStatement",
273
+ "left" =>
274
+ if node.left.class == RKelly::Nodes::VarDeclNode
275
+ make(node.left, {
276
+ "type" => "VariableDeclaration",
277
+ "kind" => "var",
278
+ "declarations" => [adapt_node(node.left)]
279
+ })
280
+ else
281
+ adapt_node(node.left)
282
+ end,
283
+ "right" => adapt_node(node.right),
284
+ "body" => adapt_node(node.value),
285
+ "each" => false,
286
+ })
287
+ when RKelly::Nodes::WithNode == node.class
288
+ make(node, {
289
+ "type" => "WithStatement",
290
+ "object" => adapt_node(node.left),
291
+ "body" => adapt_node(node.value),
292
+ })
293
+ when RKelly::Nodes::SwitchNode == node.class
294
+ make(node, {
295
+ "type" => "SwitchStatement",
296
+ "discriminant" => adapt_node(node.left),
297
+ "cases" => adapt_node(node.value),
298
+ })
299
+ when RKelly::Nodes::ReturnNode == node.class
300
+ make(node, {
301
+ "type" => "ReturnStatement",
302
+ "argument" => adapt_node(node.value),
303
+ })
304
+ when RKelly::Nodes::BreakNode == node.class
305
+ make(node, {
306
+ "type" => "BreakStatement",
307
+ "label" => node.value ? {
308
+ "type" => "Identifier",
309
+ "name" => node.value,
310
+ "range" => offset_range(node, :value, "break "),
311
+ } : nil,
312
+ })
313
+ when RKelly::Nodes::ContinueNode == node.class
314
+ make(node, {
315
+ "type" => "ContinueStatement",
316
+ "label" => node.value ? {
317
+ "type" => "Identifier",
318
+ "name" => node.value,
319
+ "range" => offset_range(node, :value),
320
+ } : nil,
321
+ })
322
+ when RKelly::Nodes::TryNode == node.class
323
+ make(node, {
324
+ "type" => "TryStatement",
325
+ "block" => adapt_node(node.value),
326
+ "guardedHandlers" => [],
327
+ "handlers" => node.catch_block ? [catch_clause(node)] : [],
328
+ "finalizer" => adapt_node(node.finally_block),
329
+ })
330
+ when RKelly::Nodes::ThrowNode == node.class
331
+ make(node, {
332
+ "type" => "ThrowStatement",
333
+ "argument" => adapt_node(node.value),
334
+ })
335
+ when RKelly::Nodes::LabelNode == node.class
336
+ make(node, {
337
+ "type" => "LabeledStatement",
338
+ "label" => {
339
+ "type" => "Identifier",
340
+ "name" => node.name,
341
+ "range" => offset_range(node, :name),
342
+ },
343
+ "body" => adapt_node(node.value),
344
+ })
345
+ when RKelly::Nodes::BlockNode == node.class
346
+ make(node, {
347
+ "type" => "BlockStatement",
348
+ "body" => adapt_node(node.value),
349
+ })
350
+ when RKelly::Nodes::FunctionBodyNode == node.class
351
+ make(node, {
352
+ "type" => "BlockStatement",
353
+ "body" => adapt_node(node.value),
354
+ })
355
+ when RKelly::Nodes::EmptyStatementNode == node.class
356
+ if node.value == "debugger"
357
+ make(node, {
358
+ "type" => "DebuggerStatement",
359
+ })
360
+ else
361
+ make(node, {
362
+ "type" => "EmptyStatement",
363
+ })
364
+ end
365
+
366
+ # Declarations
367
+ when RKelly::Nodes::VarStatementNode == node.class
368
+ make(node, {
369
+ "type" => "VariableDeclaration",
370
+ "kind" => "var",
371
+ "declarations" => node.value.map {|v| adapt_node(v) },
372
+ })
373
+ when RKelly::Nodes::ConstStatementNode == node.class
374
+ make(node, {
375
+ "type" => "VariableDeclaration",
376
+ "kind" => "const",
377
+ "declarations" => node.value.map {|v| adapt_node(v) },
378
+ })
379
+ when RKelly::Nodes::VarDeclNode == node.class
380
+ make(node, {
381
+ "type" => "VariableDeclarator",
382
+ "id" => {
383
+ "type" => "Identifier",
384
+ "name" => node.name,
385
+ "range" => offset_range(node, :name),
386
+ },
387
+ "init" => adapt_node(node.value),
388
+ })
389
+ when RKelly::Nodes::FunctionDeclNode == node.class
390
+ make(node, {
391
+ "type" => "FunctionDeclaration",
392
+ "id" => {
393
+ "type" => "Identifier",
394
+ "name" => node.value,
395
+ "range" => offset_range(node, :value, "function "),
396
+ },
397
+ "params" => node.arguments.map {|a| adapt_node(a) },
398
+ "body" => adapt_node(node.function_body),
399
+ })
400
+
401
+ else
402
+ # Unexpected node type
403
+ node
404
+ end
405
+ end
406
+
407
+ # augments node data with range info.
408
+ def make(node, config)
409
+ config["range"] = [node.range.from.index, node.range.to.index+1, node.range.from.line]
410
+ config
411
+ end
412
+
413
+ # Calculates "range" array from the start position of the node,
414
+ # its field and given offset prefix (amount of characters to
415
+ # discard from the beginning).
416
+ def offset_range(node, field, prefix="")
417
+ line = node.range.from.line
418
+ i = node.range.from.index
419
+ offset = prefix.length
420
+ length = node.send(field).to_s.length
421
+ return [i + offset, i + offset + length, line]
422
+ end
423
+
424
+ def flatten_sequence(node)
425
+ if node.is_a?(RKelly::Nodes::CommaNode)
426
+ [flatten_sequence(node.left), flatten_sequence(node.value)].flatten
427
+ else
428
+ node
429
+ end
430
+ end
431
+
432
+ def catch_clause(node)
433
+ {
434
+ "type" => "CatchClause",
435
+ "param" => {
436
+ "type" => "Identifier",
437
+ "name" => node.catch_var,
438
+ "range" => [
439
+ node.catch_block.range.from.index - (") ".length + node.catch_var.length),
440
+ node.catch_block.range.from.index - (") ".length),
441
+ node.catch_block.range.from.line,
442
+ ]
443
+ },
444
+ "body" => adapt_node(node.catch_block),
445
+ "range" => [
446
+ node.catch_block.range.from.index - ("catch () ".length + node.catch_var.length),
447
+ node.catch_block.range.to.index+1,
448
+ node.catch_block.range.from.line,
449
+ ]
450
+ }
451
+ end
452
+
453
+ def property_key(node)
454
+ if node.name.is_a?(Numeric)
455
+ {
456
+ "type" => "Literal",
457
+ "value" => node.name,
458
+ "raw" => node.name.to_s,
459
+ "range" => offset_range(node, :name),
460
+ }
461
+ elsif node.name =~ /['"]/
462
+ {
463
+ "type" => "Literal",
464
+ "value" => string_value(node.name),
465
+ "raw" => node.name,
466
+ "range" => offset_range(node, :name),
467
+ }
468
+ else
469
+ {
470
+ "type" => "Identifier",
471
+ "name" => node.name,
472
+ "range" => offset_range(node, :name),
473
+ }
474
+ end
475
+ end
476
+
477
+ # Evaluates the actual value of a JavaScript string.
478
+ # Importantly we avoid using Ruby's eval().
479
+ def string_value(string)
480
+ string[1..-2].gsub(/\\([0-9]{1,3}|x[0-9A-F]{1,2}|u[0-9A-F]{4}|.)/) do |s|
481
+ if STRING_ESCAPES[s]
482
+ STRING_ESCAPES[s]
483
+ elsif s =~ /^\\[0-9]/
484
+ nr_to_str(s[1..-1].oct, s)
485
+ elsif s =~ /^\\x[0-9A-F]/
486
+ nr_to_str(s[2..-1].hex, s)
487
+ elsif s =~ /^\\u[0-9A-F]/
488
+ [s[2..-1].hex].pack("U")
489
+ else
490
+ s[1, 1]
491
+ end
492
+ end
493
+ end
494
+
495
+ # Converts a latin1 character code to UTF-8 string.
496
+ # When running in Ruby <= 1.8, only converts ASCII chars,
497
+ # others are left as escape sequences.
498
+ def nr_to_str(nr, original)
499
+ str = nr.chr
500
+ if str.respond_to?(:encode)
501
+ str.encode('UTF-8', 'ISO-8859-1')
502
+ elsif nr < 127
503
+ str
504
+ else
505
+ original
506
+ end
507
+ end
508
+
509
+ STRING_ESCAPES = {
510
+ '\b' => "\b",
511
+ '\f' => "\f",
512
+ '\n' => "\n",
513
+ '\r' => "\r",
514
+ '\t' => "\t",
515
+ '\v' => "\v",
516
+ }
517
+
518
+ BINARY_NODES = {
519
+ RKelly::Nodes::SubtractNode => "-",
520
+ RKelly::Nodes::LessOrEqualNode => "<=",
521
+ RKelly::Nodes::GreaterOrEqualNode => ">=",
522
+ RKelly::Nodes::AddNode => "+",
523
+ RKelly::Nodes::MultiplyNode => "*",
524
+ RKelly::Nodes::NotEqualNode => "!=",
525
+ RKelly::Nodes::UnsignedRightShiftNode => ">>>",
526
+ RKelly::Nodes::ModulusNode => "%",
527
+ RKelly::Nodes::NotStrictEqualNode => "!==",
528
+ RKelly::Nodes::LessNode => "<",
529
+ RKelly::Nodes::InNode => "in",
530
+ RKelly::Nodes::GreaterNode => ">",
531
+ RKelly::Nodes::BitOrNode => "|",
532
+ RKelly::Nodes::StrictEqualNode => "===",
533
+ RKelly::Nodes::BitXOrNode => "^",
534
+ RKelly::Nodes::LeftShiftNode => "<"+"<",
535
+ RKelly::Nodes::EqualNode => "==",
536
+ RKelly::Nodes::BitAndNode => "&",
537
+ RKelly::Nodes::InstanceOfNode => "instanceof",
538
+ RKelly::Nodes::DivideNode => "/",
539
+ RKelly::Nodes::RightShiftNode => ">>",
540
+ }
541
+
542
+ LOGICAL_NODES = {
543
+ RKelly::Nodes::LogicalAndNode => "&&",
544
+ RKelly::Nodes::LogicalOrNode => "||",
545
+ }
546
+
547
+ UNARY_NODES = {
548
+ RKelly::Nodes::UnaryMinusNode => "-",
549
+ RKelly::Nodes::UnaryPlusNode => "+",
550
+ RKelly::Nodes::LogicalNotNode => "!",
551
+ RKelly::Nodes::BitwiseNotNode => "~",
552
+ RKelly::Nodes::TypeOfNode => "typeof",
553
+ RKelly::Nodes::DeleteNode => "delete",
554
+ RKelly::Nodes::VoidNode => "void",
555
+ }
556
+
557
+ ASSIGNMENT_NODES = {
558
+ RKelly::Nodes::OpEqualNode => "=",
559
+ RKelly::Nodes::OpMultiplyEqualNode => "*=",
560
+ RKelly::Nodes::OpDivideEqualNode => "/=",
561
+ RKelly::Nodes::OpLShiftEqualNode => "<<=",
562
+ RKelly::Nodes::OpMinusEqualNode => "-=",
563
+ RKelly::Nodes::OpPlusEqualNode => "+=",
564
+ RKelly::Nodes::OpModEqualNode => "%=",
565
+ RKelly::Nodes::OpXOrEqualNode => "^=",
566
+ RKelly::Nodes::OpRShiftEqualNode => ">>=",
567
+ RKelly::Nodes::OpAndEqualNode => "&=",
568
+ RKelly::Nodes::OpURShiftEqualNode => ">>>=",
569
+ RKelly::Nodes::OpOrEqualNode => "|=",
570
+ }
571
+
572
+ FALL_THROUGH_NODES = {
573
+ RKelly::Nodes::AssignExprNode => true,
574
+ RKelly::Nodes::ParentheticalNode => true,
575
+ RKelly::Nodes::ElementNode => true,
576
+ }
577
+
578
+ FALL_THROUGH_ARRAY_NODES = {
579
+ RKelly::Nodes::SourceElementsNode => true,
580
+ RKelly::Nodes::ArgumentsNode => true,
581
+ RKelly::Nodes::CaseBlockNode => true,
582
+ }
583
+
584
+ end
585
+
586
+ end
587
+ end