├── .github └── workflows │ └── node.js.yml ├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── dist └── index.js ├── icons ├── githubmoji-icon-48.png └── githubmoji-icon-96.png ├── manifest.json ├── package-lock.json ├── package.json └── src ├── gitmojis.js ├── index.js └── utils.js /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | pull_request: 10 | branches: [ "main" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: macos-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [12.x, 14.x, 16.x] 20 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 21 | 22 | steps: 23 | - uses: actions/checkout@v3 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v3 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | cache: 'npm' 29 | - run: npm install 30 | - run: npm run build --if-present 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | pnpm-lock.yaml 2 | node_modules 3 | web-ext-artifacts 4 | build 5 | dist -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "tabWidth": 4, 4 | "singleQuote": false, 5 | "semi": true, 6 | "trailingComma": "all", 7 | "printWidth": 80, 8 | "bracketSpacing": true, 9 | "arrowParens": "avoid" 10 | } 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # githubmoji 2 | ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ma1ted/githubmoji/Node.js%20CI) 3 | 4 | A Firefox addon that adds a predictive gitmoji picker to GitHub commit message inputs. 5 | ## [Get it here](https://addons.mozilla.org/en-GB/firefox/addon/githubmoji/) 6 | 7 | 8 | 9 | ## Building 10 | 11 | #### Clone the repository 12 | `git clone https://github.com/ma1ted/githubmoji` 13 | 14 | #### `cd` into the new directory 15 | `cd githubmoji` 16 | 17 | #### Install the required packages 18 | `npm install` 19 | 20 | #### Bundle the code 21 | `npm run build` 22 | 23 | ###### (I'm using node `v16.16.0` and npm `8.11.0`.) 24 | -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- 1 | (() => { 2 | // node_modules/.pnpm/selector-set@1.1.5/node_modules/selector-set/selector-set.next.js 3 | function SelectorSet() { 4 | if (!(this instanceof SelectorSet)) { 5 | return new SelectorSet(); 6 | } 7 | this.size = 0; 8 | this.uid = 0; 9 | this.selectors = []; 10 | this.selectorObjects = {}; 11 | this.indexes = Object.create(this.indexes); 12 | this.activeIndexes = []; 13 | } 14 | var docElem = window.document.documentElement; 15 | var matches = 16 | docElem.matches || 17 | docElem.webkitMatchesSelector || 18 | docElem.mozMatchesSelector || 19 | docElem.oMatchesSelector || 20 | docElem.msMatchesSelector; 21 | SelectorSet.prototype.matchesSelector = function (el2, selector) { 22 | return matches.call(el2, selector); 23 | }; 24 | SelectorSet.prototype.querySelectorAll = function (selectors, context) { 25 | return context.querySelectorAll(selectors); 26 | }; 27 | SelectorSet.prototype.indexes = []; 28 | var idRe = /^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g; 29 | SelectorSet.prototype.indexes.push({ 30 | name: "ID", 31 | selector: function matchIdSelector(sel) { 32 | var m; 33 | if ((m = sel.match(idRe))) { 34 | return m[0].slice(1); 35 | } 36 | }, 37 | element: function getElementId(el2) { 38 | if (el2.id) { 39 | return [el2.id]; 40 | } 41 | }, 42 | }); 43 | var classRe = /^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g; 44 | SelectorSet.prototype.indexes.push({ 45 | name: "CLASS", 46 | selector: function matchClassSelector(sel) { 47 | var m; 48 | if ((m = sel.match(classRe))) { 49 | return m[0].slice(1); 50 | } 51 | }, 52 | element: function getElementClassNames(el2) { 53 | var className = el2.className; 54 | if (className) { 55 | if (typeof className === "string") { 56 | return className.split(/\s/); 57 | } else if ( 58 | typeof className === "object" && 59 | "baseVal" in className 60 | ) { 61 | return className.baseVal.split(/\s/); 62 | } 63 | } 64 | }, 65 | }); 66 | var tagRe = /^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g; 67 | SelectorSet.prototype.indexes.push({ 68 | name: "TAG", 69 | selector: function matchTagSelector(sel) { 70 | var m; 71 | if ((m = sel.match(tagRe))) { 72 | return m[0].toUpperCase(); 73 | } 74 | }, 75 | element: function getElementTagName(el2) { 76 | return [el2.nodeName.toUpperCase()]; 77 | }, 78 | }); 79 | SelectorSet.prototype.indexes["default"] = { 80 | name: "UNIVERSAL", 81 | selector: function () { 82 | return true; 83 | }, 84 | element: function () { 85 | return [true]; 86 | }, 87 | }; 88 | var Map; 89 | if (typeof window.Map === "function") { 90 | Map = window.Map; 91 | } else { 92 | Map = (function () { 93 | function Map2() { 94 | this.map = {}; 95 | } 96 | Map2.prototype.get = function (key) { 97 | return this.map[key + " "]; 98 | }; 99 | Map2.prototype.set = function (key, value) { 100 | this.map[key + " "] = value; 101 | }; 102 | return Map2; 103 | })(); 104 | } 105 | var chunker = 106 | /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g; 107 | function parseSelectorIndexes(allIndexes, selector) { 108 | allIndexes = allIndexes.slice(0).concat(allIndexes["default"]); 109 | var allIndexesLen = allIndexes.length, 110 | i, 111 | j, 112 | m, 113 | dup, 114 | rest = selector, 115 | key, 116 | index, 117 | indexes = []; 118 | do { 119 | chunker.exec(""); 120 | if ((m = chunker.exec(rest))) { 121 | rest = m[3]; 122 | if (m[2] || !rest) { 123 | for (i = 0; i < allIndexesLen; i++) { 124 | index = allIndexes[i]; 125 | if ((key = index.selector(m[1]))) { 126 | j = indexes.length; 127 | dup = false; 128 | while (j--) { 129 | if ( 130 | indexes[j].index === index && 131 | indexes[j].key === key 132 | ) { 133 | dup = true; 134 | break; 135 | } 136 | } 137 | if (!dup) { 138 | indexes.push({ index, key }); 139 | } 140 | break; 141 | } 142 | } 143 | } 144 | } 145 | } while (m); 146 | return indexes; 147 | } 148 | function findByPrototype(ary, proto) { 149 | var i, len, item; 150 | for (i = 0, len = ary.length; i < len; i++) { 151 | item = ary[i]; 152 | if (proto.isPrototypeOf(item)) { 153 | return item; 154 | } 155 | } 156 | } 157 | SelectorSet.prototype.logDefaultIndexUsed = function () {}; 158 | SelectorSet.prototype.add = function (selector, data) { 159 | var obj, 160 | i, 161 | indexProto, 162 | key, 163 | index, 164 | objs, 165 | selectorIndexes, 166 | selectorIndex, 167 | indexes = this.activeIndexes, 168 | selectors = this.selectors, 169 | selectorObjects = this.selectorObjects; 170 | if (typeof selector !== "string") { 171 | return; 172 | } 173 | obj = { 174 | id: this.uid++, 175 | selector, 176 | data, 177 | }; 178 | selectorObjects[obj.id] = obj; 179 | selectorIndexes = parseSelectorIndexes(this.indexes, selector); 180 | for (i = 0; i < selectorIndexes.length; i++) { 181 | selectorIndex = selectorIndexes[i]; 182 | key = selectorIndex.key; 183 | indexProto = selectorIndex.index; 184 | index = findByPrototype(indexes, indexProto); 185 | if (!index) { 186 | index = Object.create(indexProto); 187 | index.map = new Map(); 188 | indexes.push(index); 189 | } 190 | if (indexProto === this.indexes["default"]) { 191 | this.logDefaultIndexUsed(obj); 192 | } 193 | objs = index.map.get(key); 194 | if (!objs) { 195 | objs = []; 196 | index.map.set(key, objs); 197 | } 198 | objs.push(obj); 199 | } 200 | this.size++; 201 | selectors.push(selector); 202 | }; 203 | SelectorSet.prototype.remove = function (selector, data) { 204 | if (typeof selector !== "string") { 205 | return; 206 | } 207 | var selectorIndexes, 208 | selectorIndex, 209 | i, 210 | j, 211 | k, 212 | selIndex, 213 | objs, 214 | obj, 215 | indexes = this.activeIndexes, 216 | selectors = (this.selectors = []), 217 | selectorObjects = this.selectorObjects, 218 | removedIds = {}, 219 | removeAll = arguments.length === 1; 220 | selectorIndexes = parseSelectorIndexes(this.indexes, selector); 221 | for (i = 0; i < selectorIndexes.length; i++) { 222 | selectorIndex = selectorIndexes[i]; 223 | j = indexes.length; 224 | while (j--) { 225 | selIndex = indexes[j]; 226 | if (selectorIndex.index.isPrototypeOf(selIndex)) { 227 | objs = selIndex.map.get(selectorIndex.key); 228 | if (objs) { 229 | k = objs.length; 230 | while (k--) { 231 | obj = objs[k]; 232 | if ( 233 | obj.selector === selector && 234 | (removeAll || obj.data === data) 235 | ) { 236 | objs.splice(k, 1); 237 | removedIds[obj.id] = true; 238 | } 239 | } 240 | } 241 | break; 242 | } 243 | } 244 | } 245 | for (i in removedIds) { 246 | delete selectorObjects[i]; 247 | this.size--; 248 | } 249 | for (i in selectorObjects) { 250 | selectors.push(selectorObjects[i].selector); 251 | } 252 | }; 253 | function sortById(a, b) { 254 | return a.id - b.id; 255 | } 256 | SelectorSet.prototype.queryAll = function (context) { 257 | if (!this.selectors.length) { 258 | return []; 259 | } 260 | var matches2 = {}, 261 | results = []; 262 | var els = this.querySelectorAll(this.selectors.join(", "), context); 263 | var i, j, len, len2, el2, m, match, obj; 264 | for (i = 0, len = els.length; i < len; i++) { 265 | el2 = els[i]; 266 | m = this.matches(el2); 267 | for (j = 0, len2 = m.length; j < len2; j++) { 268 | obj = m[j]; 269 | if (!matches2[obj.id]) { 270 | match = { 271 | id: obj.id, 272 | selector: obj.selector, 273 | data: obj.data, 274 | elements: [], 275 | }; 276 | matches2[obj.id] = match; 277 | results.push(match); 278 | } else { 279 | match = matches2[obj.id]; 280 | } 281 | match.elements.push(el2); 282 | } 283 | } 284 | return results.sort(sortById); 285 | }; 286 | SelectorSet.prototype.matches = function (el2) { 287 | if (!el2) { 288 | return []; 289 | } 290 | var i, j, k, len, len2, len3, index, keys, objs, obj, id; 291 | var indexes = this.activeIndexes, 292 | matchedIds = {}, 293 | matches2 = []; 294 | for (i = 0, len = indexes.length; i < len; i++) { 295 | index = indexes[i]; 296 | keys = index.element(el2); 297 | if (keys) { 298 | for (j = 0, len2 = keys.length; j < len2; j++) { 299 | if ((objs = index.map.get(keys[j]))) { 300 | for (k = 0, len3 = objs.length; k < len3; k++) { 301 | obj = objs[k]; 302 | id = obj.id; 303 | if ( 304 | !matchedIds[id] && 305 | this.matchesSelector(el2, obj.selector) 306 | ) { 307 | matchedIds[id] = true; 308 | matches2.push(obj); 309 | } 310 | } 311 | } 312 | } 313 | } 314 | } 315 | return matches2.sort(sortById); 316 | }; 317 | 318 | // node_modules/.pnpm/selector-observer@2.1.6/node_modules/selector-observer/dist/index.esm.js 319 | var el = null; 320 | var observer = null; 321 | var queue = []; 322 | function scheduleBatch(document2, callback) { 323 | var calls = []; 324 | function processBatchQueue() { 325 | var callsCopy = calls; 326 | calls = []; 327 | callback(callsCopy); 328 | } 329 | function scheduleBatchQueue() { 330 | for ( 331 | var _len = arguments.length, args = Array(_len), _key = 0; 332 | _key < _len; 333 | _key++ 334 | ) { 335 | args[_key] = arguments[_key]; 336 | } 337 | calls.push(args); 338 | if (calls.length === 1) 339 | scheduleMacroTask(document2, processBatchQueue); 340 | } 341 | return scheduleBatchQueue; 342 | } 343 | function scheduleMacroTask(document2, callback) { 344 | if (!observer) { 345 | observer = new MutationObserver(handleMutations); 346 | } 347 | if (!el) { 348 | el = document2.createElement("div"); 349 | observer.observe(el, { attributes: true }); 350 | } 351 | queue.push(callback); 352 | el.setAttribute("data-twiddle", "" + Date.now()); 353 | } 354 | function handleMutations() { 355 | var callbacks = queue; 356 | queue = []; 357 | for (var i = 0; i < callbacks.length; i++) { 358 | try { 359 | callbacks[i](); 360 | } catch (error) { 361 | setTimeout(function () { 362 | throw error; 363 | }, 0); 364 | } 365 | } 366 | } 367 | var initMap = /* @__PURE__ */ new WeakMap(); 368 | var initializerMap = /* @__PURE__ */ new WeakMap(); 369 | var subscriptionMap = /* @__PURE__ */ new WeakMap(); 370 | var addMap = /* @__PURE__ */ new WeakMap(); 371 | function applyChanges(selectorObserver, changes) { 372 | for (var i = 0; i < changes.length; i++) { 373 | var change = changes[i]; 374 | var type = change[0]; 375 | var el2 = change[1]; 376 | var observer2 = change[2]; 377 | if (type === ADD) { 378 | runInit(observer2, el2); 379 | runAdd(observer2, el2); 380 | } else if (type === REMOVE) { 381 | runRemove(observer2, el2); 382 | } else if (type === REMOVE_ALL) { 383 | runRemoveAll(selectorObserver.observers, el2); 384 | } 385 | } 386 | } 387 | function runInit(observer2, el2) { 388 | if (!(el2 instanceof observer2.elementConstructor)) { 389 | return; 390 | } 391 | var initIds = initMap.get(el2); 392 | if (!initIds) { 393 | initIds = []; 394 | initMap.set(el2, initIds); 395 | } 396 | if (initIds.indexOf(observer2.id) === -1) { 397 | var initializer = void 0; 398 | if (observer2.initialize) { 399 | initializer = observer2.initialize.call(void 0, el2); 400 | } 401 | if (initializer) { 402 | var initializers = initializerMap.get(el2); 403 | if (!initializers) { 404 | initializers = {}; 405 | initializerMap.set(el2, initializers); 406 | } 407 | initializers["" + observer2.id] = initializer; 408 | } 409 | initIds.push(observer2.id); 410 | } 411 | } 412 | function runAdd(observer2, el2) { 413 | if (!(el2 instanceof observer2.elementConstructor)) { 414 | return; 415 | } 416 | var addIds = addMap.get(el2); 417 | if (!addIds) { 418 | addIds = []; 419 | addMap.set(el2, addIds); 420 | } 421 | if (addIds.indexOf(observer2.id) === -1) { 422 | observer2.elements.push(el2); 423 | var initializers = initializerMap.get(el2); 424 | var initializer = initializers 425 | ? initializers["" + observer2.id] 426 | : null; 427 | if (initializer && initializer.add) { 428 | initializer.add.call(void 0, el2); 429 | } 430 | if (observer2.subscribe) { 431 | var subscription = observer2.subscribe.call(void 0, el2); 432 | if (subscription) { 433 | var subscriptions = subscriptionMap.get(el2); 434 | if (!subscriptions) { 435 | subscriptions = {}; 436 | subscriptionMap.set(el2, subscriptions); 437 | } 438 | subscriptions["" + observer2.id] = subscription; 439 | } 440 | } 441 | if (observer2.add) { 442 | observer2.add.call(void 0, el2); 443 | } 444 | addIds.push(observer2.id); 445 | } 446 | } 447 | function runRemove(observer2, el2) { 448 | if (!(el2 instanceof observer2.elementConstructor)) { 449 | return; 450 | } 451 | var addIds = addMap.get(el2); 452 | if (!addIds) { 453 | return; 454 | } 455 | var index = observer2.elements.indexOf(el2); 456 | if (index !== -1) { 457 | observer2.elements.splice(index, 1); 458 | } 459 | index = addIds.indexOf(observer2.id); 460 | if (index !== -1) { 461 | var initializers = initializerMap.get(el2); 462 | var initializer = initializers 463 | ? initializers["" + observer2.id] 464 | : null; 465 | if (initializer) { 466 | if (initializer.remove) { 467 | initializer.remove.call(void 0, el2); 468 | } 469 | } 470 | if (observer2.subscribe) { 471 | var subscriptions = subscriptionMap.get(el2); 472 | var subscription = subscriptions 473 | ? subscriptions["" + observer2.id] 474 | : null; 475 | if (subscription && subscription.unsubscribe) { 476 | subscription.unsubscribe(); 477 | } 478 | } 479 | if (observer2.remove) { 480 | observer2.remove.call(void 0, el2); 481 | } 482 | addIds.splice(index, 1); 483 | } 484 | if (addIds.length === 0) { 485 | addMap.delete(el2); 486 | } 487 | } 488 | function runRemoveAll(observers, el2) { 489 | var addIds = addMap.get(el2); 490 | if (!addIds) { 491 | return; 492 | } 493 | var ids = addIds.slice(0); 494 | for (var i = 0; i < ids.length; i++) { 495 | var observer2 = observers[ids[i]]; 496 | if (!observer2) { 497 | continue; 498 | } 499 | var index = observer2.elements.indexOf(el2); 500 | if (index !== -1) { 501 | observer2.elements.splice(index, 1); 502 | } 503 | var initializers = initializerMap.get(el2); 504 | var initializer = initializers 505 | ? initializers["" + observer2.id] 506 | : null; 507 | if (initializer && initializer.remove) { 508 | initializer.remove.call(void 0, el2); 509 | } 510 | var subscriptions = subscriptionMap.get(el2); 511 | var subscription = subscriptions 512 | ? subscriptions["" + observer2.id] 513 | : null; 514 | if (subscription && subscription.unsubscribe) { 515 | subscription.unsubscribe(); 516 | } 517 | if (observer2.remove) { 518 | observer2.remove.call(void 0, el2); 519 | } 520 | } 521 | addMap.delete(el2); 522 | } 523 | var innerHTMLReplacementIsBuggy = null; 524 | function detectInnerHTMLReplacementBuggy(document2) { 525 | if (innerHTMLReplacementIsBuggy === null) { 526 | var a = document2.createElement("div"); 527 | var b = document2.createElement("div"); 528 | var c = document2.createElement("div"); 529 | a.appendChild(b); 530 | b.appendChild(c); 531 | a.innerHTML = ""; 532 | innerHTMLReplacementIsBuggy = c.parentNode !== b; 533 | } 534 | return innerHTMLReplacementIsBuggy; 535 | } 536 | function supportsSelectorMatching(node) { 537 | return ( 538 | "matches" in node || 539 | "webkitMatchesSelector" in node || 540 | "mozMatchesSelector" in node || 541 | "oMatchesSelector" in node || 542 | "msMatchesSelector" in node 543 | ); 544 | } 545 | var ADD = 1; 546 | var REMOVE = 2; 547 | var REMOVE_ALL = 3; 548 | function handleMutations$1(selectorObserver, changes, mutations) { 549 | for (var i = 0; i < mutations.length; i++) { 550 | var mutation = mutations[i]; 551 | if (mutation.type === "childList") { 552 | addNodes(selectorObserver, changes, mutation.addedNodes); 553 | removeNodes(selectorObserver, changes, mutation.removedNodes); 554 | } else if (mutation.type === "attributes") { 555 | revalidateObservers(selectorObserver, changes, mutation.target); 556 | } 557 | } 558 | if (detectInnerHTMLReplacementBuggy(selectorObserver.ownerDocument)) { 559 | revalidateOrphanedElements(selectorObserver, changes); 560 | } 561 | } 562 | function addNodes(selectorObserver, changes, nodes) { 563 | for (var i = 0; i < nodes.length; i++) { 564 | var node = nodes[i]; 565 | if (supportsSelectorMatching(node)) { 566 | var matches2 = selectorObserver.selectorSet.matches(node); 567 | for (var j = 0; j < matches2.length; j++) { 568 | var data = matches2[j].data; 569 | changes.push([ADD, node, data]); 570 | } 571 | } 572 | if ("querySelectorAll" in node) { 573 | var matches22 = selectorObserver.selectorSet.queryAll(node); 574 | for (var _j = 0; _j < matches22.length; _j++) { 575 | var _matches2$_j = matches22[_j], 576 | _data = _matches2$_j.data, 577 | elements = _matches2$_j.elements; 578 | for (var k = 0; k < elements.length; k++) { 579 | changes.push([ADD, elements[k], _data]); 580 | } 581 | } 582 | } 583 | } 584 | } 585 | function removeNodes(selectorObserver, changes, nodes) { 586 | for (var i = 0; i < nodes.length; i++) { 587 | var node = nodes[i]; 588 | if ("querySelectorAll" in node) { 589 | changes.push([REMOVE_ALL, node]); 590 | var descendants = node.querySelectorAll("*"); 591 | for (var j = 0; j < descendants.length; j++) { 592 | changes.push([REMOVE_ALL, descendants[j]]); 593 | } 594 | } 595 | } 596 | } 597 | function revalidateObservers(selectorObserver, changes, node) { 598 | if (supportsSelectorMatching(node)) { 599 | var matches2 = selectorObserver.selectorSet.matches(node); 600 | for (var i = 0; i < matches2.length; i++) { 601 | var data = matches2[i].data; 602 | changes.push([ADD, node, data]); 603 | } 604 | } 605 | if ("querySelectorAll" in node) { 606 | var ids = addMap.get(node); 607 | if (ids) { 608 | for (var _i = 0; _i < ids.length; _i++) { 609 | var observer2 = selectorObserver.observers[ids[_i]]; 610 | if (observer2) { 611 | if ( 612 | !selectorObserver.selectorSet.matchesSelector( 613 | node, 614 | observer2.selector, 615 | ) 616 | ) { 617 | changes.push([REMOVE, node, observer2]); 618 | } 619 | } 620 | } 621 | } 622 | } 623 | } 624 | function revalidateDescendantObservers(selectorObserver, changes, node) { 625 | if ("querySelectorAll" in node) { 626 | revalidateObservers(selectorObserver, changes, node); 627 | var descendants = node.querySelectorAll("*"); 628 | for (var i = 0; i < descendants.length; i++) { 629 | revalidateObservers(selectorObserver, changes, descendants[i]); 630 | } 631 | } 632 | } 633 | function revalidateInputObservers(selectorObserver, changes, inputs) { 634 | for (var i = 0; i < inputs.length; i++) { 635 | var input = inputs[i]; 636 | var els = input.form 637 | ? input.form.elements 638 | : selectorObserver.rootNode.querySelectorAll("input"); 639 | for (var j = 0; j < els.length; j++) { 640 | revalidateObservers(selectorObserver, changes, els[j]); 641 | } 642 | } 643 | } 644 | function revalidateOrphanedElements(selectorObserver, changes) { 645 | for (var i = 0; i < selectorObserver.observers.length; i++) { 646 | var observer2 = selectorObserver.observers[i]; 647 | if (observer2) { 648 | var elements = observer2.elements; 649 | for (var j = 0; j < elements.length; j++) { 650 | var el2 = elements[j]; 651 | if (!el2.parentNode) { 652 | changes.push([REMOVE_ALL, el2]); 653 | } 654 | } 655 | } 656 | } 657 | } 658 | function whenReady(document2, callback) { 659 | var readyState = document2.readyState; 660 | if (readyState === "interactive" || readyState === "complete") { 661 | scheduleMacroTask(document2, callback); 662 | } else { 663 | document2.addEventListener( 664 | "DOMContentLoaded", 665 | scheduleMacroTask(document2, callback), 666 | ); 667 | } 668 | } 669 | var _typeof = 670 | typeof Symbol === "function" && typeof Symbol.iterator === "symbol" 671 | ? function (obj) { 672 | return typeof obj; 673 | } 674 | : function (obj) { 675 | return obj && 676 | typeof Symbol === "function" && 677 | obj.constructor === Symbol && 678 | obj !== Symbol.prototype 679 | ? "symbol" 680 | : typeof obj; 681 | }; 682 | var uid = 0; 683 | function SelectorObserver(rootNode) { 684 | this.rootNode = 685 | rootNode.nodeType === 9 ? rootNode.documentElement : rootNode; 686 | this.ownerDocument = 687 | rootNode.nodeType === 9 ? rootNode : rootNode.ownerDocument; 688 | this.observers = []; 689 | this.selectorSet = new SelectorSet(); 690 | this.mutationObserver = new MutationObserver( 691 | handleRootMutations.bind(this, this), 692 | ); 693 | this._scheduleAddRootNodes = scheduleBatch( 694 | this.ownerDocument, 695 | addRootNodes.bind(this, this), 696 | ); 697 | this._handleThrottledChangedTargets = scheduleBatch( 698 | this.ownerDocument, 699 | handleChangedTargets.bind(this, this), 700 | ); 701 | this.rootNode.addEventListener( 702 | "change", 703 | handleChangeEvents.bind(this, this), 704 | false, 705 | ); 706 | whenReady(this.ownerDocument, onReady.bind(this, this)); 707 | } 708 | SelectorObserver.prototype.disconnect = function () { 709 | this.mutationObserver.disconnect(); 710 | }; 711 | SelectorObserver.prototype.observe = function (a, b) { 712 | var handlers = void 0; 713 | if (typeof b === "function") { 714 | handlers = { 715 | selector: a, 716 | initialize: b, 717 | }; 718 | } else if ( 719 | (typeof b === "undefined" ? "undefined" : _typeof(b)) === "object" 720 | ) { 721 | handlers = b; 722 | handlers.selector = a; 723 | } else { 724 | handlers = a; 725 | } 726 | var self = this; 727 | var observer2 = { 728 | id: uid++, 729 | selector: handlers.selector, 730 | initialize: handlers.initialize, 731 | add: handlers.add, 732 | remove: handlers.remove, 733 | subscribe: handlers.subscribe, 734 | elements: [], 735 | elementConstructor: handlers.hasOwnProperty("constructor") 736 | ? handlers.constructor 737 | : this.ownerDocument.defaultView.Element, 738 | abort: function abort() { 739 | self._abortObserving(observer2); 740 | }, 741 | }; 742 | this.selectorSet.add(observer2.selector, observer2); 743 | this.observers[observer2.id] = observer2; 744 | this._scheduleAddRootNodes(); 745 | return observer2; 746 | }; 747 | SelectorObserver.prototype._abortObserving = function (observer2) { 748 | var elements = observer2.elements; 749 | for (var i = 0; i < elements.length; i++) { 750 | runRemove(observer2, elements[i]); 751 | } 752 | this.selectorSet.remove(observer2.selector, observer2); 753 | delete this.observers[observer2.id]; 754 | }; 755 | SelectorObserver.prototype.triggerObservers = function (container) { 756 | var changes = []; 757 | revalidateDescendantObservers(this, changes, container); 758 | applyChanges(this, changes); 759 | }; 760 | function onReady(selectorObserver) { 761 | selectorObserver.mutationObserver.observe(selectorObserver.rootNode, { 762 | childList: true, 763 | attributes: true, 764 | subtree: true, 765 | }); 766 | selectorObserver._scheduleAddRootNodes(); 767 | } 768 | function addRootNodes(selectorObserver) { 769 | var changes = []; 770 | addNodes(selectorObserver, changes, [selectorObserver.rootNode]); 771 | applyChanges(selectorObserver, changes); 772 | } 773 | function handleRootMutations(selectorObserver, mutations) { 774 | var changes = []; 775 | handleMutations$1(selectorObserver, changes, mutations); 776 | applyChanges(selectorObserver, changes); 777 | } 778 | function handleChangeEvents(selectorObserver, event) { 779 | selectorObserver._handleThrottledChangedTargets(event.target); 780 | } 781 | function handleChangedTargets(selectorObserver, inputs) { 782 | var changes = []; 783 | revalidateInputObservers(selectorObserver, changes, inputs); 784 | applyChanges(selectorObserver, changes); 785 | } 786 | var documentObserver = void 0; 787 | function getDocumentObserver() { 788 | if (!documentObserver) { 789 | documentObserver = new SelectorObserver(window.document); 790 | } 791 | return documentObserver; 792 | } 793 | function observe() { 794 | var _getDocumentObserver; 795 | return (_getDocumentObserver = getDocumentObserver()).observe.apply( 796 | _getDocumentObserver, 797 | arguments, 798 | ); 799 | } 800 | 801 | // src/gitmojis.js 802 | var gitmojis_default = (gitmojis = [ 803 | { 804 | emoji: "\u{1F3A8}", 805 | entity: "🎨", 806 | code: ":art:", 807 | description: "Improve structure / format of the code.", 808 | name: "art", 809 | semver: null, 810 | }, 811 | { 812 | emoji: "\u26A1\uFE0F", 813 | entity: "⚡", 814 | code: ":zap:", 815 | description: "Improve performance.", 816 | name: "zap", 817 | semver: "patch", 818 | }, 819 | { 820 | emoji: "\u{1F525}", 821 | entity: "🔥", 822 | code: ":fire:", 823 | description: "Remove code or files.", 824 | name: "fire", 825 | semver: null, 826 | }, 827 | { 828 | emoji: "\u{1F41B}", 829 | entity: "🐛", 830 | code: ":bug:", 831 | description: "Fix a bug.", 832 | name: "bug", 833 | semver: "patch", 834 | }, 835 | { 836 | emoji: "\u{1F691}\uFE0F", 837 | entity: "🚑", 838 | code: ":ambulance:", 839 | description: "Critical hotfix.", 840 | name: "ambulance", 841 | semver: "patch", 842 | }, 843 | { 844 | emoji: "\u2728", 845 | entity: "✨", 846 | code: ":sparkles:", 847 | description: "Introduce new features.", 848 | name: "sparkles", 849 | semver: "minor", 850 | }, 851 | { 852 | emoji: "\u{1F4DD}", 853 | entity: "📝", 854 | code: ":memo:", 855 | description: "Add or update documentation.", 856 | name: "memo", 857 | semver: null, 858 | }, 859 | { 860 | emoji: "\u{1F680}", 861 | entity: "🚀", 862 | code: ":rocket:", 863 | description: "Deploy stuff.", 864 | name: "rocket", 865 | semver: null, 866 | }, 867 | { 868 | emoji: "\u{1F484}", 869 | entity: "&#ff99cc;", 870 | code: ":lipstick:", 871 | description: "Add or update the UI and style files.", 872 | name: "lipstick", 873 | semver: "patch", 874 | }, 875 | { 876 | emoji: "\u{1F389}", 877 | entity: "🎉", 878 | code: ":tada:", 879 | description: "Begin a project.", 880 | name: "tada", 881 | semver: null, 882 | }, 883 | { 884 | emoji: "\u2705", 885 | entity: "✅", 886 | code: ":white_check_mark:", 887 | description: "Add, update, or pass tests.", 888 | name: "white-check-mark", 889 | semver: null, 890 | }, 891 | { 892 | emoji: "\u{1F512}\uFE0F", 893 | entity: "🔒", 894 | code: ":lock:", 895 | description: "Fix security issues.", 896 | name: "lock", 897 | semver: "patch", 898 | }, 899 | { 900 | emoji: "\u{1F510}", 901 | entity: "🔐", 902 | code: ":closed_lock_with_key:", 903 | description: "Add or update secrets.", 904 | name: "closed-lock-with-key", 905 | semver: null, 906 | }, 907 | { 908 | emoji: "\u{1F516}", 909 | entity: "🔖", 910 | code: ":bookmark:", 911 | description: "Release / Version tags.", 912 | name: "bookmark", 913 | semver: null, 914 | }, 915 | { 916 | emoji: "\u{1F6A8}", 917 | entity: "🚨", 918 | code: ":rotating_light:", 919 | description: "Fix compiler / linter warnings.", 920 | name: "rotating-light", 921 | semver: null, 922 | }, 923 | { 924 | emoji: "\u{1F6A7}", 925 | entity: "🚧", 926 | code: ":construction:", 927 | description: "Work in progress.", 928 | name: "construction", 929 | semver: null, 930 | }, 931 | { 932 | emoji: "\u{1F49A}", 933 | entity: "💚", 934 | code: ":green_heart:", 935 | description: "Fix CI Build.", 936 | name: "green-heart", 937 | semver: null, 938 | }, 939 | { 940 | emoji: "\u2B07\uFE0F", 941 | entity: "\u2B07\uFE0F", 942 | code: ":arrow_down:", 943 | description: "Downgrade dependencies.", 944 | name: "arrow-down", 945 | semver: "patch", 946 | }, 947 | { 948 | emoji: "\u2B06\uFE0F", 949 | entity: "\u2B06\uFE0F", 950 | code: ":arrow_up:", 951 | description: "Upgrade dependencies.", 952 | name: "arrow-up", 953 | semver: "patch", 954 | }, 955 | { 956 | emoji: "\u{1F4CC}", 957 | entity: "📌", 958 | code: ":pushpin:", 959 | description: "Pin dependencies to specific versions.", 960 | name: "pushpin", 961 | semver: "patch", 962 | }, 963 | { 964 | emoji: "\u{1F477}", 965 | entity: "👷", 966 | code: ":construction_worker:", 967 | description: "Add or update CI build system.", 968 | name: "construction-worker", 969 | semver: null, 970 | }, 971 | { 972 | emoji: "\u{1F4C8}", 973 | entity: "📈", 974 | code: ":chart_with_upwards_trend:", 975 | description: "Add or update analytics or track code.", 976 | name: "chart-with-upwards-trend", 977 | semver: "patch", 978 | }, 979 | { 980 | emoji: "\u267B\uFE0F", 981 | entity: "♻", 982 | code: ":recycle:", 983 | description: "Refactor code.", 984 | name: "recycle", 985 | semver: null, 986 | }, 987 | { 988 | emoji: "\u2795", 989 | entity: "➕", 990 | code: ":heavy_plus_sign:", 991 | description: "Add a dependency.", 992 | name: "heavy-plus-sign", 993 | semver: "patch", 994 | }, 995 | { 996 | emoji: "\u2796", 997 | entity: "➖", 998 | code: ":heavy_minus_sign:", 999 | description: "Remove a dependency.", 1000 | name: "heavy-minus-sign", 1001 | semver: "patch", 1002 | }, 1003 | { 1004 | emoji: "\u{1F527}", 1005 | entity: "🔧", 1006 | code: ":wrench:", 1007 | description: "Add or update configuration files.", 1008 | name: "wrench", 1009 | semver: "patch", 1010 | }, 1011 | { 1012 | emoji: "\u{1F528}", 1013 | entity: "🔨", 1014 | code: ":hammer:", 1015 | description: "Add or update development scripts.", 1016 | name: "hammer", 1017 | semver: null, 1018 | }, 1019 | { 1020 | emoji: "\u{1F310}", 1021 | entity: "🌐", 1022 | code: ":globe_with_meridians:", 1023 | description: "Internationalization and localization.", 1024 | name: "globe-with-meridians", 1025 | semver: "patch", 1026 | }, 1027 | { 1028 | emoji: "\u270F\uFE0F", 1029 | entity: "", 1030 | code: ":pencil2:", 1031 | description: "Fix typos.", 1032 | name: "pencil2", 1033 | semver: "patch", 1034 | }, 1035 | { 1036 | emoji: "\u{1F4A9}", 1037 | entity: "", 1038 | code: ":poop:", 1039 | description: "Write bad code that needs to be improved.", 1040 | name: "poop", 1041 | semver: null, 1042 | }, 1043 | { 1044 | emoji: "\u23EA\uFE0F", 1045 | entity: "⏪", 1046 | code: ":rewind:", 1047 | description: "Revert changes.", 1048 | name: "rewind", 1049 | semver: "patch", 1050 | }, 1051 | { 1052 | emoji: "\u{1F500}", 1053 | entity: "🔀", 1054 | code: ":twisted_rightwards_arrows:", 1055 | description: "Merge branches.", 1056 | name: "twisted-rightwards-arrows", 1057 | semver: null, 1058 | }, 1059 | { 1060 | emoji: "\u{1F4E6}\uFE0F", 1061 | entity: "F4E6;", 1062 | code: ":package:", 1063 | description: "Add or update compiled files or packages.", 1064 | name: "package", 1065 | semver: "patch", 1066 | }, 1067 | { 1068 | emoji: "\u{1F47D}\uFE0F", 1069 | entity: "F47D;", 1070 | code: ":alien:", 1071 | description: "Update code due to external API changes.", 1072 | name: "alien", 1073 | semver: "patch", 1074 | }, 1075 | { 1076 | emoji: "\u{1F69A}", 1077 | entity: "F69A;", 1078 | code: ":truck:", 1079 | description: 1080 | "Move or rename resources (e.g. files, paths, routes).", 1081 | name: "truck", 1082 | semver: null, 1083 | }, 1084 | { 1085 | emoji: "\u{1F4C4}", 1086 | entity: "F4C4;", 1087 | code: ":page_facing_up:", 1088 | description: "Add or update license.", 1089 | name: "page-facing-up", 1090 | semver: null, 1091 | }, 1092 | { 1093 | emoji: "\u{1F4A5}", 1094 | entity: "💥", 1095 | code: ":boom:", 1096 | description: "Introduce breaking changes.", 1097 | name: "boom", 1098 | semver: "major", 1099 | }, 1100 | { 1101 | emoji: "\u{1F371}", 1102 | entity: "F371", 1103 | code: ":bento:", 1104 | description: "Add or update assets.", 1105 | name: "bento", 1106 | semver: "patch", 1107 | }, 1108 | { 1109 | emoji: "\u267F\uFE0F", 1110 | entity: "♿", 1111 | code: ":wheelchair:", 1112 | description: "Improve accessibility.", 1113 | name: "wheelchair", 1114 | semver: "patch", 1115 | }, 1116 | { 1117 | emoji: "\u{1F4A1}", 1118 | entity: "💡", 1119 | code: ":bulb:", 1120 | description: "Add or update comments in source code.", 1121 | name: "bulb", 1122 | semver: null, 1123 | }, 1124 | { 1125 | emoji: "\u{1F37B}", 1126 | entity: "🍻", 1127 | code: ":beers:", 1128 | description: "Write code drunkenly.", 1129 | name: "beers", 1130 | semver: null, 1131 | }, 1132 | { 1133 | emoji: "\u{1F4AC}", 1134 | entity: "💬", 1135 | code: ":speech_balloon:", 1136 | description: "Add or update text and literals.", 1137 | name: "speech-balloon", 1138 | semver: "patch", 1139 | }, 1140 | { 1141 | emoji: "\u{1F5C3}\uFE0F", 1142 | entity: "🗃", 1143 | code: ":card_file_box:", 1144 | description: "Perform database related changes.", 1145 | name: "card-file-box", 1146 | semver: "patch", 1147 | }, 1148 | { 1149 | emoji: "\u{1F50A}", 1150 | entity: "🔊", 1151 | code: ":loud_sound:", 1152 | description: "Add or update logs.", 1153 | name: "loud-sound", 1154 | semver: null, 1155 | }, 1156 | { 1157 | emoji: "\u{1F507}", 1158 | entity: "🔇", 1159 | code: ":mute:", 1160 | description: "Remove logs.", 1161 | name: "mute", 1162 | semver: null, 1163 | }, 1164 | { 1165 | emoji: "\u{1F465}", 1166 | entity: "👥", 1167 | code: ":busts_in_silhouette:", 1168 | description: "Add or update contributor(s).", 1169 | name: "busts-in-silhouette", 1170 | semver: null, 1171 | }, 1172 | { 1173 | emoji: "\u{1F6B8}", 1174 | entity: "🚸", 1175 | code: ":children_crossing:", 1176 | description: "Improve user experience / usability.", 1177 | name: "children-crossing", 1178 | semver: "patch", 1179 | }, 1180 | { 1181 | emoji: "\u{1F3D7}\uFE0F", 1182 | entity: "f3d7;", 1183 | code: ":building_construction:", 1184 | description: "Make architectural changes.", 1185 | name: "building-construction", 1186 | semver: null, 1187 | }, 1188 | { 1189 | emoji: "\u{1F4F1}", 1190 | entity: "📱", 1191 | code: ":iphone:", 1192 | description: "Work on responsive design.", 1193 | name: "iphone", 1194 | semver: "patch", 1195 | }, 1196 | { 1197 | emoji: "\u{1F921}", 1198 | entity: "🤡", 1199 | code: ":clown_face:", 1200 | description: "Mock things.", 1201 | name: "clown-face", 1202 | semver: null, 1203 | }, 1204 | { 1205 | emoji: "\u{1F95A}", 1206 | entity: "🥚", 1207 | code: ":egg:", 1208 | description: "Add or update an easter egg.", 1209 | name: "egg", 1210 | semver: "patch", 1211 | }, 1212 | { 1213 | emoji: "\u{1F648}", 1214 | entity: "bdfe7;", 1215 | code: ":see_no_evil:", 1216 | description: "Add or update a .gitignore file.", 1217 | name: "see-no-evil", 1218 | semver: null, 1219 | }, 1220 | { 1221 | emoji: "\u{1F4F8}", 1222 | entity: "📸", 1223 | code: ":camera_flash:", 1224 | description: "Add or update snapshots.", 1225 | name: "camera-flash", 1226 | semver: null, 1227 | }, 1228 | { 1229 | emoji: "\u2697\uFE0F", 1230 | entity: "📸", 1231 | code: ":alembic:", 1232 | description: "Perform experiments.", 1233 | name: "alembic", 1234 | semver: "patch", 1235 | }, 1236 | { 1237 | emoji: "\u{1F50D}\uFE0F", 1238 | entity: "🔍", 1239 | code: ":mag:", 1240 | description: "Improve SEO.", 1241 | name: "mag", 1242 | semver: "patch", 1243 | }, 1244 | { 1245 | emoji: "\u{1F3F7}\uFE0F", 1246 | entity: "🏷", 1247 | code: ":label:", 1248 | description: "Add or update types.", 1249 | name: "label", 1250 | semver: "patch", 1251 | }, 1252 | { 1253 | emoji: "\u{1F331}", 1254 | entity: "🌱", 1255 | code: ":seedling:", 1256 | description: "Add or update seed files.", 1257 | name: "seedling", 1258 | semver: null, 1259 | }, 1260 | { 1261 | emoji: "\u{1F6A9}", 1262 | entity: "🚩", 1263 | code: ":triangular_flag_on_post:", 1264 | description: "Add, update, or remove feature flags.", 1265 | name: "triangular-flag-on-post", 1266 | semver: "patch", 1267 | }, 1268 | { 1269 | emoji: "\u{1F945}", 1270 | entity: "🥅", 1271 | code: ":goal_net:", 1272 | description: "Catch errors.", 1273 | name: "goal-net", 1274 | semver: "patch", 1275 | }, 1276 | { 1277 | emoji: "\u{1F4AB}", 1278 | entity: "💫", 1279 | code: ":dizzy:", 1280 | description: "Add or update animations and transitions.", 1281 | name: "animation", 1282 | semver: "patch", 1283 | }, 1284 | { 1285 | emoji: "\u{1F5D1}\uFE0F", 1286 | entity: "🗑", 1287 | code: ":wastebasket:", 1288 | description: "Deprecate code that needs to be cleaned up.", 1289 | name: "wastebasket", 1290 | semver: "patch", 1291 | }, 1292 | { 1293 | emoji: "\u{1F6C2}", 1294 | entity: "🛂", 1295 | code: ":passport_control:", 1296 | description: 1297 | "Work on code related to authorization, roles and permissions.", 1298 | name: "passport-control", 1299 | semver: "patch", 1300 | }, 1301 | { 1302 | emoji: "\u{1FA79}", 1303 | entity: "🩹", 1304 | code: ":adhesive_bandage:", 1305 | description: "Simple fix for a non-critical issue.", 1306 | name: "adhesive-bandage", 1307 | semver: "patch", 1308 | }, 1309 | { 1310 | emoji: "\u{1F9D0}", 1311 | entity: "🧐", 1312 | code: ":monocle_face:", 1313 | description: "Data exploration/inspection.", 1314 | name: "monocle-face", 1315 | semver: null, 1316 | }, 1317 | { 1318 | emoji: "\u26B0\uFE0F", 1319 | entity: "⚰", 1320 | code: ":coffin:", 1321 | description: "Remove dead code.", 1322 | name: "coffin", 1323 | semver: null, 1324 | }, 1325 | { 1326 | emoji: "\u{1F9EA}", 1327 | entity: "🧪", 1328 | code: ":test_tube:", 1329 | description: "Add a failing test.", 1330 | name: "test-tube", 1331 | semver: null, 1332 | }, 1333 | { 1334 | emoji: "\u{1F454}", 1335 | entity: "👔", 1336 | code: ":necktie:", 1337 | description: "Add or update business logic", 1338 | name: "necktie", 1339 | semver: "patch", 1340 | }, 1341 | { 1342 | emoji: "\u{1FA7A}", 1343 | entity: "🩺", 1344 | code: ":stethoscope:", 1345 | description: "Add or update healthcheck.", 1346 | name: "stethoscope", 1347 | semver: null, 1348 | }, 1349 | { 1350 | emoji: "\u{1F9F1}", 1351 | entity: "🧱", 1352 | code: ":bricks:", 1353 | description: "Infrastructure related changes.", 1354 | name: "bricks", 1355 | semver: null, 1356 | }, 1357 | { 1358 | emoji: "\u{1F9D1}\u200D\u{1F4BB}", 1359 | entity: "🧑‍💻", 1360 | code: ":technologist:", 1361 | description: "Improve developer experience", 1362 | name: "technologist", 1363 | semver: null, 1364 | }, 1365 | { 1366 | emoji: "\u{1F4B8}", 1367 | entity: "💸", 1368 | code: ":money_with_wings:", 1369 | description: "Add sponsorships or money related infrastructure.", 1370 | name: "money-with-wings", 1371 | semver: null, 1372 | }, 1373 | { 1374 | emoji: "\u{1F9F5}", 1375 | entity: "🧵", 1376 | code: ":thread:", 1377 | description: 1378 | "Add or update code related to multithreading or concurrency.", 1379 | name: "thread", 1380 | semver: null, 1381 | }, 1382 | ]); 1383 | 1384 | // src/utils.js 1385 | function createButtonGroup() { 1386 | const buttonGroup = document.createElement("div"); 1387 | buttonGroup.classList.add("BtnGroup"); 1388 | buttonGroup.style.display = "flex"; 1389 | document 1390 | .getElementById("commit-summary-input") 1391 | .insertAdjacentElement("beforebegin", buttonGroup); 1392 | return buttonGroup; 1393 | } 1394 | function replaceCodes(commitSummaryInput) { 1395 | const replacement = gitmojis_default.find(el2 => 1396 | commitSummaryInput.value.includes(el2.code), 1397 | ); 1398 | if (replacement) { 1399 | commitSummaryInput.value = commitSummaryInput.value.replace( 1400 | replacement.code, 1401 | replacement.emoji + " ", 1402 | ); 1403 | } 1404 | } 1405 | function createButtons(commitSummaryInput, buttonGroup) { 1406 | const commitMsg = commitSummaryInput.value.trim(); 1407 | let predictiveCount = 0; 1408 | gitmojis_default.every(el2 => { 1409 | if (!commitMsg || commitMsg == "" || commitMsg == " ") return false; 1410 | if (predictiveCount > 5) return false; 1411 | if ( 1412 | el2.description.toLowerCase().includes(commitMsg.toLowerCase()) 1413 | ) { 1414 | const predictive = document.createElement("button"); 1415 | predictive.classList.add( 1416 | "btn-sm", 1417 | "btn", 1418 | "BtnGroup-item", 1419 | "ghmoji-predictive", 1420 | ); 1421 | predictive.style.marginTop = "0.5rem"; 1422 | predictive.innerHTML = el2.emoji; 1423 | predictive.onclick = event => { 1424 | event.preventDefault(); 1425 | commitSummaryInput.value = el2.emoji + " "; 1426 | commitSummaryInput.focus(); 1427 | removeAllPredictions(); 1428 | }; 1429 | buttonGroup.insertAdjacentElement("beforeend", predictive); 1430 | predictiveCount++; 1431 | } 1432 | return true; 1433 | }); 1434 | } 1435 | 1436 | // src/index.js 1437 | observe("#commit-summary-input", { 1438 | add(commitSummaryInput) { 1439 | const buttonGroup = createButtonGroup(); 1440 | commitSummaryInput.oninput = () => { 1441 | buttonGroup.textContent = ""; 1442 | createButtons(commitSummaryInput, buttonGroup); 1443 | replaceCodes(commitSummaryInput); 1444 | }; 1445 | }, 1446 | }); 1447 | })(); 1448 | -------------------------------------------------------------------------------- /icons/githubmoji-icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malted/githubmoji/4b30eebdaf66c87ec247095fb665a88a71a8e35a/icons/githubmoji-icon-48.png -------------------------------------------------------------------------------- /icons/githubmoji-icon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malted/githubmoji/4b30eebdaf66c87ec247095fb665a88a71a8e35a/icons/githubmoji-icon-96.png -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "githubmoji", 4 | "version": "1.1", 5 | 6 | "description": "Adds an gitmoji picker on GitHub commit message inputs.", 7 | 8 | "icons": { 9 | "48": "icons/githubmoji-icon-48.png", 10 | "96": "icons/githubmoji-icon-96.png" 11 | }, 12 | 13 | "content_scripts": [ 14 | { 15 | "matches": ["*://*.github.com/*"], 16 | "js": ["dist/index.js"] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "githubmoji", 3 | "version": "1.1.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "githubmoji", 9 | "version": "1.1.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "selector-observer": "^2.1.6" 13 | }, 14 | "devDependencies": { 15 | "esbuild": "^0.14.53", 16 | "prettier": "^2.7.1" 17 | } 18 | }, 19 | "node_modules/@esbuild/linux-loong64": { 20 | "version": "0.14.53", 21 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.53.tgz", 22 | "integrity": "sha512-W2dAL6Bnyn4xa/QRSU3ilIK4EzD5wgYXKXJiS1HDF5vU3675qc2bvFyLwbUcdmssDveyndy7FbitrCoiV/eMLg==", 23 | "cpu": [ 24 | "loong64" 25 | ], 26 | "dev": true, 27 | "optional": true, 28 | "os": [ 29 | "linux" 30 | ], 31 | "engines": { 32 | "node": ">=12" 33 | } 34 | }, 35 | "node_modules/esbuild": { 36 | "version": "0.14.53", 37 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.53.tgz", 38 | "integrity": "sha512-ohO33pUBQ64q6mmheX1mZ8mIXj8ivQY/L4oVuAshr+aJI+zLl+amrp3EodrUNDNYVrKJXGPfIHFGhO8slGRjuw==", 39 | "dev": true, 40 | "hasInstallScript": true, 41 | "bin": { 42 | "esbuild": "bin/esbuild" 43 | }, 44 | "engines": { 45 | "node": ">=12" 46 | }, 47 | "optionalDependencies": { 48 | "@esbuild/linux-loong64": "0.14.53", 49 | "esbuild-android-64": "0.14.53", 50 | "esbuild-android-arm64": "0.14.53", 51 | "esbuild-darwin-64": "0.14.53", 52 | "esbuild-darwin-arm64": "0.14.53", 53 | "esbuild-freebsd-64": "0.14.53", 54 | "esbuild-freebsd-arm64": "0.14.53", 55 | "esbuild-linux-32": "0.14.53", 56 | "esbuild-linux-64": "0.14.53", 57 | "esbuild-linux-arm": "0.14.53", 58 | "esbuild-linux-arm64": "0.14.53", 59 | "esbuild-linux-mips64le": "0.14.53", 60 | "esbuild-linux-ppc64le": "0.14.53", 61 | "esbuild-linux-riscv64": "0.14.53", 62 | "esbuild-linux-s390x": "0.14.53", 63 | "esbuild-netbsd-64": "0.14.53", 64 | "esbuild-openbsd-64": "0.14.53", 65 | "esbuild-sunos-64": "0.14.53", 66 | "esbuild-windows-32": "0.14.53", 67 | "esbuild-windows-64": "0.14.53", 68 | "esbuild-windows-arm64": "0.14.53" 69 | } 70 | }, 71 | "node_modules/esbuild-android-64": { 72 | "version": "0.14.53", 73 | "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.53.tgz", 74 | "integrity": "sha512-fIL93sOTnEU+NrTAVMIKiAw0YH22HWCAgg4N4Z6zov2t0kY9RAJ50zY9ZMCQ+RT6bnOfDt8gCTnt/RaSNA2yRA==", 75 | "cpu": [ 76 | "x64" 77 | ], 78 | "dev": true, 79 | "optional": true, 80 | "os": [ 81 | "android" 82 | ], 83 | "engines": { 84 | "node": ">=12" 85 | } 86 | }, 87 | "node_modules/esbuild-android-arm64": { 88 | "version": "0.14.53", 89 | "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.53.tgz", 90 | "integrity": "sha512-PC7KaF1v0h/nWpvlU1UMN7dzB54cBH8qSsm7S9mkwFA1BXpaEOufCg8hdoEI1jep0KeO/rjZVWrsH8+q28T77A==", 91 | "cpu": [ 92 | "arm64" 93 | ], 94 | "dev": true, 95 | "optional": true, 96 | "os": [ 97 | "android" 98 | ], 99 | "engines": { 100 | "node": ">=12" 101 | } 102 | }, 103 | "node_modules/esbuild-darwin-64": { 104 | "version": "0.14.53", 105 | "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.53.tgz", 106 | "integrity": "sha512-gE7P5wlnkX4d4PKvLBUgmhZXvL7lzGRLri17/+CmmCzfncIgq8lOBvxGMiQ4xazplhxq+72TEohyFMZLFxuWvg==", 107 | "cpu": [ 108 | "x64" 109 | ], 110 | "dev": true, 111 | "optional": true, 112 | "os": [ 113 | "darwin" 114 | ], 115 | "engines": { 116 | "node": ">=12" 117 | } 118 | }, 119 | "node_modules/esbuild-darwin-arm64": { 120 | "version": "0.14.53", 121 | "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.53.tgz", 122 | "integrity": "sha512-otJwDU3hnI15Q98PX4MJbknSZ/WSR1I45il7gcxcECXzfN4Mrpft5hBDHXNRnCh+5858uPXBXA1Vaz2jVWLaIA==", 123 | "cpu": [ 124 | "arm64" 125 | ], 126 | "dev": true, 127 | "optional": true, 128 | "os": [ 129 | "darwin" 130 | ], 131 | "engines": { 132 | "node": ">=12" 133 | } 134 | }, 135 | "node_modules/esbuild-freebsd-64": { 136 | "version": "0.14.53", 137 | "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.53.tgz", 138 | "integrity": "sha512-WkdJa8iyrGHyKiPF4lk0MiOF87Q2SkE+i+8D4Cazq3/iqmGPJ6u49je300MFi5I2eUsQCkaOWhpCVQMTKGww2w==", 139 | "cpu": [ 140 | "x64" 141 | ], 142 | "dev": true, 143 | "optional": true, 144 | "os": [ 145 | "freebsd" 146 | ], 147 | "engines": { 148 | "node": ">=12" 149 | } 150 | }, 151 | "node_modules/esbuild-freebsd-arm64": { 152 | "version": "0.14.53", 153 | "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.53.tgz", 154 | "integrity": "sha512-9T7WwCuV30NAx0SyQpw8edbKvbKELnnm1FHg7gbSYaatH+c8WJW10g/OdM7JYnv7qkimw2ZTtSA+NokOLd2ydQ==", 155 | "cpu": [ 156 | "arm64" 157 | ], 158 | "dev": true, 159 | "optional": true, 160 | "os": [ 161 | "freebsd" 162 | ], 163 | "engines": { 164 | "node": ">=12" 165 | } 166 | }, 167 | "node_modules/esbuild-linux-32": { 168 | "version": "0.14.53", 169 | "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.53.tgz", 170 | "integrity": "sha512-VGanLBg5en2LfGDgLEUxQko2lqsOS7MTEWUi8x91YmsHNyzJVT/WApbFFx3MQGhkf+XdimVhpyo5/G0PBY91zg==", 171 | "cpu": [ 172 | "ia32" 173 | ], 174 | "dev": true, 175 | "optional": true, 176 | "os": [ 177 | "linux" 178 | ], 179 | "engines": { 180 | "node": ">=12" 181 | } 182 | }, 183 | "node_modules/esbuild-linux-64": { 184 | "version": "0.14.53", 185 | "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.53.tgz", 186 | "integrity": "sha512-pP/FA55j/fzAV7N9DF31meAyjOH6Bjuo3aSKPh26+RW85ZEtbJv9nhoxmGTd9FOqjx59Tc1ZbrJabuiXlMwuZQ==", 187 | "cpu": [ 188 | "x64" 189 | ], 190 | "dev": true, 191 | "optional": true, 192 | "os": [ 193 | "linux" 194 | ], 195 | "engines": { 196 | "node": ">=12" 197 | } 198 | }, 199 | "node_modules/esbuild-linux-arm": { 200 | "version": "0.14.53", 201 | "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.53.tgz", 202 | "integrity": "sha512-/u81NGAVZMopbmzd21Nu/wvnKQK3pT4CrvQ8BTje1STXcQAGnfyKgQlj3m0j2BzYbvQxSy+TMck4TNV2onvoPA==", 203 | "cpu": [ 204 | "arm" 205 | ], 206 | "dev": true, 207 | "optional": true, 208 | "os": [ 209 | "linux" 210 | ], 211 | "engines": { 212 | "node": ">=12" 213 | } 214 | }, 215 | "node_modules/esbuild-linux-arm64": { 216 | "version": "0.14.53", 217 | "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.53.tgz", 218 | "integrity": "sha512-GDmWITT+PMsjCA6/lByYk7NyFssW4Q6in32iPkpjZ/ytSyH+xeEx8q7HG3AhWH6heemEYEWpTll/eui3jwlSnw==", 219 | "cpu": [ 220 | "arm64" 221 | ], 222 | "dev": true, 223 | "optional": true, 224 | "os": [ 225 | "linux" 226 | ], 227 | "engines": { 228 | "node": ">=12" 229 | } 230 | }, 231 | "node_modules/esbuild-linux-mips64le": { 232 | "version": "0.14.53", 233 | "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.53.tgz", 234 | "integrity": "sha512-d6/XHIQW714gSSp6tOOX2UscedVobELvQlPMkInhx1NPz4ThZI9uNLQ4qQJHGBGKGfu+rtJsxM4NVHLhnNRdWQ==", 235 | "cpu": [ 236 | "mips64el" 237 | ], 238 | "dev": true, 239 | "optional": true, 240 | "os": [ 241 | "linux" 242 | ], 243 | "engines": { 244 | "node": ">=12" 245 | } 246 | }, 247 | "node_modules/esbuild-linux-ppc64le": { 248 | "version": "0.14.53", 249 | "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.53.tgz", 250 | "integrity": "sha512-ndnJmniKPCB52m+r6BtHHLAOXw+xBCWIxNnedbIpuREOcbSU/AlyM/2dA3BmUQhsHdb4w3amD5U2s91TJ3MzzA==", 251 | "cpu": [ 252 | "ppc64" 253 | ], 254 | "dev": true, 255 | "optional": true, 256 | "os": [ 257 | "linux" 258 | ], 259 | "engines": { 260 | "node": ">=12" 261 | } 262 | }, 263 | "node_modules/esbuild-linux-riscv64": { 264 | "version": "0.14.53", 265 | "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.53.tgz", 266 | "integrity": "sha512-yG2sVH+QSix6ct4lIzJj329iJF3MhloLE6/vKMQAAd26UVPVkhMFqFopY+9kCgYsdeWvXdPgmyOuKa48Y7+/EQ==", 267 | "cpu": [ 268 | "riscv64" 269 | ], 270 | "dev": true, 271 | "optional": true, 272 | "os": [ 273 | "linux" 274 | ], 275 | "engines": { 276 | "node": ">=12" 277 | } 278 | }, 279 | "node_modules/esbuild-linux-s390x": { 280 | "version": "0.14.53", 281 | "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.53.tgz", 282 | "integrity": "sha512-OCJlgdkB+XPYndHmw6uZT7jcYgzmx9K+28PVdOa/eLjdoYkeAFvH5hTwX4AXGLZLH09tpl4bVsEtvuyUldaNCg==", 283 | "cpu": [ 284 | "s390x" 285 | ], 286 | "dev": true, 287 | "optional": true, 288 | "os": [ 289 | "linux" 290 | ], 291 | "engines": { 292 | "node": ">=12" 293 | } 294 | }, 295 | "node_modules/esbuild-netbsd-64": { 296 | "version": "0.14.53", 297 | "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.53.tgz", 298 | "integrity": "sha512-gp2SB+Efc7MhMdWV2+pmIs/Ja/Mi5rjw+wlDmmbIn68VGXBleNgiEZG+eV2SRS0kJEUyHNedDtwRIMzaohWedQ==", 299 | "cpu": [ 300 | "x64" 301 | ], 302 | "dev": true, 303 | "optional": true, 304 | "os": [ 305 | "netbsd" 306 | ], 307 | "engines": { 308 | "node": ">=12" 309 | } 310 | }, 311 | "node_modules/esbuild-openbsd-64": { 312 | "version": "0.14.53", 313 | "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.53.tgz", 314 | "integrity": "sha512-eKQ30ZWe+WTZmteDYg8S+YjHV5s4iTxeSGhJKJajFfQx9TLZJvsJX0/paqwP51GicOUruFpSUAs2NCc0a4ivQQ==", 315 | "cpu": [ 316 | "x64" 317 | ], 318 | "dev": true, 319 | "optional": true, 320 | "os": [ 321 | "openbsd" 322 | ], 323 | "engines": { 324 | "node": ">=12" 325 | } 326 | }, 327 | "node_modules/esbuild-sunos-64": { 328 | "version": "0.14.53", 329 | "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.53.tgz", 330 | "integrity": "sha512-OWLpS7a2FrIRukQqcgQqR1XKn0jSJoOdT+RlhAxUoEQM/IpytS3FXzCJM6xjUYtpO5GMY0EdZJp+ur2pYdm39g==", 331 | "cpu": [ 332 | "x64" 333 | ], 334 | "dev": true, 335 | "optional": true, 336 | "os": [ 337 | "sunos" 338 | ], 339 | "engines": { 340 | "node": ">=12" 341 | } 342 | }, 343 | "node_modules/esbuild-windows-32": { 344 | "version": "0.14.53", 345 | "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.53.tgz", 346 | "integrity": "sha512-m14XyWQP5rwGW0tbEfp95U6A0wY0DYPInWBB7D69FAXUpBpBObRoGTKRv36lf2RWOdE4YO3TNvj37zhXjVL5xg==", 347 | "cpu": [ 348 | "ia32" 349 | ], 350 | "dev": true, 351 | "optional": true, 352 | "os": [ 353 | "win32" 354 | ], 355 | "engines": { 356 | "node": ">=12" 357 | } 358 | }, 359 | "node_modules/esbuild-windows-64": { 360 | "version": "0.14.53", 361 | "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.53.tgz", 362 | "integrity": "sha512-s9skQFF0I7zqnQ2K8S1xdLSfZFsPLuOGmSx57h2btSEswv0N0YodYvqLcJMrNMXh6EynOmWD7rz+0rWWbFpIHQ==", 363 | "cpu": [ 364 | "x64" 365 | ], 366 | "dev": true, 367 | "optional": true, 368 | "os": [ 369 | "win32" 370 | ], 371 | "engines": { 372 | "node": ">=12" 373 | } 374 | }, 375 | "node_modules/esbuild-windows-arm64": { 376 | "version": "0.14.53", 377 | "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.53.tgz", 378 | "integrity": "sha512-E+5Gvb+ZWts+00T9II6wp2L3KG2r3iGxByqd/a1RmLmYWVsSVUjkvIxZuJ3hYTIbhLkH5PRwpldGTKYqVz0nzQ==", 379 | "cpu": [ 380 | "arm64" 381 | ], 382 | "dev": true, 383 | "optional": true, 384 | "os": [ 385 | "win32" 386 | ], 387 | "engines": { 388 | "node": ">=12" 389 | } 390 | }, 391 | "node_modules/prettier": { 392 | "version": "2.7.1", 393 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", 394 | "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", 395 | "dev": true, 396 | "bin": { 397 | "prettier": "bin-prettier.js" 398 | }, 399 | "engines": { 400 | "node": ">=10.13.0" 401 | }, 402 | "funding": { 403 | "url": "https://github.com/prettier/prettier?sponsor=1" 404 | } 405 | }, 406 | "node_modules/selector-observer": { 407 | "version": "2.1.6", 408 | "resolved": "https://registry.npmjs.org/selector-observer/-/selector-observer-2.1.6.tgz", 409 | "integrity": "sha512-/I0XLOlDbzk9tnZUqNos/2cshOxTNk1QhoXtJRR8OZ4JjVfXq6JUjqo4icPDQ8fzNr2uQ32mfOzJ6sXPao/6MA==", 410 | "dependencies": { 411 | "selector-set": "^1.1" 412 | } 413 | }, 414 | "node_modules/selector-set": { 415 | "version": "1.1.5", 416 | "resolved": "https://registry.npmjs.org/selector-set/-/selector-set-1.1.5.tgz", 417 | "integrity": "sha512-6SQw6yMew5iOZ8/cDHDEnJWRM4ot2mxP6szZyF5ptrBogw4AcS4EXRj/8BUfgAMwVfdL84qpModlBMOl2NVrsQ==" 418 | } 419 | }, 420 | "dependencies": { 421 | "@esbuild/linux-loong64": { 422 | "version": "0.14.53", 423 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.53.tgz", 424 | "integrity": "sha512-W2dAL6Bnyn4xa/QRSU3ilIK4EzD5wgYXKXJiS1HDF5vU3675qc2bvFyLwbUcdmssDveyndy7FbitrCoiV/eMLg==", 425 | "dev": true, 426 | "optional": true 427 | }, 428 | "esbuild": { 429 | "version": "0.14.53", 430 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.53.tgz", 431 | "integrity": "sha512-ohO33pUBQ64q6mmheX1mZ8mIXj8ivQY/L4oVuAshr+aJI+zLl+amrp3EodrUNDNYVrKJXGPfIHFGhO8slGRjuw==", 432 | "dev": true, 433 | "requires": { 434 | "@esbuild/linux-loong64": "0.14.53", 435 | "esbuild-android-64": "0.14.53", 436 | "esbuild-android-arm64": "0.14.53", 437 | "esbuild-darwin-64": "0.14.53", 438 | "esbuild-darwin-arm64": "0.14.53", 439 | "esbuild-freebsd-64": "0.14.53", 440 | "esbuild-freebsd-arm64": "0.14.53", 441 | "esbuild-linux-32": "0.14.53", 442 | "esbuild-linux-64": "0.14.53", 443 | "esbuild-linux-arm": "0.14.53", 444 | "esbuild-linux-arm64": "0.14.53", 445 | "esbuild-linux-mips64le": "0.14.53", 446 | "esbuild-linux-ppc64le": "0.14.53", 447 | "esbuild-linux-riscv64": "0.14.53", 448 | "esbuild-linux-s390x": "0.14.53", 449 | "esbuild-netbsd-64": "0.14.53", 450 | "esbuild-openbsd-64": "0.14.53", 451 | "esbuild-sunos-64": "0.14.53", 452 | "esbuild-windows-32": "0.14.53", 453 | "esbuild-windows-64": "0.14.53", 454 | "esbuild-windows-arm64": "0.14.53" 455 | } 456 | }, 457 | "esbuild-android-64": { 458 | "version": "0.14.53", 459 | "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.53.tgz", 460 | "integrity": "sha512-fIL93sOTnEU+NrTAVMIKiAw0YH22HWCAgg4N4Z6zov2t0kY9RAJ50zY9ZMCQ+RT6bnOfDt8gCTnt/RaSNA2yRA==", 461 | "dev": true, 462 | "optional": true 463 | }, 464 | "esbuild-android-arm64": { 465 | "version": "0.14.53", 466 | "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.53.tgz", 467 | "integrity": "sha512-PC7KaF1v0h/nWpvlU1UMN7dzB54cBH8qSsm7S9mkwFA1BXpaEOufCg8hdoEI1jep0KeO/rjZVWrsH8+q28T77A==", 468 | "dev": true, 469 | "optional": true 470 | }, 471 | "esbuild-darwin-64": { 472 | "version": "0.14.53", 473 | "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.53.tgz", 474 | "integrity": "sha512-gE7P5wlnkX4d4PKvLBUgmhZXvL7lzGRLri17/+CmmCzfncIgq8lOBvxGMiQ4xazplhxq+72TEohyFMZLFxuWvg==", 475 | "dev": true, 476 | "optional": true 477 | }, 478 | "esbuild-darwin-arm64": { 479 | "version": "0.14.53", 480 | "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.53.tgz", 481 | "integrity": "sha512-otJwDU3hnI15Q98PX4MJbknSZ/WSR1I45il7gcxcECXzfN4Mrpft5hBDHXNRnCh+5858uPXBXA1Vaz2jVWLaIA==", 482 | "dev": true, 483 | "optional": true 484 | }, 485 | "esbuild-freebsd-64": { 486 | "version": "0.14.53", 487 | "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.53.tgz", 488 | "integrity": "sha512-WkdJa8iyrGHyKiPF4lk0MiOF87Q2SkE+i+8D4Cazq3/iqmGPJ6u49je300MFi5I2eUsQCkaOWhpCVQMTKGww2w==", 489 | "dev": true, 490 | "optional": true 491 | }, 492 | "esbuild-freebsd-arm64": { 493 | "version": "0.14.53", 494 | "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.53.tgz", 495 | "integrity": "sha512-9T7WwCuV30NAx0SyQpw8edbKvbKELnnm1FHg7gbSYaatH+c8WJW10g/OdM7JYnv7qkimw2ZTtSA+NokOLd2ydQ==", 496 | "dev": true, 497 | "optional": true 498 | }, 499 | "esbuild-linux-32": { 500 | "version": "0.14.53", 501 | "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.53.tgz", 502 | "integrity": "sha512-VGanLBg5en2LfGDgLEUxQko2lqsOS7MTEWUi8x91YmsHNyzJVT/WApbFFx3MQGhkf+XdimVhpyo5/G0PBY91zg==", 503 | "dev": true, 504 | "optional": true 505 | }, 506 | "esbuild-linux-64": { 507 | "version": "0.14.53", 508 | "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.53.tgz", 509 | "integrity": "sha512-pP/FA55j/fzAV7N9DF31meAyjOH6Bjuo3aSKPh26+RW85ZEtbJv9nhoxmGTd9FOqjx59Tc1ZbrJabuiXlMwuZQ==", 510 | "dev": true, 511 | "optional": true 512 | }, 513 | "esbuild-linux-arm": { 514 | "version": "0.14.53", 515 | "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.53.tgz", 516 | "integrity": "sha512-/u81NGAVZMopbmzd21Nu/wvnKQK3pT4CrvQ8BTje1STXcQAGnfyKgQlj3m0j2BzYbvQxSy+TMck4TNV2onvoPA==", 517 | "dev": true, 518 | "optional": true 519 | }, 520 | "esbuild-linux-arm64": { 521 | "version": "0.14.53", 522 | "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.53.tgz", 523 | "integrity": "sha512-GDmWITT+PMsjCA6/lByYk7NyFssW4Q6in32iPkpjZ/ytSyH+xeEx8q7HG3AhWH6heemEYEWpTll/eui3jwlSnw==", 524 | "dev": true, 525 | "optional": true 526 | }, 527 | "esbuild-linux-mips64le": { 528 | "version": "0.14.53", 529 | "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.53.tgz", 530 | "integrity": "sha512-d6/XHIQW714gSSp6tOOX2UscedVobELvQlPMkInhx1NPz4ThZI9uNLQ4qQJHGBGKGfu+rtJsxM4NVHLhnNRdWQ==", 531 | "dev": true, 532 | "optional": true 533 | }, 534 | "esbuild-linux-ppc64le": { 535 | "version": "0.14.53", 536 | "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.53.tgz", 537 | "integrity": "sha512-ndnJmniKPCB52m+r6BtHHLAOXw+xBCWIxNnedbIpuREOcbSU/AlyM/2dA3BmUQhsHdb4w3amD5U2s91TJ3MzzA==", 538 | "dev": true, 539 | "optional": true 540 | }, 541 | "esbuild-linux-riscv64": { 542 | "version": "0.14.53", 543 | "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.53.tgz", 544 | "integrity": "sha512-yG2sVH+QSix6ct4lIzJj329iJF3MhloLE6/vKMQAAd26UVPVkhMFqFopY+9kCgYsdeWvXdPgmyOuKa48Y7+/EQ==", 545 | "dev": true, 546 | "optional": true 547 | }, 548 | "esbuild-linux-s390x": { 549 | "version": "0.14.53", 550 | "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.53.tgz", 551 | "integrity": "sha512-OCJlgdkB+XPYndHmw6uZT7jcYgzmx9K+28PVdOa/eLjdoYkeAFvH5hTwX4AXGLZLH09tpl4bVsEtvuyUldaNCg==", 552 | "dev": true, 553 | "optional": true 554 | }, 555 | "esbuild-netbsd-64": { 556 | "version": "0.14.53", 557 | "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.53.tgz", 558 | "integrity": "sha512-gp2SB+Efc7MhMdWV2+pmIs/Ja/Mi5rjw+wlDmmbIn68VGXBleNgiEZG+eV2SRS0kJEUyHNedDtwRIMzaohWedQ==", 559 | "dev": true, 560 | "optional": true 561 | }, 562 | "esbuild-openbsd-64": { 563 | "version": "0.14.53", 564 | "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.53.tgz", 565 | "integrity": "sha512-eKQ30ZWe+WTZmteDYg8S+YjHV5s4iTxeSGhJKJajFfQx9TLZJvsJX0/paqwP51GicOUruFpSUAs2NCc0a4ivQQ==", 566 | "dev": true, 567 | "optional": true 568 | }, 569 | "esbuild-sunos-64": { 570 | "version": "0.14.53", 571 | "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.53.tgz", 572 | "integrity": "sha512-OWLpS7a2FrIRukQqcgQqR1XKn0jSJoOdT+RlhAxUoEQM/IpytS3FXzCJM6xjUYtpO5GMY0EdZJp+ur2pYdm39g==", 573 | "dev": true, 574 | "optional": true 575 | }, 576 | "esbuild-windows-32": { 577 | "version": "0.14.53", 578 | "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.53.tgz", 579 | "integrity": "sha512-m14XyWQP5rwGW0tbEfp95U6A0wY0DYPInWBB7D69FAXUpBpBObRoGTKRv36lf2RWOdE4YO3TNvj37zhXjVL5xg==", 580 | "dev": true, 581 | "optional": true 582 | }, 583 | "esbuild-windows-64": { 584 | "version": "0.14.53", 585 | "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.53.tgz", 586 | "integrity": "sha512-s9skQFF0I7zqnQ2K8S1xdLSfZFsPLuOGmSx57h2btSEswv0N0YodYvqLcJMrNMXh6EynOmWD7rz+0rWWbFpIHQ==", 587 | "dev": true, 588 | "optional": true 589 | }, 590 | "esbuild-windows-arm64": { 591 | "version": "0.14.53", 592 | "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.53.tgz", 593 | "integrity": "sha512-E+5Gvb+ZWts+00T9II6wp2L3KG2r3iGxByqd/a1RmLmYWVsSVUjkvIxZuJ3hYTIbhLkH5PRwpldGTKYqVz0nzQ==", 594 | "dev": true, 595 | "optional": true 596 | }, 597 | "prettier": { 598 | "version": "2.7.1", 599 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", 600 | "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", 601 | "dev": true 602 | }, 603 | "selector-observer": { 604 | "version": "2.1.6", 605 | "resolved": "https://registry.npmjs.org/selector-observer/-/selector-observer-2.1.6.tgz", 606 | "integrity": "sha512-/I0XLOlDbzk9tnZUqNos/2cshOxTNk1QhoXtJRR8OZ4JjVfXq6JUjqo4icPDQ8fzNr2uQ32mfOzJ6sXPao/6MA==", 607 | "requires": { 608 | "selector-set": "^1.1" 609 | } 610 | }, 611 | "selector-set": { 612 | "version": "1.1.5", 613 | "resolved": "https://registry.npmjs.org/selector-set/-/selector-set-1.1.5.tgz", 614 | "integrity": "sha512-6SQw6yMew5iOZ8/cDHDEnJWRM4ot2mxP6szZyF5ptrBogw4AcS4EXRj/8BUfgAMwVfdL84qpModlBMOl2NVrsQ==" 615 | } 616 | } 617 | } 618 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "githubmoji", 3 | "description": "Adds an gitmoji picker on GitHub commit message inputs.", 4 | "version": "1.1.0", 5 | "main": "src/index.js", 6 | "scripts": { 7 | "build": "esbuild src/index.js --bundle --outfile=dist/index.js", 8 | "format": "prettier --write ." 9 | }, 10 | "keywords": [ 11 | "gitmoji", 12 | "github" 13 | ], 14 | "author": "malted", 15 | "license": "MIT", 16 | "devDependencies": { 17 | "esbuild": "^0.14.53", 18 | "prettier": "^2.7.1" 19 | }, 20 | "dependencies": { 21 | "selector-observer": "^2.1.6" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/gitmojis.js: -------------------------------------------------------------------------------- 1 | // https://github.com/carloscuesta/gitmoji/blob/master/src/data/gitmojis.json 2 | /* Note that the colon has been removed from the :truck: description, 3 | as it was matching when a user typed a colon to start typing a Gitmoji code. */ 4 | export default gitmojis = [ 5 | { 6 | emoji: "🎨", 7 | entity: "🎨", 8 | code: ":art:", 9 | description: "Improve structure / format of the code.", 10 | name: "art", 11 | semver: null 12 | }, 13 | { 14 | emoji: "⚡️", 15 | entity: "⚡", 16 | code: ":zap:", 17 | description: "Improve performance.", 18 | name: "zap", 19 | semver: "patch" 20 | }, 21 | { 22 | emoji: "🔥", 23 | entity: "🔥", 24 | code: ":fire:", 25 | description: "Remove code or files.", 26 | name: "fire", 27 | semver: null 28 | }, 29 | { 30 | emoji: "🐛", 31 | entity: "🐛", 32 | code: ":bug:", 33 | description: "Fix a bug.", 34 | name: "bug", 35 | semver: "patch" 36 | }, 37 | { 38 | emoji: "🚑️", 39 | entity: "🚑", 40 | code: ":ambulance:", 41 | description: "Critical hotfix.", 42 | name: "ambulance", 43 | semver: "patch" 44 | }, 45 | { 46 | emoji: "✨", 47 | entity: "✨", 48 | code: ":sparkles:", 49 | description: "Introduce new features.", 50 | name: "sparkles", 51 | semver: "minor" 52 | }, 53 | { 54 | emoji: "📝", 55 | entity: "📝", 56 | code: ":memo:", 57 | description: "Add or update documentation.", 58 | name: "memo", 59 | semver: null 60 | }, 61 | { 62 | emoji: "🚀", 63 | entity: "🚀", 64 | code: ":rocket:", 65 | description: "Deploy stuff.", 66 | name: "rocket", 67 | semver: null 68 | }, 69 | { 70 | emoji: "💄", 71 | entity: "&#ff99cc;", 72 | code: ":lipstick:", 73 | description: "Add or update the UI and style files.", 74 | name: "lipstick", 75 | semver: "patch" 76 | }, 77 | { 78 | emoji: "🎉", 79 | entity: "🎉", 80 | code: ":tada:", 81 | description: "Begin a project.", 82 | name: "tada", 83 | semver: null 84 | }, 85 | { 86 | emoji: "✅", 87 | entity: "✅", 88 | code: ":white_check_mark:", 89 | description: "Add, update, or pass tests.", 90 | name: "white-check-mark", 91 | semver: null 92 | }, 93 | { 94 | emoji: "🔒️", 95 | entity: "🔒", 96 | code: ":lock:", 97 | description: "Fix security issues.", 98 | name: "lock", 99 | semver: "patch" 100 | }, 101 | { 102 | emoji: "🔐", 103 | entity: "🔐", 104 | code: ":closed_lock_with_key:", 105 | description: "Add or update secrets.", 106 | name: "closed-lock-with-key", 107 | semver: null 108 | }, 109 | { 110 | emoji: "🔖", 111 | entity: "🔖", 112 | code: ":bookmark:", 113 | description: "Release / Version tags.", 114 | name: "bookmark", 115 | semver: null 116 | }, 117 | { 118 | emoji: "🚨", 119 | entity: "🚨", 120 | code: ":rotating_light:", 121 | description: "Fix compiler / linter warnings.", 122 | name: "rotating-light", 123 | semver: null 124 | }, 125 | { 126 | emoji: "🚧", 127 | entity: "🚧", 128 | code: ":construction:", 129 | description: "Work in progress.", 130 | name: "construction", 131 | semver: null 132 | }, 133 | { 134 | emoji: "💚", 135 | entity: "💚", 136 | code: ":green_heart:", 137 | description: "Fix CI Build.", 138 | name: "green-heart", 139 | semver: null 140 | }, 141 | { 142 | emoji: "⬇️", 143 | entity: "⬇️", 144 | code: ":arrow_down:", 145 | description: "Downgrade dependencies.", 146 | name: "arrow-down", 147 | semver: "patch" 148 | }, 149 | { 150 | emoji: "⬆️", 151 | entity: "⬆️", 152 | code: ":arrow_up:", 153 | description: "Upgrade dependencies.", 154 | name: "arrow-up", 155 | semver: "patch" 156 | }, 157 | { 158 | emoji: "📌", 159 | entity: "📌", 160 | code: ":pushpin:", 161 | description: "Pin dependencies to specific versions.", 162 | name: "pushpin", 163 | semver: "patch" 164 | }, 165 | { 166 | emoji: "👷", 167 | entity: "👷", 168 | code: ":construction_worker:", 169 | description: "Add or update CI build system.", 170 | name: "construction-worker", 171 | semver: null 172 | }, 173 | { 174 | emoji: "📈", 175 | entity: "📈", 176 | code: ":chart_with_upwards_trend:", 177 | description: "Add or update analytics or track code.", 178 | name: "chart-with-upwards-trend", 179 | semver: "patch" 180 | }, 181 | { 182 | emoji: "♻️", 183 | entity: "♻", 184 | code: ":recycle:", 185 | description: "Refactor code.", 186 | name: "recycle", 187 | semver: null 188 | }, 189 | { 190 | emoji: "➕", 191 | entity: "➕", 192 | code: ":heavy_plus_sign:", 193 | description: "Add a dependency.", 194 | name: "heavy-plus-sign", 195 | semver: "patch" 196 | }, 197 | { 198 | emoji: "➖", 199 | entity: "➖", 200 | code: ":heavy_minus_sign:", 201 | description: "Remove a dependency.", 202 | name: "heavy-minus-sign", 203 | semver: "patch" 204 | }, 205 | { 206 | emoji: "🔧", 207 | entity: "🔧", 208 | code: ":wrench:", 209 | description: "Add or update configuration files.", 210 | name: "wrench", 211 | semver: "patch" 212 | }, 213 | { 214 | emoji: "🔨", 215 | entity: "🔨", 216 | code: ":hammer:", 217 | description: "Add or update development scripts.", 218 | name: "hammer", 219 | semver: null 220 | }, 221 | { 222 | emoji: "🌐", 223 | entity: "🌐", 224 | code: ":globe_with_meridians:", 225 | description: "Internationalization and localization.", 226 | name: "globe-with-meridians", 227 | semver: "patch" 228 | }, 229 | { 230 | emoji: "✏️", 231 | entity: "", 232 | code: ":pencil2:", 233 | description: "Fix typos.", 234 | name: "pencil2", 235 | semver: "patch" 236 | }, 237 | { 238 | emoji: "💩", 239 | entity: "", 240 | code: ":poop:", 241 | description: "Write bad code that needs to be improved.", 242 | name: "poop", 243 | semver: null 244 | }, 245 | { 246 | emoji: "⏪️", 247 | entity: "⏪", 248 | code: ":rewind:", 249 | description: "Revert changes.", 250 | name: "rewind", 251 | semver: "patch" 252 | }, 253 | { 254 | emoji: "🔀", 255 | entity: "🔀", 256 | code: ":twisted_rightwards_arrows:", 257 | description: "Merge branches.", 258 | name: "twisted-rightwards-arrows", 259 | semver: null 260 | }, 261 | { 262 | emoji: "📦️", 263 | entity: "F4E6;", 264 | code: ":package:", 265 | description: "Add or update compiled files or packages.", 266 | name: "package", 267 | semver: "patch" 268 | }, 269 | { 270 | emoji: "👽️", 271 | entity: "F47D;", 272 | code: ":alien:", 273 | description: "Update code due to external API changes.", 274 | name: "alien", 275 | semver: "patch" 276 | }, 277 | { 278 | emoji: "🚚", 279 | entity: "F69A;", 280 | code: ":truck:", 281 | description: "Move or rename resources (e.g. files, paths, routes).", 282 | name: "truck", 283 | semver: null 284 | }, 285 | { 286 | emoji: "📄", 287 | entity: "F4C4;", 288 | code: ":page_facing_up:", 289 | description: "Add or update license.", 290 | name: "page-facing-up", 291 | semver: null 292 | }, 293 | { 294 | emoji: "💥", 295 | entity: "💥", 296 | code: ":boom:", 297 | description: "Introduce breaking changes.", 298 | name: "boom", 299 | semver: "major" 300 | }, 301 | { 302 | emoji: "🍱", 303 | entity: "F371", 304 | code: ":bento:", 305 | description: "Add or update assets.", 306 | name: "bento", 307 | semver: "patch" 308 | }, 309 | { 310 | emoji: "♿️", 311 | entity: "♿", 312 | code: ":wheelchair:", 313 | description: "Improve accessibility.", 314 | name: "wheelchair", 315 | semver: "patch" 316 | }, 317 | { 318 | emoji: "💡", 319 | entity: "💡", 320 | code: ":bulb:", 321 | description: "Add or update comments in source code.", 322 | name: "bulb", 323 | semver: null 324 | }, 325 | { 326 | emoji: "🍻", 327 | entity: "🍻", 328 | code: ":beers:", 329 | description: "Write code drunkenly.", 330 | name: "beers", 331 | semver: null 332 | }, 333 | { 334 | emoji: "💬", 335 | entity: "💬", 336 | code: ":speech_balloon:", 337 | description: "Add or update text and literals.", 338 | name: "speech-balloon", 339 | semver: "patch" 340 | }, 341 | { 342 | emoji: "🗃️", 343 | entity: "🗃", 344 | code: ":card_file_box:", 345 | description: "Perform database related changes.", 346 | name: "card-file-box", 347 | semver: "patch" 348 | }, 349 | { 350 | emoji: "🔊", 351 | entity: "🔊", 352 | code: ":loud_sound:", 353 | description: "Add or update logs.", 354 | name: "loud-sound", 355 | semver: null 356 | }, 357 | { 358 | emoji: "🔇", 359 | entity: "🔇", 360 | code: ":mute:", 361 | description: "Remove logs.", 362 | name: "mute", 363 | semver: null 364 | }, 365 | { 366 | emoji: "👥", 367 | entity: "👥", 368 | code: ":busts_in_silhouette:", 369 | description: "Add or update contributor(s).", 370 | name: "busts-in-silhouette", 371 | semver: null 372 | }, 373 | { 374 | emoji: "🚸", 375 | entity: "🚸", 376 | code: ":children_crossing:", 377 | description: "Improve user experience / usability.", 378 | name: "children-crossing", 379 | semver: "patch" 380 | }, 381 | { 382 | emoji: "🏗️", 383 | entity: "f3d7;", 384 | code: ":building_construction:", 385 | description: "Make architectural changes.", 386 | name: "building-construction", 387 | semver: null 388 | }, 389 | { 390 | emoji: "📱", 391 | entity: "📱", 392 | code: ":iphone:", 393 | description: "Work on responsive design.", 394 | name: "iphone", 395 | semver: "patch" 396 | }, 397 | { 398 | emoji: "🤡", 399 | entity: "🤡", 400 | code: ":clown_face:", 401 | description: "Mock things.", 402 | name: "clown-face", 403 | semver: null 404 | }, 405 | { 406 | emoji: "🥚", 407 | entity: "🥚", 408 | code: ":egg:", 409 | description: "Add or update an easter egg.", 410 | name: "egg", 411 | semver: "patch" 412 | }, 413 | { 414 | emoji: "🙈", 415 | entity: "bdfe7;", 416 | code: ":see_no_evil:", 417 | description: "Add or update a .gitignore file.", 418 | name: "see-no-evil", 419 | semver: null 420 | }, 421 | { 422 | emoji: "📸", 423 | entity: "📸", 424 | code: ":camera_flash:", 425 | description: "Add or update snapshots.", 426 | name: "camera-flash", 427 | semver: null 428 | }, 429 | { 430 | emoji: "⚗️", 431 | entity: "📸", 432 | code: ":alembic:", 433 | description: "Perform experiments.", 434 | name: "alembic", 435 | semver: "patch" 436 | }, 437 | { 438 | emoji: "🔍️", 439 | entity: "🔍", 440 | code: ":mag:", 441 | description: "Improve SEO.", 442 | name: "mag", 443 | semver: "patch" 444 | }, 445 | { 446 | emoji: "🏷️", 447 | entity: "🏷", 448 | code: ":label:", 449 | description: "Add or update types.", 450 | name: "label", 451 | semver: "patch" 452 | }, 453 | { 454 | emoji: "🌱", 455 | entity: "🌱", 456 | code: ":seedling:", 457 | description: "Add or update seed files.", 458 | name: "seedling", 459 | semver: null 460 | }, 461 | { 462 | emoji: "🚩", 463 | entity: "🚩", 464 | code: ":triangular_flag_on_post:", 465 | description: "Add, update, or remove feature flags.", 466 | name: "triangular-flag-on-post", 467 | semver: "patch" 468 | }, 469 | { 470 | emoji: "🥅", 471 | entity: "🥅", 472 | code: ":goal_net:", 473 | description: "Catch errors.", 474 | name: "goal-net", 475 | semver: "patch" 476 | }, 477 | { 478 | emoji: "💫", 479 | entity: "💫", 480 | code: ":dizzy:", 481 | description: "Add or update animations and transitions.", 482 | name: "animation", 483 | semver: "patch" 484 | }, 485 | { 486 | emoji: "🗑️", 487 | entity: "🗑", 488 | code: ":wastebasket:", 489 | description: "Deprecate code that needs to be cleaned up.", 490 | name: "wastebasket", 491 | semver: "patch" 492 | }, 493 | { 494 | emoji: "🛂", 495 | entity: "🛂", 496 | code: ":passport_control:", 497 | description: "Work on code related to authorization, roles and permissions.", 498 | name: "passport-control", 499 | semver: "patch" 500 | }, 501 | { 502 | emoji: "🩹", 503 | entity: "🩹", 504 | code: ":adhesive_bandage:", 505 | description: "Simple fix for a non-critical issue.", 506 | name: "adhesive-bandage", 507 | semver: "patch" 508 | }, 509 | { 510 | emoji: "🧐", 511 | entity: "🧐", 512 | code: ":monocle_face:", 513 | description: "Data exploration/inspection.", 514 | name: "monocle-face", 515 | semver: null 516 | }, 517 | { 518 | emoji: "⚰️", 519 | entity: "⚰", 520 | code: ":coffin:", 521 | description: "Remove dead code.", 522 | name: "coffin", 523 | semver: null 524 | }, 525 | { 526 | emoji: "🧪", 527 | entity: "🧪", 528 | code: ":test_tube:", 529 | description: "Add a failing test.", 530 | name: "test-tube", 531 | semver: null 532 | }, 533 | { 534 | emoji: "👔", 535 | entity: "👔", 536 | code: ":necktie:", 537 | description: "Add or update business logic", 538 | name: "necktie", 539 | semver: "patch" 540 | }, 541 | { 542 | emoji: "🩺", 543 | entity: "🩺", 544 | code: ":stethoscope:", 545 | description: "Add or update healthcheck.", 546 | name: "stethoscope", 547 | semver: null 548 | }, 549 | { 550 | emoji: "🧱", 551 | entity: "🧱", 552 | code: ":bricks:", 553 | description: "Infrastructure related changes.", 554 | name: "bricks", 555 | semver: null 556 | }, 557 | { 558 | emoji: "🧑‍💻", 559 | entity: "🧑‍💻", 560 | code: ":technologist:", 561 | description: "Improve developer experience", 562 | name: "technologist", 563 | semver: null 564 | }, 565 | { 566 | emoji: "💸", 567 | entity: "💸", 568 | code: ":money_with_wings:", 569 | description: "Add sponsorships or money related infrastructure.", 570 | name: "money-with-wings", 571 | semver: null 572 | }, 573 | { 574 | emoji: "🧵", 575 | entity: "🧵", 576 | code: ":thread:", 577 | description: "Add or update code related to multithreading or concurrency.", 578 | name: "thread", 579 | semver: null 580 | } 581 | ]; 582 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import { observe } from "selector-observer"; 2 | import { createButtonGroup, createButtons, replaceCodes } from "./utils.js"; 3 | 4 | /* Detect when the input is added to the DOM. This is necessary because 5 | the router GitHub uses is funky & quirky and does not use the browser's 6 | native navigation. This means the load event is not fired for the navigation 7 | methods that lead to the pages we are interested in injecting into. */ 8 | observe("#commit-summary-input", { 9 | // Called when the element is detected to have been added to the DOM. 10 | add(commitSummaryInput) { 11 | const buttonGroup = createButtonGroup(); 12 | 13 | commitSummaryInput.oninput = () => { 14 | // Remove the predictions from the last keystroke, ready for this one. 15 | buttonGroup.textContent = ""; 16 | 17 | createButtons(commitSummaryInput, buttonGroup); 18 | 19 | // Replace Gitmoji codes with the corresponding emoji, for example :bug: becomes 🐛. 20 | replaceCodes(commitSummaryInput); 21 | }; 22 | }, 23 | }); 24 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | import gitmojis from "./gitmojis.js"; 2 | 3 | // Creates the parent element into which the prediction buttons will be added to. 4 | export function createButtonGroup() { 5 | const buttonGroup = document.createElement("div"); 6 | buttonGroup.classList.add("BtnGroup"); 7 | buttonGroup.style.display = "flex"; 8 | document 9 | .getElementById("commit-summary-input") 10 | .insertAdjacentElement("beforebegin", buttonGroup); // Insert the button group at the start of the group 11 | 12 | return buttonGroup; 13 | } 14 | 15 | export function replaceCodes(commitSummaryInput) { 16 | const replacement = gitmojis.find(el => 17 | commitSummaryInput.value.includes(el.code), 18 | ); 19 | if (replacement) { 20 | commitSummaryInput.value = commitSummaryInput.value.replace( 21 | replacement.code, 22 | replacement.emoji + " ", 23 | ); 24 | } 25 | } 26 | 27 | export function createButtons(commitSummaryInput, buttonGroup) { 28 | const commitMsg = commitSummaryInput.value.trim(); 29 | 30 | let predictiveCount = 0; 31 | 32 | // Predictively create a button for each emoji 33 | gitmojis.every(el => { 34 | // All the Gitmoji descriptions include spaces somewhere; break the loop if the input doesn't include meaningful content. 35 | if (!commitMsg || commitMsg == "" || commitMsg == " ") return false; 36 | 37 | // Displaying every single match would not be good UX. 38 | if (predictiveCount > 5) return false; 39 | 40 | // Convert both to lowercase; it wouldn't make sense to not match "Fix" with "fix", for example. 41 | if (el.description.toLowerCase().includes(commitMsg.toLowerCase())) { 42 | const predictive = document.createElement("button"); 43 | 44 | // Use the existing GitHub CSS classes for the button. 45 | predictive.classList.add( 46 | "btn-sm", 47 | "btn", 48 | "BtnGroup-item", 49 | "ghmoji-predictive", 50 | ); 51 | 52 | // Putting it here instead of the parent div so that there is no weird gap when there are no predictions 53 | predictive.style.marginTop = "0.5rem"; 54 | 55 | // Add the predicted emoji to the button 56 | predictive.innerHTML = el.emoji; 57 | 58 | // When the button is clicked, replace the input with the emoji, along with a space. 59 | predictive.onclick = event => { 60 | event.preventDefault(); 61 | commitSummaryInput.value = el.emoji + " "; 62 | 63 | // Regain focus on the input so that the user can continue typing. 64 | commitSummaryInput.focus(); 65 | 66 | // Remove the predictions, as the user has selected one. 67 | removeAllPredictions(); 68 | }; 69 | 70 | // Add this button after the others. 71 | buttonGroup.insertAdjacentElement("beforeend", predictive); 72 | 73 | // Increment the count to stop displaying too many predictions. 74 | predictiveCount++; 75 | } 76 | 77 | // Continue to the next array element. 78 | return true; 79 | }); 80 | } 81 | --------------------------------------------------------------------------------