@elgap/edukaai 0.1.0

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 (306) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/BHDzAs85.js +1 -0
  3. package/.output/public/_nuxt/BJzbfdL_.js +1 -0
  4. package/.output/public/_nuxt/BKGLlKXk.js +6 -0
  5. package/.output/public/_nuxt/BLuXzJk3.js +1 -0
  6. package/.output/public/_nuxt/BNOzzLI3.js +1 -0
  7. package/.output/public/_nuxt/BO5GMwXh.js +1 -0
  8. package/.output/public/_nuxt/BQRbsFGy.js +1 -0
  9. package/.output/public/_nuxt/Be4MVdOg.js +1 -0
  10. package/.output/public/_nuxt/Bu4d3Z1T.js +1 -0
  11. package/.output/public/_nuxt/BwpBBNv4.js +1 -0
  12. package/.output/public/_nuxt/C1Og9-6n.js +97 -0
  13. package/.output/public/_nuxt/C3CjAhtj.js +1 -0
  14. package/.output/public/_nuxt/C6E3Ty3z.js +1 -0
  15. package/.output/public/_nuxt/COct4B42.js +1 -0
  16. package/.output/public/_nuxt/CQ6g2dtj.js +1 -0
  17. package/.output/public/_nuxt/CURSW5TV.js +246 -0
  18. package/.output/public/_nuxt/CW57JW4s.js +1 -0
  19. package/.output/public/_nuxt/Cg2fM61o.js +18 -0
  20. package/.output/public/_nuxt/CgGOeWta.js +1 -0
  21. package/.output/public/_nuxt/CoyYbT7u.js +1 -0
  22. package/.output/public/_nuxt/D11MHbGc.js +133 -0
  23. package/.output/public/_nuxt/D24dz0S8.js +1 -0
  24. package/.output/public/_nuxt/D3EFPr8x.js +1 -0
  25. package/.output/public/_nuxt/Dvt4ZHil.js +1 -0
  26. package/.output/public/_nuxt/builds/latest.json +1 -0
  27. package/.output/public/_nuxt/builds/meta/ab87ba0e-6d0d-4466-8b12-00d44f8fb9d3.json +1 -0
  28. package/.output/public/_nuxt/default.C1K1-g4D.css +1 -0
  29. package/.output/public/_nuxt/entry.CH8k-Mga.css +1 -0
  30. package/.output/public/_nuxt/error-404.C-Ezrlz-.css +1 -0
  31. package/.output/public/_nuxt/error-500.DBWf9FGj.css +1 -0
  32. package/.output/public/_nuxt/first-training.wFDD65zm.css +1 -0
  33. package/.output/public/_nuxt/import.cUKYdCrq.css +1 -0
  34. package/.output/public/_nuxt/index.D-2VHyHA.css +1 -0
  35. package/.output/public/_nuxt/index.D4J_vHmL.css +1 -0
  36. package/.output/public/_nuxt/mPJeLIz7.js +1 -0
  37. package/.output/server/chunks/_/error-500.mjs +19 -0
  38. package/.output/server/chunks/_/error-500.mjs.map +1 -0
  39. package/.output/server/chunks/build/ExampleCard-styles.BUOJhEg0.mjs +8 -0
  40. package/.output/server/chunks/build/ExampleCard-styles.BUOJhEg0.mjs.map +1 -0
  41. package/.output/server/chunks/build/ExampleForm-Bcpl0CfL.mjs +238 -0
  42. package/.output/server/chunks/build/ExampleForm-Bcpl0CfL.mjs.map +1 -0
  43. package/.output/server/chunks/build/ImportPreview-styles.CFmMl5Ok.mjs +8 -0
  44. package/.output/server/chunks/build/ImportPreview-styles.CFmMl5Ok.mjs.map +1 -0
  45. package/.output/server/chunks/build/_id_-BUSGcL-H.mjs +113 -0
  46. package/.output/server/chunks/build/_id_-BUSGcL-H.mjs.map +1 -0
  47. package/.output/server/chunks/build/axolotl-C-EXGgM8.mjs +112 -0
  48. package/.output/server/chunks/build/axolotl-C-EXGgM8.mjs.map +1 -0
  49. package/.output/server/chunks/build/best-practices-DsadorHb.mjs +38 -0
  50. package/.output/server/chunks/build/best-practices-DsadorHb.mjs.map +1 -0
  51. package/.output/server/chunks/build/client.precomputed.mjs +4 -0
  52. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
  53. package/.output/server/chunks/build/default-DPkqqHOE.mjs +354 -0
  54. package/.output/server/chunks/build/default-DPkqqHOE.mjs.map +1 -0
  55. package/.output/server/chunks/build/default-styles.DsqVVS7k.mjs +8 -0
  56. package/.output/server/chunks/build/default-styles.DsqVVS7k.mjs.map +1 -0
  57. package/.output/server/chunks/build/error-404-K4UfZNck.mjs +97 -0
  58. package/.output/server/chunks/build/error-404-K4UfZNck.mjs.map +1 -0
  59. package/.output/server/chunks/build/error-404-styles.DuDrf-v0.mjs +8 -0
  60. package/.output/server/chunks/build/error-404-styles.DuDrf-v0.mjs.map +1 -0
  61. package/.output/server/chunks/build/error-500-CA7TEPNg.mjs +79 -0
  62. package/.output/server/chunks/build/error-500-CA7TEPNg.mjs.map +1 -0
  63. package/.output/server/chunks/build/error-500-styles.8IYEHzz6.mjs +8 -0
  64. package/.output/server/chunks/build/error-500-styles.8IYEHzz6.mjs.map +1 -0
  65. package/.output/server/chunks/build/examples-BHK8MDrs.mjs +134 -0
  66. package/.output/server/chunks/build/examples-BHK8MDrs.mjs.map +1 -0
  67. package/.output/server/chunks/build/export-BzxFqqfP.mjs +233 -0
  68. package/.output/server/chunks/build/export-BzxFqqfP.mjs.map +1 -0
  69. package/.output/server/chunks/build/faq-DKch73dS.mjs +112 -0
  70. package/.output/server/chunks/build/faq-DKch73dS.mjs.map +1 -0
  71. package/.output/server/chunks/build/field-guide-qbukT8F0.mjs +38 -0
  72. package/.output/server/chunks/build/field-guide-qbukT8F0.mjs.map +1 -0
  73. package/.output/server/chunks/build/first-training-BbEOBcEW.mjs +343 -0
  74. package/.output/server/chunks/build/first-training-BbEOBcEW.mjs.map +1 -0
  75. package/.output/server/chunks/build/first-training-styles.BzOa_KRD.mjs +8 -0
  76. package/.output/server/chunks/build/first-training-styles.BzOa_KRD.mjs.map +1 -0
  77. package/.output/server/chunks/build/glossary-CxSGCJoH.mjs +397 -0
  78. package/.output/server/chunks/build/glossary-CxSGCJoH.mjs.map +1 -0
  79. package/.output/server/chunks/build/huggingface-TSmyUzZU.mjs +128 -0
  80. package/.output/server/chunks/build/huggingface-TSmyUzZU.mjs.map +1 -0
  81. package/.output/server/chunks/build/import-C0kYhRv9.mjs +247 -0
  82. package/.output/server/chunks/build/import-C0kYhRv9.mjs.map +1 -0
  83. package/.output/server/chunks/build/index-C1ntBEWd.mjs +235 -0
  84. package/.output/server/chunks/build/index-C1ntBEWd.mjs.map +1 -0
  85. package/.output/server/chunks/build/index-D3CxihcX.mjs +320 -0
  86. package/.output/server/chunks/build/index-D3CxihcX.mjs.map +1 -0
  87. package/.output/server/chunks/build/index-DgKa1cy0.mjs +360 -0
  88. package/.output/server/chunks/build/index-DgKa1cy0.mjs.map +1 -0
  89. package/.output/server/chunks/build/index-cG54gaKX.mjs +513 -0
  90. package/.output/server/chunks/build/index-cG54gaKX.mjs.map +1 -0
  91. package/.output/server/chunks/build/index-styles.BX2SZiiS.mjs +8 -0
  92. package/.output/server/chunks/build/index-styles.BX2SZiiS.mjs.map +1 -0
  93. package/.output/server/chunks/build/llm-training-DIqc0eiM.mjs +91 -0
  94. package/.output/server/chunks/build/llm-training-DIqc0eiM.mjs.map +1 -0
  95. package/.output/server/chunks/build/new-b3338aLF.mjs +92 -0
  96. package/.output/server/chunks/build/new-b3338aLF.mjs.map +1 -0
  97. package/.output/server/chunks/build/nuxt-link-Ceyd90PQ.mjs +290 -0
  98. package/.output/server/chunks/build/nuxt-link-Ceyd90PQ.mjs.map +1 -0
  99. package/.output/server/chunks/build/sample-datasets-CVLWMQUA.mjs +45 -0
  100. package/.output/server/chunks/build/sample-datasets-CVLWMQUA.mjs.map +1 -0
  101. package/.output/server/chunks/build/server.mjs +1979 -0
  102. package/.output/server/chunks/build/server.mjs.map +1 -0
  103. package/.output/server/chunks/build/styles.mjs +20 -0
  104. package/.output/server/chunks/build/styles.mjs.map +1 -0
  105. package/.output/server/chunks/build/test-router-BYM6Cpst.mjs +105 -0
  106. package/.output/server/chunks/build/test-router-BYM6Cpst.mjs.map +1 -0
  107. package/.output/server/chunks/nitro/nitro.mjs +5800 -0
  108. package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  109. package/.output/server/chunks/routes/renderer.mjs +481 -0
  110. package/.output/server/chunks/routes/renderer.mjs.map +1 -0
  111. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  112. package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  113. package/.output/server/index.mjs +12 -0
  114. package/.output/server/index.mjs.map +1 -0
  115. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/api.js +2 -0
  116. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/app.js +2 -0
  117. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/component.js +2 -0
  118. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/context.js +2 -0
  119. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/hooks.js +2 -0
  120. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/index.js +22 -0
  121. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/util.js +2 -0
  122. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/const.js +5 -0
  123. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/env.js +17 -0
  124. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/index.js +45 -0
  125. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/plugin.js +2 -0
  126. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/proxy.js +111 -0
  127. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/time.js +28 -0
  128. package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/package.json +37 -0
  129. package/.output/server/node_modules/.nitro/@vue/devtools-api@7.7.9/dist/index.cjs +42 -0
  130. package/.output/server/node_modules/.nitro/@vue/devtools-api@7.7.9/package.json +32 -0
  131. package/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.cjs +299 -0
  132. package/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +49 -0
  133. package/.output/server/node_modules/.nitro/hookable@6.0.1/dist/index.mjs +266 -0
  134. package/.output/server/node_modules/.nitro/hookable@6.0.1/package.json +52 -0
  135. package/.output/server/node_modules/.nitro/perfect-debounce@1.0.0/dist/index.cjs +59 -0
  136. package/.output/server/node_modules/.nitro/perfect-debounce@1.0.0/package.json +44 -0
  137. package/.output/server/node_modules/.nitro/perfect-debounce@2.1.0/dist/index.mjs +89 -0
  138. package/.output/server/node_modules/.nitro/perfect-debounce@2.1.0/package.json +41 -0
  139. package/.output/server/node_modules/@babel/parser/lib/index.js +14582 -0
  140. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  141. package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +292 -0
  142. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +702 -0
  143. package/.output/server/node_modules/@iconify/utils/lib/css/common.js +76 -0
  144. package/.output/server/node_modules/@iconify/utils/lib/css/format.js +40 -0
  145. package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +52 -0
  146. package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +133 -0
  147. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +20 -0
  148. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +15 -0
  149. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +18 -0
  150. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +18 -0
  151. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +31 -0
  152. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +80 -0
  153. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +102 -0
  154. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +29 -0
  155. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +60 -0
  156. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +50 -0
  157. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +204 -0
  158. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +35 -0
  159. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +134 -0
  160. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +167 -0
  161. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +81 -0
  162. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +94 -0
  163. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +28 -0
  164. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +78 -0
  165. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +68 -0
  166. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +47 -0
  167. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +105 -0
  168. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +38 -0
  169. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +94 -0
  170. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +64 -0
  171. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +26 -0
  172. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +18 -0
  173. package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +58 -0
  174. package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +34 -0
  175. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +13 -0
  176. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +126 -0
  177. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +21 -0
  178. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +27 -0
  179. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +38 -0
  180. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +93 -0
  181. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +48 -0
  182. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +24 -0
  183. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +44 -0
  184. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +125 -0
  185. package/.output/server/node_modules/@iconify/utils/lib/index.js +53 -0
  186. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +32 -0
  187. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +28 -0
  188. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +42 -0
  189. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +63 -0
  190. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +27 -0
  191. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +27 -0
  192. package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +10 -0
  193. package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +115 -0
  194. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +32 -0
  195. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +15 -0
  196. package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +10 -0
  197. package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +42 -0
  198. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +23 -0
  199. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +69 -0
  200. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +55 -0
  201. package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +28 -0
  202. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +8 -0
  203. package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +23 -0
  204. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +9 -0
  205. package/.output/server/node_modules/@iconify/utils/package.json +118 -0
  206. package/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1893 -0
  207. package/.output/server/node_modules/@iconify/vue/package.json +64 -0
  208. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
  209. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  210. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  211. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  212. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  213. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  214. package/.output/server/node_modules/@vue/devtools-kit/dist/index.cjs +6850 -0
  215. package/.output/server/node_modules/@vue/devtools-kit/package.json +44 -0
  216. package/.output/server/node_modules/@vue/devtools-shared/dist/index.cjs +378 -0
  217. package/.output/server/node_modules/@vue/devtools-shared/package.json +34 -0
  218. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1870 -0
  219. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  220. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6810 -0
  221. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  222. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1750 -0
  223. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  224. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +883 -0
  225. package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  226. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
  227. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  228. package/.output/server/node_modules/birpc/dist/index.cjs +296 -0
  229. package/.output/server/node_modules/birpc/package.json +57 -0
  230. package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  231. package/.output/server/node_modules/consola/dist/core.mjs +512 -0
  232. package/.output/server/node_modules/consola/dist/index.mjs +651 -0
  233. package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  234. package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  235. package/.output/server/node_modules/consola/package.json +136 -0
  236. package/.output/server/node_modules/devalue/index.js +4 -0
  237. package/.output/server/node_modules/devalue/package.json +37 -0
  238. package/.output/server/node_modules/devalue/src/base64.js +110 -0
  239. package/.output/server/node_modules/devalue/src/constants.js +7 -0
  240. package/.output/server/node_modules/devalue/src/parse.js +246 -0
  241. package/.output/server/node_modules/devalue/src/stringify.js +350 -0
  242. package/.output/server/node_modules/devalue/src/uneval.js +490 -0
  243. package/.output/server/node_modules/devalue/src/utils.js +148 -0
  244. package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  245. package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  246. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  247. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  248. package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  249. package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  250. package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  251. package/.output/server/node_modules/entities/package.json +120 -0
  252. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  253. package/.output/server/node_modules/estree-walker/package.json +37 -0
  254. package/.output/server/node_modules/pinia/dist/pinia.prod.cjs +719 -0
  255. package/.output/server/node_modules/pinia/package.json +94 -0
  256. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  257. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  258. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  259. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  260. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  261. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  262. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  263. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  264. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  265. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  266. package/.output/server/node_modules/source-map-js/package.json +71 -0
  267. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  268. package/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
  269. package/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
  270. package/.output/server/node_modules/tailwindcss/package.json +89 -0
  271. package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  272. package/.output/server/node_modules/ufo/package.json +48 -0
  273. package/.output/server/node_modules/unhead/dist/index.mjs +9 -0
  274. package/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
  275. package/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
  276. package/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
  277. package/.output/server/node_modules/unhead/dist/server.mjs +180 -0
  278. package/.output/server/node_modules/unhead/dist/shared/unhead.BPM0-cfG.mjs +44 -0
  279. package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  280. package/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
  281. package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
  282. package/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
  283. package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  284. package/.output/server/node_modules/unhead/dist/shared/unhead.D_nrZZPH.mjs +182 -0
  285. package/.output/server/node_modules/unhead/dist/shared/unhead.ckV6dpEQ.mjs +166 -0
  286. package/.output/server/node_modules/unhead/dist/shared/unhead.fVVqDC1O.mjs +203 -0
  287. package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  288. package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  289. package/.output/server/node_modules/unhead/package.json +105 -0
  290. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  291. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  292. package/.output/server/node_modules/vue/index.js +7 -0
  293. package/.output/server/node_modules/vue/index.mjs +1 -0
  294. package/.output/server/node_modules/vue/package.json +112 -0
  295. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  296. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +301 -0
  297. package/.output/server/node_modules/vue-bundle-renderer/package.json +55 -0
  298. package/.output/server/node_modules/vue-router/dist/devtools-EWN81iOl.mjs +1220 -0
  299. package/.output/server/node_modules/vue-router/dist/vue-router.mjs +1557 -0
  300. package/.output/server/node_modules/vue-router/package.json +153 -0
  301. package/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
  302. package/.output/server/package.json +37 -0
  303. package/LICENSE +21 -0
  304. package/README.md +132 -0
  305. package/bin/cli.js +75 -0
  306. package/package.json +71 -0
@@ -0,0 +1,76 @@
1
+ import { makeViewBoxSquare } from "../icon/square.js";
2
+ import { calculateSize } from "../svg/size.js";
3
+ import { iconToSVG } from "../svg/build.js";
4
+ import { svgToURL } from "../svg/url.js";
5
+ import { iconToHTML } from "../svg/html.js";
6
+
7
+ /**
8
+ * Generates common CSS rules for multiple icons, rendered as background/mask
9
+ */
10
+ function getCommonCSSRules(options) {
11
+ const result = {
12
+ display: "inline-block",
13
+ width: "1em",
14
+ height: "1em"
15
+ };
16
+ const varName = options.varName;
17
+ if (options.pseudoSelector) result["content"] = "''";
18
+ switch (options.mode) {
19
+ case "background":
20
+ if (varName) result["background-image"] = "var(--" + varName + ")";
21
+ result["background-repeat"] = "no-repeat";
22
+ result["background-size"] = "100% 100%";
23
+ break;
24
+ case "mask":
25
+ result["background-color"] = "currentColor";
26
+ if (varName) result["mask-image"] = result["-webkit-mask-image"] = "var(--" + varName + ")";
27
+ result["mask-repeat"] = result["-webkit-mask-repeat"] = "no-repeat";
28
+ result["mask-size"] = result["-webkit-mask-size"] = "100% 100%";
29
+ break;
30
+ }
31
+ return result;
32
+ }
33
+ /**
34
+ * Generate CSS rules for one icon, rendered as background/mask
35
+ *
36
+ * This function excludes common rules
37
+ */
38
+ function generateItemCSSRules(icon, options) {
39
+ const result = {};
40
+ const varName = options.varName;
41
+ const buildResult = iconToSVG(icon);
42
+ let viewBox = buildResult.viewBox;
43
+ if (viewBox[2] !== viewBox[3]) if (options.forceSquare) viewBox = makeViewBoxSquare(viewBox);
44
+ else result["width"] = calculateSize("1em", viewBox[2] / viewBox[3]);
45
+ const url = svgToURL(iconToHTML(buildResult.body.replace(/currentColor/g, options.color || "black"), {
46
+ viewBox: `${viewBox[0]} ${viewBox[1]} ${viewBox[2]} ${viewBox[3]}`,
47
+ width: `${viewBox[2]}`,
48
+ height: `${viewBox[3]}`
49
+ }));
50
+ if (varName) result["--" + varName] = url;
51
+ else switch (options.mode) {
52
+ case "background":
53
+ result["background-image"] = url;
54
+ break;
55
+ case "mask":
56
+ result["mask-image"] = result["-webkit-mask-image"] = url;
57
+ break;
58
+ }
59
+ return result;
60
+ }
61
+ /**
62
+ * Generate content for one icon, rendered as content of pseudo-selector
63
+ */
64
+ function generateItemContent(icon, options) {
65
+ const buildResult = iconToSVG(icon);
66
+ const viewBox = buildResult.viewBox;
67
+ const height = options.height;
68
+ const width = options.width ?? calculateSize(height, viewBox[2] / viewBox[3]);
69
+ return svgToURL(iconToHTML(buildResult.body.replace(/currentColor/g, options.color || "black"), {
70
+ viewBox: `${viewBox[0]} ${viewBox[1]} ${viewBox[2]} ${viewBox[3]}`,
71
+ width: width.toString(),
72
+ height: height.toString()
73
+ }));
74
+ }
75
+
76
+ export { generateItemCSSRules, generateItemContent, getCommonCSSRules };
@@ -0,0 +1,40 @@
1
+ const format = {
2
+ selectorStart: {
3
+ compressed: "{",
4
+ compact: " {",
5
+ expanded: " {"
6
+ },
7
+ selectorEnd: {
8
+ compressed: "}",
9
+ compact: "; }\n",
10
+ expanded: ";\n}\n"
11
+ },
12
+ rule: {
13
+ compressed: "{key}:",
14
+ compact: " {key}: ",
15
+ expanded: "\n {key}: "
16
+ }
17
+ };
18
+ /**
19
+ * Format data
20
+ *
21
+ * Key is selector, value is list of rules
22
+ */
23
+ function formatCSS(data, mode = "expanded") {
24
+ const results = [];
25
+ for (let i = 0; i < data.length; i++) {
26
+ const { selector, rules } = data[i];
27
+ let entry = (selector instanceof Array ? selector.join(mode === "compressed" ? "," : ", ") : selector) + format.selectorStart[mode];
28
+ let firstRule = true;
29
+ for (const key in rules) {
30
+ if (!firstRule) entry += ";";
31
+ entry += format.rule[mode].replace("{key}", key) + rules[key];
32
+ firstRule = false;
33
+ }
34
+ entry += format.selectorEnd[mode];
35
+ results.push(entry);
36
+ }
37
+ return results.join(mode === "compressed" ? "" : "\n");
38
+ }
39
+
40
+ export { formatCSS };
@@ -0,0 +1,52 @@
1
+ import { defaultIconProps } from "../icon/defaults.js";
2
+ import { generateItemCSSRules, generateItemContent, getCommonCSSRules } from "./common.js";
3
+ import { formatCSS } from "./format.js";
4
+
5
+ /**
6
+ * Get CSS for icon, rendered as background or mask
7
+ */
8
+ function getIconCSS(icon, options = {}) {
9
+ const body = options.customise ? options.customise(icon.body) : icon.body;
10
+ const mode = options.mode || (options.color || !body.includes("currentColor") ? "background" : "mask");
11
+ let varName = options.varName;
12
+ if (varName === void 0 && mode === "mask") varName = "svg";
13
+ const newOptions = {
14
+ ...options,
15
+ mode,
16
+ varName
17
+ };
18
+ if (mode === "background") delete newOptions.varName;
19
+ const rules = {
20
+ ...options.rules,
21
+ ...getCommonCSSRules(newOptions),
22
+ ...generateItemCSSRules({
23
+ ...defaultIconProps,
24
+ ...icon,
25
+ body
26
+ }, newOptions)
27
+ };
28
+ return formatCSS([{
29
+ selector: options.iconSelector || ".icon",
30
+ rules
31
+ }], newOptions.format);
32
+ }
33
+ /**
34
+ * Get CSS for icon, rendered as content
35
+ */
36
+ function getIconContentCSS(icon, options) {
37
+ const body = options.customise ? options.customise(icon.body) : icon.body;
38
+ const content = generateItemContent({
39
+ ...defaultIconProps,
40
+ ...icon,
41
+ body
42
+ }, options);
43
+ return formatCSS([{
44
+ selector: options.iconSelector || ".icon::after",
45
+ rules: {
46
+ ...options.rules,
47
+ content
48
+ }
49
+ }], options.format);
50
+ }
51
+
52
+ export { getIconCSS, getIconContentCSS };
@@ -0,0 +1,133 @@
1
+ import { defaultIconProps } from "../icon/defaults.js";
2
+ import { getIconData } from "../icon-set/get-icon.js";
3
+ import { generateItemCSSRules, generateItemContent, getCommonCSSRules } from "./common.js";
4
+ import { formatCSS } from "./format.js";
5
+
6
+ const commonSelector = ".icon--{prefix}";
7
+ const iconSelector = ".icon--{prefix}--{name}";
8
+ const contentSelector = ".icon--{prefix}--{name}::after";
9
+ const defaultSelectors = {
10
+ commonSelector,
11
+ iconSelector,
12
+ overrideSelector: commonSelector + iconSelector
13
+ };
14
+ /**
15
+ * Get data for getIconsCSS()
16
+ */
17
+ function getIconsCSSData(iconSet, names, options = {}) {
18
+ const css = [];
19
+ const errors = [];
20
+ const palette = options.color ? true : void 0;
21
+ let mode = options.mode || typeof palette === "boolean" && (palette ? "background" : "mask");
22
+ if (!mode) {
23
+ for (let i = 0; i < names.length; i++) {
24
+ const name = names[i];
25
+ const icon = getIconData(iconSet, name);
26
+ if (icon) {
27
+ mode = (options.customise ? options.customise(icon.body, name) : icon.body).includes("currentColor") ? "mask" : "background";
28
+ break;
29
+ }
30
+ }
31
+ if (!mode) {
32
+ mode = "mask";
33
+ errors.push("/* cannot detect icon mode: not set in options and icon set is missing info, rendering as " + mode + " */");
34
+ }
35
+ }
36
+ let varName = options.varName;
37
+ if (varName === void 0 && mode === "mask") varName = "svg";
38
+ const newOptions = {
39
+ ...options,
40
+ mode,
41
+ varName
42
+ };
43
+ const { commonSelector: commonSelector$1, iconSelector: iconSelector$1, overrideSelector } = newOptions.iconSelector ? newOptions : defaultSelectors;
44
+ const iconSelectorWithPrefix = iconSelector$1.replace(/{prefix}/g, iconSet.prefix);
45
+ const commonRules = {
46
+ ...options.rules,
47
+ ...getCommonCSSRules(newOptions)
48
+ };
49
+ const hasCommonRules = commonSelector$1 && commonSelector$1 !== iconSelector$1;
50
+ const commonSelectors = /* @__PURE__ */ new Set();
51
+ if (hasCommonRules) css.push({
52
+ selector: commonSelector$1.replace(/{prefix}/g, iconSet.prefix),
53
+ rules: commonRules
54
+ });
55
+ for (let i = 0; i < names.length; i++) {
56
+ const name = names[i];
57
+ const iconData = getIconData(iconSet, name);
58
+ if (!iconData) {
59
+ errors.push("/* Could not find icon: " + name + " */");
60
+ continue;
61
+ }
62
+ const body = options.customise ? options.customise(iconData.body, name) : iconData.body;
63
+ const rules = generateItemCSSRules({
64
+ ...defaultIconProps,
65
+ ...iconData,
66
+ body
67
+ }, newOptions);
68
+ let requiresOverride = false;
69
+ if (hasCommonRules && overrideSelector) {
70
+ for (const key in rules) if (key in commonRules) requiresOverride = true;
71
+ }
72
+ const selector = (requiresOverride && overrideSelector ? overrideSelector.replace(/{prefix}/g, iconSet.prefix) : iconSelectorWithPrefix).replace(/{name}/g, name);
73
+ css.push({
74
+ selector,
75
+ rules
76
+ });
77
+ if (!hasCommonRules) commonSelectors.add(selector);
78
+ }
79
+ const result = {
80
+ css,
81
+ errors
82
+ };
83
+ if (!hasCommonRules && commonSelectors.size) result.common = {
84
+ selector: Array.from(commonSelectors).join(newOptions.format === "compressed" ? "," : ", "),
85
+ rules: commonRules
86
+ };
87
+ return result;
88
+ }
89
+ /**
90
+ * Get CSS for icons as background/mask
91
+ */
92
+ function getIconsCSS(iconSet, names, options = {}) {
93
+ const { css, errors, common } = getIconsCSSData(iconSet, names, options);
94
+ if (common) if (css.length === 1 && css[0].selector === common.selector) css[0].rules = {
95
+ ...common.rules,
96
+ ...css[0].rules
97
+ };
98
+ else css.unshift(common);
99
+ return formatCSS(css, options.format) + (errors.length ? "\n" + errors.join("\n") + "\n" : "");
100
+ }
101
+ /**
102
+ * Get CSS for icons as content
103
+ */
104
+ function getIconsContentCSS(iconSet, names, options) {
105
+ const errors = [];
106
+ const css = [];
107
+ const iconSelectorWithPrefix = (options.iconSelector ?? contentSelector).replace(/{prefix}/g, iconSet.prefix);
108
+ for (let i = 0; i < names.length; i++) {
109
+ const name = names[i];
110
+ const iconData = getIconData(iconSet, name);
111
+ if (!iconData) {
112
+ errors.push("/* Could not find icon: " + name + " */");
113
+ continue;
114
+ }
115
+ const body = options.customise ? options.customise(iconData.body, name) : iconData.body;
116
+ const content = generateItemContent({
117
+ ...defaultIconProps,
118
+ ...iconData,
119
+ body
120
+ }, options);
121
+ const selector = iconSelectorWithPrefix.replace(/{name}/g, name);
122
+ css.push({
123
+ selector,
124
+ rules: {
125
+ ...options.rules,
126
+ content
127
+ }
128
+ });
129
+ }
130
+ return formatCSS(css, options.format) + (errors.length ? "\n" + errors.join("\n") + "\n" : "");
131
+ }
132
+
133
+ export { getIconsCSS, getIconsCSSData, getIconsContentCSS };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Get boolean customisation value from attribute
3
+ */
4
+ function toBoolean(name, value, defaultValue) {
5
+ switch (typeof value) {
6
+ case "boolean": return value;
7
+ case "number": return !!value;
8
+ case "string": switch (value.toLowerCase()) {
9
+ case "1":
10
+ case "true":
11
+ case name.toLowerCase(): return true;
12
+ case "0":
13
+ case "false":
14
+ case "": return false;
15
+ }
16
+ }
17
+ return defaultValue;
18
+ }
19
+
20
+ export { toBoolean };
@@ -0,0 +1,15 @@
1
+ import { defaultIconTransformations } from "../icon/defaults.js";
2
+
3
+ /**
4
+ * Default icon customisations values
5
+ */
6
+ const defaultIconSizeCustomisations = Object.freeze({
7
+ width: null,
8
+ height: null
9
+ });
10
+ const defaultIconCustomisations = Object.freeze({
11
+ ...defaultIconSizeCustomisations,
12
+ ...defaultIconTransformations
13
+ });
14
+
15
+ export { defaultIconCustomisations, defaultIconSizeCustomisations };
@@ -0,0 +1,18 @@
1
+ const separator = /[\s,]+/;
2
+ /**
3
+ * Apply "flip" string to icon customisations
4
+ */
5
+ function flipFromString(custom, flip) {
6
+ flip.split(separator).forEach((str) => {
7
+ switch (str.trim()) {
8
+ case "horizontal":
9
+ custom.hFlip = true;
10
+ break;
11
+ case "vertical":
12
+ custom.vFlip = true;
13
+ break;
14
+ }
15
+ });
16
+ }
17
+
18
+ export { flipFromString };
@@ -0,0 +1,18 @@
1
+ import { defaultIconSizeCustomisations } from "./defaults.js";
2
+
3
+ /**
4
+ * Convert IconifyIconCustomisations to FullIconCustomisations, checking value types
5
+ */
6
+ function mergeCustomisations(defaults, item) {
7
+ const result = { ...defaults };
8
+ for (const key in item) {
9
+ const value = item[key];
10
+ const valueType = typeof value;
11
+ if (key in defaultIconSizeCustomisations) {
12
+ if (value === null || value && (valueType === "string" || valueType === "number")) result[key] = value;
13
+ } else if (valueType === typeof result[key]) result[key] = key === "rotate" ? value % 4 : value;
14
+ }
15
+ return result;
16
+ }
17
+
18
+ export { mergeCustomisations };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Get rotation value
3
+ */
4
+ function rotateFromString(value, defaultValue = 0) {
5
+ const units = value.replace(/^-?[0-9.]*/, "");
6
+ function cleanup(value$1) {
7
+ while (value$1 < 0) value$1 += 4;
8
+ return value$1 % 4;
9
+ }
10
+ if (units === "") {
11
+ const num = parseInt(value);
12
+ return isNaN(num) ? 0 : cleanup(num);
13
+ } else if (units !== value) {
14
+ let split = 0;
15
+ switch (units) {
16
+ case "%":
17
+ split = 25;
18
+ break;
19
+ case "deg": split = 90;
20
+ }
21
+ if (split) {
22
+ let num = parseFloat(value.slice(0, value.length - units.length));
23
+ if (isNaN(num)) return 0;
24
+ num = num / split;
25
+ return num % 1 === 0 ? cleanup(num) : 0;
26
+ }
27
+ }
28
+ return defaultValue;
29
+ }
30
+
31
+ export { rotateFromString };
@@ -0,0 +1,80 @@
1
+ import { joinerEmoji, vs16Emoji } from "./data.js";
2
+ import { getEmojiCodePoint } from "./convert.js";
3
+
4
+ /**
5
+ * Get emoji sequence from string
6
+ *
7
+ * @example
8
+ * // shows same emoji sequence formatted differently
9
+ * - '1F441 FE0F 200D 1F5E8 FE0F' => [0x1f441, 0xfe0f, 0x200d, 0x1f5e8, 0xfe0f]
10
+ * - '1f441-fe0f-200d-1f5e8-fe0f' => [0x1f441, 0xfe0f, 0x200d, 0x1f5e8, 0xfe0f]
11
+ * - '\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8\\uFE0F' => [0x1f441, 0xfe0f, 0x200d, 0x1f5e8, 0xfe0f]
12
+ */
13
+ function getEmojiSequenceFromString(value) {
14
+ return value.trim().split(/[^0-9A-F]+/i).filter((item) => item.length > 0).map(getEmojiCodePoint);
15
+ }
16
+ /**
17
+ * Convert emoji sequence or keyword
18
+ *
19
+ * If sequence is characters list, like '1f441-fe0f', it will be converted to [0x1f441, 0xfe0f]
20
+ * If sequence contains anything other than [0-9A-F-\s], it will be converted character by character
21
+ *
22
+ * This is used to treat keywords, like ':cat:' differently when converting strings to sequences
23
+ */
24
+ function getSequenceFromEmojiStringOrKeyword(value) {
25
+ if (!value.match(/^[0-9a-fA-F-\s]+$/)) {
26
+ const results = [];
27
+ for (const codePoint of value) {
28
+ const code = codePoint.codePointAt(0);
29
+ if (code) results.push(code);
30
+ else return getEmojiSequenceFromString(value);
31
+ }
32
+ return results;
33
+ }
34
+ return getEmojiSequenceFromString(value);
35
+ }
36
+ /**
37
+ * Split emoji sequence by joiner
38
+ *
39
+ * Result represents one emoji, split in smaller sequences separated by 0x200D
40
+ *
41
+ * @example
42
+ * [0x1FAF1, 0x1F3FB, 0x200D, 0x1FAF2, 0x1F3FC] => [[0x1FAF1, 0x1F3FB], [0x1FAF2, 0x1F3FC]]
43
+ */
44
+ function splitEmojiSequences(sequence, separator = joinerEmoji) {
45
+ const results = [];
46
+ let queue = [];
47
+ for (let i = 0; i < sequence.length; i++) {
48
+ const code = sequence[i];
49
+ if (code === separator) {
50
+ results.push(queue);
51
+ queue = [];
52
+ } else queue.push(code);
53
+ }
54
+ results.push(queue);
55
+ return results;
56
+ }
57
+ /**
58
+ * Join emoji sequences
59
+ *
60
+ * Parameter represents one emoji, split in smaller sequences
61
+ *
62
+ * @example
63
+ * [[0x1FAF1, 0x1F3FB], [0x1FAF2, 0x1F3FC]] => [0x1FAF1, 0x1F3FB, 0x200D, 0x1FAF2, 0x1F3FC]
64
+ */
65
+ function joinEmojiSequences(sequences, separator = joinerEmoji) {
66
+ let results = [];
67
+ for (let i = 0; i < sequences.length; i++) {
68
+ if (i > 0) results.push(separator);
69
+ results = results.concat(sequences[i]);
70
+ }
71
+ return results;
72
+ }
73
+ /**
74
+ * Get unqualified sequence
75
+ */
76
+ function getUnqualifiedEmojiSequence(sequence) {
77
+ return sequence.filter((num) => num !== vs16Emoji);
78
+ }
79
+
80
+ export { getEmojiSequenceFromString, getSequenceFromEmojiStringOrKeyword, getUnqualifiedEmojiSequence, joinEmojiSequences, splitEmojiSequences };
@@ -0,0 +1,102 @@
1
+ import { endUTF32Pair, minUTF32, startUTF32Pair1, startUTF32Pair2 } from "./data.js";
2
+
3
+ /**
4
+ * Convert string to number
5
+ */
6
+ function getEmojiCodePoint(code) {
7
+ return parseInt(code, 16);
8
+ }
9
+ /**
10
+ * First part of UTF-32 to UTF-16
11
+ */
12
+ function utf32FirstNum(code) {
13
+ return (code - minUTF32 >> 10 | 0) + startUTF32Pair1;
14
+ }
15
+ /**
16
+ * First part of UTF-32 to UTF-16
17
+ */
18
+ function utf32SecondNum(code) {
19
+ return (code - minUTF32 & 1023) + startUTF32Pair2;
20
+ }
21
+ /**
22
+ * Get UTF-32 as UTF-16 sequence
23
+ */
24
+ function splitUTF32Number(code) {
25
+ if (code >= minUTF32) return [utf32FirstNum(code), utf32SecondNum(code)];
26
+ }
27
+ /**
28
+ * Check if number is UTF-32 split as UTF-16
29
+ *
30
+ * @returns
31
+ * - 1 if number fits first number in sequence
32
+ * - 2 if number fits second number in sequence
33
+ * - false on failure
34
+ */
35
+ function isUTF32SplitNumber(value) {
36
+ if (value >= startUTF32Pair1) {
37
+ if (value < startUTF32Pair2) return 1;
38
+ if (value < endUTF32Pair) return 2;
39
+ }
40
+ return false;
41
+ }
42
+ /**
43
+ * Get UTF-16 sequence as UTF-32
44
+ */
45
+ function mergeUTF32Numbers(part1, part2) {
46
+ if (part1 < startUTF32Pair1 || part1 >= startUTF32Pair2 || part2 < startUTF32Pair2 || part2 >= endUTF32Pair) return;
47
+ return (part1 - startUTF32Pair1 << 10) + (part2 - startUTF32Pair2) + minUTF32;
48
+ }
49
+ /**
50
+ * Convert hexadecimal string or number to unicode
51
+ */
52
+ function getEmojiUnicode(code) {
53
+ return String.fromCodePoint(typeof code === "number" ? code : getEmojiCodePoint(code));
54
+ }
55
+ /**
56
+ * Convert sequence to UTF-16
57
+ */
58
+ function convertEmojiSequenceToUTF16(numbers) {
59
+ const results = [];
60
+ for (let i = 0; i < numbers.length; i++) {
61
+ const code = numbers[i];
62
+ if (code >= minUTF32) {
63
+ results.push(utf32FirstNum(code));
64
+ results.push(utf32SecondNum(code));
65
+ } else results.push(code);
66
+ }
67
+ return results;
68
+ }
69
+ /**
70
+ * Convert sequence to UTF-32
71
+ */
72
+ function convertEmojiSequenceToUTF32(numbers, throwOnError = true) {
73
+ const results = [];
74
+ for (let i = 0; i < numbers.length; i++) {
75
+ const code = numbers[i];
76
+ if (code >= minUTF32) {
77
+ results.push(code);
78
+ continue;
79
+ }
80
+ const part = isUTF32SplitNumber(code);
81
+ if (!part) {
82
+ results.push(code);
83
+ continue;
84
+ }
85
+ if (part === 1 && numbers.length > i + 1) {
86
+ const merged = mergeUTF32Numbers(code, numbers[i + 1]);
87
+ if (merged) {
88
+ i++;
89
+ results.push(merged);
90
+ continue;
91
+ }
92
+ }
93
+ if (throwOnError) {
94
+ const nextCode = numbers[i + 1];
95
+ throw new Error(`Invalid UTF-16 sequence: ${code.toString(16)}-${nextCode ? nextCode.toString(16) : "undefined"}`);
96
+ }
97
+ results.push(code);
98
+ }
99
+ return results;
100
+ }
101
+
102
+ export { convertEmojiSequenceToUTF16, convertEmojiSequenceToUTF32, getEmojiCodePoint, getEmojiUnicode, isUTF32SplitNumber, mergeUTF32Numbers, splitUTF32Number };
@@ -0,0 +1,29 @@
1
+ /** Joiner in emoji sequences */
2
+ const joinerEmoji = 8205;
3
+ /** Emoji as icon */
4
+ const vs16Emoji = 65039;
5
+ /** Keycap, preceeded by mandatory VS16 for full emoji */
6
+ const keycapEmoji = 8419;
7
+ const emojiComponents = {
8
+ "hair-style": [129456, 129460],
9
+ "skin-tone": [127995, 128e3]
10
+ };
11
+ /**
12
+ * Minimum UTF-32 number
13
+ */
14
+ const minUTF32 = 65536;
15
+ /**
16
+ * Codes for UTF-32 characters presented as UTF-16
17
+ *
18
+ * startUTF32Pair1 <= code < startUTF32Pair2 -> code for first character in pair
19
+ * startUTF32Pair2 <= code < endUTF32Pair -> code for second character in pair
20
+ */
21
+ const startUTF32Pair1 = 55296;
22
+ const startUTF32Pair2 = 56320;
23
+ const endUTF32Pair = 57344;
24
+ /**
25
+ * Emoji version as string
26
+ */
27
+ const emojiVersion = "17.0";
28
+
29
+ export { emojiComponents, emojiVersion, endUTF32Pair, joinerEmoji, keycapEmoji, minUTF32, startUTF32Pair1, startUTF32Pair2, vs16Emoji };
@@ -0,0 +1,60 @@
1
+ import { convertEmojiSequenceToUTF16, convertEmojiSequenceToUTF32 } from "./convert.js";
2
+
3
+ const defaultUnicodeOptions = {
4
+ prefix: "",
5
+ separator: "",
6
+ case: "lower",
7
+ format: "utf-32",
8
+ add0: false,
9
+ throwOnError: true
10
+ };
11
+ /**
12
+ * Convert number to string
13
+ */
14
+ function convert(sequence, options) {
15
+ const prefix = options.prefix;
16
+ const func = options.case === "upper" ? "toUpperCase" : "toLowerCase";
17
+ return (options.format === "utf-16" ? convertEmojiSequenceToUTF16(sequence) : convertEmojiSequenceToUTF32(sequence, options.throwOnError)).map((code) => {
18
+ let str = code.toString(16);
19
+ if (options.add0 && str.length < 4) str = "0".repeat(4 - str.length) + str;
20
+ return prefix + str[func]();
21
+ }).join(options.separator);
22
+ }
23
+ /**
24
+ * Convert unicode number to string
25
+ *
26
+ * Example:
27
+ * 0x1F600 => '1F600'
28
+ */
29
+ function getEmojiUnicodeString(code, options = {}) {
30
+ return convert([code], {
31
+ ...defaultUnicodeOptions,
32
+ ...options
33
+ });
34
+ }
35
+ const defaultSequenceOptions = {
36
+ ...defaultUnicodeOptions,
37
+ separator: "-"
38
+ };
39
+ /**
40
+ * Convert unicode numbers sequence to string
41
+ *
42
+ * Example:
43
+ * [0x1f441, 0xfe0f] => '1f441-fe0f'
44
+ */
45
+ function getEmojiSequenceString(sequence, options = {}) {
46
+ return convert(sequence, {
47
+ ...defaultSequenceOptions,
48
+ ...options
49
+ });
50
+ }
51
+ /**
52
+ * Convert unicode numbers sequence to string
53
+ *
54
+ * Simple version of `getEmojiSequenceString()` without options that otherwise add to bundle
55
+ */
56
+ function getEmojiSequenceKeyword(sequence) {
57
+ return sequence.map((code) => code.toString(16)).join("-");
58
+ }
59
+
60
+ export { getEmojiSequenceKeyword, getEmojiSequenceString, getEmojiUnicodeString };