@hatiolab/things-scene 9.0.0-beta.36 → 9.0.0-beta.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/package.json +1 -1
  2. package/things-scene-min.js +11 -11
  3. package/things-scene-min.js.map +1 -1
  4. package/things-scene.mjs +11 -11
  5. package/things-scene.mjs.map +1 -1
  6. package/.cursorignore +0 -62
  7. package/.prettierrc +0 -21
  8. package/assets/icon-audio.png +0 -0
  9. package/assets/icon-gif-viewer.png +0 -0
  10. package/assets/images/spinner.png +0 -0
  11. package/babel.config.js +0 -23
  12. package/db.sqlite +0 -0
  13. package/dist/animation/animate.js +0 -63
  14. package/dist/animation/animate.js.map +0 -1
  15. package/dist/animation/animations/animation.js +0 -122
  16. package/dist/animation/animations/animation.js.map +0 -1
  17. package/dist/animation/animations/fade.js +0 -28
  18. package/dist/animation/animations/fade.js.map +0 -1
  19. package/dist/animation/animations/heartbeat.js +0 -28
  20. package/dist/animation/animations/heartbeat.js.map +0 -1
  21. package/dist/animation/animations/moving.js +0 -24
  22. package/dist/animation/animations/moving.js.map +0 -1
  23. package/dist/animation/animations/outline.js +0 -47
  24. package/dist/animation/animations/outline.js.map +0 -1
  25. package/dist/animation/animations/rotation.js +0 -22
  26. package/dist/animation/animations/rotation.js.map +0 -1
  27. package/dist/animation/animations/vibration.js +0 -31
  28. package/dist/animation/animations/vibration.js.map +0 -1
  29. package/dist/animation/compile.js +0 -31
  30. package/dist/animation/compile.js.map +0 -1
  31. package/dist/animation/delta.js +0 -51
  32. package/dist/animation/delta.js.map +0 -1
  33. package/dist/animation/index.js +0 -14
  34. package/dist/animation/index.js.map +0 -1
  35. package/dist/command/command-change.js +0 -33
  36. package/dist/command/command-change.js.map +0 -1
  37. package/dist/command/command-migrate.js +0 -103
  38. package/dist/command/command-migrate.js.map +0 -1
  39. package/dist/command/command.js +0 -18
  40. package/dist/command/command.js.map +0 -1
  41. package/dist/command/snapshot-commander.js +0 -84
  42. package/dist/command/snapshot-commander.js.map +0 -1
  43. package/dist/components/anchor/anchor.js +0 -105
  44. package/dist/components/anchor/anchor.js.map +0 -1
  45. package/dist/components/anchor/ellipse-anchors.js +0 -53
  46. package/dist/components/anchor/ellipse-anchors.js.map +0 -1
  47. package/dist/components/anchor/rect-anchors.js +0 -53
  48. package/dist/components/anchor/rect-anchors.js.map +0 -1
  49. package/dist/components/audio.js +0 -154
  50. package/dist/components/audio.js.map +0 -1
  51. package/dist/components/cloud.js +0 -44
  52. package/dist/components/cloud.js.map +0 -1
  53. package/dist/components/component.js +0 -1086
  54. package/dist/components/component.js.map +0 -1
  55. package/dist/components/container-abstract.js +0 -387
  56. package/dist/components/container-abstract.js.map +0 -1
  57. package/dist/components/container.js +0 -331
  58. package/dist/components/container.js.map +0 -1
  59. package/dist/components/data/data-mapping.js +0 -82
  60. package/dist/components/data/data-mapping.js.map +0 -1
  61. package/dist/components/data/data.js +0 -166
  62. package/dist/components/data/data.js.map +0 -1
  63. package/dist/components/data/evaluator.js +0 -103
  64. package/dist/components/data/evaluator.js.map +0 -1
  65. package/dist/components/donut.js +0 -104
  66. package/dist/components/donut.js.map +0 -1
  67. package/dist/components/drawer/draw-image-pendable.js +0 -20
  68. package/dist/components/drawer/draw-image-pendable.js.map +0 -1
  69. package/dist/components/drawer/effect.js +0 -19
  70. package/dist/components/drawer/effect.js.map +0 -1
  71. package/dist/components/drawer/fill.js +0 -228
  72. package/dist/components/drawer/fill.js.map +0 -1
  73. package/dist/components/drawer/format.js +0 -115
  74. package/dist/components/drawer/format.js.map +0 -1
  75. package/dist/components/drawer/line.js +0 -191
  76. package/dist/components/drawer/line.js.map +0 -1
  77. package/dist/components/drawer/stroke.js +0 -62
  78. package/dist/components/drawer/stroke.js.map +0 -1
  79. package/dist/components/drawer/text-wrapper.js +0 -51
  80. package/dist/components/drawer/text-wrapper.js.map +0 -1
  81. package/dist/components/drawer/text.js +0 -269
  82. package/dist/components/drawer/text.js.map +0 -1
  83. package/dist/components/ellipse.js +0 -110
  84. package/dist/components/ellipse.js.map +0 -1
  85. package/dist/components/file/ondropfile.js +0 -19
  86. package/dist/components/file/ondropfile.js.map +0 -1
  87. package/dist/components/fit/fit.js +0 -137
  88. package/dist/components/fit/fit.js.map +0 -1
  89. package/dist/components/geometry/transcoord.js +0 -339
  90. package/dist/components/geometry/transcoord.js.map +0 -1
  91. package/dist/components/geometry/union.js +0 -35
  92. package/dist/components/geometry/union.js.map +0 -1
  93. package/dist/components/gif-view.js +0 -128
  94. package/dist/components/gif-view.js.map +0 -1
  95. package/dist/components/global-ref.js +0 -154
  96. package/dist/components/global-ref.js.map +0 -1
  97. package/dist/components/group.js +0 -171
  98. package/dist/components/group.js.map +0 -1
  99. package/dist/components/html/elements.js +0 -24
  100. package/dist/components/html/elements.js.map +0 -1
  101. package/dist/components/html/fill.js +0 -126
  102. package/dist/components/html/fill.js.map +0 -1
  103. package/dist/components/html/reposition.js +0 -119
  104. package/dist/components/html/reposition.js.map +0 -1
  105. package/dist/components/html/shadow.js +0 -24
  106. package/dist/components/html/shadow.js.map +0 -1
  107. package/dist/components/html-overlay-container.js +0 -27
  108. package/dist/components/html-overlay-container.js.map +0 -1
  109. package/dist/components/html-overlay-element.js +0 -22
  110. package/dist/components/html-overlay-element.js.map +0 -1
  111. package/dist/components/image-view.js +0 -193
  112. package/dist/components/image-view.js.map +0 -1
  113. package/dist/components/index.js +0 -231
  114. package/dist/components/index.js.map +0 -1
  115. package/dist/components/info-window.js +0 -416
  116. package/dist/components/info-window.js.map +0 -1
  117. package/dist/components/line.js +0 -374
  118. package/dist/components/line.js.map +0 -1
  119. package/dist/components/local-ref.js +0 -114
  120. package/dist/components/local-ref.js.map +0 -1
  121. package/dist/components/mixins/connectable.js +0 -128
  122. package/dist/components/mixins/connectable.js.map +0 -1
  123. package/dist/components/mixins/data-source.js +0 -34
  124. package/dist/components/mixins/data-source.js.map +0 -1
  125. package/dist/components/mixins/html-element.js +0 -107
  126. package/dist/components/mixins/html-element.js.map +0 -1
  127. package/dist/components/mixins/move-handle.js +0 -73
  128. package/dist/components/mixins/move-handle.js.map +0 -1
  129. package/dist/components/mixins/rect-path.js +0 -113
  130. package/dist/components/mixins/rect-path.js.map +0 -1
  131. package/dist/components/mixins/value-holder.js +0 -81
  132. package/dist/components/mixins/value-holder.js.map +0 -1
  133. package/dist/components/mutater/bounds.js +0 -68
  134. package/dist/components/mutater/bounds.js.map +0 -1
  135. package/dist/components/mutater/path.js +0 -73
  136. package/dist/components/mutater/path.js.map +0 -1
  137. package/dist/components/ortholine.js +0 -763
  138. package/dist/components/ortholine.js.map +0 -1
  139. package/dist/components/outline/ellipse-outline.js +0 -23
  140. package/dist/components/outline/ellipse-outline.js.map +0 -1
  141. package/dist/components/outline/path-outline.js +0 -48
  142. package/dist/components/outline/path-outline.js.map +0 -1
  143. package/dist/components/path.js +0 -49
  144. package/dist/components/path.js.map +0 -1
  145. package/dist/components/polygon.js +0 -91
  146. package/dist/components/polygon.js.map +0 -1
  147. package/dist/components/polyline.js +0 -114
  148. package/dist/components/polyline.js.map +0 -1
  149. package/dist/components/popup.js +0 -160
  150. package/dist/components/popup.js.map +0 -1
  151. package/dist/components/rect.js +0 -72
  152. package/dist/components/rect.js.map +0 -1
  153. package/dist/components/retention/retention-manager.js +0 -81
  154. package/dist/components/retention/retention-manager.js.map +0 -1
  155. package/dist/components/root-container.js +0 -519
  156. package/dist/components/root-container.js.map +0 -1
  157. package/dist/components/ruler.js +0 -103
  158. package/dist/components/ruler.js.map +0 -1
  159. package/dist/components/shape.js +0 -97
  160. package/dist/components/shape.js.map +0 -1
  161. package/dist/components/star.js +0 -103
  162. package/dist/components/star.js.map +0 -1
  163. package/dist/components/text/substitutor.js +0 -92
  164. package/dist/components/text/substitutor.js.map +0 -1
  165. package/dist/components/text.js +0 -21
  166. package/dist/components/text.js.map +0 -1
  167. package/dist/components/triangle.js +0 -92
  168. package/dist/components/triangle.js.map +0 -1
  169. package/dist/const.js +0 -71
  170. package/dist/const.js.map +0 -1
  171. package/dist/core/collection.js +0 -28
  172. package/dist/core/collection.js.map +0 -1
  173. package/dist/core/debug.js +0 -12
  174. package/dist/core/debug.js.map +0 -1
  175. package/dist/core/deep-equals.js +0 -112
  176. package/dist/core/deep-equals.js.map +0 -1
  177. package/dist/core/dom-to-image.js +0 -617
  178. package/dist/core/dom-to-image.js.map +0 -1
  179. package/dist/core/event.js +0 -205
  180. package/dist/core/event.js.map +0 -1
  181. package/dist/core/index.js +0 -21
  182. package/dist/core/index.js.map +0 -1
  183. package/dist/core/list.js +0 -87
  184. package/dist/core/list.js.map +0 -1
  185. package/dist/core/logger.js +0 -29
  186. package/dist/core/logger.js.map +0 -1
  187. package/dist/core/memoize.js +0 -40
  188. package/dist/core/memoize.js.map +0 -1
  189. package/dist/core/mixin.js +0 -26
  190. package/dist/core/mixin.js.map +0 -1
  191. package/dist/core/obj-accessor.js +0 -26
  192. package/dist/core/obj-accessor.js.map +0 -1
  193. package/dist/core/reference-map.js +0 -147
  194. package/dist/core/reference-map.js.map +0 -1
  195. package/dist/core/round-rect.js +0 -62
  196. package/dist/core/round-rect.js.map +0 -1
  197. package/dist/core/safe-round.js +0 -10
  198. package/dist/core/safe-round.js.map +0 -1
  199. package/dist/core/script-loader.js +0 -148
  200. package/dist/core/script-loader.js.map +0 -1
  201. package/dist/core/snapshot-taker.js +0 -59
  202. package/dist/core/snapshot-taker.js.map +0 -1
  203. package/dist/core/stack.js +0 -18
  204. package/dist/core/stack.js.map +0 -1
  205. package/dist/core/timecapsule.js +0 -88
  206. package/dist/core/timecapsule.js.map +0 -1
  207. package/dist/core/utils.js +0 -309
  208. package/dist/core/utils.js.map +0 -1
  209. package/dist/decorator/anchors-decorator.js +0 -53
  210. package/dist/decorator/anchors-decorator.js.map +0 -1
  211. package/dist/decorator/bouncing-arrow-decorator.js +0 -52
  212. package/dist/decorator/bouncing-arrow-decorator.js.map +0 -1
  213. package/dist/decorator/data-spread-decorator.js +0 -69
  214. package/dist/decorator/data-spread-decorator.js.map +0 -1
  215. package/dist/decorator/decotag-decorator.js +0 -33
  216. package/dist/decorator/decotag-decorator.js.map +0 -1
  217. package/dist/decorator/index.js +0 -31
  218. package/dist/decorator/index.js.map +0 -1
  219. package/dist/decorator/link-decorator.js +0 -66
  220. package/dist/decorator/link-decorator.js.map +0 -1
  221. package/dist/effect/gradation.js +0 -37
  222. package/dist/effect/gradation.js.map +0 -1
  223. package/dist/effect/index.js +0 -23
  224. package/dist/effect/index.js.map +0 -1
  225. package/dist/effect/shadow.js +0 -33
  226. package/dist/effect/shadow.js.map +0 -1
  227. package/dist/effect/turn.js +0 -25
  228. package/dist/effect/turn.js.map +0 -1
  229. package/dist/event/event-engine.js +0 -76
  230. package/dist/event/event-engine.js.map +0 -1
  231. package/dist/event/event-pump.js +0 -92
  232. package/dist/event/event-pump.js.map +0 -1
  233. package/dist/event/event-tracker.js +0 -97
  234. package/dist/event/event-tracker.js.map +0 -1
  235. package/dist/event/index.js +0 -21
  236. package/dist/event/index.js.map +0 -1
  237. package/dist/event/ua-event-handler.js +0 -453
  238. package/dist/event/ua-event-handler.js.map +0 -1
  239. package/dist/event-map/animator-handler.js +0 -225
  240. package/dist/event-map/animator-handler.js.map +0 -1
  241. package/dist/event-map/animators/animated-icon.js +0 -265
  242. package/dist/event-map/animators/animated-icon.js.map +0 -1
  243. package/dist/event-map/animators/border-highlighting.js +0 -476
  244. package/dist/event-map/animators/border-highlighting.js.map +0 -1
  245. package/dist/event-map/animators/bouncing-arrow.js +0 -226
  246. package/dist/event-map/animators/bouncing-arrow.js.map +0 -1
  247. package/dist/event-map/event-map.js +0 -36
  248. package/dist/event-map/event-map.js.map +0 -1
  249. package/dist/event-map/index.js +0 -20
  250. package/dist/event-map/index.js.map +0 -1
  251. package/dist/event-map/move-handler.js +0 -233
  252. package/dist/event-map/move-handler.js.map +0 -1
  253. package/dist/event-map/paste-handler.js +0 -176
  254. package/dist/event-map/paste-handler.js.map +0 -1
  255. package/dist/event-map/shift-handler.js +0 -55
  256. package/dist/event-map/shift-handler.js.map +0 -1
  257. package/dist/event-map/text-editor-lite.js +0 -276
  258. package/dist/event-map/text-editor-lite.js.map +0 -1
  259. package/dist/event-map/zoom-handler.js +0 -49
  260. package/dist/event-map/zoom-handler.js.map +0 -1
  261. package/dist/index.js +0 -20
  262. package/dist/index.js.map +0 -1
  263. package/dist/layer/action/emphasize.js +0 -42
  264. package/dist/layer/action/emphasize.js.map +0 -1
  265. package/dist/layer/action/popup.js +0 -461
  266. package/dist/layer/action/popup.js.map +0 -1
  267. package/dist/layer/action/pressed.js +0 -31
  268. package/dist/layer/action/pressed.js.map +0 -1
  269. package/dist/layer/add-layer.js +0 -180
  270. package/dist/layer/add-layer.js.map +0 -1
  271. package/dist/layer/decotag-layer.js +0 -121
  272. package/dist/layer/decotag-layer.js.map +0 -1
  273. package/dist/layer/guide-layer.js +0 -292
  274. package/dist/layer/guide-layer.js.map +0 -1
  275. package/dist/layer/index.js +0 -70
  276. package/dist/layer/index.js.map +0 -1
  277. package/dist/layer/layer.js +0 -230
  278. package/dist/layer/layer.js.map +0 -1
  279. package/dist/layer/minimap-layer.js +0 -84
  280. package/dist/layer/minimap-layer.js.map +0 -1
  281. package/dist/layer/model-layer.js +0 -465
  282. package/dist/layer/model-layer.js.map +0 -1
  283. package/dist/layer/modeler/anchor-handler.js +0 -193
  284. package/dist/layer/modeler/anchor-handler.js.map +0 -1
  285. package/dist/layer/modeler/control-handler.js +0 -95
  286. package/dist/layer/modeler/control-handler.js.map +0 -1
  287. package/dist/layer/modeler/focus-outline.js +0 -41
  288. package/dist/layer/modeler/focus-outline.js.map +0 -1
  289. package/dist/layer/modeler/group-outline.js +0 -30
  290. package/dist/layer/modeler/group-outline.js.map +0 -1
  291. package/dist/layer/modeler/index.js +0 -56
  292. package/dist/layer/modeler/index.js.map +0 -1
  293. package/dist/layer/modeler/path-handler.js +0 -300
  294. package/dist/layer/modeler/path-handler.js.map +0 -1
  295. package/dist/layer/modeler/resizer.js +0 -333
  296. package/dist/layer/modeler/resizer.js.map +0 -1
  297. package/dist/layer/modeler/rotator.js +0 -134
  298. package/dist/layer/modeler/rotator.js.map +0 -1
  299. package/dist/layer/modeling-layer.js +0 -491
  300. package/dist/layer/modeling-layer.js.map +0 -1
  301. package/dist/layer/reaction-layer.js +0 -111
  302. package/dist/layer/reaction-layer.js.map +0 -1
  303. package/dist/layer/scroll-layer.js +0 -191
  304. package/dist/layer/scroll-layer.js.map +0 -1
  305. package/dist/layer/selection/selected-finder.js +0 -96
  306. package/dist/layer/selection/selected-finder.js.map +0 -1
  307. package/dist/layer/selection-layer.js +0 -373
  308. package/dist/layer/selection-layer.js.map +0 -1
  309. package/dist/layer/shift-layer.js +0 -83
  310. package/dist/layer/shift-layer.js.map +0 -1
  311. package/dist/layout/absolute.js +0 -30
  312. package/dist/layout/absolute.js.map +0 -1
  313. package/dist/layout/card.js +0 -52
  314. package/dist/layout/card.js.map +0 -1
  315. package/dist/layout/html-absolute.js +0 -32
  316. package/dist/layout/html-absolute.js.map +0 -1
  317. package/dist/layout/index.js +0 -56
  318. package/dist/layout/index.js.map +0 -1
  319. package/dist/layout/layout.js +0 -36
  320. package/dist/layout/layout.js.map +0 -1
  321. package/dist/layout/linear-horizontal.js +0 -56
  322. package/dist/layout/linear-horizontal.js.map +0 -1
  323. package/dist/layout/linear-vertical.js +0 -56
  324. package/dist/layout/linear-vertical.js.map +0 -1
  325. package/dist/layout/table.js +0 -106
  326. package/dist/layout/table.js.map +0 -1
  327. package/dist/license/license.js +0 -170
  328. package/dist/license/license.js.map +0 -1
  329. package/dist/model/compile.js +0 -40
  330. package/dist/model/compile.js.map +0 -1
  331. package/dist/model/duplicate.js +0 -19
  332. package/dist/model/duplicate.js.map +0 -1
  333. package/dist/model/index.js +0 -34
  334. package/dist/model/index.js.map +0 -1
  335. package/dist/model/selector.js +0 -104
  336. package/dist/model/selector.js.map +0 -1
  337. package/dist/style/compile.js +0 -14
  338. package/dist/style/compile.js.map +0 -1
  339. package/dist/style/index.js +0 -14
  340. package/dist/style/index.js.map +0 -1
  341. package/dist/things-scene/api/add-start.js +0 -18
  342. package/dist/things-scene/api/add-start.js.map +0 -1
  343. package/dist/things-scene/api/add.js +0 -71
  344. package/dist/things-scene/api/add.js.map +0 -1
  345. package/dist/things-scene/api/align.js +0 -116
  346. package/dist/things-scene/api/align.js.map +0 -1
  347. package/dist/things-scene/api/center-to.js +0 -50
  348. package/dist/things-scene/api/center-to.js.map +0 -1
  349. package/dist/things-scene/api/change.js +0 -27
  350. package/dist/things-scene/api/change.js.map +0 -1
  351. package/dist/things-scene/api/clipboard.js +0 -45
  352. package/dist/things-scene/api/clipboard.js.map +0 -1
  353. package/dist/things-scene/api/distribute.js +0 -57
  354. package/dist/things-scene/api/distribute.js.map +0 -1
  355. package/dist/things-scene/api/duplicate.js +0 -47
  356. package/dist/things-scene/api/duplicate.js.map +0 -1
  357. package/dist/things-scene/api/fullscreen.js +0 -26
  358. package/dist/things-scene/api/fullscreen.js.map +0 -1
  359. package/dist/things-scene/api/group.js +0 -91
  360. package/dist/things-scene/api/group.js.map +0 -1
  361. package/dist/things-scene/api/ids.js +0 -28
  362. package/dist/things-scene/api/ids.js.map +0 -1
  363. package/dist/things-scene/api/index.js +0 -192
  364. package/dist/things-scene/api/index.js.map +0 -1
  365. package/dist/things-scene/api/listener.js +0 -69
  366. package/dist/things-scene/api/listener.js.map +0 -1
  367. package/dist/things-scene/api/paste-start.js +0 -27
  368. package/dist/things-scene/api/paste-start.js.map +0 -1
  369. package/dist/things-scene/api/place.js +0 -98
  370. package/dist/things-scene/api/place.js.map +0 -1
  371. package/dist/things-scene/api/remove.js +0 -57
  372. package/dist/things-scene/api/remove.js.map +0 -1
  373. package/dist/things-scene/api/symmetry.js +0 -47
  374. package/dist/things-scene/api/symmetry.js.map +0 -1
  375. package/dist/things-scene/api/to-data-url.js +0 -76
  376. package/dist/things-scene/api/to-data-url.js.map +0 -1
  377. package/dist/things-scene/api/zorder.js +0 -68
  378. package/dist/things-scene/api/zorder.js.map +0 -1
  379. package/dist/things-scene/application-context.js +0 -168
  380. package/dist/things-scene/application-context.js.map +0 -1
  381. package/dist/things-scene/config.js +0 -18
  382. package/dist/things-scene/config.js.map +0 -1
  383. package/dist/things-scene/create.js +0 -67
  384. package/dist/things-scene/create.js.map +0 -1
  385. package/dist/things-scene/fps.js +0 -26
  386. package/dist/things-scene/fps.js.map +0 -1
  387. package/dist/things-scene/index.js +0 -152
  388. package/dist/things-scene/index.js.map +0 -1
  389. package/dist/things-scene/polyfill.js +0 -111
  390. package/dist/things-scene/polyfill.js.map +0 -1
  391. package/dist/things-scene/scene.js +0 -442
  392. package/dist/things-scene/scene.js.map +0 -1
  393. package/dist/things-scene/version.js +0 -12
  394. package/dist/things-scene/version.js.map +0 -1
  395. package/rollup.config.js +0 -67
  396. package/schema.graphql +0 -4606
  397. package/tsconfig.json +0 -31
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "compile", {
7
- enumerable: true,
8
- get: function () {
9
- return _compile.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "duplicate", {
13
- enumerable: true,
14
- get: function () {
15
- return _duplicate.default;
16
- }
17
- });
18
- Object.defineProperty(exports, "match", {
19
- enumerable: true,
20
- get: function () {
21
- return _selector.match;
22
- }
23
- });
24
- Object.defineProperty(exports, "select", {
25
- enumerable: true,
26
- get: function () {
27
- return _selector.select;
28
- }
29
- });
30
- var _compile = _interopRequireDefault(require("./compile.js"));
31
- var _duplicate = _interopRequireDefault(require("./duplicate.js"));
32
- var _selector = require("./selector.js");
33
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
34
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_compile","_interopRequireDefault","require","_duplicate","_selector","e","__esModule","default"],"sources":["../../src/model/index.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nexport { default as compile } from './compile.js'\nexport { default as duplicate } from './duplicate.js'\nexport { select, match } from './selector.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAA6C,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1,104 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.match = match;
7
- exports.select = select;
8
- /*
9
- * Copyright © HatioLab Inc. All rights reserved.
10
- */
11
-
12
- function match_by_id(selector, component, listener, root) {
13
- return selector.substr(1) == component.get('id');
14
- }
15
- function match_by_class(selector, component, listener, root) {
16
- var str_class = component.get('class');
17
- if (!str_class) return false;
18
- var classes = str_class.split(' ') || [];
19
- return classes.indexOf(selector.substr(1)) >= 0;
20
- }
21
- function match_by_special(selector, component, listener, root) {
22
- switch (selector) {
23
- case '(all)':
24
- return true;
25
- case '(self)':
26
- return root === component;
27
- case '(root)':
28
- return !root.parent && root === component;
29
- case '(descendant)':
30
- return root !== component;
31
- case '(child)':
32
- return root === component.parent;
33
- default:
34
- return false;
35
- }
36
- }
37
- function match_by_type(selector, component, listener, root) {
38
- return selector == component.get('type');
39
- }
40
-
41
- // match의 self는 root 이다.
42
- function match(selector, component, listener, root) {
43
- if (selector == '(all)') return true;
44
- switch (selector.charAt(0)) {
45
- case '#':
46
- return match_by_id(selector, component, listener, root);
47
- case '.':
48
- return match_by_class(selector, component, listener, root);
49
- case '(':
50
- return match_by_special(selector, component, listener, root);
51
- default:
52
- return match_by_type(selector, component, listener, root);
53
- }
54
- }
55
- function select_recurse(matcher, selector, component, self, root, result) {
56
- if (matcher(selector, component, self, root)) result.push(component);
57
- component.components && component.components.forEach(child => {
58
- select_recurse(matcher, selector, child, self, root, result);
59
- });
60
- return result;
61
- }
62
- function match_by_special_for_select(selector, component, self, root) {
63
- switch (selector) {
64
- case '(all)':
65
- return true;
66
- // TODO descendant를 구현하시오. (self의 자손들)
67
- // case '(descendant)' :
68
- // return root !== component
69
- case '(parent)':
70
- return self && self.parent === component;
71
- case '(child)':
72
- case '(children)':
73
- return self && self === component.parent;
74
- case '(sibling)':
75
- case '(siblings)':
76
- return self && self.parent === component.parent && self !== component;
77
- default:
78
- return false;
79
- }
80
- }
81
-
82
- // select의 self는 self 이다.
83
- function select(selector, component, self) {
84
- if (selector == '(root)') return [component];
85
- if (selector == '(self)') return self ? [self] : [];
86
- var matcher;
87
- switch (selector.charAt(0)) {
88
- case '#':
89
- let selected = component.root.findAllById(selector.substr(1));
90
- if (selected) return selected;else return [];
91
- break;
92
- case '.':
93
- matcher = match_by_class;
94
- break;
95
- case '(':
96
- matcher = match_by_special_for_select;
97
- break;
98
- default:
99
- matcher = match_by_type;
100
- break;
101
- }
102
- return select_recurse(matcher, selector, component, self, component, []);
103
- }
104
- //# sourceMappingURL=selector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selector.js","names":["match_by_id","selector","component","listener","root","substr","get","match_by_class","str_class","classes","split","indexOf","match_by_special","parent","match_by_type","match","charAt","select_recurse","matcher","self","result","push","components","forEach","child","match_by_special_for_select","select","selected","findAllById"],"sources":["../../src/model/selector.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nfunction match_by_id(selector, component, listener, root) {\n return selector.substr(1) == component.get('id')\n}\n\nfunction match_by_class(selector, component, listener, root) {\n var str_class = component.get('class')\n if (!str_class) return false\n\n var classes = str_class.split(' ') || []\n\n return classes.indexOf(selector.substr(1)) >= 0\n}\n\nfunction match_by_special(selector, component, listener, root) {\n switch (selector) {\n case '(all)':\n return true\n case '(self)':\n return root === component\n case '(root)':\n return !root.parent && root === component\n case '(descendant)':\n return root !== component\n case '(child)':\n return root === component.parent\n default:\n return false\n }\n}\n\nfunction match_by_type(selector, component, listener, root) {\n return selector == component.get('type')\n}\n\n// match의 self는 root 이다.\nexport function match(selector, component, listener, root) {\n if (selector == '(all)') return true\n\n switch (selector.charAt(0)) {\n case '#':\n return match_by_id(selector, component, listener, root)\n case '.':\n return match_by_class(selector, component, listener, root)\n case '(':\n return match_by_special(selector, component, listener, root)\n default:\n return match_by_type(selector, component, listener, root)\n }\n}\n\nfunction select_recurse(matcher, selector, component, self, root, result) {\n if (matcher(selector, component, self, root)) result.push(component)\n\n component.components &&\n component.components.forEach(child => {\n select_recurse(matcher, selector, child, self, root, result)\n })\n\n return result\n}\n\nfunction match_by_special_for_select(selector, component, self, root) {\n switch (selector) {\n case '(all)':\n return true\n // TODO descendant를 구현하시오. (self의 자손들)\n // case '(descendant)' :\n // return root !== component\n case '(parent)':\n return self && self.parent === component\n case '(child)':\n case '(children)':\n return self && self === component.parent\n case '(sibling)':\n case '(siblings)':\n return self && self.parent === component.parent && self !== component\n default:\n return false\n }\n}\n\n// select의 self는 self 이다.\nexport function select(selector, component, self) {\n if (selector == '(root)') return [component]\n if (selector == '(self)') return self ? [self] : []\n\n var matcher\n switch (selector.charAt(0)) {\n case '#':\n let selected = component.root.findAllById(selector.substr(1))\n if (selected) return selected\n else return []\n break\n case '.':\n matcher = match_by_class\n break\n case '(':\n matcher = match_by_special_for_select\n break\n default:\n matcher = match_by_type\n break\n }\n\n return select_recurse(matcher, selector, component, self, component, [])\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;;AAEA,SAASA,WAAWA,CAACC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,IAAI,EAAE;EACxD,OAAOH,QAAQ,CAACI,MAAM,CAAC,CAAC,CAAC,IAAIH,SAAS,CAACI,GAAG,CAAC,IAAI,CAAC;AAClD;AAEA,SAASC,cAAcA,CAACN,QAAQ,EAAEC,SAA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EC,SAAS,EAAEiB,IAAI,EAAE;EAChD,IAAIlB,QAAQ,IAAI,QAAQ,EAAE,OAAO,CAACC,SAAS,CAAC;EAC5C,IAAID,QAAQ,IAAI,QAAQ,EAAE,OAAOkB,IAAI,GAAG,CAACA,IAAI,CAAC,GAAG,EAAE;EAEnD,IAAID,OAAO;EACX,QAAQjB,QAAQ,CAACe,MAAM,CAAC,CAAC,CAAC;IACxB,KAAK,GAAG;MACN,IAAIW,QAAQ,GAAGzB,SAAS,CAACE,IAAI,CAACwB,WAAW,CAAC3B,QAAQ,CAACI,MAAM,CAAC,CAAC,CAAC,CAAC;MAC7D,IAAIsB,QAAQ,EAAE,OAAOA,QAAQ,MACxB,OAAO,EAAE;MACd;IACF,KAAK,GAAG;MACNT,OAAO,GAAGX,cAAc;MACxB;IACF,KAAK,GAAG;MACNW,OAAO,GAAGO,2BAA2B;MACrC;IACF;MACEP,OAAO,GAAGJ,aAAa;MACvB;EACJ;EAEA,OAAOG,cAAc,CAACC,OAAO,EAAEjB,QAAQ,EAAEC,SAAS,EAAEiB,IAAI,EAAEjB,SAAS,EAAE,EAAE,CAAC;AAC1E","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = compile;
7
- /*
8
- * Copyright © HatioLab Inc. All rights reserved.
9
- */
10
-
11
- function compile(style) {
12
- return style;
13
- }
14
- //# sourceMappingURL=compile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compile.js","names":["compile","style"],"sources":["../../src/style/compile.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nexport default function compile(style) {\n return style\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEe,SAASA,OAAOA,CAACC,KAAK,EAAE;EACrC,OAAOA,KAAK;AACd","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "compile", {
7
- enumerable: true,
8
- get: function () {
9
- return _compile.default;
10
- }
11
- });
12
- var _compile = _interopRequireDefault(require("./compile.js"));
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_compile","_interopRequireDefault","require","e","__esModule","default"],"sources":["../../src/style/index.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nexport { default as compile } from './compile.js'\n"],"mappings":";;;;;;;;;;;AAIA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.startAddMode = startAddMode;
7
- /*
8
- * Copyright © HatioLab Inc. All rights reserved.
9
- */
10
-
11
- /* this should be root-container */
12
- function startAddMode(models) {
13
- if (!(models instanceof Array)) {
14
- models = [models];
15
- }
16
- this.trigger('addstart', models);
17
- }
18
- //# sourceMappingURL=add-start.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-start.js","names":["startAddMode","models","Array","trigger"],"sources":["../../../src/things-scene/api/add-start.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\n/* this should be root-container */\nexport function startAddMode(models) {\n if (!(models instanceof Array)) {\n models = [models]\n }\n\n this.trigger('addstart', models)\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;AACO,SAASA,YAAYA,CAACC,MAAM,EAAE;EACnC,IAAI,EAAEA,MAAM,YAAYC,KAAK,CAAC,EAAE;IAC9BD,MAAM,GAAG,CAACA,MAAM,CAAC;EACnB;EAEA,IAAI,CAACE,OAAO,CAAC,UAAU,EAAEF,MAAM,CAAC;AAClC","ignoreList":[]}
@@ -1,71 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = add;
7
- var _commandMigrate = _interopRequireDefault(require("../../command/command-migrate.js"));
8
- var Model = _interopRequireWildcard(require("../../model/index.js"));
9
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
10
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- /*
13
- * Copyright © HatioLab Inc. All rights reserved.
14
- */
15
-
16
- /* this should be root-container */
17
- function add(models, boundsOrOffset, onto) {
18
- if (!(models instanceof Array)) models = [models];
19
- if (!onto) onto = this.model_layer;
20
- var changes = [];
21
- var replaceRefidMap = new Map();
22
- this.selected = models.map(model => {
23
- try {
24
- return Model.compile(model, onto.app, refid => {
25
- const newRef = this.getNewRefid();
26
- if (typeof refid !== 'undefined') {
27
- replaceRefidMap.set(refid, newRef);
28
- }
29
- return newRef;
30
- }, id => (this.indexMap[id] || [])[0]);
31
- } catch (e) {
32
- console.warn(e);
33
- return false;
34
- }
35
- }).filter(Boolean).map(component => {
36
- let {
37
- left,
38
- top,
39
- width,
40
- height,
41
- x,
42
- y,
43
- cx,
44
- cy
45
- } = boundsOrOffset;
46
- component.replaceRefids(replaceRefidMap);
47
- if (!isNaN(left) && !isNaN(top) && !isNaN(width) && !isNaN(height)) component.bounds = {
48
- left,
49
- top,
50
- width,
51
- height
52
- };
53
- if (!isNaN(x) && !isNaN(y)) component.move({
54
- x,
55
- y
56
- }, false /* relatively - leave relations among components */);
57
- if (!isNaN(cx) && !isNaN(cy)) component.center = {
58
- x: cx,
59
- y: cy
60
- };
61
- changes.push({
62
- component: component,
63
- to_container: onto
64
- });
65
- return component;
66
- });
67
- this.app.commander.execute(new _commandMigrate.default({
68
- changes
69
- }));
70
- }
71
- //# sourceMappingURL=add.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add.js","names":["_commandMigrate","_interopRequireDefault","require","Model","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","add","models","boundsOrOffset","onto","Array","model_layer","changes","replaceRefidMap","Map","selected","map","model","compile","app","refid","newRef","getNewRefid","id","indexMap","console","warn","filter","Boolean","component","left","top","width","height","x","y","cx","cy","replaceRefids","isNaN","bounds","move","center","push","to_container","commander","execute","CommandMigrate"],"sources":["../../../src/things-scene/api/add.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport CommandMigrate from '../../command/command-migrate.js'\nimport * as Model from '../../model/index.js'\n\n/* this should be root-container */\nexport default function add(models, boundsOrOffset, onto) {\n if (!(models instanceof Array)) models = [models]\n\n if (!onto) onto = this.model_layer\n\n var changes = []\n\n var replaceRefidMap = new Map()\n\n this.selected = models\n .map(model => {\n try {\n return Model.compile(\n model,\n onto.app,\n refid => {\n const newRef = this.getNewRefid()\n if (typeof refid !== 'undefined') {\n replaceRefidMap.set(refid, newRef)\n }\n return newRef\n },\n id => (this.indexMap[id] || [])[0]\n )\n } catch (e) {\n console.warn(e)\n return false\n }\n })\n .filter(Boolean)\n .map(component => {\n let { left, top, width, height, x, y, cx, cy } = boundsOrOffset\n\n component.replaceRefids(replaceRefidMap)\n\n if (!isNaN(left) && !isNaN(top) && !isNaN(width) && !isNaN(height))\n component.bounds = { left, top, width, height }\n\n if (!isNaN(x) && !isNaN(y)) component.move({ x, y }, false /* relatively - leave relations among components */)\n\n if (!isNaN(cx) && !isNaN(cy)) component.center = { x: cx, y: cy }\n\n changes.push({\n component: component,\n to_container: onto\n })\n\n return component\n })\n\n this.app.commander.execute(new CommandMigrate({ changes }))\n}\n"],"mappings":";;;;;;AAIA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA6C,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,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ACC,OAAO,CAAC,CACfZ,GAAG,CAACa,SAAS,IAAI;IAChB,IAAI;MAAEC,IAAI;MAAEC,GAAG;MAAEC,KAAK;MAAEC,MAAM;MAAEC,CAAC;MAAEC,CAAC;MAAEC,EAAE;MAAEC;IAAG,CAAC,GAAG7B,cAAc;IAE/DqB,SAAS,CAACS,aAAa,CAACzB,eAAe,CAAC;IAExC,IAAI,CAAC0B,KAAK,CAACT,IAAI,CAAC,IAAI,CAACS,KAAK,CAACR,GAAG,CAAC,IAAI,CAACQ,KAAK,CAACP,KAAK,CAAC,IAAI,CAACO,KAAK,CAACN,MAAM,CAAC,EAChEJ,SAAS,CAACW,MAAM,GAAG;MAAEV,IAAI;MAAEC,GAAG;MAAEC,KAAK;MAAEC;IAAO,CAAC;IAEjD,IAAI,CAACM,KAAK,CAACL,CAAC,CAAC,IAAI,CAACK,KAAK,CAACJ,CAAC,CAAC,EAAEN,SAAS,CAACY,IAAI,CAAC;MAAEP,CAAC;MAAEC;IAAE,CAAC,EAAE,KAAK,CAAC,mDAAmD,CAAC;IAE/G,IAAI,CAACI,KAAK,CAACH,EAAE,CAAC,IAAI,CAACG,KAAK,CAACF,EAAE,CAAC,EAAER,SAAS,CAACa,MAAM,GAAG;MAAER,CAAC,EAAEE,EAAE;MAAED,CAAC,EAAEE;IAAG,CAAC;IAEjEzB,OAAO,CAAC+B,IAAI,CAAC;MACXd,SAAS,EAAEA,SAAS;MACpBe,YAAY,EAAEnC;IAChB,CAAC,CAAC;IAEF,OAAOoB,SAAS;EAClB,CAAC,CAAC;EAEJ,IAAI,CAACV,GAAG,CAAC0B,SAAS,CAACC,OAAO,CAAC,IAAIC,uBAAc,CAAC;IAAEnC;EAAQ,CAAC,CAAC,CAAC;AAC7D","ignoreList":[]}
@@ -1,116 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = align;
7
- var _commandChange = _interopRequireDefault(require("../../command/command-change.js"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- /*
10
- * Copyright © HatioLab Inc. All rights reserved.
11
- */
12
-
13
- const LEFT = 'left';
14
- const RIGHT = 'right';
15
- const CENTER = 'center';
16
- const TOP = 'top';
17
- const BOTTOM = 'bottom';
18
- const MIDDLE = 'middle';
19
- const ALIGN_COMMANDS = [LEFT, RIGHT, CENTER, TOP, MIDDLE, BOTTOM];
20
- function _align(type, selected) {
21
- var total_bounds = JSON.parse(JSON.stringify(selected[0].bounds));
22
- var right = total_bounds.left + total_bounds.width;
23
- var bottom = total_bounds.top + total_bounds.height;
24
- for (let i = 0; i < selected.length; i++) {
25
- let bounds = selected[i].bounds;
26
- total_bounds.left = bounds.left > total_bounds.left ? total_bounds.left : bounds.left;
27
- total_bounds.top = bounds.top > total_bounds.top ? total_bounds.top : bounds.top;
28
- right = bounds.left + bounds.width > right ? bounds.left + bounds.width : right;
29
- bottom = bounds.top + bounds.height > bottom ? bounds.top + bounds.height : bottom;
30
- }
31
- total_bounds.width = right - total_bounds.left;
32
- total_bounds.height = bottom - total_bounds.top;
33
- switch (type) {
34
- case LEFT:
35
- for (let i = 0; i < selected.length; i++) {
36
- let bounds = selected[i].bounds;
37
- selected[i].bounds = {
38
- left: total_bounds.left,
39
- top: bounds.top,
40
- width: bounds.width,
41
- height: bounds.height
42
- };
43
- }
44
- break;
45
- case CENTER:
46
- for (let i = 0; i < selected.length; i++) {
47
- let bounds = selected[i].bounds;
48
- selected[i].bounds = {
49
- left: total_bounds.left + total_bounds.width / 2 - bounds.width / 2,
50
- top: bounds.top,
51
- width: bounds.width,
52
- height: bounds.height
53
- };
54
- }
55
- break;
56
- case RIGHT:
57
- for (let i = 0; i < selected.length; i++) {
58
- let bounds = selected[i].bounds;
59
- selected[i].bounds = {
60
- left: right - bounds.width,
61
- top: bounds.top,
62
- width: bounds.width,
63
- height: bounds.height
64
- };
65
- }
66
- break;
67
- case TOP:
68
- for (let i = 0; i < selected.length; i++) {
69
- let bounds = selected[i].bounds;
70
- selected[i].bounds = {
71
- left: bounds.left,
72
- top: total_bounds.top,
73
- width: bounds.width,
74
- height: bounds.height
75
- };
76
- }
77
- break;
78
- case MIDDLE:
79
- for (let i = 0; i < selected.length; i++) {
80
- let bounds = selected[i].bounds;
81
- selected[i].bounds = {
82
- left: bounds.left,
83
- top: total_bounds.top + total_bounds.height / 2 - bounds.height / 2,
84
- width: bounds.width,
85
- height: bounds.height
86
- };
87
- }
88
- break;
89
- case BOTTOM:
90
- for (let i = 0; i < selected.length; i++) {
91
- let bounds = selected[i].bounds;
92
- selected[i].bounds = {
93
- left: bounds.left,
94
- top: bottom - bounds.height,
95
- width: bounds.width,
96
- height: bounds.height
97
- };
98
- }
99
- break;
100
- default:
101
- return;
102
- }
103
- }
104
-
105
- /* this should be root-container */
106
- function align(type) {
107
- if (!this.hasSameParentForAllSelected || ALIGN_COMMANDS.indexOf(type) == -1) return;
108
- var selected = this.selected.filter(c => !c.stuck);
109
- if (selected.length <= 1) return;
110
- var commander = this.app.commander;
111
- _commandChange.default.around(commander, function () {
112
- // 선택된 컴포넌트들을 움직인다.
113
- _align(type, selected);
114
- });
115
- }
116
- //# sourceMappingURL=align.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"align.js","names":["_commandChange","_interopRequireDefault","require","e","__esModule","default","LEFT","RIGHT","CENTER","TOP","BOTTOM","MIDDLE","ALIGN_COMMANDS","_align","type","selected","total_bounds","JSON","parse","stringify","bounds","right","left","width","bottom","top","height","i","length","align","hasSameParentForAllSelected","indexOf","filter","c","stuck","commander","app","CommandChange","around"],"sources":["../../../src/things-scene/api/align.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport CommandChange from '../../command/command-change.js'\n\nconst LEFT = 'left'\nconst RIGHT = 'right'\nconst CENTER = 'center'\nconst TOP = 'top'\nconst BOTTOM = 'bottom'\nconst MIDDLE = 'middle'\n\nconst ALIGN_COMMANDS = [LEFT, RIGHT, CENTER, TOP, MIDDLE, BOTTOM]\n\nfunction _align(type, selected) {\n var total_bounds = JSON.parse(JSON.stringify(selected[0].bounds))\n var right = total_bounds.left + total_bounds.width\n var bottom = total_bounds.top + total_bounds.height\n\n for (let i = 0; i < selected.length; i++) {\n let bounds = selected[i].bounds\n\n total_bounds.left = bounds.left > total_bounds.left ? total_bounds.left : bounds.left\n total_bounds.top = bounds.top > total_bounds.top ? total_bounds.top : bounds.top\n\n right = bounds.left + bounds.width > right ? bounds.left + bounds.width : right\n bottom = bounds.top + bounds.height > bottom ? bounds.top + bounds.height : bottom\n }\n\n total_bounds.width = right - total_bounds.left\n total_bounds.height = bottom - total_bounds.top\n\n switch (type) {\n case LEFT:\n for (let i = 0; i < selected.length; i++) {\n let bounds = selected[i].bounds\n selected[i].bounds = {\n left: total_bounds.left,\n top: bounds.top,\n width: bounds.width,\n height: bounds.height\n }\n }\n\n break\n case CENTER:\n for (let i = 0; i < selected.length; i++) {\n let bounds = selected[i].bounds\n selected[i].bounds = {\n left: total_bounds.left + total_bounds.width / 2 - bounds.width / 2,\n top: bounds.top,\n width: bounds.width,\n height: bounds.height\n }\n }\n break\n case RIGHT:\n for (let i = 0; i < selected.length; i++) {\n let bounds = selected[i].bounds\n selected[i].bounds = {\n left: right - bounds.width,\n top: bounds.top,\n width: bounds.width,\n height: bounds.height\n }\n }\n break\n case TOP:\n for (let i = 0; i < selected.length; i++) {\n let bounds = selected[i].bounds\n selected[i].bounds = {\n left: bounds.left,\n top: total_bounds.top,\n width: bounds.width,\n height: bounds.height\n }\n }\n break\n case MIDDLE:\n for (let i = 0; i < selected.length; i++) {\n let bounds = selected[i].bounds\n selected[i].bounds = {\n left: bounds.left,\n top: total_bounds.top + total_bounds.height / 2 - bounds.height / 2,\n width: bounds.width,\n height: bounds.height\n }\n }\n break\n case BOTTOM:\n for (let i = 0; i < selected.length; i++) {\n let bounds = selected[i].bounds\n selected[i].bounds = {\n left: bounds.left,\n top: bottom - bounds.height,\n width: bounds.width,\n height: bounds.height\n }\n }\n break\n\n default:\n return\n }\n}\n\n/* this should be root-container */\nexport default function align(type) {\n if (!this.hasSameParentForAllSelected || ALIGN_COMMANDS.indexOf(type) == -1) return\n\n var selected = this.selected.filter(c => !c.stuck)\n if (selected.length <= 1) return\n\n var commander = this.app.commander\n\n CommandChange.around(commander, function () {\n // 선택된 컴포넌트들을 움직인다.\n _align(type, selected)\n })\n}\n"],"mappings":";;;;;;AAIA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2D,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ3D;AACA;AACA;;AAIA,MAAMG,IAAI,GAAG,MAAM;AACnB,MAAMC,KAAK,GAAG,OAAO;AACrB,MAAMC,MAAM,GAAG,QAAQ;AACvB,MAAMC,GAAG,GAAG,KAAK;AACjB,MAAMC,MAAM,GAAG,QAAQ;AACvB,MAAMC,MAAM,GAAG,QAAQ;AAEvB,MAAMC,cAAc,GAAG,CAACN,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAEC,GAAG,EAAEE,MAAM,EAAED,MAAM,CAAC;AAEjE,SAASG,MAAMA,CAACC,IAAI,EAAEC,QAAQ,EAAE;EAC9B,IAAIC,YAAY,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACJ,QAAQ,CAAC,CAAC,CAAC,CAACK,MAAM,CAAC,CAAC;EACjE,IAAIC,KAAK,GAAGL,YAAY,CAACM,IAAI,GAAGN,YAAY,CAACO,KAAK;EAClD,IAAIC,MAAM,GAAGR,YAAY,CAACS,GAAG,GAAGT,YAAY,CAACU,MAAM;EAEnD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGZ,QAAQ,CAACa,MAAM,EAAED,CAAC,EAAE,EAAE;IACxC,IAAIP,MAAM,GAAGL,QAAQ,CAACY,CAAC,CAAC,CAACP,MAAM;IAE/BJ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sBAAa,CAACC,MAAM,CAACH,SAAS,EAAE,YAAY;IAC1C;IACAtB,MAAM,CAACC,IAAI,EAAEC,QAAQ,CAAC;EACxB,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.centerTo = centerTo;
7
- /*
8
- * Copyright © HatioLab Inc. All rights reserved.
9
- */
10
-
11
- /* this should be root-container */
12
- function centerTo(component) {
13
- // 1. canvas의 center 좌표를 rootModel의 좌표로 변환한다.
14
- const canvas = component.rootModel.canvas;
15
- const cw = canvas.clientWidth;
16
- const ch = canvas.clientHeight;
17
- const cc = component.rootModel.transcoordC2S(cw / 2, ch / 2);
18
-
19
- // 2. rootModel로부터 component의 center좌표를 구한다.
20
- const {
21
- x,
22
- y
23
- } = component.center;
24
- const {
25
- x: px,
26
- y: py
27
- } = component.transcoordP2S(x, y);
28
- const {
29
- x: cx,
30
- y: cy
31
- } = component.transcoordS2T(px, py);
32
-
33
- // 3. rootModel의 현재 translate를 구한다.
34
- const {
35
- x: tx,
36
- y: ty
37
- } = component.rootModel.get('translate');
38
- const {
39
- x: sx,
40
- y: sy
41
- } = component.rootModel.get('scale');
42
- ty + (cc.y - cy) * sy;
43
- component.rootModel.set({
44
- translate: {
45
- x: tx + (cc.x - cx) * sx,
46
- y: ty + (cc.y - cy) * sy
47
- }
48
- });
49
- }
50
- //# sourceMappingURL=center-to.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"center-to.js","names":["centerTo","component","canvas","rootModel","cw","clientWidth","ch","clientHeight","cc","transcoordC2S","x","y","center","px","py","transcoordP2S","cx","cy","transcoordS2T","tx","ty","get","sx","sy","set","translate"],"sources":["../../../src/things-scene/api/center-to.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\n/* this should be root-container */\nexport function centerTo(component) {\n // 1. canvas의 center 좌표를 rootModel의 좌표로 변환한다.\n const canvas = component.rootModel.canvas\n const cw = canvas.clientWidth\n const ch = canvas.clientHeight\n\n const cc = component.rootModel.transcoordC2S(cw / 2, ch / 2)\n\n // 2. rootModel로부터 component의 center좌표를 구한다.\n const { x, y } = component.center\n const { x: px, y: py } = component.transcoordP2S(x, y)\n const { x: cx, y: cy } = component.transcoordS2T(px, py)\n\n // 3. rootModel의 현재 translate를 구한다.\n const { x: tx, y: ty } = component.rootModel.get('translate')\n const { x: sx, y: sy } = component.rootModel.get('scale')\n\n ty + (cc.y - cy) * sy\n\n component.rootModel.set({\n translate: {\n x: tx + (cc.x - cx) * sx,\n y: ty + (cc.y - cy) * sy\n }\n })\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;AACO,SAASA,QAAQA,CAACC,SAAS,EAAE;EAClC;EACA,MAAMC,MAAM,GAAGD,SAAS,CAACE,SAAS,CAACD,MAAM;EACzC,MAAME,EAAE,GAAGF,MAAM,CAACG,WAAW;EAC7B,MAAMC,EAAE,GAAGJ,MAAM,CAACK,YAAY;EAE9B,MAAMC,EAAE,GAAGP,SAAS,CAACE,SAAS,CAACM,aAAa,CAACL,EAAE,GAAG,CAAC,EAAEE,EAAE,GAAG,CAAC,CAAC;;EAE5D;EACA,MAAM;IAAEI,CAAC;IAAEC;EAAE,CAAC,GAAGV,SAAS,CAACW,MAAM;EACjC,MAAM;IAAEF,CAAC,EAAEG,EAAE;IAAEF,CAAC,EAAEG;EAAG,CAAC,GAAGb,SAAS,CAACc,aAAa,CAACL,CAAC,EAAEC,CAAC,CAAC;EACtD,MAAM;IAAED,CAAC,EAAEM,EAAE;IAAEL,CAAC,EAAEM;EAAG,CAAC,GAAGhB,SAAS,CAACiB,aAAa,CAACL,EAAE,EAAEC,EAAE,CAAC;;EAExD;EACA,MAAM;IAAEJ,CAAC,EAAES,EAAE;IAAER,CAAC,EAAES;EAAG,CAAC,GAAGnB,SAAS,CAACE,SAAS,CAACkB,GAAG,CAAC,WAAW,CAAC;EAC7D,MAAM;IAAEX,CAAC,EAAEY,EAAE;IAAEX,CAAC,EAAEY;EAAG,CAAC,GAAGtB,SAAS,CAACE,SAAS,CAACkB,GAAG,CAAC,OAAO,CAAC;EAEzDD,EAAE,GAAG,CAACZ,EAAE,CAACG,CAAC,GAAGM,EAAE,IAAIM,EAAE;EAErBtB,SAAS,CAACE,SAAS,CAACqB,GAAG,CAAC;IACtBC,SAAS,EAAE;MACTf,CAAC,EAAES,EAAE,GAAG,CAACX,EAAE,CAACE,CAAC,GAAGM,EAAE,IAAIM,EAAE;MACxBX,CAAC,EAAES,EAAE,GAAG,CAACZ,EAAE,CAACG,CAAC,GAAGM,EAAE,IAAIM;IACxB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.change = change;
7
- exports.undoableChange = undoableChange;
8
- var _commandChange = _interopRequireDefault(require("../../command/command-change.js"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- /*
11
- * Copyright © HatioLab Inc. All rights reserved.
12
- */
13
-
14
- /* this should be model-layer */
15
- function change(selector, value, self) {
16
- var components = this.findAll(selector, self);
17
- components.forEach(component => {
18
- component.set(value);
19
- });
20
- return components;
21
- }
22
-
23
- /* this should be root-container */
24
- function undoableChange(changeFunc) {
25
- _commandChange.default.around(this.app.commander, changeFunc);
26
- }
27
- //# sourceMappingURL=change.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change.js","names":["_commandChange","_interopRequireDefault","require","e","__esModule","default","change","selector","value","self","components","findAll","forEach","component","set","undoableChange","changeFunc","CommandChange","around","app","commander"],"sources":["../../../src/things-scene/api/change.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport CommandChange from '../../command/command-change.js'\n\n/* this should be model-layer */\nexport function change(selector, value, self) {\n var components = this.findAll(selector, self)\n components.forEach(component => {\n component.set(value)\n })\n\n return components\n}\n\n/* this should be root-container */\nexport function undoableChange(changeFunc) {\n CommandChange.around(this.app.commander, changeFunc)\n}\n"],"mappings":";;;;;;;AAIA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2D,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ3D;AACA;AACA;;AAIA;AACO,SAASG,MAAMA,CAACC,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE;EAC5C,IAAIC,UAAU,GAAG,IAAI,CAACC,OAAO,CAACJ,QAAQ,EAAEE,IAAI,CAAC;EAC7CC,UAAU,CAACE,OAAO,CAACC,SAAS,IAAI;IAC9BA,SAAS,CAACC,GAAG,CAACN,KAAK,CAAC;EACtB,CAAC,CAAC;EAEF,OAAOE,UAAU;AACnB;;AAEA;AACO,SAASK,cAAcA,CAACC,UAAU,EAAE;EACzCC,sBAAa,CAACC,MAAM,CAAC,IAAI,CAACC,GAAG,CAACC,SAAS,EAAEJ,UAAU,CAAC;AACtD","ignoreList":[]}
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.copy = copy;
7
- exports.cut = cut;
8
- exports.paste = paste;
9
- var _remove = _interopRequireDefault(require("./remove.js"));
10
- var _add = _interopRequireDefault(require("./add.js"));
11
- var _logger = require("../../core/logger.js");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- /*
14
- * Copyright © HatioLab Inc. All rights reserved.
15
- */
16
-
17
- var count = 0;
18
-
19
- /* this should be root-container */
20
- function copy() {
21
- var selected = this.selected;
22
- var copied = selected.filter(component => !component.isRootModel()).map(component => component.hierarchy);
23
- if (copied.length == 0) return;
24
- count = 0;
25
- return JSON.stringify(copied, null, 2);
26
- }
27
- function cut() {
28
- count = 0;
29
- var copied = copy.call(this);
30
- _remove.default.call(this);
31
- return copied;
32
- }
33
- function paste(copied) {
34
- if (!copied) return;
35
- try {
36
- count++;
37
- _add.default.call(this, JSON.parse(copied), {
38
- x: count * 15,
39
- y: count * 15
40
- });
41
- } catch (e) {
42
- (0, _logger.error)(e, copied);
43
- }
44
- }
45
- //# sourceMappingURL=clipboard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clipboard.js","names":["_remove","_interopRequireDefault","require","_add","_logger","e","__esModule","default","count","copy","selected","copied","filter","component","isRootModel","map","hierarchy","length","JSON","stringify","cut","call","remove","paste","add","parse","x","y","error"],"sources":["../../../src/things-scene/api/clipboard.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport remove from './remove.js'\nimport add from './add.js'\nimport { error } from '../../core/logger.js'\n\nvar count = 0\n\n/* this should be root-container */\nexport function copy() {\n var selected = this.selected\n\n var copied = selected.filter(component => !component.isRootModel()).map(component => component.hierarchy)\n\n if (copied.length == 0) return\n\n count = 0\n\n return JSON.stringify(copied, null, 2)\n}\n\nexport function cut() {\n count = 0\n\n var copied = copy.call(this)\n remove.call(this)\n\n return copied\n}\n\nexport function paste(copied) {\n if (!copied) return\n\n try {\n count++\n add.call(this, JSON.parse(copied), { x: count * 15, y: count * 15 })\n } catch (e) {\n error(e, copied)\n }\n}\n"],"mappings":";;;;;;;;AAIA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAA4C,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAN5C;AACA;AACA;;AAMA,IAAIG,KAAK,GAAG,CAAC;;AAEb;AACO,SAASC,IAAIA,CAAA,EAAG;EACrB,IAAIC,QAAQ,GAAG,IAAI,CAACA,QAAQ;EAE5B,IAAIC,MAAM,GAAGD,QAAQ,CAACE,MAAM,CAACC,SAAS,IAAI,CAACA,SAAS,CAACC,WAAW,CAAC,CAAC,CAAC,CAACC,GAAG,CAACF,SAAS,IAAIA,SAAS,CAACG,SAAS,CAAC;EAEzG,IAAIL,MAAM,CAACM,MAAM,IAAI,CAAC,EAAE;EAExBT,KAAK,GAAG,CAAC;EAET,OAAOU,IAAI,CAACC,SAAS,CAACR,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AACxC;AAEO,SAASS,GAAGA,CAAA,EAAG;EACpBZ,KAAK,GAAG,CAAC;EAET,IAAIG,MAAM,GAAGF,IAAI,CAACY,IAAI,CAAC,IAAI,CAAC;EAC5BC,eAAM,CAACD,IAAI,CAAC,IAAI,CAAC;EAEjB,OAAOV,MAAM;AACf;AAEO,SAASY,KAAKA,CAACZ,MAAM,EAAE;EAC5B,IAAI,CAACA,MAAM,EAAE;EAEb,IAAI;IACFH,KAAK,EAAE;IACPgB,YAAG,CAACH,IAAI,CAAC,IAAI,EAAEH,IAAI,CAACO,KAAK,CAACd,MAAM,CAAC,EAAE;MAAEe,CAAC,EAAElB,KAAK,GAAG,EAAE;MAAEmB,CAAC,EAAEnB,KAAK,GAAG;IAAG,CAAC,CAAC;EACtE,CAAC,CAAC,OAAOH,CAAC,EAAE;IACV,IAAAuB,aAAK,EAACvB,CAAC,EAAEM,MAAM,CAAC;EAClB;AACF","ignoreList":[]}
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = distribute;
7
- var _commandChange = _interopRequireDefault(require("../../command/command-change.js"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- /*
10
- * Copyright © HatioLab Inc. All rights reserved.
11
- */
12
-
13
- const VERTICAL = 'VERTICAL';
14
- const HORIZONTAL = 'HORIZONTAL';
15
- const DISTRIBUTE_COMMANDS = [VERTICAL, HORIZONTAL];
16
- function _distribute(type, selected) {
17
- var order = selected.filter(c => !c.stuck).slice(0);
18
- order.sort(function (a, b) {
19
- let ca = a.center;
20
- let cb = b.center;
21
- return type === VERTICAL ? ca.y - cb.y : ca.x - cb.x;
22
- });
23
- var length_sum = order.reduce((sum, c) => {
24
- return sum + (type === VERTICAL ? c.bounds.height : c.bounds.width);
25
- }, 0);
26
- var first_bounds = order[0].bounds;
27
- var last_bounds = order[order.length - 1].bounds;
28
- var bounds_length = type === VERTICAL ? last_bounds.top + last_bounds.height - first_bounds.top : last_bounds.left + last_bounds.width - first_bounds.left;
29
- var space = (bounds_length - length_sum) / (order.length - 1);
30
- var offset = type === VERTICAL ? first_bounds.top + first_bounds.height : first_bounds.left + first_bounds.width;
31
- for (let i = 1; i < order.length - 1; i++) {
32
- let component = order[i];
33
- let bounds = component.bounds;
34
- offset += space;
35
- if (type === VERTICAL) {
36
- bounds.top = offset;
37
- offset += bounds.height;
38
- } else {
39
- bounds.left = offset;
40
- offset += bounds.width;
41
- }
42
- component.bounds = bounds;
43
- }
44
- }
45
-
46
- /* this should be root-container */
47
- function distribute(type) {
48
- if (!this.hasSameParentForAllSelected || DISTRIBUTE_COMMANDS.indexOf(type) == -1) return;
49
- var selected = this.selected;
50
- if (selected.length <= 1) return;
51
- var commander = this.app.commander;
52
- _commandChange.default.around(commander, function () {
53
- // 선택된 컴포넌트들을 움직인다.
54
- _distribute(type, selected);
55
- });
56
- }
57
- //# sourceMappingURL=distribute.js.map