@webwriter/geogebra 1.0.1 → 2.0.1

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 (386) hide show
  1. package/.github/workflows/publish.yml +8 -0
  2. package/LICENSE +6 -6
  3. package/README.md +785 -0
  4. package/custom-elements.json +11514 -0
  5. package/dist/chunks/af-35CD6HFH.js +12 -0
  6. package/dist/chunks/am-JMDT5LI7.js +12 -0
  7. package/dist/chunks/ar-JL4QKYYL.js +12 -0
  8. package/dist/chunks/az-3SZS6WCY.js +12 -0
  9. package/dist/chunks/be-C4GWVHR2.js +12 -0
  10. package/dist/chunks/bg-6QGE5EQ4.js +12 -0
  11. package/dist/chunks/bn-UM2BV46R.js +12 -0
  12. package/dist/chunks/bs-XE2PWKCS.js +12 -0
  13. package/dist/chunks/ca-ZO2BQKPZ.js +12 -0
  14. package/dist/chunks/ca-balear-GJKWY5R7.js +12 -0
  15. package/dist/chunks/ca-valencia-CNQYSJSJ.js +12 -0
  16. package/dist/chunks/chunk-ACU6XINJ.js +781 -0
  17. package/dist/chunks/chunk-ANJTU3IB.js +203 -0
  18. package/dist/chunks/chunk-BSUFUO7E.js +65 -0
  19. package/dist/chunks/cnr-MCZGASOD.js +12 -0
  20. package/dist/chunks/cs-4Q7FRISG.js +12 -0
  21. package/dist/chunks/cy-7VXG3AYH.js +12 -0
  22. package/dist/chunks/da-VDMHGBXD.js +12 -0
  23. package/dist/chunks/de-AT-YM5GCI75.js +12 -0
  24. package/dist/chunks/de-CH-LQNHTGYT.js +12 -0
  25. package/dist/chunks/de-GJT7RSHT.js +12 -0
  26. package/dist/chunks/el-ZVUVWEQ3.js +12 -0
  27. package/dist/chunks/en-AU-PCIYYC4M.js +12 -0
  28. package/dist/chunks/en-CA-37T7YUIL.js +12 -0
  29. package/dist/chunks/en-GB-ZYCA2CIZ.js +12 -0
  30. package/dist/chunks/en-IN-EPHXLNO6.js +12 -0
  31. package/dist/chunks/en-US-ECSJ5HDL.js +12 -0
  32. package/dist/chunks/es-5VBYK2HE.js +12 -0
  33. package/dist/chunks/et-OFQRRTW6.js +12 -0
  34. package/dist/chunks/eu-7TNOYFB7.js +12 -0
  35. package/dist/chunks/fa-KZU6GKWU.js +12 -0
  36. package/dist/chunks/fi-THJEKJPW.js +12 -0
  37. package/dist/chunks/fr-MUVVTBQZ.js +12 -0
  38. package/dist/chunks/ga-UWUVCWOT.js +12 -0
  39. package/dist/chunks/gl-NHQ52YCN.js +12 -0
  40. package/dist/chunks/gu-HVDD4QHO.js +12 -0
  41. package/dist/chunks/ha-2BPTATOZ.js +12 -0
  42. package/dist/chunks/he-MDESCUHJ.js +12 -0
  43. package/dist/chunks/hi-C6BGPR4Y.js +12 -0
  44. package/dist/chunks/hr-77MP3ELT.js +12 -0
  45. package/dist/chunks/hu-7PRNX6NB.js +12 -0
  46. package/dist/chunks/hy-R3VEL63L.js +12 -0
  47. package/dist/chunks/id-O6B2T3Y2.js +12 -0
  48. package/dist/chunks/is-XLNS5CAZ.js +12 -0
  49. package/dist/chunks/it-NZODUGUP.js +12 -0
  50. package/dist/chunks/ja-FFK5WXSB.js +12 -0
  51. package/dist/chunks/jv-GS3IRAIB.js +12 -0
  52. package/dist/chunks/ka-NWIJAO54.js +12 -0
  53. package/dist/chunks/kk-WQFRFG44.js +12 -0
  54. package/dist/chunks/km-AUKBN3YT.js +12 -0
  55. package/dist/chunks/kn-PKZFPECM.js +12 -0
  56. package/dist/chunks/ko-XNGAWKQ4.js +12 -0
  57. package/dist/chunks/ky-AQTYDJIL.js +12 -0
  58. package/dist/chunks/la-ERS7V4N4.js +12 -0
  59. package/dist/chunks/lb-KU3DVPI4.js +12 -0
  60. package/dist/chunks/locale-codes-TGY5LMYX.js +11 -0
  61. package/dist/chunks/lt-6RI4HSG3.js +12 -0
  62. package/dist/chunks/lv-RGIUQVA7.js +12 -0
  63. package/dist/chunks/mk-JMAYXTCL.js +12 -0
  64. package/dist/chunks/ml-5ZAIPAYV.js +12 -0
  65. package/dist/chunks/mn-N2GZBVDP.js +12 -0
  66. package/dist/chunks/mr-2SRCJIBC.js +12 -0
  67. package/dist/chunks/ms-WHD5PUQM.js +12 -0
  68. package/dist/chunks/mt-EXRK5UO6.js +12 -0
  69. package/dist/chunks/my-D2COGDRI.js +12 -0
  70. package/dist/chunks/nb-3XNBS2DU.js +12 -0
  71. package/dist/chunks/ne-PA4KUBGU.js +12 -0
  72. package/dist/chunks/nl-QMM3PBPM.js +12 -0
  73. package/dist/chunks/nn-CLFEMF2K.js +12 -0
  74. package/dist/chunks/no-CV376NZG.js +12 -0
  75. package/dist/chunks/or-KP7CET7X.js +12 -0
  76. package/dist/chunks/pa-CH5JYVXT.js +12 -0
  77. package/dist/chunks/pl-DDW4HT7M.js +12 -0
  78. package/dist/chunks/pt-BR-CVNA2MRU.js +12 -0
  79. package/dist/chunks/pt-CRTRYTDJ.js +12 -0
  80. package/dist/chunks/pt-PT-IZMPF3BY.js +12 -0
  81. package/dist/chunks/ro-FUOGHWJA.js +12 -0
  82. package/dist/chunks/ru-KAT4X5EC.js +12 -0
  83. package/dist/chunks/si-GDAXEOBK.js +12 -0
  84. package/dist/chunks/sk-CDSK6MY5.js +12 -0
  85. package/dist/chunks/sl-TFJQYNA4.js +12 -0
  86. package/dist/chunks/so-TXI6JJPW.js +12 -0
  87. package/dist/chunks/sq-KMM2QIRU.js +12 -0
  88. package/dist/chunks/sr-OTZNEL5Z.js +12 -0
  89. package/dist/chunks/sv-7CANJ6CF.js +12 -0
  90. package/dist/chunks/sw-5JDMTJ5K.js +12 -0
  91. package/dist/chunks/ta-HT4SO7PD.js +12 -0
  92. package/dist/chunks/te-FECCLHOI.js +12 -0
  93. package/dist/chunks/tg-FJWFJWF2.js +12 -0
  94. package/dist/chunks/th-JEP434LN.js +12 -0
  95. package/dist/chunks/tl-GN35ZR2F.js +12 -0
  96. package/dist/chunks/tr-IPVLQUE4.js +12 -0
  97. package/dist/chunks/uk-LHWPGFRV.js +12 -0
  98. package/dist/chunks/ur-7FU4XRAY.js +12 -0
  99. package/dist/chunks/uz-RO7XCKFE.js +12 -0
  100. package/dist/chunks/vi-5PHPTVV4.js +12 -0
  101. package/dist/chunks/zh-Hans-UM7MUEDB.js +12 -0
  102. package/dist/chunks/zh-Hant-7M2P4G7R.js +12 -0
  103. package/dist/chunks/zh-LHCPWZN2.js +12 -0
  104. package/dist/widgets/webwriter-geogebra-3d.js +23 -1880
  105. package/dist/widgets/webwriter-geogebra-classic.js +22 -1879
  106. package/dist/widgets/webwriter-geogebra-geometry.js +22 -1879
  107. package/dist/widgets/webwriter-geogebra-notes.js +22 -1879
  108. package/dist/widgets/webwriter-geogebra-scientific.js +22 -1879
  109. package/dist/widgets/webwriter-geogebra.js +34 -1887
  110. package/editing-config.json +856 -0
  111. package/lit-localize.json +111 -0
  112. package/localization/af.xlf +290 -0
  113. package/localization/am.xlf +290 -0
  114. package/localization/ar.xlf +295 -0
  115. package/localization/az.xlf +290 -0
  116. package/localization/be.xlf +290 -0
  117. package/localization/bg.xlf +295 -0
  118. package/localization/bn.xlf +290 -0
  119. package/localization/bs.xlf +290 -0
  120. package/localization/ca-balear.xlf +290 -0
  121. package/localization/ca-valencia.xlf +290 -0
  122. package/localization/ca.xlf +290 -0
  123. package/localization/cnr.xlf +290 -0
  124. package/localization/cs.xlf +295 -0
  125. package/localization/cy.xlf +290 -0
  126. package/localization/da.xlf +295 -0
  127. package/localization/de-AT.xlf +294 -0
  128. package/localization/de-CH.xlf +294 -0
  129. package/localization/de.xlf +294 -0
  130. package/localization/el.xlf +295 -0
  131. package/localization/es.xlf +295 -0
  132. package/localization/et.xlf +295 -0
  133. package/localization/eu.xlf +290 -0
  134. package/localization/fa.xlf +290 -0
  135. package/localization/fi.xlf +295 -0
  136. package/localization/fr.xlf +295 -0
  137. package/localization/ga.xlf +290 -0
  138. package/localization/generated/af.ts +16 -0
  139. package/localization/generated/am.ts +16 -0
  140. package/localization/generated/ar.ts +16 -0
  141. package/localization/generated/az.ts +16 -0
  142. package/localization/generated/be.ts +16 -0
  143. package/localization/generated/bg.ts +16 -0
  144. package/localization/generated/bn.ts +16 -0
  145. package/localization/generated/bs.ts +16 -0
  146. package/localization/generated/ca-balear.ts +16 -0
  147. package/localization/generated/ca-valencia.ts +16 -0
  148. package/localization/generated/ca.ts +16 -0
  149. package/localization/generated/cnr.ts +16 -0
  150. package/localization/generated/cs.ts +16 -0
  151. package/localization/generated/cy.ts +16 -0
  152. package/localization/generated/da.ts +16 -0
  153. package/localization/generated/de-AT.ts +16 -0
  154. package/localization/generated/de-CH.ts +16 -0
  155. package/localization/generated/de.ts +16 -0
  156. package/localization/generated/el.ts +16 -0
  157. package/localization/generated/en-AU.ts +16 -0
  158. package/localization/generated/en-CA.ts +16 -0
  159. package/localization/generated/en-GB.ts +16 -0
  160. package/localization/generated/en-IN.ts +16 -0
  161. package/localization/generated/en-US.ts +16 -0
  162. package/localization/generated/es.ts +16 -0
  163. package/localization/generated/et.ts +16 -0
  164. package/localization/generated/eu.ts +16 -0
  165. package/localization/generated/fa.ts +16 -0
  166. package/localization/generated/fi.ts +16 -0
  167. package/localization/generated/fr.ts +16 -0
  168. package/localization/generated/ga.ts +16 -0
  169. package/localization/generated/gl.ts +16 -0
  170. package/localization/generated/gu.ts +16 -0
  171. package/localization/generated/ha.ts +16 -0
  172. package/localization/generated/he.ts +16 -0
  173. package/localization/generated/hi.ts +16 -0
  174. package/localization/generated/hr.ts +16 -0
  175. package/localization/generated/hu.ts +16 -0
  176. package/localization/generated/hy.ts +16 -0
  177. package/localization/generated/id.ts +16 -0
  178. package/localization/generated/index.js +3 -0
  179. package/localization/generated/is.ts +16 -0
  180. package/localization/generated/it.ts +16 -0
  181. package/localization/generated/ja.ts +16 -0
  182. package/localization/generated/jv.ts +16 -0
  183. package/localization/generated/ka.ts +16 -0
  184. package/localization/generated/kk.ts +16 -0
  185. package/localization/generated/km.ts +16 -0
  186. package/localization/generated/kn.ts +16 -0
  187. package/localization/generated/ko.ts +16 -0
  188. package/localization/generated/ky.ts +16 -0
  189. package/localization/generated/la.ts +16 -0
  190. package/localization/generated/lb.ts +16 -0
  191. package/localization/generated/locale-codes.ts +211 -0
  192. package/localization/generated/lt.ts +16 -0
  193. package/localization/generated/lv.ts +16 -0
  194. package/localization/generated/mk.ts +16 -0
  195. package/localization/generated/ml.ts +16 -0
  196. package/localization/generated/mn.ts +16 -0
  197. package/localization/generated/mr.ts +16 -0
  198. package/localization/generated/ms.ts +16 -0
  199. package/localization/generated/mt.ts +16 -0
  200. package/localization/generated/my.ts +16 -0
  201. package/localization/generated/nb.ts +16 -0
  202. package/localization/generated/ne.ts +16 -0
  203. package/localization/generated/nl.ts +16 -0
  204. package/localization/generated/nn.ts +16 -0
  205. package/localization/generated/no.ts +16 -0
  206. package/localization/generated/or.ts +16 -0
  207. package/localization/generated/pa.ts +16 -0
  208. package/localization/generated/pl.ts +16 -0
  209. package/localization/generated/pt-BR.ts +16 -0
  210. package/localization/generated/pt-PT.ts +16 -0
  211. package/localization/generated/pt.ts +16 -0
  212. package/localization/generated/ro.ts +16 -0
  213. package/localization/generated/ru.ts +16 -0
  214. package/localization/generated/si.ts +16 -0
  215. package/localization/generated/sk.ts +16 -0
  216. package/localization/generated/sl.ts +16 -0
  217. package/localization/generated/so.ts +16 -0
  218. package/localization/generated/sq.ts +16 -0
  219. package/localization/generated/sr.ts +16 -0
  220. package/localization/generated/sv.ts +16 -0
  221. package/localization/generated/sw.ts +16 -0
  222. package/localization/generated/ta.ts +16 -0
  223. package/localization/generated/te.ts +16 -0
  224. package/localization/generated/tg.ts +16 -0
  225. package/localization/generated/th.ts +16 -0
  226. package/localization/generated/tl.ts +16 -0
  227. package/localization/generated/tr.ts +16 -0
  228. package/localization/generated/uk.ts +16 -0
  229. package/localization/generated/ur.ts +16 -0
  230. package/localization/generated/uz.ts +16 -0
  231. package/localization/generated/vi.ts +16 -0
  232. package/localization/generated/zh-Hans.ts +16 -0
  233. package/localization/generated/zh-Hant.ts +16 -0
  234. package/localization/generated/zh.ts +16 -0
  235. package/localization/gl.xlf +290 -0
  236. package/localization/gu.xlf +290 -0
  237. package/localization/ha.xlf +290 -0
  238. package/localization/he.xlf +290 -0
  239. package/localization/hi.xlf +290 -0
  240. package/localization/hr.xlf +290 -0
  241. package/localization/hu.xlf +295 -0
  242. package/localization/hy.xlf +290 -0
  243. package/localization/id.xlf +295 -0
  244. package/localization/is.xlf +290 -0
  245. package/localization/it.xlf +295 -0
  246. package/localization/ja.xlf +295 -0
  247. package/localization/jv.xlf +290 -0
  248. package/localization/ka.xlf +290 -0
  249. package/localization/kk.xlf +290 -0
  250. package/localization/km.xlf +290 -0
  251. package/localization/kn.xlf +290 -0
  252. package/localization/ko.xlf +295 -0
  253. package/localization/ky.xlf +290 -0
  254. package/localization/la.xlf +290 -0
  255. package/localization/lb.xlf +290 -0
  256. package/localization/lt.xlf +295 -0
  257. package/localization/lv.xlf +295 -0
  258. package/localization/mk.xlf +290 -0
  259. package/localization/ml.xlf +290 -0
  260. package/localization/mn.xlf +290 -0
  261. package/localization/mr.xlf +290 -0
  262. package/localization/ms.xlf +290 -0
  263. package/localization/mt.xlf +290 -0
  264. package/localization/my.xlf +290 -0
  265. package/localization/nb.xlf +295 -0
  266. package/localization/ne.xlf +290 -0
  267. package/localization/nl.xlf +295 -0
  268. package/localization/nn.xlf +290 -0
  269. package/localization/no.xlf +295 -0
  270. package/localization/or.xlf +290 -0
  271. package/localization/pa.xlf +290 -0
  272. package/localization/pkg/ar.xliff +6 -0
  273. package/localization/pkg/bg.xliff +6 -0
  274. package/localization/pkg/cs.xliff +6 -0
  275. package/localization/pkg/da.xliff +6 -0
  276. package/localization/pkg/de.xliff +6 -0
  277. package/localization/pkg/el.xliff +6 -0
  278. package/localization/pkg/es.xliff +6 -0
  279. package/localization/pkg/et.xliff +6 -0
  280. package/localization/pkg/fi.xliff +6 -0
  281. package/localization/pkg/fr.xliff +6 -0
  282. package/localization/pkg/hu.xliff +6 -0
  283. package/localization/pkg/id.xliff +6 -0
  284. package/localization/pkg/it.xliff +6 -0
  285. package/localization/pkg/ja.xliff +6 -0
  286. package/localization/pkg/ko.xliff +6 -0
  287. package/localization/pkg/lt.xliff +6 -0
  288. package/localization/pkg/lv.xliff +6 -0
  289. package/localization/pkg/nb.xliff +6 -0
  290. package/localization/pkg/nl.xliff +6 -0
  291. package/localization/pkg/pl.xliff +6 -0
  292. package/localization/pkg/pt-BR.xliff +6 -0
  293. package/localization/pkg/pt-PT.xliff +6 -0
  294. package/localization/pkg/ro.xliff +6 -0
  295. package/localization/pkg/ru.xliff +6 -0
  296. package/localization/pkg/sk.xliff +6 -0
  297. package/localization/pkg/sl.xliff +6 -0
  298. package/localization/pkg/sv.xliff +6 -0
  299. package/localization/pkg/tr.xliff +6 -0
  300. package/localization/pkg/uk.xliff +6 -0
  301. package/localization/pkg/zh-Hans.xliff +6 -0
  302. package/localization/pkg/zh-Hant.xliff +6 -0
  303. package/localization/pl.xlf +295 -0
  304. package/localization/pt-BR.xlf +295 -0
  305. package/localization/pt-PT.xlf +295 -0
  306. package/localization/pt.xlf +295 -0
  307. package/localization/ro.xlf +295 -0
  308. package/localization/ru.xlf +295 -0
  309. package/localization/si.xlf +290 -0
  310. package/localization/sk.xlf +295 -0
  311. package/localization/sl.xlf +295 -0
  312. package/localization/snippets/ar.xliff +4 -0
  313. package/localization/snippets/bg.xliff +4 -0
  314. package/localization/snippets/cs.xliff +4 -0
  315. package/localization/snippets/da.xliff +4 -0
  316. package/localization/snippets/de.xliff +4 -0
  317. package/localization/snippets/el.xliff +4 -0
  318. package/localization/snippets/es.xliff +4 -0
  319. package/localization/snippets/et.xliff +4 -0
  320. package/localization/snippets/fi.xliff +4 -0
  321. package/localization/snippets/fr.xliff +4 -0
  322. package/localization/snippets/hu.xliff +4 -0
  323. package/localization/snippets/id.xliff +4 -0
  324. package/localization/snippets/it.xliff +4 -0
  325. package/localization/snippets/ja.xliff +4 -0
  326. package/localization/snippets/ko.xliff +4 -0
  327. package/localization/snippets/lt.xliff +4 -0
  328. package/localization/snippets/lv.xliff +4 -0
  329. package/localization/snippets/nb.xliff +4 -0
  330. package/localization/snippets/nl.xliff +4 -0
  331. package/localization/snippets/pl.xliff +4 -0
  332. package/localization/snippets/pt-BR.xliff +4 -0
  333. package/localization/snippets/pt-PT.xliff +4 -0
  334. package/localization/snippets/ro.xliff +4 -0
  335. package/localization/snippets/ru.xliff +4 -0
  336. package/localization/snippets/sk.xliff +4 -0
  337. package/localization/snippets/sl.xliff +4 -0
  338. package/localization/snippets/sv.xliff +4 -0
  339. package/localization/snippets/tr.xliff +4 -0
  340. package/localization/snippets/uk.xliff +4 -0
  341. package/localization/snippets/zh-Hans.xliff +4 -0
  342. package/localization/snippets/zh-Hant.xliff +4 -0
  343. package/localization/so.xlf +290 -0
  344. package/localization/sq.xlf +290 -0
  345. package/localization/sr.xlf +290 -0
  346. package/localization/sv.xlf +295 -0
  347. package/localization/sw.xlf +290 -0
  348. package/localization/ta.xlf +290 -0
  349. package/localization/te.xlf +290 -0
  350. package/localization/tg.xlf +290 -0
  351. package/localization/th.xlf +290 -0
  352. package/localization/tl.xlf +290 -0
  353. package/localization/tr.xlf +295 -0
  354. package/localization/uk.xlf +295 -0
  355. package/localization/ur.xlf +290 -0
  356. package/localization/uz.xlf +290 -0
  357. package/localization/vi.xlf +290 -0
  358. package/localization/zh-Hans.xlf +295 -0
  359. package/localization/zh-Hant.xlf +295 -0
  360. package/localization/zh.xlf +295 -0
  361. package/package.json +272 -166
  362. package/src/components/geogebra-app.styles.ts +47 -0
  363. package/src/components/geogebra-app.ts +651 -0
  364. package/src/model/boolean-attribute-converter.ts +8 -0
  365. package/src/model/geogebra-api.ts +148 -0
  366. package/src/model/geogebra-options.ts +72 -0
  367. package/src/model/geogebra-parameters.ts +53 -0
  368. package/src/model/ggb-file.ts +30 -0
  369. package/src/types.d.ts +3 -0
  370. package/src/widgets/webwriter-geogebra-3d.ts +15 -0
  371. package/{widgets → src/widgets}/webwriter-geogebra-classic.ts +14 -8
  372. package/{widgets → src/widgets}/webwriter-geogebra-geometry.ts +14 -8
  373. package/{widgets → src/widgets}/webwriter-geogebra-notes.ts +14 -8
  374. package/{widgets → src/widgets}/webwriter-geogebra-scientific.ts +14 -8
  375. package/src/widgets/webwriter-geogebra.ts +28 -0
  376. package/tests/conversions.test.ts +80 -0
  377. package/tests/data-block.test.ts +72 -0
  378. package/tests/helpers.ts +48 -0
  379. package/tests/language.test.ts +49 -0
  380. package/tests/presentation.test.ts +80 -0
  381. package/tsconfig.json +4 -8
  382. package/components/geogebra-app.ts +0 -417
  383. package/custom.d.ts +0 -180
  384. package/widgets/webwriter-geogebra-3d.ts +0 -9
  385. package/widgets/webwriter-geogebra-evaluator.ts +0 -9
  386. package/widgets/webwriter-geogebra.ts +0 -20
package/README.md ADDED
@@ -0,0 +1,785 @@
1
+ # Geogebra (`@webwriter/geogebra@2.0.1`)
2
+ [License: MIT](LICENSE) | Version: 2.0.1
3
+
4
+ Use the mathematics learning apps of GeoGebra for algebra and geometry.
5
+
6
+
7
+
8
+
9
+
10
+ ## `WebwriterGeogebra` (`<webwriter-geogebra>`)
11
+ A GeoGebra Calculator Suite widget.
12
+
13
+ ### Usage
14
+
15
+ Use with a CDN (e.g. [jsdelivr](https://jsdelivr.com)):
16
+ ```html
17
+ <link href="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra.css" rel="stylesheet">
18
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra.js"></script>
19
+ <webwriter-geogebra></webwriter-geogebra>
20
+ ```
21
+
22
+ Or use with a bundler (e.g. [Vite](https://vite.dev)):
23
+
24
+ ```
25
+ npm install @webwriter/geogebra
26
+ ```
27
+
28
+ ```html
29
+ <link href="@webwriter/geogebra/widgets/webwriter-geogebra.css" rel="stylesheet">
30
+ <script type="module" src="@webwriter/geogebra/widgets/webwriter-geogebra.js"></script>
31
+ <webwriter-geogebra></webwriter-geogebra>
32
+ ```
33
+
34
+ ## Fields
35
+ | Name (Attribute Name) | Type | Description | Default | Reflects |
36
+ | :-------------------: | :--: | :---------: | :-----: | :------: |
37
+ | `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" …​ GeoGebra Graphing Calculator "geometry" …​ GeoGebra Geometry "3d" …​ GeoGebra 3D Graphing Calculator "classic" …​ GeoGebra Classic "suite" …​ GeoGebra Calculator Suite "evaluator" …​ Equation Editor "scientific" …​Scientific Calculator "notes" …​ GeoGebra Notes | `"suite"` | ✓ |
38
+ | `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
39
+ | `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
40
+ | `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `false` | ✓ |
41
+ | `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `false` | ✓ |
42
+ | `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
43
+ | `WebwriterGeogebra.options` | - | - | `geogebraOptions` | ✗ |
44
+ | `WebwriterGeogebra.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
45
+ | `WebwriterGeogebra.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
46
+ | `WebwriterGeogebra.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
47
+ | `msg` | `MsgFn` | - | - | ✗ |
48
+ | `width` (`width`) | `number` | Applet width | `800` | ✓ |
49
+ | `height` (`height`) | `number` | Applet height | `450` | ✓ |
50
+ | `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
51
+ | `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
52
+ | `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
53
+ | `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
54
+ | `enableLabelDrags` (`enableLabelDrags`) | `boolean` | States whether labels can be dragged. Default: true | `true` | ✓ |
55
+ | `enableShiftDragZoom` (`enableShiftDragZoom`) | `boolean` | States whether the Graphics View(s) should be moveable using Shift mouse drag (or. Ctrl + mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true | `true` | ✓ |
56
+ | `errorDialogsActive` (`errorDialogsActive`) | `boolean` | States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true | `true` | ✓ |
57
+ | `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
58
+ | `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
59
+ | `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
60
+ | `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
61
+ | `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
62
+ | `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
63
+ | `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
64
+ | `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
65
+ | `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
66
+ | `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
67
+ | `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
68
+ | `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
69
+ | `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
70
+ | `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
71
+ | `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
72
+ | `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
73
+ | `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
74
+ | `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
75
+ | `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
76
+ | `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
77
+ | `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
78
+ | `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
79
+ | `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
80
+ | `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
81
+ | `scale` (`scale`) | `number` | Ratio by which the applet should be scaled (eg. 2 makes the applet 2 times bigger, including all texts and UI elements). Default: 1 | `1` | ✓ |
82
+ | `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
83
+ | `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
84
+ | `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
85
+ | `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
86
+ | `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
87
+ | `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
88
+ | `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
89
+ | `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
90
+ | `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
91
+ | `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
92
+ | `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
93
+ | `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
94
+ | `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
95
+ | `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
96
+ | `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
97
+
98
+ *Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
99
+
100
+ ## Methods
101
+ | Name | Description | Parameters |
102
+ | :--: | :---------: | :-------: |
103
+ | `importConstruction` | - | `files: File[]`
104
+ | `importGgb` | - | `file: File`
105
+ | `exportGgb` | - | -
106
+ | `exportPng` | - | -
107
+ | `exportSvg` | - | -
108
+ | `focus` | - | `options: FocusOptions`
109
+
110
+ *[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
111
+
112
+ ## Events
113
+ | Name | Description |
114
+ | :--: | :---------: |
115
+ | focus | Fired when the GeoGebra applet gains focus. |
116
+ | ggb-load | Fired when the GeoGebra API is ready. The event detail contains the API instance. |
117
+
118
+ *[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
119
+
120
+ ## CSS parts
121
+ | Name | Description |
122
+ | :--: | :---------: |
123
+ | applet | The iframe that holds the GeoGebra applet. |
124
+
125
+ *[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
126
+
127
+ ## Editing config
128
+ | Name | Value |
129
+ | :--: | :---------: |
130
+ | `content` | `text*` |
131
+ | `importFormats` | `.ggb` |
132
+ | `exportFormats` | `.ggb,image/png,image/svg+xml` |
133
+
134
+ *The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
135
+
136
+ *No public slots, or custom CSS properties.*
137
+
138
+
139
+ ## `WebwriterGeogebraGeometry` (`<webwriter-geogebra-geometry>`)
140
+ A GeoGebra Geometry widget.
141
+
142
+ ### Usage
143
+
144
+ Use with a CDN (e.g. [jsdelivr](https://jsdelivr.com)):
145
+ ```html
146
+ <link href="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-geometry.css" rel="stylesheet">
147
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-geometry.js"></script>
148
+ <webwriter-geogebra-geometry></webwriter-geogebra-geometry>
149
+ ```
150
+
151
+ Or use with a bundler (e.g. [Vite](https://vite.dev)):
152
+
153
+ ```
154
+ npm install @webwriter/geogebra
155
+ ```
156
+
157
+ ```html
158
+ <link href="@webwriter/geogebra/widgets/webwriter-geogebra-geometry.css" rel="stylesheet">
159
+ <script type="module" src="@webwriter/geogebra/widgets/webwriter-geogebra-geometry.js"></script>
160
+ <webwriter-geogebra-geometry></webwriter-geogebra-geometry>
161
+ ```
162
+
163
+ ## Fields
164
+ | Name (Attribute Name) | Type | Description | Default | Reflects |
165
+ | :-------------------: | :--: | :---------: | :-----: | :------: |
166
+ | `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" …​ GeoGebra Graphing Calculator "geometry" …​ GeoGebra Geometry "3d" …​ GeoGebra 3D Graphing Calculator "classic" …​ GeoGebra Classic "suite" …​ GeoGebra Calculator Suite "evaluator" …​ Equation Editor "scientific" …​Scientific Calculator "notes" …​ GeoGebra Notes | `"geometry"` | ✓ |
167
+ | `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
168
+ | `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
169
+ | `WebwriterGeogebraGeometry.options` | - | - | `geogebraOptions` | ✗ |
170
+ | `WebwriterGeogebraGeometry.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
171
+ | `WebwriterGeogebraGeometry.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
172
+ | `WebwriterGeogebraGeometry.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
173
+ | `msg` | `MsgFn` | - | - | ✗ |
174
+ | `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
175
+ | `width` (`width`) | `number` | Applet width | `800` | ✓ |
176
+ | `height` (`height`) | `number` | Applet height | `450` | ✓ |
177
+ | `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
178
+ | `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
179
+ | `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
180
+ | `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
181
+ | `enableLabelDrags` (`enableLabelDrags`) | `boolean` | States whether labels can be dragged. Default: true | `true` | ✓ |
182
+ | `enableShiftDragZoom` (`enableShiftDragZoom`) | `boolean` | States whether the Graphics View(s) should be moveable using Shift mouse drag (or. Ctrl + mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true | `true` | ✓ |
183
+ | `errorDialogsActive` (`errorDialogsActive`) | `boolean` | States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true | `true` | ✓ |
184
+ | `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
185
+ | `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
186
+ | `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
187
+ | `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
188
+ | `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
189
+ | `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
190
+ | `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
191
+ | `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
192
+ | `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
193
+ | `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
194
+ | `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
195
+ | `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
196
+ | `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
197
+ | `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
198
+ | `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
199
+ | `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
200
+ | `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
201
+ | `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
202
+ | `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
203
+ | `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
204
+ | `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
205
+ | `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
206
+ | `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
207
+ | `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
208
+ | `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
209
+ | `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
210
+ | `scale` (`scale`) | `number` | Ratio by which the applet should be scaled (eg. 2 makes the applet 2 times bigger, including all texts and UI elements). Default: 1 | `1` | ✓ |
211
+ | `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
212
+ | `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
213
+ | `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
214
+ | `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
215
+ | `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
216
+ | `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
217
+ | `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
218
+ | `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
219
+ | `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
220
+ | `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
221
+ | `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
222
+ | `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
223
+ | `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
224
+ | `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
225
+ | `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
226
+
227
+ *Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
228
+
229
+ ## Methods
230
+ | Name | Description | Parameters |
231
+ | :--: | :---------: | :-------: |
232
+ | `importConstruction` | - | `files: File[]`
233
+ | `importGgb` | - | `file: File`
234
+ | `exportGgb` | - | -
235
+ | `exportPng` | - | -
236
+ | `exportSvg` | - | -
237
+ | `focus` | - | `options: FocusOptions`
238
+
239
+ *[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
240
+
241
+ ## Events
242
+ | Name | Description |
243
+ | :--: | :---------: |
244
+ | focus | Fired when the GeoGebra applet gains focus. |
245
+ | ggb-load | Fired when the GeoGebra API is ready. The event detail contains the API instance. |
246
+
247
+ *[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
248
+
249
+ ## CSS parts
250
+ | Name | Description |
251
+ | :--: | :---------: |
252
+ | applet | The iframe that holds the GeoGebra applet. |
253
+
254
+ *[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
255
+
256
+ ## Editing config
257
+ | Name | Value |
258
+ | :--: | :---------: |
259
+ | `content` | `text*` |
260
+ | `importFormats` | `.ggb` |
261
+ | `exportFormats` | `.ggb,image/png,image/svg+xml` |
262
+
263
+ *The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
264
+
265
+ *No public slots, or custom CSS properties.*
266
+
267
+
268
+ ## `WebwriterGeogebra3d` (`<webwriter-geogebra-3d>`)
269
+ A GeoGebra 3D Graphing Calculator widget.
270
+
271
+ ### Usage
272
+
273
+ Use with a CDN (e.g. [jsdelivr](https://jsdelivr.com)):
274
+ ```html
275
+ <link href="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-3d.css" rel="stylesheet">
276
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-3d.js"></script>
277
+ <webwriter-geogebra-3d></webwriter-geogebra-3d>
278
+ ```
279
+
280
+ Or use with a bundler (e.g. [Vite](https://vite.dev)):
281
+
282
+ ```
283
+ npm install @webwriter/geogebra
284
+ ```
285
+
286
+ ```html
287
+ <link href="@webwriter/geogebra/widgets/webwriter-geogebra-3d.css" rel="stylesheet">
288
+ <script type="module" src="@webwriter/geogebra/widgets/webwriter-geogebra-3d.js"></script>
289
+ <webwriter-geogebra-3d></webwriter-geogebra-3d>
290
+ ```
291
+
292
+ ## Fields
293
+ | Name (Attribute Name) | Type | Description | Default | Reflects |
294
+ | :-------------------: | :--: | :---------: | :-----: | :------: |
295
+ | `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" …​ GeoGebra Graphing Calculator "geometry" …​ GeoGebra Geometry "3d" …​ GeoGebra 3D Graphing Calculator "classic" …​ GeoGebra Classic "suite" …​ GeoGebra Calculator Suite "evaluator" …​ Equation Editor "scientific" …​Scientific Calculator "notes" …​ GeoGebra Notes | `"3d"` | ✓ |
296
+ | `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
297
+ | `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
298
+ | `WebwriterGeogebra3d.options` | - | - | `geogebraOptions` | ✗ |
299
+ | `WebwriterGeogebra3d.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
300
+ | `WebwriterGeogebra3d.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
301
+ | `WebwriterGeogebra3d.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
302
+ | `msg` | `MsgFn` | - | - | ✗ |
303
+ | `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
304
+ | `width` (`width`) | `number` | Applet width | `800` | ✓ |
305
+ | `height` (`height`) | `number` | Applet height | `450` | ✓ |
306
+ | `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
307
+ | `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
308
+ | `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
309
+ | `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
310
+ | `enableLabelDrags` (`enableLabelDrags`) | `boolean` | States whether labels can be dragged. Default: true | `true` | ✓ |
311
+ | `enableShiftDragZoom` (`enableShiftDragZoom`) | `boolean` | States whether the Graphics View(s) should be moveable using Shift mouse drag (or. Ctrl + mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true | `true` | ✓ |
312
+ | `errorDialogsActive` (`errorDialogsActive`) | `boolean` | States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true | `true` | ✓ |
313
+ | `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
314
+ | `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
315
+ | `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
316
+ | `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
317
+ | `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
318
+ | `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
319
+ | `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
320
+ | `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
321
+ | `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
322
+ | `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
323
+ | `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
324
+ | `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
325
+ | `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
326
+ | `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
327
+ | `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
328
+ | `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
329
+ | `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
330
+ | `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
331
+ | `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
332
+ | `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
333
+ | `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
334
+ | `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
335
+ | `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
336
+ | `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
337
+ | `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
338
+ | `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
339
+ | `scale` (`scale`) | `number` | Ratio by which the applet should be scaled (eg. 2 makes the applet 2 times bigger, including all texts and UI elements). Default: 1 | `1` | ✓ |
340
+ | `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
341
+ | `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
342
+ | `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
343
+ | `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
344
+ | `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
345
+ | `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
346
+ | `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
347
+ | `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
348
+ | `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
349
+ | `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
350
+ | `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
351
+ | `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
352
+ | `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
353
+ | `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
354
+ | `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
355
+
356
+ *Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
357
+
358
+ ## Methods
359
+ | Name | Description | Parameters |
360
+ | :--: | :---------: | :-------: |
361
+ | `importConstruction` | - | `files: File[]`
362
+ | `importGgb` | - | `file: File`
363
+ | `exportGgb` | - | -
364
+ | `exportPng` | - | -
365
+ | `exportSvg` | - | -
366
+ | `focus` | - | `options: FocusOptions`
367
+
368
+ *[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
369
+
370
+ ## Events
371
+ | Name | Description |
372
+ | :--: | :---------: |
373
+ | focus | Fired when the GeoGebra applet gains focus. |
374
+ | ggb-load | Fired when the GeoGebra API is ready. The event detail contains the API instance. |
375
+
376
+ *[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
377
+
378
+ ## CSS parts
379
+ | Name | Description |
380
+ | :--: | :---------: |
381
+ | applet | The iframe that holds the GeoGebra applet. |
382
+
383
+ *[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
384
+
385
+ ## Editing config
386
+ | Name | Value |
387
+ | :--: | :---------: |
388
+ | `content` | `text*` |
389
+ | `importFormats` | `.ggb` |
390
+ | `exportFormats` | `.ggb,image/png,image/svg+xml` |
391
+
392
+ *The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
393
+
394
+ *No public slots, or custom CSS properties.*
395
+
396
+
397
+ ## `WebwriterGeogebraNotes` (`<webwriter-geogebra-notes>`)
398
+ A GeoGebra Notes widget.
399
+
400
+ ### Usage
401
+
402
+ Use with a CDN (e.g. [jsdelivr](https://jsdelivr.com)):
403
+ ```html
404
+ <link href="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-notes.css" rel="stylesheet">
405
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-notes.js"></script>
406
+ <webwriter-geogebra-notes></webwriter-geogebra-notes>
407
+ ```
408
+
409
+ Or use with a bundler (e.g. [Vite](https://vite.dev)):
410
+
411
+ ```
412
+ npm install @webwriter/geogebra
413
+ ```
414
+
415
+ ```html
416
+ <link href="@webwriter/geogebra/widgets/webwriter-geogebra-notes.css" rel="stylesheet">
417
+ <script type="module" src="@webwriter/geogebra/widgets/webwriter-geogebra-notes.js"></script>
418
+ <webwriter-geogebra-notes></webwriter-geogebra-notes>
419
+ ```
420
+
421
+ ## Fields
422
+ | Name (Attribute Name) | Type | Description | Default | Reflects |
423
+ | :-------------------: | :--: | :---------: | :-----: | :------: |
424
+ | `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" …​ GeoGebra Graphing Calculator "geometry" …​ GeoGebra Geometry "3d" …​ GeoGebra 3D Graphing Calculator "classic" …​ GeoGebra Classic "suite" …​ GeoGebra Calculator Suite "evaluator" …​ Equation Editor "scientific" …​Scientific Calculator "notes" …​ GeoGebra Notes | `"notes"` | ✓ |
425
+ | `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
426
+ | `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
427
+ | `WebwriterGeogebraNotes.options` | - | - | `geogebraOptions` | ✗ |
428
+ | `WebwriterGeogebraNotes.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
429
+ | `WebwriterGeogebraNotes.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
430
+ | `WebwriterGeogebraNotes.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
431
+ | `msg` | `MsgFn` | - | - | ✗ |
432
+ | `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
433
+ | `width` (`width`) | `number` | Applet width | `800` | ✓ |
434
+ | `height` (`height`) | `number` | Applet height | `450` | ✓ |
435
+ | `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
436
+ | `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
437
+ | `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
438
+ | `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
439
+ | `enableLabelDrags` (`enableLabelDrags`) | `boolean` | States whether labels can be dragged. Default: true | `true` | ✓ |
440
+ | `enableShiftDragZoom` (`enableShiftDragZoom`) | `boolean` | States whether the Graphics View(s) should be moveable using Shift mouse drag (or. Ctrl + mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true | `true` | ✓ |
441
+ | `errorDialogsActive` (`errorDialogsActive`) | `boolean` | States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true | `true` | ✓ |
442
+ | `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
443
+ | `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
444
+ | `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
445
+ | `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
446
+ | `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
447
+ | `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
448
+ | `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
449
+ | `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
450
+ | `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
451
+ | `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
452
+ | `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
453
+ | `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
454
+ | `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
455
+ | `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
456
+ | `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
457
+ | `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
458
+ | `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
459
+ | `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
460
+ | `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
461
+ | `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
462
+ | `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
463
+ | `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
464
+ | `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
465
+ | `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
466
+ | `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
467
+ | `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
468
+ | `scale` (`scale`) | `number` | Ratio by which the applet should be scaled (eg. 2 makes the applet 2 times bigger, including all texts and UI elements). Default: 1 | `1` | ✓ |
469
+ | `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
470
+ | `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
471
+ | `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
472
+ | `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
473
+ | `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
474
+ | `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
475
+ | `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
476
+ | `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
477
+ | `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
478
+ | `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
479
+ | `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
480
+ | `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
481
+ | `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
482
+ | `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
483
+ | `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
484
+
485
+ *Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
486
+
487
+ ## Methods
488
+ | Name | Description | Parameters |
489
+ | :--: | :---------: | :-------: |
490
+ | `importConstruction` | - | `files: File[]`
491
+ | `importGgb` | - | `file: File`
492
+ | `exportGgb` | - | -
493
+ | `exportPng` | - | -
494
+ | `exportSvg` | - | -
495
+ | `focus` | - | `options: FocusOptions`
496
+
497
+ *[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
498
+
499
+ ## Events
500
+ | Name | Description |
501
+ | :--: | :---------: |
502
+ | focus | Fired when the GeoGebra applet gains focus. |
503
+ | ggb-load | Fired when the GeoGebra API is ready. The event detail contains the API instance. |
504
+
505
+ *[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
506
+
507
+ ## CSS parts
508
+ | Name | Description |
509
+ | :--: | :---------: |
510
+ | applet | The iframe that holds the GeoGebra applet. |
511
+
512
+ *[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
513
+
514
+ ## Editing config
515
+ | Name | Value |
516
+ | :--: | :---------: |
517
+ | `content` | `text*` |
518
+ | `importFormats` | `.ggb` |
519
+ | `exportFormats` | `.ggb,image/png,image/svg+xml` |
520
+
521
+ *The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
522
+
523
+ *No public slots, or custom CSS properties.*
524
+
525
+
526
+ ## `WebwriterGeogebraScientific` (`<webwriter-geogebra-scientific>`)
527
+ A GeoGebra Scientific Calculator widget.
528
+
529
+ ### Usage
530
+
531
+ Use with a CDN (e.g. [jsdelivr](https://jsdelivr.com)):
532
+ ```html
533
+ <link href="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-scientific.css" rel="stylesheet">
534
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-scientific.js"></script>
535
+ <webwriter-geogebra-scientific></webwriter-geogebra-scientific>
536
+ ```
537
+
538
+ Or use with a bundler (e.g. [Vite](https://vite.dev)):
539
+
540
+ ```
541
+ npm install @webwriter/geogebra
542
+ ```
543
+
544
+ ```html
545
+ <link href="@webwriter/geogebra/widgets/webwriter-geogebra-scientific.css" rel="stylesheet">
546
+ <script type="module" src="@webwriter/geogebra/widgets/webwriter-geogebra-scientific.js"></script>
547
+ <webwriter-geogebra-scientific></webwriter-geogebra-scientific>
548
+ ```
549
+
550
+ ## Fields
551
+ | Name (Attribute Name) | Type | Description | Default | Reflects |
552
+ | :-------------------: | :--: | :---------: | :-----: | :------: |
553
+ | `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" …​ GeoGebra Graphing Calculator "geometry" …​ GeoGebra Geometry "3d" …​ GeoGebra 3D Graphing Calculator "classic" …​ GeoGebra Classic "suite" …​ GeoGebra Calculator Suite "evaluator" …​ Equation Editor "scientific" …​Scientific Calculator "notes" …​ GeoGebra Notes | `"scientific"` | ✓ |
554
+ | `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
555
+ | `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
556
+ | `WebwriterGeogebraScientific.options` | - | - | `geogebraOptions` | ✗ |
557
+ | `WebwriterGeogebraScientific.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
558
+ | `WebwriterGeogebraScientific.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
559
+ | `WebwriterGeogebraScientific.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
560
+ | `msg` | `MsgFn` | - | - | ✗ |
561
+ | `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
562
+ | `width` (`width`) | `number` | Applet width | `800` | ✓ |
563
+ | `height` (`height`) | `number` | Applet height | `450` | ✓ |
564
+ | `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
565
+ | `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
566
+ | `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
567
+ | `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
568
+ | `enableLabelDrags` (`enableLabelDrags`) | `boolean` | States whether labels can be dragged. Default: true | `true` | ✓ |
569
+ | `enableShiftDragZoom` (`enableShiftDragZoom`) | `boolean` | States whether the Graphics View(s) should be moveable using Shift mouse drag (or. Ctrl + mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true | `true` | ✓ |
570
+ | `errorDialogsActive` (`errorDialogsActive`) | `boolean` | States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true | `true` | ✓ |
571
+ | `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
572
+ | `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
573
+ | `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
574
+ | `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
575
+ | `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
576
+ | `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
577
+ | `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
578
+ | `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
579
+ | `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
580
+ | `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
581
+ | `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
582
+ | `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
583
+ | `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
584
+ | `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
585
+ | `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
586
+ | `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
587
+ | `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
588
+ | `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
589
+ | `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
590
+ | `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
591
+ | `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
592
+ | `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
593
+ | `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
594
+ | `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
595
+ | `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
596
+ | `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
597
+ | `scale` (`scale`) | `number` | Ratio by which the applet should be scaled (eg. 2 makes the applet 2 times bigger, including all texts and UI elements). Default: 1 | `1` | ✓ |
598
+ | `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
599
+ | `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
600
+ | `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
601
+ | `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
602
+ | `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
603
+ | `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
604
+ | `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
605
+ | `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
606
+ | `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
607
+ | `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
608
+ | `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
609
+ | `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
610
+ | `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
611
+ | `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
612
+ | `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
613
+
614
+ *Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
615
+
616
+ ## Methods
617
+ | Name | Description | Parameters |
618
+ | :--: | :---------: | :-------: |
619
+ | `importConstruction` | - | `files: File[]`
620
+ | `importGgb` | - | `file: File`
621
+ | `exportGgb` | - | -
622
+ | `exportPng` | - | -
623
+ | `exportSvg` | - | -
624
+ | `focus` | - | `options: FocusOptions`
625
+
626
+ *[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
627
+
628
+ ## Events
629
+ | Name | Description |
630
+ | :--: | :---------: |
631
+ | focus | Fired when the GeoGebra applet gains focus. |
632
+ | ggb-load | Fired when the GeoGebra API is ready. The event detail contains the API instance. |
633
+
634
+ *[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
635
+
636
+ ## CSS parts
637
+ | Name | Description |
638
+ | :--: | :---------: |
639
+ | applet | The iframe that holds the GeoGebra applet. |
640
+
641
+ *[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
642
+
643
+ ## Editing config
644
+ | Name | Value |
645
+ | :--: | :---------: |
646
+ | `content` | `text*` |
647
+ | `importFormats` | `.ggb` |
648
+ | `exportFormats` | `.ggb,image/png,image/svg+xml` |
649
+
650
+ *The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
651
+
652
+ *No public slots, or custom CSS properties.*
653
+
654
+
655
+ ## `WebwriterGeogebraClassic` (`<webwriter-geogebra-classic>`)
656
+ A GeoGebra Classic widget.
657
+
658
+ ### Usage
659
+
660
+ Use with a CDN (e.g. [jsdelivr](https://jsdelivr.com)):
661
+ ```html
662
+ <link href="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-classic.css" rel="stylesheet">
663
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/geogebra/widgets/webwriter-geogebra-classic.js"></script>
664
+ <webwriter-geogebra-classic></webwriter-geogebra-classic>
665
+ ```
666
+
667
+ Or use with a bundler (e.g. [Vite](https://vite.dev)):
668
+
669
+ ```
670
+ npm install @webwriter/geogebra
671
+ ```
672
+
673
+ ```html
674
+ <link href="@webwriter/geogebra/widgets/webwriter-geogebra-classic.css" rel="stylesheet">
675
+ <script type="module" src="@webwriter/geogebra/widgets/webwriter-geogebra-classic.js"></script>
676
+ <webwriter-geogebra-classic></webwriter-geogebra-classic>
677
+ ```
678
+
679
+ ## Fields
680
+ | Name (Attribute Name) | Type | Description | Default | Reflects |
681
+ | :-------------------: | :--: | :---------: | :-----: | :------: |
682
+ | `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" …​ GeoGebra Graphing Calculator "geometry" …​ GeoGebra Geometry "3d" …​ GeoGebra 3D Graphing Calculator "classic" …​ GeoGebra Classic "suite" …​ GeoGebra Calculator Suite "evaluator" …​ Equation Editor "scientific" …​Scientific Calculator "notes" …​ GeoGebra Notes | `"classic"` | ✓ |
683
+ | `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
684
+ | `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
685
+ | `WebwriterGeogebraClassic.options` | - | - | `geogebraOptions` | ✗ |
686
+ | `WebwriterGeogebraClassic.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
687
+ | `WebwriterGeogebraClassic.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
688
+ | `WebwriterGeogebraClassic.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
689
+ | `msg` | `MsgFn` | - | - | ✗ |
690
+ | `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
691
+ | `width` (`width`) | `number` | Applet width | `800` | ✓ |
692
+ | `height` (`height`) | `number` | Applet height | `450` | ✓ |
693
+ | `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
694
+ | `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
695
+ | `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
696
+ | `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
697
+ | `enableLabelDrags` (`enableLabelDrags`) | `boolean` | States whether labels can be dragged. Default: true | `true` | ✓ |
698
+ | `enableShiftDragZoom` (`enableShiftDragZoom`) | `boolean` | States whether the Graphics View(s) should be moveable using Shift mouse drag (or. Ctrl + mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true | `true` | ✓ |
699
+ | `errorDialogsActive` (`errorDialogsActive`) | `boolean` | States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true | `true` | ✓ |
700
+ | `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
701
+ | `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
702
+ | `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
703
+ | `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
704
+ | `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
705
+ | `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
706
+ | `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
707
+ | `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
708
+ | `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
709
+ | `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
710
+ | `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
711
+ | `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
712
+ | `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
713
+ | `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
714
+ | `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
715
+ | `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
716
+ | `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
717
+ | `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
718
+ | `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
719
+ | `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
720
+ | `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
721
+ | `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
722
+ | `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
723
+ | `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
724
+ | `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
725
+ | `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
726
+ | `scale` (`scale`) | `number` | Ratio by which the applet should be scaled (eg. 2 makes the applet 2 times bigger, including all texts and UI elements). Default: 1 | `1` | ✓ |
727
+ | `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
728
+ | `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
729
+ | `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
730
+ | `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
731
+ | `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
732
+ | `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
733
+ | `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
734
+ | `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
735
+ | `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
736
+ | `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
737
+ | `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
738
+ | `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
739
+ | `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
740
+ | `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
741
+ | `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
742
+
743
+ *Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
744
+
745
+ ## Methods
746
+ | Name | Description | Parameters |
747
+ | :--: | :---------: | :-------: |
748
+ | `importConstruction` | - | `files: File[]`
749
+ | `importGgb` | - | `file: File`
750
+ | `exportGgb` | - | -
751
+ | `exportPng` | - | -
752
+ | `exportSvg` | - | -
753
+ | `focus` | - | `options: FocusOptions`
754
+
755
+ *[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
756
+
757
+ ## Events
758
+ | Name | Description |
759
+ | :--: | :---------: |
760
+ | focus | Fired when the GeoGebra applet gains focus. |
761
+ | ggb-load | Fired when the GeoGebra API is ready. The event detail contains the API instance. |
762
+
763
+ *[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
764
+
765
+ ## CSS parts
766
+ | Name | Description |
767
+ | :--: | :---------: |
768
+ | applet | The iframe that holds the GeoGebra applet. |
769
+
770
+ *[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
771
+
772
+ ## Editing config
773
+ | Name | Value |
774
+ | :--: | :---------: |
775
+ | `content` | `text*` |
776
+ | `importFormats` | `.ggb` |
777
+ | `exportFormats` | `.ggb,image/png,image/svg+xml` |
778
+
779
+ *The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
780
+
781
+ *No public slots, or custom CSS properties.*
782
+
783
+
784
+ ---
785
+ *Generated with @webwriter/build@1.15.0*