@pie-element/hotspot 11.1.1-next.1 → 11.1.1-next.29

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 (339) hide show
  1. package/CHANGELOG.json +997 -0
  2. package/CHANGELOG.md +2210 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +1 -0
  5. package/configure/CHANGELOG.json +682 -0
  6. package/configure/CHANGELOG.md +1947 -0
  7. package/configure/lib/DeleteWidget.js +64 -0
  8. package/configure/lib/DeleteWidget.js.map +1 -0
  9. package/configure/lib/button.js +42 -0
  10. package/configure/lib/button.js.map +1 -0
  11. package/configure/lib/buttons/circle.js +33 -0
  12. package/configure/lib/buttons/circle.js.map +1 -0
  13. package/configure/lib/buttons/polygon.js +39 -0
  14. package/configure/lib/buttons/polygon.js.map +1 -0
  15. package/configure/lib/buttons/rectangle.js +39 -0
  16. package/configure/lib/buttons/rectangle.js.map +1 -0
  17. package/configure/lib/defaults.js +155 -0
  18. package/configure/lib/defaults.js.map +1 -0
  19. package/configure/lib/hotspot-circle.js +192 -0
  20. package/configure/lib/hotspot-circle.js.map +1 -0
  21. package/configure/lib/hotspot-container.js +320 -0
  22. package/configure/lib/hotspot-container.js.map +1 -0
  23. package/configure/lib/hotspot-drawable.js +519 -0
  24. package/configure/lib/hotspot-drawable.js.map +1 -0
  25. package/configure/lib/hotspot-palette.js +107 -0
  26. package/configure/lib/hotspot-palette.js.map +1 -0
  27. package/configure/lib/hotspot-polygon.js +293 -0
  28. package/configure/lib/hotspot-polygon.js.map +1 -0
  29. package/configure/lib/hotspot-rectangle.js +190 -0
  30. package/configure/lib/hotspot-rectangle.js.map +1 -0
  31. package/configure/lib/icons.js +7 -0
  32. package/configure/lib/icons.js.map +1 -0
  33. package/configure/lib/image-konva.js +66 -0
  34. package/configure/lib/image-konva.js.map +1 -0
  35. package/configure/lib/index.js +194 -0
  36. package/configure/lib/index.js.map +1 -0
  37. package/configure/lib/root.js +330 -0
  38. package/configure/lib/root.js.map +1 -0
  39. package/configure/lib/shapes/circle.js +84 -0
  40. package/configure/lib/shapes/circle.js.map +1 -0
  41. package/configure/lib/shapes/index.js +50 -0
  42. package/configure/lib/shapes/index.js.map +1 -0
  43. package/configure/lib/shapes/polygon.js +82 -0
  44. package/configure/lib/shapes/polygon.js.map +1 -0
  45. package/configure/lib/shapes/rectagle.js +84 -0
  46. package/configure/lib/shapes/rectagle.js.map +1 -0
  47. package/configure/lib/shapes/utils.js +21 -0
  48. package/configure/lib/shapes/utils.js.map +1 -0
  49. package/configure/lib/upload-control.js +41 -0
  50. package/configure/lib/upload-control.js.map +1 -0
  51. package/configure/lib/utils.js +185 -0
  52. package/configure/lib/utils.js.map +1 -0
  53. package/configure/package.json +26 -0
  54. package/configure/src/DeleteWidget.jsx +51 -0
  55. package/configure/src/__tests__/DeleteWidget.test.jsx +366 -0
  56. package/configure/src/__tests__/button.test.jsx +198 -0
  57. package/configure/src/__tests__/hotspot-circle.test.jsx +259 -0
  58. package/configure/src/__tests__/hotspot-container.test.js +366 -0
  59. package/configure/src/__tests__/hotspot-drawable.test.js +271 -0
  60. package/configure/src/__tests__/hotspot-palette.test.jsx +71 -0
  61. package/configure/src/__tests__/image-konva.test.jsx +226 -0
  62. package/configure/src/__tests__/index.test.js +329 -0
  63. package/configure/src/__tests__/root.test.js +400 -0
  64. package/configure/src/__tests__/utils.test.js +241 -0
  65. package/configure/src/button.jsx +35 -0
  66. package/configure/src/buttons/circle.jsx +18 -0
  67. package/configure/src/buttons/polygon.jsx +29 -0
  68. package/configure/src/buttons/rectangle.jsx +29 -0
  69. package/configure/src/defaults.js +109 -0
  70. package/configure/src/hotspot-circle.jsx +183 -0
  71. package/configure/src/hotspot-container.jsx +330 -0
  72. package/configure/src/hotspot-drawable.jsx +527 -0
  73. package/configure/src/hotspot-palette.jsx +90 -0
  74. package/configure/src/hotspot-polygon.jsx +294 -0
  75. package/configure/src/hotspot-rectangle.jsx +169 -0
  76. package/configure/src/icons.js +5 -0
  77. package/configure/src/image-konva.jsx +63 -0
  78. package/configure/src/index.js +208 -0
  79. package/configure/src/root.jsx +346 -0
  80. package/configure/src/shapes/circle.js +81 -0
  81. package/configure/src/shapes/index.js +4 -0
  82. package/configure/src/shapes/polygon.js +81 -0
  83. package/configure/src/shapes/rectagle.js +82 -0
  84. package/configure/src/shapes/utils.js +16 -0
  85. package/configure/src/upload-control.jsx +33 -0
  86. package/configure/src/utils.js +210 -0
  87. package/controller/CHANGELOG.json +362 -0
  88. package/controller/CHANGELOG.md +1300 -0
  89. package/controller/lib/defaults.js +33 -0
  90. package/controller/lib/defaults.js.map +1 -0
  91. package/controller/lib/index.js +341 -0
  92. package/controller/lib/index.js.map +1 -0
  93. package/controller/lib/utils.js +32 -0
  94. package/controller/lib/utils.js.map +1 -0
  95. package/controller/package.json +18 -0
  96. package/controller/src/__tests__/index.test.js +419 -0
  97. package/controller/src/__tests__/utils.test.js +5 -0
  98. package/controller/src/defaults.js +19 -0
  99. package/controller/src/index.js +328 -0
  100. package/controller/src/utils.js +29 -0
  101. package/docs/config-schema.json +2023 -0
  102. package/docs/config-schema.json.md +1495 -0
  103. package/docs/demo/config.js +8 -0
  104. package/docs/demo/generate.js +118 -0
  105. package/docs/demo/index.html +1 -0
  106. package/docs/demo/session.js +11 -0
  107. package/docs/pie-schema.json +1204 -0
  108. package/docs/pie-schema.json.md +851 -0
  109. package/lib/hotspot/circle.js +156 -0
  110. package/lib/hotspot/circle.js.map +1 -0
  111. package/lib/hotspot/container.js +206 -0
  112. package/lib/hotspot/container.js.map +1 -0
  113. package/lib/hotspot/icons.js +8 -0
  114. package/lib/hotspot/icons.js.map +1 -0
  115. package/lib/hotspot/image-konva-tooltip.js +86 -0
  116. package/lib/hotspot/image-konva-tooltip.js.map +1 -0
  117. package/lib/hotspot/index.js +163 -0
  118. package/lib/hotspot/index.js.map +1 -0
  119. package/lib/hotspot/polygon.js +203 -0
  120. package/lib/hotspot/polygon.js.map +1 -0
  121. package/lib/hotspot/rectangle.js +175 -0
  122. package/lib/hotspot/rectangle.js.map +1 -0
  123. package/lib/index.js +213 -0
  124. package/lib/index.js.map +1 -0
  125. package/lib/session-updater.js +42 -0
  126. package/lib/session-updater.js.map +1 -0
  127. package/package.json +19 -57
  128. package/src/__tests__/container.test.jsx +58 -0
  129. package/src/__tests__/index.test.js +123 -0
  130. package/src/__tests__/session-updater.test.jsx +69 -0
  131. package/src/hotspot/__tests__/circle.test.jsx +464 -0
  132. package/src/hotspot/__tests__/container.test.jsx +546 -0
  133. package/src/hotspot/__tests__/image-konva-tooltip.test.jsx +510 -0
  134. package/src/hotspot/__tests__/polygon.test.jsx +502 -0
  135. package/src/hotspot/__tests__/rectangle.test.jsx +418 -0
  136. package/src/hotspot/circle.jsx +152 -0
  137. package/src/hotspot/container.jsx +217 -0
  138. package/src/hotspot/icons.js +7 -0
  139. package/src/hotspot/image-konva-tooltip.jsx +76 -0
  140. package/src/hotspot/index.jsx +165 -0
  141. package/src/hotspot/polygon.jsx +195 -0
  142. package/src/hotspot/rectangle.jsx +171 -0
  143. package/src/index.js +226 -0
  144. package/src/session-updater.js +29 -0
  145. package/dist/author/DeleteWidget.d.ts +0 -38
  146. package/dist/author/DeleteWidget.js +0 -46
  147. package/dist/author/button.d.ts +0 -31
  148. package/dist/author/button.js +0 -27
  149. package/dist/author/buttons/circle.d.ts +0 -18
  150. package/dist/author/buttons/circle.js +0 -25
  151. package/dist/author/buttons/polygon.d.ts +0 -18
  152. package/dist/author/buttons/polygon.js +0 -36
  153. package/dist/author/buttons/rectangle.d.ts +0 -18
  154. package/dist/author/buttons/rectangle.js +0 -36
  155. package/dist/author/defaults.d.ts +0 -157
  156. package/dist/author/defaults.js +0 -119
  157. package/dist/author/hotspot-circle.d.ts +0 -21
  158. package/dist/author/hotspot-circle.js +0 -124
  159. package/dist/author/hotspot-container.d.ts +0 -29
  160. package/dist/author/hotspot-container.js +0 -210
  161. package/dist/author/hotspot-drawable.d.ts +0 -31
  162. package/dist/author/hotspot-drawable.js +0 -312
  163. package/dist/author/hotspot-palette.d.ts +0 -14
  164. package/dist/author/hotspot-palette.js +0 -72
  165. package/dist/author/hotspot-polygon.d.ts +0 -38
  166. package/dist/author/hotspot-polygon.js +0 -200
  167. package/dist/author/hotspot-rectangle.d.ts +0 -20
  168. package/dist/author/hotspot-rectangle.js +0 -119
  169. package/dist/author/icons.d.ts +0 -9
  170. package/dist/author/icons.js +0 -4
  171. package/dist/author/image-konva.d.ts +0 -19
  172. package/dist/author/image-konva.js +0 -49
  173. package/dist/author/index.d.ts +0 -52
  174. package/dist/author/index.js +0 -143
  175. package/dist/author/root.d.ts +0 -15
  176. package/dist/author/root.js +0 -215
  177. package/dist/author/shapes/circle.d.ts +0 -18
  178. package/dist/author/shapes/circle.js +0 -47
  179. package/dist/author/shapes/index.d.ts +0 -12
  180. package/dist/author/shapes/polygon.d.ts +0 -19
  181. package/dist/author/shapes/polygon.js +0 -51
  182. package/dist/author/shapes/rectagle.d.ts +0 -18
  183. package/dist/author/shapes/rectagle.js +0 -57
  184. package/dist/author/shapes/utils.d.ts +0 -19
  185. package/dist/author/shapes/utils.js +0 -16
  186. package/dist/author/upload-control.d.ts +0 -29
  187. package/dist/author/upload-control.js +0 -28
  188. package/dist/author/utils.d.ts +0 -24
  189. package/dist/author/utils.js +0 -83
  190. package/dist/controller/defaults.d.ts +0 -35
  191. package/dist/controller/defaults.js +0 -29
  192. package/dist/controller/index.d.ts +0 -22
  193. package/dist/controller/index.js +0 -154
  194. package/dist/controller/utils.d.ts +0 -10
  195. package/dist/controller/utils.js +0 -13
  196. package/dist/delivery/hotspot/circle.d.ts +0 -19
  197. package/dist/delivery/hotspot/circle.js +0 -100
  198. package/dist/delivery/hotspot/container.d.ts +0 -16
  199. package/dist/delivery/hotspot/container.js +0 -150
  200. package/dist/delivery/hotspot/icons.d.ts +0 -10
  201. package/dist/delivery/hotspot/icons.js +0 -4
  202. package/dist/delivery/hotspot/image-konva-tooltip.d.ts +0 -19
  203. package/dist/delivery/hotspot/image-konva-tooltip.js +0 -66
  204. package/dist/delivery/hotspot/index.d.ts +0 -17
  205. package/dist/delivery/hotspot/index.js +0 -114
  206. package/dist/delivery/hotspot/polygon.d.ts +0 -21
  207. package/dist/delivery/hotspot/polygon.js +0 -108
  208. package/dist/delivery/hotspot/rectangle.d.ts +0 -19
  209. package/dist/delivery/hotspot/rectangle.js +0 -104
  210. package/dist/delivery/index.d.ts +0 -20
  211. package/dist/delivery/index.js +0 -107
  212. package/dist/delivery/session-updater.d.ts +0 -10
  213. package/dist/delivery/session-updater.js +0 -14
  214. package/dist/index.d.ts +0 -1
  215. package/dist/index.iife.d.ts +0 -8
  216. package/dist/index.iife.js +0 -169
  217. package/dist/index.js +0 -2
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  230. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  231. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  232. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  233. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  234. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  235. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  236. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  237. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  238. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  239. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  240. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  241. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  242. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  243. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  244. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  245. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  246. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  247. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  248. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  249. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  250. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  251. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  252. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  253. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  254. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  255. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  256. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  257. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  258. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  259. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  260. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  261. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  262. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  263. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  264. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  265. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  266. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  267. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  268. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  269. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  270. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  271. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  272. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  273. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  274. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  275. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  276. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  277. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  278. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  279. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  280. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  281. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  282. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  283. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  284. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  285. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  286. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  287. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  288. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  289. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  290. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  291. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  292. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  293. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  294. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  295. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  296. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  297. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  298. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  299. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  300. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  301. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  302. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  303. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  304. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  305. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  306. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  307. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  308. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  309. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  310. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  311. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  312. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  313. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  314. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  315. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  316. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  317. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  318. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  319. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  320. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  321. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  322. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  323. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  324. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  325. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  326. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  327. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  328. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  329. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  330. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  331. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  332. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  333. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  334. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  335. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  336. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  337. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  338. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  339. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _reactKonva = require("react-konva");
11
+ var _icons = require("./icons");
12
+ var _imageKonva = _interopRequireDefault(require("./image-konva"));
13
+ var _utils = require("./utils");
14
+ const DeleteWidget = ({
15
+ height,
16
+ id,
17
+ width,
18
+ x,
19
+ y,
20
+ points,
21
+ isCircle,
22
+ radius,
23
+ handleWidgetClick
24
+ }) => {
25
+ let positionX, positionY;
26
+ const offset = 20;
27
+ if (isCircle) {
28
+ // For circles, position the delete icon above the circle
29
+ positionX = x + radius - offset;
30
+ positionY = y;
31
+ } else if (points) {
32
+ // For polygons, compute position based on points
33
+ const calculated = (0, _utils.calculate)(points);
34
+ positionX = calculated.x;
35
+ positionY = calculated.y;
36
+ } else {
37
+ // For rectangles
38
+ positionX = x + width - offset;
39
+ positionY = y + height - offset;
40
+ }
41
+ return /*#__PURE__*/_react.default.createElement(_reactKonva.Group, {
42
+ onClick: () => handleWidgetClick(id)
43
+ }, /*#__PURE__*/_react.default.createElement(_imageKonva.default, {
44
+ x: positionX,
45
+ y: positionY,
46
+ src: _icons.faDelete
47
+ }));
48
+ };
49
+ DeleteWidget.propTypes = {
50
+ id: _propTypes.default.string.isRequired,
51
+ height: _propTypes.default.number,
52
+ width: _propTypes.default.number,
53
+ x: _propTypes.default.number.isRequired,
54
+ y: _propTypes.default.number.isRequired,
55
+ handleWidgetClick: _propTypes.default.func.isRequired,
56
+ radius: _propTypes.default.number,
57
+ isCircle: _propTypes.default.bool,
58
+ points: _propTypes.default.arrayOf(_propTypes.default.shape({
59
+ x: _propTypes.default.number,
60
+ y: _propTypes.default.number
61
+ }))
62
+ };
63
+ var _default = exports.default = DeleteWidget;
64
+ //# sourceMappingURL=DeleteWidget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeleteWidget.js","names":["_react","_interopRequireDefault","require","_propTypes","_reactKonva","_icons","_imageKonva","_utils","DeleteWidget","height","id","width","x","y","points","isCircle","radius","handleWidgetClick","positionX","positionY","offset","calculated","calculate","default","createElement","Group","onClick","src","faDelete","propTypes","PropTypes","string","isRequired","number","func","bool","arrayOf","shape","_default","exports"],"sources":["../src/DeleteWidget.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Group } from 'react-konva';\nimport { faDelete } from './icons';\nimport ImageComponent from './image-konva';\nimport { calculate } from './utils';\n\nconst DeleteWidget = ({ height, id, width, x, y, points, isCircle, radius, handleWidgetClick }) => {\n let positionX, positionY;\n const offset = 20;\n\n if (isCircle) {\n // For circles, position the delete icon above the circle\n positionX = x + radius - offset;\n positionY = y;\n } else if (points) {\n // For polygons, compute position based on points\n const calculated = calculate(points);\n positionX = calculated.x;\n positionY = calculated.y;\n } else {\n // For rectangles\n positionX = x + width - offset;\n positionY = y + height - offset;\n }\n\n return (\n <Group onClick={() => handleWidgetClick(id)}>\n <ImageComponent x={positionX} y={positionY} src={faDelete} />\n </Group>\n );\n};\n\nDeleteWidget.propTypes = {\n id: PropTypes.string.isRequired,\n height: PropTypes.number,\n width: PropTypes.number,\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n handleWidgetClick: PropTypes.func.isRequired,\n radius: PropTypes.number,\n isCircle: PropTypes.bool,\n points: PropTypes.arrayOf(\n PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n }),\n ),\n};\n\nexport default DeleteWidget;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,MAAMM,YAAY,GAAGA,CAAC;EAAEC,MAAM;EAAEC,EAAE;EAAEC,KAAK;EAAEC,CAAC;EAAEC,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC,MAAM;EAAEC;AAAkB,CAAC,KAAK;EACjG,IAAIC,SAAS,EAAEC,SAAS;EACxB,MAAMC,MAAM,GAAG,EAAE;EAEjB,IAAIL,QAAQ,EAAE;IACZ;IACAG,SAAS,GAAGN,CAAC,GAAGI,MAAM,GAAGI,MAAM;IAC/BD,SAAS,GAAGN,CAAC;EACf,CAAC,MAAM,IAAIC,MAAM,EAAE;IACjB;IACA,MAAMO,UAAU,GAAG,IAAAC,gBAAS,EAACR,MAAM,CAAC;IACpCI,SAAS,GAAGG,UAAU,CAACT,CAAC;IACxBO,SAAS,GAAGE,UAAU,CAACR,CAAC;EAC1B,CAAC,MAAM;IACL;IACAK,SAAS,GAAGN,CAAC,GAAGD,KAAK,GAAGS,MAAM;IAC9BD,SAAS,GAAGN,CAAC,GAAGJ,MAAM,GAAGW,MAAM;EACjC;EAEA,oBACEpB,MAAA,CAAAuB,OAAA,CAAAC,aAAA,CAACpB,WAAA,CAAAqB,KAAK;IAACC,OAAO,EAAEA,CAAA,KAAMT,iBAAiB,CAACP,EAAE;EAAE,gBAC1CV,MAAA,CAAAuB,OAAA,CAAAC,aAAA,CAAClB,WAAA,CAAAiB,OAAc;IAACX,CAAC,EAAEM,SAAU;IAACL,CAAC,EAAEM,SAAU;IAACQ,GAAG,EAAEC;EAAS,CAAE,CACvD,CAAC;AAEZ,CAAC;AAEDpB,YAAY,CAACqB,SAAS,GAAG;EACvBnB,EAAE,EAAEoB,kBAAS,CAACC,MAAM,CAACC,UAAU;EAC/BvB,MAAM,EAAEqB,kBAAS,CAACG,MAAM;EACxBtB,KAAK,EAAEmB,kBAAS,CAACG,MAAM;EACvBrB,CAAC,EAAEkB,kBAAS,CAACG,MAAM,CAACD,UAAU;EAC9BnB,CAAC,EAAEiB,kBAAS,CAACG,MAAM,CAACD,UAAU;EAC9Bf,iBAAiB,EAAEa,kBAAS,CAACI,IAAI,CAACF,UAAU;EAC5ChB,MAAM,EAAEc,kBAAS,CAACG,MAAM;EACxBlB,QAAQ,EAAEe,kBAAS,CAACK,IAAI;EACxBrB,MAAM,EAAEgB,kBAAS,CAACM,OAAO,CACvBN,kBAAS,CAACO,KAAK,CAAC;IACdzB,CAAC,EAAEkB,kBAAS,CAACG,MAAM;IACnBpB,CAAC,EAAEiB,kBAAS,CAACG;EACf,CAAC,CACH;AACF,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAhB,OAAA,GAEaf,YAAY","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _styles = require("@mui/material/styles");
11
+ var _Button = _interopRequireDefault(require("@mui/material/Button"));
12
+ const StyledButton = (0, _styles.styled)(_Button.default)(({
13
+ theme
14
+ }) => ({
15
+ marginLeft: theme.spacing(1)
16
+ }));
17
+ const RawButton = ({
18
+ className,
19
+ label,
20
+ onClick,
21
+ disabled
22
+ }) => /*#__PURE__*/_react.default.createElement(StyledButton, {
23
+ onClick: onClick,
24
+ disabled: disabled,
25
+ className: className,
26
+ size: "small",
27
+ variant: "contained"
28
+ }, label);
29
+ RawButton.propTypes = {
30
+ className: _propTypes.default.string,
31
+ disabled: _propTypes.default.bool,
32
+ label: _propTypes.default.string,
33
+ onClick: _propTypes.default.func
34
+ };
35
+ RawButton.defaultProps = {
36
+ className: '',
37
+ disabled: false,
38
+ label: 'Add',
39
+ onClick: () => {}
40
+ };
41
+ var _default = exports.default = RawButton;
42
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Button","StyledButton","styled","Button","theme","marginLeft","spacing","RawButton","className","label","onClick","disabled","default","createElement","size","variant","propTypes","PropTypes","string","bool","func","defaultProps","_default","exports"],"sources":["../src/button.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Button from '@mui/material/Button';\n\nconst StyledButton = styled(Button)(({ theme }) => ({\n marginLeft: theme.spacing(1),\n}));\n\nconst RawButton = ({ className, label, onClick, disabled }) => (\n <StyledButton\n onClick={onClick}\n disabled={disabled}\n className={className}\n size=\"small\"\n variant=\"contained\">\n {label}\n </StyledButton>\n);\n\nRawButton.propTypes = {\n className: PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string,\n onClick: PropTypes.func,\n};\n\nRawButton.defaultProps = {\n className: '',\n disabled: false,\n label: 'Add',\n onClick: () => {},\n};\n\nexport default RawButton;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,MAAMI,YAAY,GAAG,IAAAC,cAAM,EAACC,eAAM,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EAClDC,UAAU,EAAED,KAAK,CAACE,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH,MAAMC,SAAS,GAAGA,CAAC;EAAEC,SAAS;EAAEC,KAAK;EAAEC,OAAO;EAAEC;AAAS,CAAC,kBACxDhB,MAAA,CAAAiB,OAAA,CAAAC,aAAA,CAACZ,YAAY;EACXS,OAAO,EAAEA,OAAQ;EACjBC,QAAQ,EAAEA,QAAS;EACnBH,SAAS,EAAEA,SAAU;EACrBM,IAAI,EAAC,OAAO;EACZC,OAAO,EAAC;AAAW,GAClBN,KACW,CACf;AAEDF,SAAS,CAACS,SAAS,GAAG;EACpBR,SAAS,EAAES,kBAAS,CAACC,MAAM;EAC3BP,QAAQ,EAAEM,kBAAS,CAACE,IAAI;EACxBV,KAAK,EAAEQ,kBAAS,CAACC,MAAM;EACvBR,OAAO,EAAEO,kBAAS,CAACG;AACrB,CAAC;AAEDb,SAAS,CAACc,YAAY,GAAG;EACvBb,SAAS,EAAE,EAAE;EACbG,QAAQ,EAAE,KAAK;EACfF,KAAK,EAAE,KAAK;EACZC,OAAO,EAAEA,CAAA,KAAM,CAAC;AAClB,CAAC;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAX,OAAA,GAEaL,SAAS","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.CircleButton = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ const CircleButton = ({
11
+ isActive = false
12
+ }) => /*#__PURE__*/_react.default.createElement("svg", {
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "48",
15
+ height: "32",
16
+ viewBox: "56 0 48 32",
17
+ fill: "none"
18
+ }, /*#__PURE__*/_react.default.createElement("path", {
19
+ fillRule: "evenodd",
20
+ clipRule: "evenodd",
21
+ d: "M56 4C56 1.79086 57.7909 0 60 0H99C101.209 0 103 1.79086 103 4V28.0001C103 30.2093 101.209 32.0001 99 32.0001H60C57.7909 32.0001 56 30.2093 56 28.0001V4Z",
22
+ fill: isActive ? '#D3D4D9' : '#ECEDF1'
23
+ }), /*#__PURE__*/_react.default.createElement("circle", {
24
+ cx: "79",
25
+ cy: "16",
26
+ r: "7.5",
27
+ stroke: "black"
28
+ }));
29
+ exports.CircleButton = CircleButton;
30
+ CircleButton.propTypes = {
31
+ isActive: _propTypes.default.bool
32
+ };
33
+ //# sourceMappingURL=circle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle.js","names":["_propTypes","_interopRequireDefault","require","_react","CircleButton","isActive","default","createElement","xmlns","width","height","viewBox","fill","fillRule","clipRule","d","cx","cy","r","stroke","exports","propTypes","PropTypes","bool"],"sources":["../../src/buttons/circle.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nexport const CircleButton = ({ isActive = false }) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"32\" viewBox=\"56 0 48 32\" fill=\"none\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M56 4C56 1.79086 57.7909 0 60 0H99C101.209 0 103 1.79086 103 4V28.0001C103 30.2093 101.209 32.0001 99 32.0001H60C57.7909 32.0001 56 30.2093 56 28.0001V4Z\"\n fill={isActive ? '#D3D4D9' : '#ECEDF1'}\n />\n <circle cx=\"79\" cy=\"16\" r=\"7.5\" stroke=\"black\" />\n </svg>\n);\n\nCircleButton.propTypes = {\n isActive: PropTypes.bool,\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEO,MAAME,YAAY,GAAGA,CAAC;EAAEC,QAAQ,GAAG;AAAM,CAAC,kBAC/CF,MAAA,CAAAG,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAC,4BAA4B;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,YAAY;EAACC,IAAI,EAAC;AAAM,gBAC7FT,MAAA,CAAAG,OAAA,CAAAC,aAAA;EACEM,QAAQ,EAAC,SAAS;EAClBC,QAAQ,EAAC,SAAS;EAClBC,CAAC,EAAC,2JAA2J;EAC7JH,IAAI,EAAEP,QAAQ,GAAG,SAAS,GAAG;AAAU,CACxC,CAAC,eACFF,MAAA,CAAAG,OAAA,CAAAC,aAAA;EAAQS,EAAE,EAAC,IAAI;EAACC,EAAE,EAAC,IAAI;EAACC,CAAC,EAAC,KAAK;EAACC,MAAM,EAAC;AAAO,CAAE,CAC7C,CACN;AAACC,OAAA,CAAAhB,YAAA,GAAAA,YAAA;AAEFA,YAAY,CAACiB,SAAS,GAAG;EACvBhB,QAAQ,EAAEiB,kBAAS,CAACC;AACtB,CAAC","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.PolygonButton = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ const PolygonButton = ({
11
+ isActive = false
12
+ }) => /*#__PURE__*/_react.default.createElement("svg", {
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "48",
15
+ height: "32",
16
+ viewBox: "112 0 48 32",
17
+ fill: "none"
18
+ }, /*#__PURE__*/_react.default.createElement("path", {
19
+ fillRule: "evenodd",
20
+ clipRule: "evenodd",
21
+ d: "M112 4C112 1.79086 113.791 0 116 0H155C157.209 0 159 1.79086 159 4V28.0001C159 30.2093 157.209 32.0001 155 32.0001H116C113.791 32.0001 112 30.2093 112 28.0001V4Z",
22
+ fill: isActive ? '#D3D4D9' : '#ECEDF1'
23
+ }), /*#__PURE__*/_react.default.createElement("mask", {
24
+ id: "path-6-inside-1_2196_700",
25
+ fill: "white"
26
+ }, /*#__PURE__*/_react.default.createElement("path", {
27
+ fillRule: "evenodd",
28
+ clipRule: "evenodd",
29
+ d: "M130 8H126V12H127.5V20H126V24H130V22.7145H141V24H145V20H141.737L139.998 18H140V14.4265L142.11 12H145V8H141V9.71451H130V8ZM139.046 14L141 11.7525V10.7145H130V12H128.5V20H130V21.7145H141V20.6765L138.673 18H136V14H139.046Z"
30
+ })), /*#__PURE__*/_react.default.createElement("path", {
31
+ d: "M126 8V7H125V8H126ZM130 8H131V7H130V8ZM126 12H125V13H126V12ZM127.5 12H128.5V11H127.5V12ZM127.5 20V21H128.5V20H127.5ZM126 20V19H125V20H126ZM126 24H125V25H126V24ZM130 24V25H131V24H130ZM130 22.7145V21.7145H129V22.7145H130ZM141 22.7145H142V21.7145H141V22.7145ZM141 24H140V25H141V24ZM145 24V25H146V24H145ZM145 20H146V19H145V20ZM141.737 20L140.982 20.6562L141.281 21H141.737V20ZM139.998 18V17H137.803L139.243 18.6562L139.998 18ZM140 18V19H141V18H140ZM140 14.4265L139.245 13.7703L139 14.0525V14.4265H140ZM142.11 12V11H141.654L141.355 11.3438L142.11 12ZM145 12V13H146V12H145ZM145 8H146V7H145V8ZM141 8V7H140V8H141ZM141 9.71451V10.7145H142V9.71451H141ZM130 9.71451H129V10.7145H130V9.71451ZM141 11.7525L141.755 12.4087L142 12.1265V11.7525H141ZM139.046 14V15H139.501L139.8 14.6562L139.046 14ZM141 10.7145H142V9.71451H141V10.7145ZM130 10.7145V9.71451H129V10.7145H130ZM130 12V13H131V12H130ZM128.5 12V11H127.5V12H128.5ZM128.5 20H127.5V21H128.5V20ZM130 20H131V19H130V20ZM130 21.7145H129V22.7145H130V21.7145ZM141 21.7145V22.7145H142V21.7145H141ZM141 20.6765H142V20.3025L141.755 20.0203L141 20.6765ZM138.673 18L139.427 17.3438L139.128 17H138.673V18ZM136 18H135V19H136V18ZM136 14V13H135V14H136ZM126 9H130V7H126V9ZM127 12V8H125V12H127ZM127.5 11H126V13H127.5V11ZM128.5 20V12H126.5V20H128.5ZM126 21H127.5V19H126V21ZM127 24V20H125V24H127ZM130 23H126V25H130V23ZM129 22.7145V24H131V22.7145H129ZM141 21.7145H130V23.7145H141V21.7145ZM142 24V22.7145H140V24H142ZM145 23H141V25H145V23ZM144 20V24H146V20H144ZM141.737 21H145V19H141.737V21ZM139.243 18.6562L140.982 20.6562L142.492 19.3438L140.752 17.3438L139.243 18.6562ZM140 17H139.998V19H140V17ZM139 14.4265V18H141V14.4265H139ZM141.355 11.3438L139.245 13.7703L140.755 15.0827L142.865 12.6562L141.355 11.3438ZM145 11H142.11V13H145V11ZM144 8V12H146V8H144ZM141 9H145V7H141V9ZM142 9.71451V8H140V9.71451H142ZM130 10.7145H141V8.71451H130V10.7145ZM129 8V9.71451H131V8H129ZM140.245 11.0963L138.291 13.3438L139.8 14.6562L141.755 12.4087L140.245 11.0963ZM140 10.7145V11.7525H142V10.7145H140ZM130 11.7145H141V9.71451H130V11.7145ZM131 12V10.7145H129V12H131ZM128.5 13H130V11H128.5V13ZM129.5 20V12H127.5V20H129.5ZM130 19H128.5V21H130V19ZM131 21.7145V20H129V21.7145H131ZM141 20.7145H130V22.7145H141V20.7145ZM140 20.6765V21.7145H142V20.6765H140ZM137.918 18.6562L140.245 21.3327L141.755 20.0203L139.427 17.3438L137.918 18.6562ZM138.673 17H136V19H138.673V17ZM137 18V14H135V18H137ZM136 15H139.046V13H136V15Z",
32
+ fill: "black",
33
+ mask: "url(#path-6-inside-1_2196_700)"
34
+ }));
35
+ exports.PolygonButton = PolygonButton;
36
+ PolygonButton.propTypes = {
37
+ isActive: _propTypes.default.bool
38
+ };
39
+ //# sourceMappingURL=polygon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon.js","names":["_propTypes","_interopRequireDefault","require","_react","PolygonButton","isActive","default","createElement","xmlns","width","height","viewBox","fill","fillRule","clipRule","d","id","mask","exports","propTypes","PropTypes","bool"],"sources":["../../src/buttons/polygon.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nexport const PolygonButton = ({ isActive = false }) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"32\" viewBox=\"112 0 48 32\" fill=\"none\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M112 4C112 1.79086 113.791 0 116 0H155C157.209 0 159 1.79086 159 4V28.0001C159 30.2093 157.209 32.0001 155 32.0001H116C113.791 32.0001 112 30.2093 112 28.0001V4Z\"\n fill={isActive ? '#D3D4D9' : '#ECEDF1'}\n />\n <mask id=\"path-6-inside-1_2196_700\" fill=\"white\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M130 8H126V12H127.5V20H126V24H130V22.7145H141V24H145V20H141.737L139.998 18H140V14.4265L142.11 12H145V8H141V9.71451H130V8ZM139.046 14L141 11.7525V10.7145H130V12H128.5V20H130V21.7145H141V20.6765L138.673 18H136V14H139.046Z\"\n />\n </mask>\n <path\n d=\"M126 8V7H125V8H126ZM130 8H131V7H130V8ZM126 12H125V13H126V12ZM127.5 12H128.5V11H127.5V12ZM127.5 20V21H128.5V20H127.5ZM126 20V19H125V20H126ZM126 24H125V25H126V24ZM130 24V25H131V24H130ZM130 22.7145V21.7145H129V22.7145H130ZM141 22.7145H142V21.7145H141V22.7145ZM141 24H140V25H141V24ZM145 24V25H146V24H145ZM145 20H146V19H145V20ZM141.737 20L140.982 20.6562L141.281 21H141.737V20ZM139.998 18V17H137.803L139.243 18.6562L139.998 18ZM140 18V19H141V18H140ZM140 14.4265L139.245 13.7703L139 14.0525V14.4265H140ZM142.11 12V11H141.654L141.355 11.3438L142.11 12ZM145 12V13H146V12H145ZM145 8H146V7H145V8ZM141 8V7H140V8H141ZM141 9.71451V10.7145H142V9.71451H141ZM130 9.71451H129V10.7145H130V9.71451ZM141 11.7525L141.755 12.4087L142 12.1265V11.7525H141ZM139.046 14V15H139.501L139.8 14.6562L139.046 14ZM141 10.7145H142V9.71451H141V10.7145ZM130 10.7145V9.71451H129V10.7145H130ZM130 12V13H131V12H130ZM128.5 12V11H127.5V12H128.5ZM128.5 20H127.5V21H128.5V20ZM130 20H131V19H130V20ZM130 21.7145H129V22.7145H130V21.7145ZM141 21.7145V22.7145H142V21.7145H141ZM141 20.6765H142V20.3025L141.755 20.0203L141 20.6765ZM138.673 18L139.427 17.3438L139.128 17H138.673V18ZM136 18H135V19H136V18ZM136 14V13H135V14H136ZM126 9H130V7H126V9ZM127 12V8H125V12H127ZM127.5 11H126V13H127.5V11ZM128.5 20V12H126.5V20H128.5ZM126 21H127.5V19H126V21ZM127 24V20H125V24H127ZM130 23H126V25H130V23ZM129 22.7145V24H131V22.7145H129ZM141 21.7145H130V23.7145H141V21.7145ZM142 24V22.7145H140V24H142ZM145 23H141V25H145V23ZM144 20V24H146V20H144ZM141.737 21H145V19H141.737V21ZM139.243 18.6562L140.982 20.6562L142.492 19.3438L140.752 17.3438L139.243 18.6562ZM140 17H139.998V19H140V17ZM139 14.4265V18H141V14.4265H139ZM141.355 11.3438L139.245 13.7703L140.755 15.0827L142.865 12.6562L141.355 11.3438ZM145 11H142.11V13H145V11ZM144 8V12H146V8H144ZM141 9H145V7H141V9ZM142 9.71451V8H140V9.71451H142ZM130 10.7145H141V8.71451H130V10.7145ZM129 8V9.71451H131V8H129ZM140.245 11.0963L138.291 13.3438L139.8 14.6562L141.755 12.4087L140.245 11.0963ZM140 10.7145V11.7525H142V10.7145H140ZM130 11.7145H141V9.71451H130V11.7145ZM131 12V10.7145H129V12H131ZM128.5 13H130V11H128.5V13ZM129.5 20V12H127.5V20H129.5ZM130 19H128.5V21H130V19ZM131 21.7145V20H129V21.7145H131ZM141 20.7145H130V22.7145H141V20.7145ZM140 20.6765V21.7145H142V20.6765H140ZM137.918 18.6562L140.245 21.3327L141.755 20.0203L139.427 17.3438L137.918 18.6562ZM138.673 17H136V19H138.673V17ZM137 18V14H135V18H137ZM136 15H139.046V13H136V15Z\"\n fill=\"black\"\n mask=\"url(#path-6-inside-1_2196_700)\"\n />\n </svg>\n);\n\nPolygonButton.propTypes = {\n isActive: PropTypes.bool,\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEO,MAAME,aAAa,GAAGA,CAAC;EAAEC,QAAQ,GAAG;AAAM,CAAC,kBAChDF,MAAA,CAAAG,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAC,4BAA4B;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,aAAa;EAACC,IAAI,EAAC;AAAM,gBAC9FT,MAAA,CAAAG,OAAA,CAAAC,aAAA;EACEM,QAAQ,EAAC,SAAS;EAClBC,QAAQ,EAAC,SAAS;EAClBC,CAAC,EAAC,mKAAmK;EACrKH,IAAI,EAAEP,QAAQ,GAAG,SAAS,GAAG;AAAU,CACxC,CAAC,eACFF,MAAA,CAAAG,OAAA,CAAAC,aAAA;EAAMS,EAAE,EAAC,0BAA0B;EAACJ,IAAI,EAAC;AAAO,gBAC9CT,MAAA,CAAAG,OAAA,CAAAC,aAAA;EACEM,QAAQ,EAAC,SAAS;EAClBC,QAAQ,EAAC,SAAS;EAClBC,CAAC,EAAC;AAA6N,CAChO,CACG,CAAC,eACPZ,MAAA,CAAAG,OAAA,CAAAC,aAAA;EACEQ,CAAC,EAAC,y2EAAy2E;EAC32EH,IAAI,EAAC,OAAO;EACZK,IAAI,EAAC;AAAgC,CACtC,CACE,CACN;AAACC,OAAA,CAAAd,aAAA,GAAAA,aAAA;AAEFA,aAAa,CAACe,SAAS,GAAG;EACxBd,QAAQ,EAAEe,kBAAS,CAACC;AACtB,CAAC","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.RectangleButton = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ const RectangleButton = ({
11
+ isActive = false
12
+ }) => /*#__PURE__*/_react.default.createElement("svg", {
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "48",
15
+ height: "32",
16
+ viewBox: "0 0 48 32",
17
+ fill: "none"
18
+ }, /*#__PURE__*/_react.default.createElement("path", {
19
+ fillRule: "evenodd",
20
+ clipRule: "evenodd",
21
+ d: "M0 4C0 1.79086 1.79086 0 4 0H43C45.2091 0 47 1.79086 47 4V28.0001C47 30.2093 45.2091 32.0001 43 32.0001H4C1.79086 32.0001 0 30.2093 0 28.0001V4Z",
22
+ fill: isActive ? '#D3D4D9' : '#ECEDF1'
23
+ }), /*#__PURE__*/_react.default.createElement("mask", {
24
+ id: "path-8-inside-2_2196_700",
25
+ fill: "white"
26
+ }, /*#__PURE__*/_react.default.createElement("path", {
27
+ fillRule: "evenodd",
28
+ clipRule: "evenodd",
29
+ d: "M13 8H17V9.5H29V8H33V12H31.5V20H33V24H29V22.5H17V24H13V20H14.5V12H13V8ZM17 21.5V20H15.5V12H17V10.5H29V12H30.5V20H29V21.5H17Z"
30
+ })), /*#__PURE__*/_react.default.createElement("path", {
31
+ d: "M17 8H18V7H17V8ZM13 8V7H12V8H13ZM17 9.5H16V10.5H17V9.5ZM29 9.5V10.5H30V9.5H29ZM29 8V7H28V8H29ZM33 8H34V7H33V8ZM33 12V13H34V12H33ZM31.5 12V11H30.5V12H31.5ZM31.5 20H30.5V21H31.5V20ZM33 20H34V19H33V20ZM33 24V25H34V24H33ZM29 24H28V25H29V24ZM29 22.5H30V21.5H29V22.5ZM17 22.5V21.5H16V22.5H17ZM17 24V25H18V24H17ZM13 24H12V25H13V24ZM13 20V19H12V20H13ZM14.5 20V21H15.5V20H14.5ZM14.5 12H15.5V11H14.5V12ZM13 12H12V13H13V12ZM17 20H18V19H17V20ZM17 21.5H16V22.5H17V21.5ZM15.5 20H14.5V21H15.5V20ZM15.5 12V11H14.5V12H15.5ZM17 12V13H18V12H17ZM17 10.5V9.5H16V10.5H17ZM29 10.5H30V9.5H29V10.5ZM29 12H28V13H29V12ZM30.5 12H31.5V11H30.5V12ZM30.5 20V21H31.5V20H30.5ZM29 20V19H28V20H29ZM29 21.5V22.5H30V21.5H29ZM17 7H13V9H17V7ZM18 9.5V8H16V9.5H18ZM29 8.5H17V10.5H29V8.5ZM28 8V9.5H30V8H28ZM33 7H29V9H33V7ZM34 12V8H32V12H34ZM31.5 13H33V11H31.5V13ZM32.5 20V12H30.5V20H32.5ZM33 19H31.5V21H33V19ZM34 24V20H32V24H34ZM29 25H33V23H29V25ZM28 22.5V24H30V22.5H28ZM17 23.5H29V21.5H17V23.5ZM16 22.5V24H18V22.5H16ZM17 23H13V25H17V23ZM14 24V20H12V24H14ZM13 21H14.5V19H13V21ZM13.5 12V20H15.5V12H13.5ZM13 13H14.5V11H13V13ZM12 8V12H14V8H12ZM16 20V21.5H18V20H16ZM15.5 21H17V19H15.5V21ZM16.5 20V12H14.5V20H16.5ZM15.5 13H17V11H15.5V13ZM18 12V10.5H16V12H18ZM17 11.5H29V9.5H17V11.5ZM28 10.5V12H30V10.5H28ZM29 13H30.5V11H29V13ZM29.5 12V20H31.5V12H29.5ZM30.5 19H29V21H30.5V19ZM28 20V21.5H30V20H28ZM29 20.5H17V22.5H29V20.5Z",
32
+ fill: "black",
33
+ mask: "url(#path-8-inside-2_2196_700)"
34
+ }));
35
+ exports.RectangleButton = RectangleButton;
36
+ RectangleButton.propTypes = {
37
+ isActive: _propTypes.default.bool
38
+ };
39
+ //# sourceMappingURL=rectangle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rectangle.js","names":["_propTypes","_interopRequireDefault","require","_react","RectangleButton","isActive","default","createElement","xmlns","width","height","viewBox","fill","fillRule","clipRule","d","id","mask","exports","propTypes","PropTypes","bool"],"sources":["../../src/buttons/rectangle.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nexport const RectangleButton = ({ isActive = false }) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"32\" viewBox=\"0 0 48 32\" fill=\"none\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0 4C0 1.79086 1.79086 0 4 0H43C45.2091 0 47 1.79086 47 4V28.0001C47 30.2093 45.2091 32.0001 43 32.0001H4C1.79086 32.0001 0 30.2093 0 28.0001V4Z\"\n fill={isActive ? '#D3D4D9' : '#ECEDF1'}\n />\n <mask id=\"path-8-inside-2_2196_700\" fill=\"white\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M13 8H17V9.5H29V8H33V12H31.5V20H33V24H29V22.5H17V24H13V20H14.5V12H13V8ZM17 21.5V20H15.5V12H17V10.5H29V12H30.5V20H29V21.5H17Z\"\n />\n </mask>\n <path\n d=\"M17 8H18V7H17V8ZM13 8V7H12V8H13ZM17 9.5H16V10.5H17V9.5ZM29 9.5V10.5H30V9.5H29ZM29 8V7H28V8H29ZM33 8H34V7H33V8ZM33 12V13H34V12H33ZM31.5 12V11H30.5V12H31.5ZM31.5 20H30.5V21H31.5V20ZM33 20H34V19H33V20ZM33 24V25H34V24H33ZM29 24H28V25H29V24ZM29 22.5H30V21.5H29V22.5ZM17 22.5V21.5H16V22.5H17ZM17 24V25H18V24H17ZM13 24H12V25H13V24ZM13 20V19H12V20H13ZM14.5 20V21H15.5V20H14.5ZM14.5 12H15.5V11H14.5V12ZM13 12H12V13H13V12ZM17 20H18V19H17V20ZM17 21.5H16V22.5H17V21.5ZM15.5 20H14.5V21H15.5V20ZM15.5 12V11H14.5V12H15.5ZM17 12V13H18V12H17ZM17 10.5V9.5H16V10.5H17ZM29 10.5H30V9.5H29V10.5ZM29 12H28V13H29V12ZM30.5 12H31.5V11H30.5V12ZM30.5 20V21H31.5V20H30.5ZM29 20V19H28V20H29ZM29 21.5V22.5H30V21.5H29ZM17 7H13V9H17V7ZM18 9.5V8H16V9.5H18ZM29 8.5H17V10.5H29V8.5ZM28 8V9.5H30V8H28ZM33 7H29V9H33V7ZM34 12V8H32V12H34ZM31.5 13H33V11H31.5V13ZM32.5 20V12H30.5V20H32.5ZM33 19H31.5V21H33V19ZM34 24V20H32V24H34ZM29 25H33V23H29V25ZM28 22.5V24H30V22.5H28ZM17 23.5H29V21.5H17V23.5ZM16 22.5V24H18V22.5H16ZM17 23H13V25H17V23ZM14 24V20H12V24H14ZM13 21H14.5V19H13V21ZM13.5 12V20H15.5V12H13.5ZM13 13H14.5V11H13V13ZM12 8V12H14V8H12ZM16 20V21.5H18V20H16ZM15.5 21H17V19H15.5V21ZM16.5 20V12H14.5V20H16.5ZM15.5 13H17V11H15.5V13ZM18 12V10.5H16V12H18ZM17 11.5H29V9.5H17V11.5ZM28 10.5V12H30V10.5H28ZM29 13H30.5V11H29V13ZM29.5 12V20H31.5V12H29.5ZM30.5 19H29V21H30.5V19ZM28 20V21.5H30V20H28ZM29 20.5H17V22.5H29V20.5Z\"\n fill=\"black\"\n mask=\"url(#path-8-inside-2_2196_700)\"\n />\n </svg>\n);\n\nRectangleButton.propTypes = {\n isActive: PropTypes.bool,\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEO,MAAME,eAAe,GAAGA,CAAC;EAAEC,QAAQ,GAAG;AAAM,CAAC,kBAClDF,MAAA,CAAAG,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAC,4BAA4B;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,IAAI,EAAC;AAAM,gBAC5FT,MAAA,CAAAG,OAAA,CAAAC,aAAA;EACEM,QAAQ,EAAC,SAAS;EAClBC,QAAQ,EAAC,SAAS;EAClBC,CAAC,EAAC,kJAAkJ;EACpJH,IAAI,EAAEP,QAAQ,GAAG,SAAS,GAAG;AAAU,CACxC,CAAC,eACFF,MAAA,CAAAG,OAAA,CAAAC,aAAA;EAAMS,EAAE,EAAC,0BAA0B;EAACJ,IAAI,EAAC;AAAO,gBAC9CT,MAAA,CAAAG,OAAA,CAAAC,aAAA;EACEM,QAAQ,EAAC,SAAS;EAClBC,QAAQ,EAAC,SAAS;EAClBC,CAAC,EAAC;AAA8H,CACjI,CACG,CAAC,eACPZ,MAAA,CAAAG,OAAA,CAAAC,aAAA;EACEQ,CAAC,EAAC,81CAA81C;EACh2CH,IAAI,EAAC,OAAO;EACZK,IAAI,EAAC;AAAgC,CACtC,CACE,CACN;AAACC,OAAA,CAAAd,eAAA,GAAAA,eAAA;AAEFA,eAAe,CAACe,SAAS,GAAG;EAC1Bd,QAAQ,EAAEe,kBAAS,CAACC;AACtB,CAAC","ignoreList":[]}
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = {
8
+ model: {
9
+ dimensions: {
10
+ height: 0,
11
+ width: 0
12
+ },
13
+ hotspotColor: 'rgba(137, 183, 244, 0.25)',
14
+ hotspotList: ['rgba(137, 183, 244, 0.25)'],
15
+ imageUrl: '',
16
+ multipleCorrect: true,
17
+ outlineColor: 'blue',
18
+ outlineList: ['blue'],
19
+ partialScoring: false,
20
+ prompt: '',
21
+ promptEnabled: true,
22
+ rationaleEnabled: true,
23
+ shapes: {
24
+ rectangles: [],
25
+ polygons: [],
26
+ circles: []
27
+ },
28
+ strokeWidth: 5,
29
+ studentInstructionsEnabled: true,
30
+ teacherInstructions: '',
31
+ teacherInstructionsEnabled: true,
32
+ toolbarEditorPosition: 'bottom'
33
+ },
34
+ configuration: {
35
+ baseInputConfiguration: {
36
+ h3: {
37
+ disabled: true
38
+ },
39
+ audio: {
40
+ disabled: false
41
+ },
42
+ video: {
43
+ disabled: false
44
+ },
45
+ image: {
46
+ disabled: false
47
+ },
48
+ textAlign: {
49
+ disabled: true
50
+ },
51
+ showParagraphs: {
52
+ disabled: false
53
+ },
54
+ separateParagraphs: {
55
+ disabled: true
56
+ }
57
+ },
58
+ multipleCorrect: {
59
+ settings: true,
60
+ label: 'Multiple Correct Responses'
61
+ },
62
+ partialScoring: {
63
+ settings: false,
64
+ label: 'Allow Partial Scoring'
65
+ },
66
+ rationale: {
67
+ settings: true,
68
+ label: 'Rationale',
69
+ inputConfiguration: {
70
+ audio: {
71
+ disabled: false
72
+ },
73
+ video: {
74
+ disabled: false
75
+ },
76
+ image: {
77
+ disabled: false
78
+ }
79
+ },
80
+ required: false
81
+ },
82
+ prompt: {
83
+ settings: true,
84
+ label: 'Prompt',
85
+ inputConfiguration: {
86
+ audio: {
87
+ disabled: false
88
+ },
89
+ video: {
90
+ disabled: false
91
+ },
92
+ image: {
93
+ disabled: false
94
+ }
95
+ },
96
+ required: false
97
+ },
98
+ settingsPanelDisabled: false,
99
+ spellCheck: {
100
+ label: 'Spellcheck',
101
+ settings: false,
102
+ enabled: true
103
+ },
104
+ teacherInstructions: {
105
+ settings: true,
106
+ label: 'Teacher Instructions',
107
+ inputConfiguration: {
108
+ audio: {
109
+ disabled: false
110
+ },
111
+ video: {
112
+ disabled: false
113
+ },
114
+ image: {
115
+ disabled: false
116
+ }
117
+ },
118
+ required: false
119
+ },
120
+ preserveAspectRatio: {
121
+ settings: false,
122
+ enabled: true,
123
+ label: 'Preserve aspect ratio'
124
+ },
125
+ minShapes: 2,
126
+ maxImageWidth: {
127
+ teacherInstructions: 300,
128
+ prompt: 300,
129
+ rationale: 300
130
+ },
131
+ maxImageHeight: {
132
+ teacherInstructions: 300,
133
+ prompt: 300,
134
+ rationale: 300
135
+ },
136
+ withRubric: {
137
+ settings: false,
138
+ label: 'Add Rubric'
139
+ },
140
+ mathMlOptions: {
141
+ mmlOutput: false,
142
+ mmlEditing: false
143
+ },
144
+ language: {
145
+ settings: false,
146
+ label: 'Specify Language',
147
+ enabled: false
148
+ },
149
+ languageChoices: {
150
+ label: 'Language Choices',
151
+ options: []
152
+ }
153
+ }
154
+ };
155
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","names":["model","dimensions","height","width","hotspotColor","hotspotList","imageUrl","multipleCorrect","outlineColor","outlineList","partialScoring","prompt","promptEnabled","rationaleEnabled","shapes","rectangles","polygons","circles","strokeWidth","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","toolbarEditorPosition","configuration","baseInputConfiguration","h3","disabled","audio","video","image","textAlign","showParagraphs","separateParagraphs","settings","label","rationale","inputConfiguration","required","settingsPanelDisabled","spellCheck","enabled","preserveAspectRatio","minShapes","maxImageWidth","maxImageHeight","withRubric","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n model: {\n dimensions: { height: 0, width: 0 },\n hotspotColor: 'rgba(137, 183, 244, 0.25)',\n hotspotList: ['rgba(137, 183, 244, 0.25)'],\n imageUrl: '',\n multipleCorrect: true,\n outlineColor: 'blue',\n outlineList: ['blue'],\n partialScoring: false,\n prompt: '',\n promptEnabled: true,\n rationaleEnabled: true,\n shapes: { rectangles: [], polygons: [], circles: [] },\n strokeWidth: 5,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n multipleCorrect: {\n settings: true,\n label: 'Multiple Correct Responses',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n preserveAspectRatio: {\n settings: false,\n enabled: true,\n label: 'Preserve aspect ratio',\n },\n minShapes: 2,\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n"],"mappings":";;;;;;iCAAe;EACbA,KAAK,EAAE;IACLC,UAAU,EAAE;MAAEC,MAAM,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAE,CAAC;IACnCC,YAAY,EAAE,2BAA2B;IACzCC,WAAW,EAAE,CAAC,2BAA2B,CAAC;IAC1CC,QAAQ,EAAE,EAAE;IACZC,eAAe,EAAE,IAAI;IACrBC,YAAY,EAAE,MAAM;IACpBC,WAAW,EAAE,CAAC,MAAM,CAAC;IACrBC,cAAc,EAAE,KAAK;IACrBC,MAAM,EAAE,EAAE;IACVC,aAAa,EAAE,IAAI;IACnBC,gBAAgB,EAAE,IAAI;IACtBC,MAAM,EAAE;MAAEC,UAAU,EAAE,EAAE;MAAEC,QAAQ,EAAE,EAAE;MAAEC,OAAO,EAAE;IAAG,CAAC;IACrDC,WAAW,EAAE,CAAC;IACdC,0BAA0B,EAAE,IAAI;IAChCC,mBAAmB,EAAE,EAAE;IACvBC,0BAA0B,EAAE,IAAI;IAChCC,qBAAqB,EAAE;EACzB,CAAC;EACDC,aAAa,EAAE;IACbC,sBAAsB,EAAE;MACtBC,EAAE,EAAE;QAAEC,QAAQ,EAAE;MAAK,CAAC;MACtBC,KAAK,EAAE;QAAED,QAAQ,EAAE;MAAM,CAAC;MAC1BE,KAAK,EAAE;QAAEF,QAAQ,EAAE;MAAM,CAAC;MAC1BG,KAAK,EAAE;QAAEH,QAAQ,EAAE;MAAM,CAAC;MAC1BI,SAAS,EAAE;QAAEJ,QAAQ,EAAE;MAAK,CAAC;MAC7BK,cAAc,EAAE;QAAEL,QAAQ,EAAE;MAAM,CAAC;MACnCM,kBAAkB,EAAE;QAAEN,QAAQ,EAAE;MAAK;IACvC,CAAC;IACDnB,eAAe,EAAE;MACf0B,QAAQ,EAAE,IAAI;MACdC,KAAK,EAAE;IACT,CAAC;IACDxB,cAAc,EAAE;MACduB,QAAQ,EAAE,KAAK;MACfC,KAAK,EAAE;IACT,CAAC;IACDC,SAAS,EAAE;MACTF,QAAQ,EAAE,IAAI;MACdC,KAAK,EAAE,WAAW;MAClBE,kBAAkB,EAAE;QAClBT,KAAK,EAAE;UAAED,QAAQ,EAAE;QAAM,CAAC;QAC1BE,KAAK,EAAE;UAAEF,QAAQ,EAAE;QAAM,CAAC;QAC1BG,KAAK,EAAE;UAAEH,QAAQ,EAAE;QAAM;MAC3B,CAAC;MACDW,QAAQ,EAAE;IACZ,CAAC;IACD1B,MAAM,EAAE;MACNsB,QAAQ,EAAE,IAAI;MACdC,KAAK,EAAE,QAAQ;MACfE,kBAAkB,EAAE;QAClBT,KAAK,EAAE;UAAED,QAAQ,EAAE;QAAM,CAAC;QAC1BE,KAAK,EAAE;UAAEF,QAAQ,EAAE;QAAM,CAAC;QAC1BG,KAAK,EAAE;UAAEH,QAAQ,EAAE;QAAM;MAC3B,CAAC;MACDW,QAAQ,EAAE;IACZ,CAAC;IACDC,qBAAqB,EAAE,KAAK;IAC5BC,UAAU,EAAE;MACVL,KAAK,EAAE,YAAY;MACnBD,QAAQ,EAAE,KAAK;MACfO,OAAO,EAAE;IACX,CAAC;IACDpB,mBAAmB,EAAE;MACnBa,QAAQ,EAAE,IAAI;MACdC,KAAK,EAAE,sBAAsB;MAC7BE,kBAAkB,EAAE;QAClBT,KAAK,EAAE;UAAED,QAAQ,EAAE;QAAM,CAAC;QAC1BE,KAAK,EAAE;UAAEF,QAAQ,EAAE;QAAM,CAAC;QAC1BG,KAAK,EAAE;UAAEH,QAAQ,EAAE;QAAM;MAC3B,CAAC;MACDW,QAAQ,EAAE;IACZ,CAAC;IACDI,mBAAmB,EAAE;MACnBR,QAAQ,EAAE,KAAK;MACfO,OAAO,EAAE,IAAI;MACbN,KAAK,EAAE;IACT,CAAC;IACDQ,SAAS,EAAE,CAAC;IACZC,aAAa,EAAE;MACbvB,mBAAmB,EAAE,GAAG;MACxBT,MAAM,EAAE,GAAG;MACXwB,SAAS,EAAE;IACb,CAAC;IACDS,cAAc,EAAE;MACdxB,mBAAmB,EAAE,GAAG;MACxBT,MAAM,EAAE,GAAG;MACXwB,SAAS,EAAE;IACb,CAAC;IACDU,UAAU,EAAE;MACVZ,QAAQ,EAAE,KAAK;MACfC,KAAK,EAAE;IACT,CAAC;IACDY,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRhB,QAAQ,EAAE,KAAK;MACfC,KAAK,EAAE,kBAAkB;MACzBM,OAAO,EAAE;IACX,CAAC;IACDU,eAAe,EAAE;MACfhB,KAAK,EAAE,kBAAkB;MACzBiB,OAAO,EAAE;IACX;EACF;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+ var _reactKonva = require("react-konva");
12
+ var _DeleteWidget = _interopRequireDefault(require("./DeleteWidget"));
13
+ class CircleComponent extends _react.default.Component {
14
+ constructor(props) {
15
+ super(props);
16
+ (0, _defineProperty2.default)(this, "handleClick", e => {
17
+ const {
18
+ radius,
19
+ isDrawing,
20
+ onClick,
21
+ id
22
+ } = this.props;
23
+ if (radius <= 0 && isDrawing) {
24
+ return;
25
+ }
26
+ e.cancelBubble = true;
27
+ onClick(id);
28
+ });
29
+ (0, _defineProperty2.default)(this, "handleMouseEnter", () => {
30
+ document.body.style.cursor = 'pointer';
31
+ this.setState({
32
+ hovered: true
33
+ });
34
+ this.trRef.current.setNode(this.shapeRef.current);
35
+ this.trRef.current.getLayer().batchDraw();
36
+ });
37
+ (0, _defineProperty2.default)(this, "handleMouseLeave", () => {
38
+ // Don't hide transformer if user is actively dragging/resizing
39
+ if (!this.state.isDragging) {
40
+ this.setState({
41
+ hovered: false
42
+ });
43
+ }
44
+ document.body.style.cursor = 'default';
45
+ });
46
+ (0, _defineProperty2.default)(this, "handleOnDragEnd", e => {
47
+ const {
48
+ onDragEnd,
49
+ id
50
+ } = this.props;
51
+ this.setState({
52
+ isDragging: false
53
+ });
54
+ onDragEnd(id, {
55
+ x: e.target.x(),
56
+ y: e.target.y()
57
+ });
58
+ });
59
+ (0, _defineProperty2.default)(this, "onResizeEnd", () => {
60
+ const {
61
+ onDragEnd,
62
+ id
63
+ } = this.props;
64
+ const node = this.shapeRef.current;
65
+ const scale = node.scaleX() !== 1 ? node.scaleX() : node.scaleY();
66
+ const newRadius = Math.max(node.radius() * scale, 5);
67
+ this.setState({
68
+ isDragging: false
69
+ });
70
+ onDragEnd(id, {
71
+ x: node.x(),
72
+ y: node.y(),
73
+ radius: newRadius
74
+ });
75
+ node.scaleX(1);
76
+ node.scaleY(1);
77
+ });
78
+ (0, _defineProperty2.default)(this, "handleDelete", id => {
79
+ const {
80
+ onDeleteShape
81
+ } = this.props;
82
+ onDeleteShape(id);
83
+ });
84
+ (0, _defineProperty2.default)(this, "onTransform", () => {
85
+ const node = this.shapeRef.current;
86
+ const avgScale = (node.scaleX() + node.scaleY()) / 2;
87
+ node.scaleX(avgScale);
88
+ node.scaleY(avgScale);
89
+ });
90
+ this.state = {
91
+ hovered: false,
92
+ isDragging: false
93
+ };
94
+ this.shapeRef = /*#__PURE__*/_react.default.createRef();
95
+ this.trRef = /*#__PURE__*/_react.default.createRef();
96
+ }
97
+ render() {
98
+ const {
99
+ correct,
100
+ radius,
101
+ hotspotColor,
102
+ id,
103
+ outlineColor,
104
+ x,
105
+ y,
106
+ strokeWidth = 5,
107
+ selectedHotspotColor,
108
+ hoverOutlineColor
109
+ } = this.props;
110
+ const {
111
+ hovered,
112
+ isDragging
113
+ } = this.state;
114
+ // Ensure radius is valid
115
+ const validRadius = isNaN(radius) || radius <= 0 ? 5 : radius;
116
+ return /*#__PURE__*/_react.default.createElement(_reactKonva.Group, {
117
+ onMouseLeave: this.handleMouseLeave,
118
+ onMouseEnter: this.handleMouseEnter,
119
+ padding: 12
120
+ }, /*#__PURE__*/_react.default.createElement(_reactKonva.Circle, {
121
+ ref: this.shapeRef,
122
+ radius: validRadius,
123
+ fill: correct && selectedHotspotColor ? selectedHotspotColor : hotspotColor,
124
+ onClick: this.handleClick,
125
+ onTap: this.handleClick,
126
+ draggable: true,
127
+ stroke: outlineColor,
128
+ strokeWidth: correct ? strokeWidth : 0,
129
+ onDragStart: () => this.setState({
130
+ isDragging: true
131
+ }),
132
+ onDragEnd: this.handleOnDragEnd,
133
+ onTransformStart: () => this.setState({
134
+ isDragging: true
135
+ }),
136
+ onTransformEnd: this.onResizeEnd,
137
+ x: x,
138
+ y: y,
139
+ cursor: "pointer"
140
+ }), !isDragging && hovered && /*#__PURE__*/_react.default.createElement(_DeleteWidget.default, {
141
+ id: id,
142
+ radius: validRadius,
143
+ x: x,
144
+ y: y,
145
+ handleWidgetClick: this.handleDelete,
146
+ isCircle: true
147
+ }), this.state.hovered && /*#__PURE__*/_react.default.createElement(_reactKonva.Transformer, {
148
+ borderStroke: hoverOutlineColor || null,
149
+ ref: this.trRef,
150
+ rotateEnabled: false,
151
+ keepRatio: true,
152
+ onTransform: this.onTransform,
153
+ enabledAnchors: ['middle-left', 'middle-right', 'top-center', 'bottom-center'],
154
+ boundBoxFunc: (oldBox, newBox) => {
155
+ // Constraint to prevent resizing too small
156
+ if (newBox.width < 10 || newBox.height < 10) {
157
+ return oldBox;
158
+ }
159
+ const oldCenterX = oldBox.x + oldBox.width / 2;
160
+ const oldCenterY = oldBox.y + oldBox.height / 2;
161
+ const newCenterX = newBox.x + newBox.width / 2;
162
+ const newCenterY = newBox.y + newBox.height / 2;
163
+ const offsetX = oldCenterX - newCenterX;
164
+ const offsetY = oldCenterY - newCenterY;
165
+ newBox.x += offsetX;
166
+ newBox.y += offsetY;
167
+ return newBox;
168
+ }
169
+ }));
170
+ }
171
+ }
172
+ CircleComponent.propTypes = {
173
+ correct: _propTypes.default.bool,
174
+ isDrawing: _propTypes.default.bool.isRequired,
175
+ id: _propTypes.default.string.isRequired,
176
+ radius: _propTypes.default.number.isRequired,
177
+ hotspotColor: _propTypes.default.string.isRequired,
178
+ selectedHotspotColor: _propTypes.default.string,
179
+ hoverOutlineColor: _propTypes.default.string,
180
+ onClick: _propTypes.default.func.isRequired,
181
+ onDeleteShape: _propTypes.default.func.isRequired,
182
+ onDragEnd: _propTypes.default.func.isRequired,
183
+ outlineColor: _propTypes.default.string.isRequired,
184
+ x: _propTypes.default.number.isRequired,
185
+ y: _propTypes.default.number.isRequired,
186
+ strokeWidth: _propTypes.default.number
187
+ };
188
+ CircleComponent.defaultProps = {
189
+ correct: false
190
+ };
191
+ var _default = exports.default = CircleComponent;
192
+ //# sourceMappingURL=hotspot-circle.js.map