diff --git a/docs/api/.nojekyll b/docs/api/.nojekyll deleted file mode 100644 index e2ac661..0000000 --- a/docs/api/.nojekyll +++ /dev/null @@ -1 +0,0 @@ -TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/api/README.md b/docs/api/README.md deleted file mode 100644 index 66c784b..0000000 --- a/docs/api/README.md +++ /dev/null @@ -1,32 +0,0 @@ -untilted - -# untilted - -## Table of contents - -### Functions - -- [demo](README.md#demo) - -## Functions - -### demo - -▸ **demo**(): `void` - -Demo function for template repository - -**`remarks`** -Read more about TSDoc at: [https://github.com/microsoft/tsdoc](https://github.com/microsoft/tsdoc) - -**`beta`** - -#### Returns - -`void` - -Nothing! - -#### Defined in - -[index.ts:12](https://github.com/ivandotv/microbundle-template/blob/56ba4dd/src/index.ts#L12) diff --git a/package-lock.json b/package-lock.json index 2d23b67..ed872a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "license": "MIT", "dependencies": { "@types/hast-format": "^2.3.0", + "changeset": "^0.2.6", "hast-util-to-html": "^9.0.1", "hastscript": "^9.0.0", "mdast-util-from-markdown": "^2.0.1", @@ -36,7 +37,7 @@ "@babel/preset-env": "^7.24.0", "@babel/preset-typescript": "^7.23.3", "@biomejs/biome": "1.8.2", - "@changesets/cli": "^2.27.1", + "@changesets/cli": "^2.27.7", "@trbn/jsoncanvas": "^1.0.6", "@types/node": "^20.11.24", "@vitest/coverage-v8": "^1.3.1", @@ -2255,14 +2256,13 @@ } }, "node_modules/@changesets/apply-release-plan": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.3.tgz", - "integrity": "sha512-klL6LCdmfbEe9oyfLxnidIf/stFXmrbFO/3gT5LU5pcyoZytzJe4gWpTBx3BPmyNPl16dZ1xrkcW7b98e3tYkA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.4.tgz", + "integrity": "sha512-HLFwhKWayKinWAul0Vj+76jVx1Pc2v55MGPVjZ924Y/ROeSsBMFutv9heHmCUj48lJyRfOTJG5+ar+29FUky/A==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", - "@changesets/config": "^3.0.1", + "@changesets/config": "^3.0.2", "@changesets/get-version-range-type": "^0.4.0", "@changesets/git": "^3.0.0", "@changesets/should-skip-package": "^0.1.0", @@ -2282,7 +2282,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2291,15 +2290,14 @@ } }, "node_modules/@changesets/assemble-release-plan": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.2.tgz", - "integrity": "sha512-n9/Tdq+ze+iUtjmq0mZO3pEhJTKkku9hUxtUadW30jlN7kONqJG3O6ALeXrmc6gsi/nvoCuKjqEJ68Hk8RbMTQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.3.tgz", + "integrity": "sha512-bLNh9/Lgl1VwkjWZTq8JmRqH+hj7/Yzfz0jsQ/zJJ+FTmVqmqPj3szeKOri8O/hEM8JmHW019vh2gTO9iq5Cuw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.0", + "@changesets/get-dependents-graph": "^2.1.1", "@changesets/should-skip-package": "^0.1.0", "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", @@ -2311,7 +2309,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2330,20 +2327,19 @@ } }, "node_modules/@changesets/cli": { - "version": "2.27.6", - "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.27.6.tgz", - "integrity": "sha512-PB7KS5JkCQ4WSXlnfThn8CXAHVwYxFdZvYTimhi12fls/tzj9iimUhKsYwkrKSbw1AiVlGCZtihj5Wkt6siIjA==", + "version": "2.27.7", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.27.7.tgz", + "integrity": "sha512-6lr8JltiiXPIjDeYg4iM2MeePP6VN/JkmqBsVA5XRiy01hGS3y629LtSDvKcycj/w/5Eur1rEwby/MjcYS+e2A==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", - "@changesets/apply-release-plan": "^7.0.3", - "@changesets/assemble-release-plan": "^6.0.2", + "@changesets/apply-release-plan": "^7.0.4", + "@changesets/assemble-release-plan": "^6.0.3", "@changesets/changelog-git": "^0.2.0", - "@changesets/config": "^3.0.1", + "@changesets/config": "^3.0.2", "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.0", - "@changesets/get-release-plan": "^4.0.2", + "@changesets/get-dependents-graph": "^2.1.1", + "@changesets/get-release-plan": "^4.0.3", "@changesets/git": "^3.0.0", "@changesets/logger": "^0.1.0", "@changesets/pre": "^2.0.0", @@ -2387,14 +2383,13 @@ } }, "node_modules/@changesets/config": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.0.1.tgz", - "integrity": "sha512-nCr8pOemUjvGJ8aUu8TYVjqnUL+++bFOQHBVmtNbLvKzIDkN/uiP/Z4RKmr7NNaiujIURHySDEGFPftR4GbTUA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.0.2.tgz", + "integrity": "sha512-cdEhS4t8woKCX2M8AotcV2BOWnBp09sqICxKapgLHf9m5KdENpWjyrFNMjkLqGJtUys9U+w93OxWT0czorVDfw==", "dev": true, - "license": "MIT", "dependencies": { "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.0", + "@changesets/get-dependents-graph": "^2.1.1", "@changesets/logger": "^0.1.0", "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", @@ -2407,17 +2402,15 @@ "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", "dev": true, - "license": "MIT", "dependencies": { "extendable-error": "^0.1.5" } }, "node_modules/@changesets/get-dependents-graph": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.0.tgz", - "integrity": "sha512-QOt6pQq9RVXKGHPVvyKimJDYJumx7p4DO5MO9AhRJYgAPgv0emhNqAqqysSVKHBm4sxKlGN4S1zXOIb5yCFuhQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.1.tgz", + "integrity": "sha512-LRFjjvigBSzfnPU2n/AhFsuWR5DK++1x47aq6qZ8dzYsPtS/I5mNhIGAS68IAxh1xjO9BTtz55FwefhANZ+FCA==", "dev": true, - "license": "MIT", "dependencies": { "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", @@ -2431,7 +2424,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2440,15 +2432,14 @@ } }, "node_modules/@changesets/get-release-plan": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.2.tgz", - "integrity": "sha512-rOalz7nMuMV2vyeP7KBeAhqEB7FM2GFPO5RQSoOoUKKH9L6wW3QyPA2K+/rG9kBrWl2HckPVES73/AuwPvbH3w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.3.tgz", + "integrity": "sha512-6PLgvOIwTSdJPTtpdcr3sLtGatT+Jr22+cQwEBJBy6wP0rjB4yJ9lv583J9fVpn1bfQlBkDa8JxbS2g/n9lIyA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", - "@changesets/assemble-release-plan": "^6.0.2", - "@changesets/config": "^3.0.1", + "@changesets/assemble-release-plan": "^6.0.3", + "@changesets/config": "^3.0.2", "@changesets/pre": "^2.0.0", "@changesets/read": "^0.6.0", "@changesets/types": "^6.0.0", @@ -2459,15 +2450,13 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz", "integrity": "sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@changesets/git": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.0.tgz", "integrity": "sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", "@changesets/errors": "^0.2.0", @@ -2483,7 +2472,6 @@ "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.0.tgz", "integrity": "sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^2.1.0" } @@ -2493,7 +2481,6 @@ "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.0.tgz", "integrity": "sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==", "dev": true, - "license": "MIT", "dependencies": { "@changesets/types": "^6.0.0", "js-yaml": "^3.13.1" @@ -2504,7 +2491,6 @@ "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.0.tgz", "integrity": "sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", "@changesets/errors": "^0.2.0", @@ -2518,7 +2504,6 @@ "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.0.tgz", "integrity": "sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", "@changesets/git": "^3.0.0", @@ -2535,7 +2520,6 @@ "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.0.tgz", "integrity": "sha512-FxG6Mhjw7yFStlSM7Z0Gmg3RiyQ98d/9VpQAZ3Fzr59dCOM9G6ZdYbjiSAt0XtFr9JR5U2tBaJWPjrkGGc618g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", "@changesets/types": "^6.0.0", @@ -3021,7 +3005,6 @@ "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.5.5", "@types/node": "^12.7.1", @@ -3033,15 +3016,13 @@ "version": "12.20.55", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@manypkg/find-root/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -3056,7 +3037,6 @@ "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.5.5", "@changesets/types": "^4.0.1", @@ -3070,15 +3050,13 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@manypkg/get-packages/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -3093,7 +3071,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -3107,7 +3084,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } @@ -3117,7 +3093,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -3828,7 +3803,6 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -4057,7 +4031,6 @@ "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", "dev": true, - "license": "MIT", "dependencies": { "is-windows": "^1.0.0" }, @@ -4291,6 +4264,15 @@ "node": ">=4" } }, + "node_modules/changeset": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/changeset/-/changeset-0.2.6.tgz", + "integrity": "sha512-d21ym9zLPOKMVhIa8ulJo5IV3QR2NNdK6BWuwg48qJA0XSQaMeDjo1UGThcTn7YDmU08j3UpKyFNvb3zplk8mw==", + "dependencies": { + "udc": "^1.0.0", + "underscore": "^1.8.3" + } + }, "node_modules/character-entities": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", @@ -4488,7 +4470,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", "dev": true, - "license": "MIT", "dependencies": { "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", @@ -4500,7 +4481,6 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, - "license": "ISC", "dependencies": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" @@ -4510,8 +4490,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/css-declaration-sorter": { "version": "6.4.1", @@ -4841,7 +4820,6 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -4873,7 +4851,6 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -5352,8 +5329,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/external-editor": { "version": "3.1.0", @@ -5375,7 +5351,6 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -5392,7 +5367,6 @@ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, - "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -5741,7 +5715,6 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -5788,7 +5761,6 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -6280,7 +6252,6 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } @@ -6517,7 +6488,6 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6537,7 +6507,6 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -6679,7 +6648,6 @@ "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", "dev": true, - "license": "MIT", "dependencies": { "better-path-resolve": "1.0.0" }, @@ -6737,7 +6705,6 @@ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7306,8 +7273,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/lodash.uniq": { "version": "4.5.0", @@ -7600,7 +7566,6 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } @@ -8407,15 +8372,13 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/p-filter": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", "dev": true, - "license": "MIT", "dependencies": { "p-map": "^2.0.0" }, @@ -8467,7 +8430,6 @@ "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -9450,8 +9412,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/punycode.js": { "version": "2.3.1", @@ -9481,8 +9442,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/randombytes": { "version": "2.1.0", @@ -9505,7 +9465,6 @@ "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.1.5", "js-yaml": "^3.6.1", @@ -9725,7 +9684,6 @@ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -10095,7 +10053,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -10244,7 +10201,6 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^1.0.0" }, @@ -10257,7 +10213,6 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10336,8 +10291,7 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/slash": { "version": "3.0.0", @@ -10402,7 +10356,6 @@ "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^5.1.0", "signal-exit": "^3.0.2" @@ -11016,6 +10969,11 @@ "dev": true, "license": "MIT" }, + "node_modules/udc": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/udc/-/udc-1.0.1.tgz", + "integrity": "sha512-jv+D9de1flsum5QkFtBdjyppCQAdz9kTck/0xST5Vx48T9LL2BYnw0Iw77dSKDQ9KZ/PS3qPO1vfXHDpLZlxcQ==" + }, "node_modules/ufo": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", @@ -11052,6 +11010,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -11531,7 +11494,6 @@ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, diff --git a/package.json b/package.json index 19e24d5..d2471d5 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@babel/preset-env": "^7.24.0", "@babel/preset-typescript": "^7.23.3", "@biomejs/biome": "1.8.2", - "@changesets/cli": "^2.27.1", + "@changesets/cli": "^2.27.7", "@trbn/jsoncanvas": "^1.0.6", "@types/node": "^20.11.24", "@vitest/coverage-v8": "^1.3.1", @@ -95,6 +95,7 @@ }, "dependencies": { "@types/hast-format": "^2.3.0", + "changeset": "^0.2.6", "hast-util-to-html": "^9.0.1", "hastscript": "^9.0.0", "mdast-util-from-markdown": "^2.0.1", diff --git a/src/jsoncanvas.ts b/src/jsoncanvas.ts index 08a7122..c421355 100644 --- a/src/jsoncanvas.ts +++ b/src/jsoncanvas.ts @@ -7,13 +7,13 @@ import { type Options, applyDefaults } from "./options" import { drawEmbedded, drawMarkdownEmbed } from "./embed" -function calculateMinimumCanvasSize(canvas: JSONCanvas) { +function calculateMinimumCanvasSize(jsc: JSONCanvas) { let minX = Number.POSITIVE_INFINITY let minY = Number.POSITIVE_INFINITY let maxX = Number.NEGATIVE_INFINITY let maxY = Number.NEGATIVE_INFINITY - for (const node in canvas.getNodes()) { + for (const node of jsc.getNodes()) { minX = Math.min(minX, node.x) minY = Math.min(minY, node.y) maxX = Math.max(maxX, node.x + node.width) @@ -47,12 +47,12 @@ export function render( if (svg === null) return null // Draw nodes - for (const node in jsc.getNodes()) { + for (const node of jsc.getNodes()) { drawNode(svg, node, options) } // Draw Edges - for (const edge in jsc.getEdges()) { + for (const edge of jsc.getEdges()) { const fromNode = jsc.getNodes().find((node) => node.id === edge.fromNode) const toNode = jsc.getNodes().find((node) => node.id === edge.toNode) if (toNode !== undefined && fromNode !== undefined) @@ -151,7 +151,7 @@ async function drawNode( drawEmbedded(svg, group, node) drawMarkdownEmbed(svg, group, node) - // ctx.fillStyle = "rgba(0, 0, 0, 1)"; + // Group Label if (node.label) { const t = s( "text", @@ -167,6 +167,7 @@ async function drawNode( group.children.push(t) } + // Node within a rect if (node.type === "text" && node.text) { const t = s( "text",