@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.
- package/.output/nitro.json +15 -0
- package/.output/public/_nuxt/BHDzAs85.js +1 -0
- package/.output/public/_nuxt/BJzbfdL_.js +1 -0
- package/.output/public/_nuxt/BKGLlKXk.js +6 -0
- package/.output/public/_nuxt/BLuXzJk3.js +1 -0
- package/.output/public/_nuxt/BNOzzLI3.js +1 -0
- package/.output/public/_nuxt/BO5GMwXh.js +1 -0
- package/.output/public/_nuxt/BQRbsFGy.js +1 -0
- package/.output/public/_nuxt/Be4MVdOg.js +1 -0
- package/.output/public/_nuxt/Bu4d3Z1T.js +1 -0
- package/.output/public/_nuxt/BwpBBNv4.js +1 -0
- package/.output/public/_nuxt/C1Og9-6n.js +97 -0
- package/.output/public/_nuxt/C3CjAhtj.js +1 -0
- package/.output/public/_nuxt/C6E3Ty3z.js +1 -0
- package/.output/public/_nuxt/COct4B42.js +1 -0
- package/.output/public/_nuxt/CQ6g2dtj.js +1 -0
- package/.output/public/_nuxt/CURSW5TV.js +246 -0
- package/.output/public/_nuxt/CW57JW4s.js +1 -0
- package/.output/public/_nuxt/Cg2fM61o.js +18 -0
- package/.output/public/_nuxt/CgGOeWta.js +1 -0
- package/.output/public/_nuxt/CoyYbT7u.js +1 -0
- package/.output/public/_nuxt/D11MHbGc.js +133 -0
- package/.output/public/_nuxt/D24dz0S8.js +1 -0
- package/.output/public/_nuxt/D3EFPr8x.js +1 -0
- package/.output/public/_nuxt/Dvt4ZHil.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/ab87ba0e-6d0d-4466-8b12-00d44f8fb9d3.json +1 -0
- package/.output/public/_nuxt/default.C1K1-g4D.css +1 -0
- package/.output/public/_nuxt/entry.CH8k-Mga.css +1 -0
- package/.output/public/_nuxt/error-404.C-Ezrlz-.css +1 -0
- package/.output/public/_nuxt/error-500.DBWf9FGj.css +1 -0
- package/.output/public/_nuxt/first-training.wFDD65zm.css +1 -0
- package/.output/public/_nuxt/import.cUKYdCrq.css +1 -0
- package/.output/public/_nuxt/index.D-2VHyHA.css +1 -0
- package/.output/public/_nuxt/index.D4J_vHmL.css +1 -0
- package/.output/public/_nuxt/mPJeLIz7.js +1 -0
- package/.output/server/chunks/_/error-500.mjs +19 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/build/ExampleCard-styles.BUOJhEg0.mjs +8 -0
- package/.output/server/chunks/build/ExampleCard-styles.BUOJhEg0.mjs.map +1 -0
- package/.output/server/chunks/build/ExampleForm-Bcpl0CfL.mjs +238 -0
- package/.output/server/chunks/build/ExampleForm-Bcpl0CfL.mjs.map +1 -0
- package/.output/server/chunks/build/ImportPreview-styles.CFmMl5Ok.mjs +8 -0
- package/.output/server/chunks/build/ImportPreview-styles.CFmMl5Ok.mjs.map +1 -0
- package/.output/server/chunks/build/_id_-BUSGcL-H.mjs +113 -0
- package/.output/server/chunks/build/_id_-BUSGcL-H.mjs.map +1 -0
- package/.output/server/chunks/build/axolotl-C-EXGgM8.mjs +112 -0
- package/.output/server/chunks/build/axolotl-C-EXGgM8.mjs.map +1 -0
- package/.output/server/chunks/build/best-practices-DsadorHb.mjs +38 -0
- package/.output/server/chunks/build/best-practices-DsadorHb.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +4 -0
- package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
- package/.output/server/chunks/build/default-DPkqqHOE.mjs +354 -0
- package/.output/server/chunks/build/default-DPkqqHOE.mjs.map +1 -0
- package/.output/server/chunks/build/default-styles.DsqVVS7k.mjs +8 -0
- package/.output/server/chunks/build/default-styles.DsqVVS7k.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-K4UfZNck.mjs +97 -0
- package/.output/server/chunks/build/error-404-K4UfZNck.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.DuDrf-v0.mjs +8 -0
- package/.output/server/chunks/build/error-404-styles.DuDrf-v0.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-CA7TEPNg.mjs +79 -0
- package/.output/server/chunks/build/error-500-CA7TEPNg.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.8IYEHzz6.mjs +8 -0
- package/.output/server/chunks/build/error-500-styles.8IYEHzz6.mjs.map +1 -0
- package/.output/server/chunks/build/examples-BHK8MDrs.mjs +134 -0
- package/.output/server/chunks/build/examples-BHK8MDrs.mjs.map +1 -0
- package/.output/server/chunks/build/export-BzxFqqfP.mjs +233 -0
- package/.output/server/chunks/build/export-BzxFqqfP.mjs.map +1 -0
- package/.output/server/chunks/build/faq-DKch73dS.mjs +112 -0
- package/.output/server/chunks/build/faq-DKch73dS.mjs.map +1 -0
- package/.output/server/chunks/build/field-guide-qbukT8F0.mjs +38 -0
- package/.output/server/chunks/build/field-guide-qbukT8F0.mjs.map +1 -0
- package/.output/server/chunks/build/first-training-BbEOBcEW.mjs +343 -0
- package/.output/server/chunks/build/first-training-BbEOBcEW.mjs.map +1 -0
- package/.output/server/chunks/build/first-training-styles.BzOa_KRD.mjs +8 -0
- package/.output/server/chunks/build/first-training-styles.BzOa_KRD.mjs.map +1 -0
- package/.output/server/chunks/build/glossary-CxSGCJoH.mjs +397 -0
- package/.output/server/chunks/build/glossary-CxSGCJoH.mjs.map +1 -0
- package/.output/server/chunks/build/huggingface-TSmyUzZU.mjs +128 -0
- package/.output/server/chunks/build/huggingface-TSmyUzZU.mjs.map +1 -0
- package/.output/server/chunks/build/import-C0kYhRv9.mjs +247 -0
- package/.output/server/chunks/build/import-C0kYhRv9.mjs.map +1 -0
- package/.output/server/chunks/build/index-C1ntBEWd.mjs +235 -0
- package/.output/server/chunks/build/index-C1ntBEWd.mjs.map +1 -0
- package/.output/server/chunks/build/index-D3CxihcX.mjs +320 -0
- package/.output/server/chunks/build/index-D3CxihcX.mjs.map +1 -0
- package/.output/server/chunks/build/index-DgKa1cy0.mjs +360 -0
- package/.output/server/chunks/build/index-DgKa1cy0.mjs.map +1 -0
- package/.output/server/chunks/build/index-cG54gaKX.mjs +513 -0
- package/.output/server/chunks/build/index-cG54gaKX.mjs.map +1 -0
- package/.output/server/chunks/build/index-styles.BX2SZiiS.mjs +8 -0
- package/.output/server/chunks/build/index-styles.BX2SZiiS.mjs.map +1 -0
- package/.output/server/chunks/build/llm-training-DIqc0eiM.mjs +91 -0
- package/.output/server/chunks/build/llm-training-DIqc0eiM.mjs.map +1 -0
- package/.output/server/chunks/build/new-b3338aLF.mjs +92 -0
- package/.output/server/chunks/build/new-b3338aLF.mjs.map +1 -0
- package/.output/server/chunks/build/nuxt-link-Ceyd90PQ.mjs +290 -0
- package/.output/server/chunks/build/nuxt-link-Ceyd90PQ.mjs.map +1 -0
- package/.output/server/chunks/build/sample-datasets-CVLWMQUA.mjs +45 -0
- package/.output/server/chunks/build/sample-datasets-CVLWMQUA.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +1979 -0
- package/.output/server/chunks/build/server.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +20 -0
- package/.output/server/chunks/build/styles.mjs.map +1 -0
- package/.output/server/chunks/build/test-router-BYM6Cpst.mjs +105 -0
- package/.output/server/chunks/build/test-router-BYM6Cpst.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +5800 -0
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +481 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/index.mjs +12 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/api.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/app.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/component.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/context.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/hooks.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/index.js +22 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/util.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/const.js +5 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/env.js +17 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/index.js +45 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/plugin.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/proxy.js +111 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/time.js +28 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/package.json +37 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@7.7.9/dist/index.cjs +42 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@7.7.9/package.json +32 -0
- package/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.cjs +299 -0
- package/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +49 -0
- package/.output/server/node_modules/.nitro/hookable@6.0.1/dist/index.mjs +266 -0
- package/.output/server/node_modules/.nitro/hookable@6.0.1/package.json +52 -0
- package/.output/server/node_modules/.nitro/perfect-debounce@1.0.0/dist/index.cjs +59 -0
- package/.output/server/node_modules/.nitro/perfect-debounce@1.0.0/package.json +44 -0
- package/.output/server/node_modules/.nitro/perfect-debounce@2.1.0/dist/index.mjs +89 -0
- package/.output/server/node_modules/.nitro/perfect-debounce@2.1.0/package.json +41 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14582 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +292 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +702 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/common.js +76 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/format.js +40 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +52 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +133 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +15 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +18 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +18 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +31 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +80 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +102 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +29 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +60 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +204 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +35 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +134 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +167 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +81 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +94 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +78 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +68 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +47 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +105 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +38 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +94 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +64 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +26 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +18 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +58 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +34 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +13 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +126 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +21 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +27 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +38 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +93 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +48 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +24 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +44 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +125 -0
- package/.output/server/node_modules/@iconify/utils/lib/index.js +53 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +32 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +42 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +63 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +27 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +27 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +10 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +115 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +32 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +15 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +10 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +42 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +69 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +55 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +8 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +9 -0
- package/.output/server/node_modules/@iconify/utils/package.json +118 -0
- package/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1893 -0
- package/.output/server/node_modules/@iconify/vue/package.json +64 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/devtools-kit/dist/index.cjs +6850 -0
- package/.output/server/node_modules/@vue/devtools-kit/package.json +44 -0
- package/.output/server/node_modules/@vue/devtools-shared/dist/index.cjs +378 -0
- package/.output/server/node_modules/@vue/devtools-shared/package.json +34 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1870 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6810 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1750 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +883 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/birpc/dist/index.cjs +296 -0
- package/.output/server/node_modules/birpc/package.json +57 -0
- package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/.output/server/node_modules/consola/dist/core.mjs +512 -0
- package/.output/server/node_modules/consola/dist/index.mjs +651 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/.output/server/node_modules/consola/package.json +136 -0
- package/.output/server/node_modules/devalue/index.js +4 -0
- package/.output/server/node_modules/devalue/package.json +37 -0
- package/.output/server/node_modules/devalue/src/base64.js +110 -0
- package/.output/server/node_modules/devalue/src/constants.js +7 -0
- package/.output/server/node_modules/devalue/src/parse.js +246 -0
- package/.output/server/node_modules/devalue/src/stringify.js +350 -0
- package/.output/server/node_modules/devalue/src/uneval.js +490 -0
- package/.output/server/node_modules/devalue/src/utils.js +148 -0
- package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/entities/package.json +120 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/pinia/dist/pinia.prod.cjs +719 -0
- package/.output/server/node_modules/pinia/package.json +94 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/.output/server/node_modules/source-map-js/package.json +71 -0
- package/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
- package/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
- package/.output/server/node_modules/tailwindcss/package.json +89 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
- package/.output/server/node_modules/ufo/package.json +48 -0
- package/.output/server/node_modules/unhead/dist/index.mjs +9 -0
- package/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
- package/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +180 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BPM0-cfG.mjs +44 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.D_nrZZPH.mjs +182 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.ckV6dpEQ.mjs +166 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.fVVqDC1O.mjs +203 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/.output/server/node_modules/unhead/package.json +105 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +301 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +55 -0
- package/.output/server/node_modules/vue-router/dist/devtools-EWN81iOl.mjs +1220 -0
- package/.output/server/node_modules/vue-router/dist/vue-router.mjs +1557 -0
- package/.output/server/node_modules/vue-router/package.json +153 -0
- package/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
- package/.output/server/package.json +37 -0
- package/LICENSE +21 -0
- package/README.md +132 -0
- package/bin/cli.js +75 -0
- package/package.json +71 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { vs16Emoji } from "../data.js";
|
|
2
|
+
import { convertEmojiSequenceToUTF32 } from "../convert.js";
|
|
3
|
+
import { getEmojiSequenceKeyword } from "../format.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Create regular expression instance
|
|
7
|
+
*/
|
|
8
|
+
function createEmojiRegExp(regexp) {
|
|
9
|
+
return new RegExp(regexp, "g");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Find emojis in text
|
|
13
|
+
*
|
|
14
|
+
* Returns only one entry per match
|
|
15
|
+
*/
|
|
16
|
+
function getEmojiMatchesInText(regexp, content) {
|
|
17
|
+
const results = [];
|
|
18
|
+
const found = /* @__PURE__ */ new Set();
|
|
19
|
+
(regexp instanceof Array ? regexp : [regexp]).forEach((regexp$1, index) => {
|
|
20
|
+
const matches = content.match(typeof regexp$1 === "string" ? createEmojiRegExp(regexp$1) : regexp$1);
|
|
21
|
+
if (matches) for (let i = 0; i < matches.length; i++) {
|
|
22
|
+
const match = matches[i];
|
|
23
|
+
if (found.has(match)) continue;
|
|
24
|
+
found.add(match);
|
|
25
|
+
const sequence = [];
|
|
26
|
+
for (const codePoint of match) {
|
|
27
|
+
const num = codePoint.codePointAt(0);
|
|
28
|
+
if (num !== vs16Emoji) sequence.push(num);
|
|
29
|
+
}
|
|
30
|
+
results.push({
|
|
31
|
+
match,
|
|
32
|
+
sequence,
|
|
33
|
+
keyword: getEmojiSequenceKeyword(convertEmojiSequenceToUTF32(sequence)),
|
|
34
|
+
regexp: index
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
results.sort((a, b) => {
|
|
39
|
+
const match1 = a.match;
|
|
40
|
+
const match2 = b.match;
|
|
41
|
+
if (match2.length === match1.length) return match1.localeCompare(match2);
|
|
42
|
+
return match2.length - match1.length;
|
|
43
|
+
});
|
|
44
|
+
return results;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Sort emojis, get prev and next text
|
|
48
|
+
*/
|
|
49
|
+
function sortEmojiMatchesInText(content, matches) {
|
|
50
|
+
const ranges = [];
|
|
51
|
+
const check = (start, end) => {
|
|
52
|
+
for (let i = 0; i < ranges.length; i++) if (start < ranges[i].end && end > ranges[i].start) return false;
|
|
53
|
+
return true;
|
|
54
|
+
};
|
|
55
|
+
for (let i = 0; i < matches.length; i++) {
|
|
56
|
+
const match = matches[i];
|
|
57
|
+
const search = match.match;
|
|
58
|
+
let startFrom = 0;
|
|
59
|
+
let start;
|
|
60
|
+
while ((start = content.indexOf(search, startFrom)) !== -1) {
|
|
61
|
+
const end = start + search.length;
|
|
62
|
+
startFrom = end;
|
|
63
|
+
if (check(start, end)) ranges.push({
|
|
64
|
+
start,
|
|
65
|
+
end,
|
|
66
|
+
match
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
ranges.sort((a, b) => a.start - b.start);
|
|
71
|
+
const list = [];
|
|
72
|
+
let prevRange;
|
|
73
|
+
let lastEnd;
|
|
74
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
75
|
+
const range = ranges[i];
|
|
76
|
+
const prev = content.slice(prevRange ? prevRange.end : 0, range.start);
|
|
77
|
+
list.push({
|
|
78
|
+
match: range.match,
|
|
79
|
+
prev
|
|
80
|
+
});
|
|
81
|
+
prevRange = range;
|
|
82
|
+
lastEnd = range.end;
|
|
83
|
+
}
|
|
84
|
+
if (!lastEnd) return [];
|
|
85
|
+
return list.map((item, index) => {
|
|
86
|
+
const nextItem = list[index + 1];
|
|
87
|
+
return {
|
|
88
|
+
...item,
|
|
89
|
+
next: nextItem ? nextItem.prev : content.slice(lastEnd)
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { createEmojiRegExp, getEmojiMatchesInText, sortEmojiMatchesInText };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getEmojiMatchesInText, sortEmojiMatchesInText } from "./find.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Find and replace emojis in text
|
|
5
|
+
*
|
|
6
|
+
* Returns null if nothing was replaced
|
|
7
|
+
*/
|
|
8
|
+
function findAndReplaceEmojisInText(regexp, content, callback) {
|
|
9
|
+
const matches = getEmojiMatchesInText(regexp, content);
|
|
10
|
+
if (!matches.length) return null;
|
|
11
|
+
const sortedMatches = sortEmojiMatchesInText(content, matches);
|
|
12
|
+
let result = "";
|
|
13
|
+
let replaced = false;
|
|
14
|
+
for (let i = 0; i < sortedMatches.length; i++) {
|
|
15
|
+
const item = sortedMatches[i];
|
|
16
|
+
result += item.prev;
|
|
17
|
+
const replacement = callback({ ...item.match }, result);
|
|
18
|
+
if (replacement === void 0) result += item.match.match;
|
|
19
|
+
else {
|
|
20
|
+
result += replacement;
|
|
21
|
+
replaced = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
result += sortedMatches[sortedMatches.length - 1].next;
|
|
25
|
+
return replaced ? result : null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { findAndReplaceEmojisInText };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { emojiComponents } from "../data.js";
|
|
2
|
+
import { getEmojiSequenceKeyword } from "../format.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Map components from test data
|
|
6
|
+
*/
|
|
7
|
+
function mapEmojiTestDataComponents(testSequences) {
|
|
8
|
+
const results = {
|
|
9
|
+
converted: /* @__PURE__ */ new Map(),
|
|
10
|
+
items: /* @__PURE__ */ new Map(),
|
|
11
|
+
names: /* @__PURE__ */ new Map(),
|
|
12
|
+
types: {},
|
|
13
|
+
keywords: {}
|
|
14
|
+
};
|
|
15
|
+
for (const key in emojiComponents) {
|
|
16
|
+
const type = key;
|
|
17
|
+
const range = emojiComponents[type];
|
|
18
|
+
for (let number = range[0]; number < range[1]; number++) {
|
|
19
|
+
const keyword = getEmojiSequenceKeyword([number]);
|
|
20
|
+
const item = testSequences[keyword];
|
|
21
|
+
if (!item) throw new Error(`Missing emoji component in test sequence: "${keyword}"`);
|
|
22
|
+
results.converted.set(number, keyword);
|
|
23
|
+
results.items.set(number, item);
|
|
24
|
+
results.items.set(keyword, item);
|
|
25
|
+
const name = item.name;
|
|
26
|
+
results.names.set(number, name);
|
|
27
|
+
results.names.set(keyword, name);
|
|
28
|
+
results.types[name] = type;
|
|
29
|
+
results.keywords[name] = keyword;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return results;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Convert to string
|
|
36
|
+
*/
|
|
37
|
+
function emojiSequenceWithComponentsToString(sequence) {
|
|
38
|
+
return sequence.map((item) => typeof item === "number" ? item.toString(16) : item).join("-");
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Find variations in sequence
|
|
42
|
+
*/
|
|
43
|
+
function findEmojiComponentsInSequence(sequence) {
|
|
44
|
+
const components = [];
|
|
45
|
+
for (let index = 0; index < sequence.length; index++) {
|
|
46
|
+
const code = sequence[index];
|
|
47
|
+
for (const key in emojiComponents) {
|
|
48
|
+
const type = key;
|
|
49
|
+
const range = emojiComponents[type];
|
|
50
|
+
if (code >= range[0] && code < range[1]) {
|
|
51
|
+
components.push({
|
|
52
|
+
index,
|
|
53
|
+
type
|
|
54
|
+
});
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return components;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Replace components in sequence
|
|
63
|
+
*/
|
|
64
|
+
function replaceEmojiComponentsInCombinedSequence(sequence, values) {
|
|
65
|
+
const indexes = {
|
|
66
|
+
"hair-style": 0,
|
|
67
|
+
"skin-tone": 0
|
|
68
|
+
};
|
|
69
|
+
return sequence.map((item) => {
|
|
70
|
+
if (typeof item === "number") return item;
|
|
71
|
+
const index = indexes[item]++;
|
|
72
|
+
const list = values[item];
|
|
73
|
+
if (!list || !list.length) throw new Error(`Cannot replace ${item}: no valid values provided`);
|
|
74
|
+
return list[index >= list.length ? list.length - 1 : index];
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { emojiSequenceWithComponentsToString, findEmojiComponentsInSequence, mapEmojiTestDataComponents, replaceEmojiComponentsInCombinedSequence };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { emojiComponents } from "../data.js";
|
|
2
|
+
import { getUnqualifiedEmojiSequence } from "../cleanup.js";
|
|
3
|
+
import { getEmojiSequenceKeyword } from "../format.js";
|
|
4
|
+
import { replaceEmojiComponentsInCombinedSequence } from "./components.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Find missing emojis
|
|
8
|
+
*
|
|
9
|
+
* Result includes missing items, which are extended from items that needs to
|
|
10
|
+
* be copied. To identify which emojis to copy, source object should include
|
|
11
|
+
* something like `iconName` key that points to icon sequence represents.
|
|
12
|
+
*/
|
|
13
|
+
function findMissingEmojis(sequences, testDataTree) {
|
|
14
|
+
const results = [];
|
|
15
|
+
const existingItems = Object.create(null);
|
|
16
|
+
const copiedItems = Object.create(null);
|
|
17
|
+
sequences.forEach((item) => {
|
|
18
|
+
const key = getEmojiSequenceKeyword(getUnqualifiedEmojiSequence(item.sequence));
|
|
19
|
+
if (!existingItems[key] || existingItems[key].sequence.length < item.sequence.length) existingItems[key] = item;
|
|
20
|
+
});
|
|
21
|
+
const iterate = (type, parentTree, parentValues, parentItem, deep) => {
|
|
22
|
+
const childTree = parentTree.children?.[type];
|
|
23
|
+
if (!childTree) return;
|
|
24
|
+
const range = emojiComponents[type];
|
|
25
|
+
for (let number = range[0]; number < range[1]; number++) {
|
|
26
|
+
const values = {
|
|
27
|
+
"hair-style": [...parentValues["hair-style"]],
|
|
28
|
+
"skin-tone": [...parentValues["skin-tone"]]
|
|
29
|
+
};
|
|
30
|
+
values[type].push(number);
|
|
31
|
+
const sequence = replaceEmojiComponentsInCombinedSequence(childTree.item.sequence, values);
|
|
32
|
+
const key = getEmojiSequenceKeyword(getUnqualifiedEmojiSequence(sequence));
|
|
33
|
+
const oldItem = existingItems[key];
|
|
34
|
+
let item;
|
|
35
|
+
if (oldItem) item = oldItem;
|
|
36
|
+
else {
|
|
37
|
+
item = copiedItems[key];
|
|
38
|
+
if (!item) {
|
|
39
|
+
item = {
|
|
40
|
+
...parentItem,
|
|
41
|
+
sequence
|
|
42
|
+
};
|
|
43
|
+
if (item.sequenceKey) item.sequenceKey = key;
|
|
44
|
+
copiedItems[key] = item;
|
|
45
|
+
results.push(item);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (deep || oldItem) for (const key$1 in values) iterate(key$1, childTree, values, item, deep);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const parse = (key, deep) => {
|
|
52
|
+
const treeItem = testDataTree[key];
|
|
53
|
+
const rootItem = existingItems[treeItem.item.sequenceKey];
|
|
54
|
+
if (!rootItem) return;
|
|
55
|
+
const values = {
|
|
56
|
+
"skin-tone": [],
|
|
57
|
+
"hair-style": []
|
|
58
|
+
};
|
|
59
|
+
for (const key$1 in values) iterate(key$1, treeItem, values, rootItem, deep);
|
|
60
|
+
};
|
|
61
|
+
for (const key in testDataTree) {
|
|
62
|
+
parse(key, false);
|
|
63
|
+
parse(key, true);
|
|
64
|
+
}
|
|
65
|
+
return results;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { findMissingEmojis };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { emojiComponents } from "../data.js";
|
|
2
|
+
|
|
3
|
+
const nameSplit = ": ";
|
|
4
|
+
const variationSplit = ", ";
|
|
5
|
+
const ignoredVariations = new Set(["person"]);
|
|
6
|
+
/**
|
|
7
|
+
* Split emoji name to base name and variations
|
|
8
|
+
*
|
|
9
|
+
* Also finds indexes of each variation
|
|
10
|
+
*/
|
|
11
|
+
function splitEmojiNameVariations(name, sequence, componentsData) {
|
|
12
|
+
const parts = name.split(nameSplit);
|
|
13
|
+
const base = parts.shift();
|
|
14
|
+
if (!parts.length) return {
|
|
15
|
+
base,
|
|
16
|
+
key: base
|
|
17
|
+
};
|
|
18
|
+
const baseVariations = parts.join(nameSplit).split(variationSplit).filter((text) => {
|
|
19
|
+
if (!componentsData.types[text]) return !ignoredVariations.has(text);
|
|
20
|
+
return false;
|
|
21
|
+
});
|
|
22
|
+
const result = {
|
|
23
|
+
base,
|
|
24
|
+
key: base + (baseVariations.length ? nameSplit + baseVariations.join(variationSplit) : "")
|
|
25
|
+
};
|
|
26
|
+
let components = 0;
|
|
27
|
+
const variations = [...baseVariations];
|
|
28
|
+
for (let index = 0; index < sequence.length; index++) {
|
|
29
|
+
const num = sequence[index];
|
|
30
|
+
for (const key in emojiComponents) {
|
|
31
|
+
const type = key;
|
|
32
|
+
const range = emojiComponents[type];
|
|
33
|
+
if (num >= range[0] && num < range[1]) {
|
|
34
|
+
variations.push({
|
|
35
|
+
index,
|
|
36
|
+
type
|
|
37
|
+
});
|
|
38
|
+
components++;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (variations.length) result.variations = variations;
|
|
43
|
+
if (components) result.components = components;
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { splitEmojiNameVariations };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { getEmojiSequenceFromString, getUnqualifiedEmojiSequence } from "../cleanup.js";
|
|
2
|
+
import { getEmojiSequenceKeyword } from "../format.js";
|
|
3
|
+
|
|
4
|
+
const componentStatus = "component";
|
|
5
|
+
const allowedStatus = new Set([
|
|
6
|
+
componentStatus,
|
|
7
|
+
"fully-qualified",
|
|
8
|
+
"minimally-qualified",
|
|
9
|
+
"unqualified"
|
|
10
|
+
]);
|
|
11
|
+
/**
|
|
12
|
+
* Get qualified variations from parsed test file
|
|
13
|
+
*
|
|
14
|
+
* Key is unqualified emoji, value is longest fully qualified emoji
|
|
15
|
+
*/
|
|
16
|
+
function getQualifiedTestData(data) {
|
|
17
|
+
const results = Object.create(null);
|
|
18
|
+
for (const key in data) {
|
|
19
|
+
const item = data[key];
|
|
20
|
+
const sequence = getUnqualifiedEmojiSequence(item.sequence);
|
|
21
|
+
const shortKey = getEmojiSequenceKeyword(sequence);
|
|
22
|
+
if (!results[shortKey] || results[shortKey].sequence.length < sequence.length) results[shortKey] = item;
|
|
23
|
+
}
|
|
24
|
+
return results;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get all emoji sequences from test file
|
|
28
|
+
*
|
|
29
|
+
* Returns all emojis as UTF-32 sequences, where:
|
|
30
|
+
* key = unqualified sequence (without \uFE0F)
|
|
31
|
+
* value = qualified sequence (with \uFE0F)
|
|
32
|
+
*
|
|
33
|
+
* Duplicate items that have different versions with and without \uFE0F are
|
|
34
|
+
* listed only once, with unqualified sequence as key and longest possible
|
|
35
|
+
* qualified sequence as value
|
|
36
|
+
*
|
|
37
|
+
* Example of 3 identical entries:
|
|
38
|
+
* '1F441 FE0F 200D 1F5E8 FE0F'
|
|
39
|
+
* '1F441 200D 1F5E8 FE0F'
|
|
40
|
+
* '1F441 FE0F 200D 1F5E8'
|
|
41
|
+
* '1F441 200D 1F5E8'
|
|
42
|
+
*
|
|
43
|
+
* Out of these entries, only one item will be returned with:
|
|
44
|
+
* key = '1f441-200d-1f5e8' (converted to lower case, separated with dash)
|
|
45
|
+
* value.sequence = [0x1F441, 0xFE0F, 0x200D, 0x1F5E8, 0xFE0F]
|
|
46
|
+
* value.status = 'fully-qualified'
|
|
47
|
+
* other properties in value are identical for all versions
|
|
48
|
+
*/
|
|
49
|
+
function parseEmojiTestFile(data) {
|
|
50
|
+
const results = Object.create(null);
|
|
51
|
+
let group;
|
|
52
|
+
let subgroup;
|
|
53
|
+
data.split("\n").forEach((line) => {
|
|
54
|
+
line = line.trim();
|
|
55
|
+
const parts = line.split("#");
|
|
56
|
+
if (parts.length < 2) return;
|
|
57
|
+
const firstChunk = parts.shift().trim();
|
|
58
|
+
const secondChunk = parts.join("#").trim();
|
|
59
|
+
if (!firstChunk) {
|
|
60
|
+
const commentParts = secondChunk.split(":");
|
|
61
|
+
if (commentParts.length === 2) {
|
|
62
|
+
const key$1 = commentParts[0].trim();
|
|
63
|
+
const value = commentParts[1].trim();
|
|
64
|
+
switch (key$1) {
|
|
65
|
+
case "group":
|
|
66
|
+
group = value;
|
|
67
|
+
subgroup = void 0;
|
|
68
|
+
break;
|
|
69
|
+
case "subgroup":
|
|
70
|
+
subgroup = value;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (!group || !subgroup) return;
|
|
77
|
+
const firstChunkParts = firstChunk.split(";");
|
|
78
|
+
if (firstChunkParts.length !== 2) return;
|
|
79
|
+
const code = firstChunkParts[0].trim();
|
|
80
|
+
if (!code || !code.match(/^[A-F0-9]+[A-F0-9\s]*[A-F0-9]+$/)) return;
|
|
81
|
+
const status = firstChunkParts[1].trim();
|
|
82
|
+
if (!allowedStatus.has(status)) throw new Error(`Bad emoji type: ${status}`);
|
|
83
|
+
const secondChunkParts = secondChunk.split(/\s+/);
|
|
84
|
+
if (secondChunkParts.length < 3) throw new Error(`Bad emoji comment for: ${code}`);
|
|
85
|
+
const emoji = secondChunkParts.shift();
|
|
86
|
+
const version = secondChunkParts.shift();
|
|
87
|
+
if (version.slice(0, 1) !== "E") throw new Error(`Bad unicode version "${version}" for: ${code}`);
|
|
88
|
+
const name = secondChunkParts.join(" ");
|
|
89
|
+
const sequence = getEmojiSequenceFromString(code);
|
|
90
|
+
const key = getEmojiSequenceKeyword(sequence);
|
|
91
|
+
if (results[key]) throw new Error(`Duplicate entry for "${code}"`);
|
|
92
|
+
results[key] = {
|
|
93
|
+
group,
|
|
94
|
+
subgroup,
|
|
95
|
+
sequence,
|
|
96
|
+
emoji,
|
|
97
|
+
status,
|
|
98
|
+
version,
|
|
99
|
+
name
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
return getQualifiedTestData(results);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { componentStatus, parseEmojiTestFile };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { vs16Emoji } from "../data.js";
|
|
2
|
+
import { emojiSequenceWithComponentsToString, mapEmojiTestDataComponents } from "./components.js";
|
|
3
|
+
import { splitEmojiNameVariations } from "./name.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Find components in item, generate CombinedEmojiTestDataItem
|
|
7
|
+
*/
|
|
8
|
+
function findComponentsInEmojiTestItem(item, componentsData) {
|
|
9
|
+
const name = splitEmojiNameVariations(item.name, item.sequence, componentsData);
|
|
10
|
+
const sequence = [...item.sequence];
|
|
11
|
+
name.variations?.forEach((item$1) => {
|
|
12
|
+
if (typeof item$1 !== "string") sequence[item$1.index] = item$1.type;
|
|
13
|
+
});
|
|
14
|
+
const sequenceKey = emojiSequenceWithComponentsToString(sequence.filter((code) => code !== vs16Emoji));
|
|
15
|
+
return {
|
|
16
|
+
...item,
|
|
17
|
+
name,
|
|
18
|
+
sequenceKey,
|
|
19
|
+
sequence
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Combine similar items in one iteratable item
|
|
24
|
+
*/
|
|
25
|
+
function combineSimilarEmojiTestData(data, componentsData) {
|
|
26
|
+
const results = Object.create(null);
|
|
27
|
+
componentsData = componentsData || mapEmojiTestDataComponents(data);
|
|
28
|
+
for (const key in data) {
|
|
29
|
+
const sourceItem = data[key];
|
|
30
|
+
if (sourceItem.status !== "component") {
|
|
31
|
+
const item = findComponentsInEmojiTestItem(sourceItem, componentsData);
|
|
32
|
+
results[item.sequenceKey] = item;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return results;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { combineSimilarEmojiTestData, findComponentsInEmojiTestItem };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { emojiComponents } from "../data.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Merge types for unique key
|
|
5
|
+
*/
|
|
6
|
+
function mergeComponentTypes(value) {
|
|
7
|
+
return "[" + value.join(",") + "]";
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Merge count for unique key
|
|
11
|
+
*/
|
|
12
|
+
function mergeComponentsCount(value) {
|
|
13
|
+
const keys = [];
|
|
14
|
+
for (const key in emojiComponents) {
|
|
15
|
+
const type = key;
|
|
16
|
+
for (let i = 0; i < value[type]; i++) keys.push(type);
|
|
17
|
+
}
|
|
18
|
+
return keys.length ? mergeComponentTypes(keys) : "";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get item from group
|
|
22
|
+
*/
|
|
23
|
+
function getGroupItem(items, components) {
|
|
24
|
+
const item = items[mergeComponentsCount(components)];
|
|
25
|
+
if (item) {
|
|
26
|
+
item.parsed = true;
|
|
27
|
+
return item.item;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Convert test data to dependencies tree, based on components
|
|
32
|
+
*/
|
|
33
|
+
function getEmojiTestDataTree(data) {
|
|
34
|
+
const groups = Object.create(null);
|
|
35
|
+
for (const key in data) {
|
|
36
|
+
const item = data[key];
|
|
37
|
+
const text = item.name.key;
|
|
38
|
+
const parent = groups[text] || (groups[text] = {});
|
|
39
|
+
const components = {
|
|
40
|
+
"hair-style": 0,
|
|
41
|
+
"skin-tone": 0
|
|
42
|
+
};
|
|
43
|
+
item.sequence.forEach((value) => {
|
|
44
|
+
if (typeof value !== "number") components[value]++;
|
|
45
|
+
});
|
|
46
|
+
const componentsKey = mergeComponentsCount(components);
|
|
47
|
+
if (parent[componentsKey]) throw new Error(`Duplicate components tree item for "${text}"`);
|
|
48
|
+
parent[componentsKey] = { item: {
|
|
49
|
+
...item,
|
|
50
|
+
components,
|
|
51
|
+
componentsKey
|
|
52
|
+
} };
|
|
53
|
+
}
|
|
54
|
+
const results = Object.create(null);
|
|
55
|
+
for (const key in groups) {
|
|
56
|
+
const items = groups[key];
|
|
57
|
+
const check = (parent, parentComponents, type) => {
|
|
58
|
+
const item = parse(parentComponents, [type]);
|
|
59
|
+
if (item) {
|
|
60
|
+
const children = parent.children || (parent.children = {});
|
|
61
|
+
children[type] = item;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const parse = (parentComponents, newComponents) => {
|
|
66
|
+
const components = {
|
|
67
|
+
"hair-style": 0,
|
|
68
|
+
"skin-tone": 0
|
|
69
|
+
};
|
|
70
|
+
const componentsList = parentComponents.concat(newComponents);
|
|
71
|
+
componentsList.forEach((type) => {
|
|
72
|
+
components[type]++;
|
|
73
|
+
});
|
|
74
|
+
let item = getGroupItem(items, components);
|
|
75
|
+
if (!item && newComponents.length === 1 && newComponents[0] === "skin-tone") {
|
|
76
|
+
const doubleComponents = { ...components };
|
|
77
|
+
doubleComponents["skin-tone"]++;
|
|
78
|
+
item = getGroupItem(items, doubleComponents);
|
|
79
|
+
}
|
|
80
|
+
if (item) {
|
|
81
|
+
const result = { item };
|
|
82
|
+
for (const key$1 in emojiComponents) check(result, componentsList, key$1);
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const root = parse([], []);
|
|
87
|
+
if (!root) throw new Error(`Cannot find parent item for "${key}"`);
|
|
88
|
+
for (const itemsKey in items) if (!items[itemsKey].parsed) throw new Error(`Error generating tree for "${key}"`);
|
|
89
|
+
if (root.children) results[key] = root;
|
|
90
|
+
}
|
|
91
|
+
return results;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { getEmojiTestDataTree };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { emojiComponents, keycapEmoji, vs16Emoji } from "../data.js";
|
|
2
|
+
import { convertEmojiSequenceToUTF32 } from "../convert.js";
|
|
3
|
+
import { getUnqualifiedEmojiSequence, joinEmojiSequences, splitEmojiSequences } from "../cleanup.js";
|
|
4
|
+
import { getEmojiSequenceKeyword } from "../format.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Get qualified sequence, adding optional `FE0F` wherever it might exist
|
|
8
|
+
*
|
|
9
|
+
* This might result in sequence that is not actually valid, but considering
|
|
10
|
+
* that `FE0F` is always treated as optional, full sequence used in regex will
|
|
11
|
+
* catch both qualified and unqualified emojis, so proper sequence will get
|
|
12
|
+
* caught anyway. This function just makes sure that in case if sequence does
|
|
13
|
+
* have `FE0F`, it will be caught by regex too.
|
|
14
|
+
*/
|
|
15
|
+
function guessQualifiedEmojiSequence(sequence) {
|
|
16
|
+
return joinEmojiSequences(splitEmojiSequences(sequence).map((part) => {
|
|
17
|
+
if (part.indexOf(vs16Emoji) !== -1) return part;
|
|
18
|
+
if (part.length === 2) {
|
|
19
|
+
const lastNum = part[1];
|
|
20
|
+
if (lastNum === keycapEmoji) return [
|
|
21
|
+
part[0],
|
|
22
|
+
vs16Emoji,
|
|
23
|
+
lastNum
|
|
24
|
+
];
|
|
25
|
+
for (const key in emojiComponents) {
|
|
26
|
+
const range = emojiComponents[key];
|
|
27
|
+
if (lastNum >= range[0] && lastNum < range[1]) return [
|
|
28
|
+
part[0],
|
|
29
|
+
vs16Emoji,
|
|
30
|
+
lastNum
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return part.length === 1 ? [part[0], vs16Emoji] : part;
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get qualified variations for emojis
|
|
39
|
+
*
|
|
40
|
+
* Also converts list to UTF-32 as needed and removes duplicate items
|
|
41
|
+
*/
|
|
42
|
+
function getQualifiedEmojiVariation(item) {
|
|
43
|
+
const unqualifiedSequence = getUnqualifiedEmojiSequence(convertEmojiSequenceToUTF32(item.sequence));
|
|
44
|
+
const result = {
|
|
45
|
+
...item,
|
|
46
|
+
sequence: guessQualifiedEmojiSequence(unqualifiedSequence)
|
|
47
|
+
};
|
|
48
|
+
if (result.sequenceKey) result.sequenceKey = getEmojiSequenceKeyword(unqualifiedSequence);
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get qualified emoji variations for set of emojis, ignoring duplicate entries
|
|
53
|
+
*/
|
|
54
|
+
function getQualifiedEmojiVariations(items) {
|
|
55
|
+
const results = Object.create(null);
|
|
56
|
+
for (let i = 0; i < items.length; i++) {
|
|
57
|
+
const result = getQualifiedEmojiVariation(items[i]);
|
|
58
|
+
const key = getEmojiSequenceKeyword(getUnqualifiedEmojiSequence(result.sequence));
|
|
59
|
+
if (!results[key] || results[key].sequence.length < result.sequence.length) results[key] = result;
|
|
60
|
+
}
|
|
61
|
+
return Object.values(results);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { getQualifiedEmojiVariation, getQualifiedEmojiVariations, guessQualifiedEmojiSequence };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Default values for dimensions */
|
|
2
|
+
const defaultIconDimensions = Object.freeze({
|
|
3
|
+
left: 0,
|
|
4
|
+
top: 0,
|
|
5
|
+
width: 16,
|
|
6
|
+
height: 16
|
|
7
|
+
});
|
|
8
|
+
/** Default values for transformations */
|
|
9
|
+
const defaultIconTransformations = Object.freeze({
|
|
10
|
+
rotate: 0,
|
|
11
|
+
vFlip: false,
|
|
12
|
+
hFlip: false
|
|
13
|
+
});
|
|
14
|
+
/** Default values for all optional IconifyIcon properties */
|
|
15
|
+
const defaultIconProps = Object.freeze({
|
|
16
|
+
...defaultIconDimensions,
|
|
17
|
+
...defaultIconTransformations
|
|
18
|
+
});
|
|
19
|
+
/** Default values for all properties used in ExtendedIconifyIcon */
|
|
20
|
+
const defaultExtendedIconProps = Object.freeze({
|
|
21
|
+
...defaultIconProps,
|
|
22
|
+
body: "",
|
|
23
|
+
hidden: false
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export { defaultExtendedIconProps, defaultIconDimensions, defaultIconProps, defaultIconTransformations };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defaultExtendedIconProps, defaultIconTransformations } from "./defaults.js";
|
|
2
|
+
import { mergeIconTransformations } from "./transformations.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Merge icon and alias
|
|
6
|
+
*
|
|
7
|
+
* Can also be used to merge default values and icon
|
|
8
|
+
*/
|
|
9
|
+
function mergeIconData(parent, child) {
|
|
10
|
+
const result = mergeIconTransformations(parent, child);
|
|
11
|
+
for (const key in defaultExtendedIconProps) if (key in defaultIconTransformations) {
|
|
12
|
+
if (key in parent && !(key in result)) result[key] = defaultIconTransformations[key];
|
|
13
|
+
} else if (key in child) result[key] = child[key];
|
|
14
|
+
else if (key in parent) result[key] = parent[key];
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { mergeIconData };
|