diff --git a/.github/workflows/ci-validate-pr.yml b/.github/workflows/ci-validate-pr.yml index 69b484df..30d767ad 100644 --- a/.github/workflows/ci-validate-pr.yml +++ b/.github/workflows/ci-validate-pr.yml @@ -41,6 +41,9 @@ jobs: - name: Check for the presence of changed files inside ./change run: npm run checkchange + + - name: Build all packages + run: npm run build - name: Validate workspaces run: npm run test diff --git a/change/@adaptive-web-adaptive-ui-9435dadf-6d12-4915-9466-dd24533274aa.json b/change/@adaptive-web-adaptive-ui-9435dadf-6d12-4915-9466-dd24533274aa.json new file mode 100644 index 00000000..70c41ea4 --- /dev/null +++ b/change/@adaptive-web-adaptive-ui-9435dadf-6d12-4915-9466-dd24533274aa.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Adds stylesheet generation from JSON anatomy", + "packageName": "@adaptive-web/adaptive-ui", + "email": "nicholasrice@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@adaptive-web-adaptive-ui-designer-core-7c2a3ded-5385-4952-897c-53aa895bfaca.json b/change/@adaptive-web-adaptive-ui-designer-core-7c2a3ded-5385-4952-897c-53aa895bfaca.json new file mode 100644 index 00000000..930b5a65 --- /dev/null +++ b/change/@adaptive-web-adaptive-ui-designer-core-7c2a3ded-5385-4952-897c-53aa895bfaca.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Initial package creation", + "packageName": "@adaptive-web/adaptive-ui-designer-core", + "email": "nicholasrice@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@adaptive-web-adaptive-ui-designer-figma-2970b0fd-66c9-45a2-bbe8-a7ea479f0a96.json b/change/@adaptive-web-adaptive-ui-designer-figma-2970b0fd-66c9-45a2-bbe8-a7ea479f0a96.json new file mode 100644 index 00000000..ca0ca295 --- /dev/null +++ b/change/@adaptive-web-adaptive-ui-designer-figma-2970b0fd-66c9-45a2-bbe8-a7ea479f0a96.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Initial package creation", + "packageName": "@adaptive-web/adaptive-ui-designer-figma", + "email": "nicholasrice@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/package-lock.json b/package-lock.json index 58666065..cd6953fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,10 @@ "workspaces": [ "./packages/adaptive-ui", "./packages/adaptive-web-components", + "./packages/adaptive-ui-designer-core", "./packages/adaptive-ui-explorer", - "./packages/adaptive-ui-figma-designer", + "./packages/adaptive-ui-designer-figma", + "./packages/adaptive-ui-designer-figma-plugin", "./examples/*" ], "devDependencies": { @@ -1037,12 +1039,20 @@ "resolved": "packages/adaptive-ui", "link": true }, - "node_modules/@adaptive-web/adaptive-ui-explorer": { - "resolved": "packages/adaptive-ui-explorer", + "node_modules/@adaptive-web/adaptive-ui-designer-core": { + "resolved": "packages/adaptive-ui-designer-core", "link": true }, - "node_modules/@adaptive-web/adaptive-ui-figma-designer": { - "resolved": "packages/adaptive-ui-figma-designer", + "node_modules/@adaptive-web/adaptive-ui-designer-figma": { + "resolved": "packages/adaptive-ui-designer-figma", + "link": true + }, + "node_modules/@adaptive-web/adaptive-ui-designer-figma-plugin": { + "resolved": "packages/adaptive-ui-designer-figma-plugin", + "link": true + }, + "node_modules/@adaptive-web/adaptive-ui-explorer": { + "resolved": "packages/adaptive-ui-explorer", "link": true }, "node_modules/@adaptive-web/adaptive-web-components": { @@ -3516,6 +3526,12 @@ "integrity": "sha512-dosTVp5wj8u0pn5/pP+Ii7u/iurwbhEkT9kNbxkyrRf59cjsfbMKw5i7PyRrOUOyBmsH3edhCfh9jMff7G6tjQ==", "dev": true }, + "node_modules/@figma/rest-api-spec": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@figma/rest-api-spec/-/rest-api-spec-0.13.0.tgz", + "integrity": "sha512-MxkWwH1POcqniItTXVYtUZQJUtrFpF6g93+eTbop52U/ffEP/vt9SqAmDyhOT0S75hscIGMiimPbMrPM5KyMiw==", + "dev": true + }, "node_modules/@floating-ui/core": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.1.0.tgz", @@ -3586,6 +3602,14 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@inquirer/figures": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.2.tgz", + "integrity": "sha512-4F1MBwVr3c/m4bAUef6LgkvBfSjzwH+OfldgHqcuacWwSUetFebM2wi58WfG9uk1rR98U6GwLed4asLJbwdV5w==", + "engines": { + "node": ">=18" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -3973,33 +3997,33 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -4012,13 +4036,24 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@ljharb/through": { + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz", + "integrity": "sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/@mdx-js/mdx": { @@ -13052,6 +13087,15 @@ "node": ">=10.13.0" } }, + "node_modules/@types/ajv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/ajv/-/ajv-1.0.0.tgz", + "integrity": "sha512-yGSqw9/QKd5FXbTNrSANcJ6IHWeNhA+gokXqmlPquJgLDC87d4g2FGPs+AlCeGG0GuZXmPq42hOFA2hnPymCLw==", + "deprecated": "This is a stub types definition for ajv (https://github.com/epoberezkin/ajv). ajv provides its own type definitions, so you don't need @types/ajv installed!", + "dependencies": { + "ajv": "*" + } + }, "node_modules/@types/argparse": { "version": "1.0.38", "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", @@ -13139,6 +13183,16 @@ "integrity": "sha512-h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w==", "dev": true }, + "node_modules/@types/inquirer": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-9.0.7.tgz", + "integrity": "sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==", + "dev": true, + "dependencies": { + "@types/through": "*", + "rxjs": "^7.2.0" + } + }, "node_modules/@types/is-function": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/is-function/-/is-function-1.0.1.tgz", @@ -13316,6 +13370,15 @@ "integrity": "sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ==", "dev": true }, + "node_modules/@types/through": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.33.tgz", + "integrity": "sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/trusted-types": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", @@ -14126,7 +14189,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -14174,6 +14236,31 @@ "node": ">=6" } }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-html-community": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", @@ -14190,7 +14277,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -14892,7 +14978,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -15074,6 +15159,39 @@ "file-uri-to-path": "1.0.0" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -15397,9 +15515,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -15409,13 +15527,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -15578,13 +15700,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -15661,9 +15788,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001441", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", - "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", + "version": "1.0.30001621", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz", + "integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==", "dev": true, "funding": [ { @@ -15673,6 +15800,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -15780,6 +15911,11 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, "node_modules/check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -15987,6 +16123,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-table3": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", @@ -16002,6 +16160,14 @@ "@colors/colors": "1.5.0" } }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "engines": { + "node": ">= 12" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -16013,6 +16179,14 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -17394,6 +17568,33 @@ "node": ">=0.10.0" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -17772,9 +17973,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.778", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.778.tgz", + "integrity": "sha512-C6q/xcUJf/2yODRxAVCfIk4j3y3LMsD0ehiE2RQNV2cxc8XU62gR6vvYh3+etSUzlgTfil+qDHI1vubpdf0TOA==", "dev": true }, "node_modules/elliptic": { @@ -17801,8 +18002,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/emojis-list": { "version": "3.0.0", @@ -18001,6 +18201,25 @@ "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", "dev": true }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-get-iterator": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.2.tgz", @@ -18105,9 +18324,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -18917,6 +19136,19 @@ "node": ">=0.10.0" } }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", @@ -18981,8 +19213,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { "version": "3.3.2", @@ -19003,8 +19234,7 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -19771,10 +20001,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -19851,14 +20083,18 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", - "dev": true, + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -20065,7 +20301,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -20249,12 +20484,22 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -20264,7 +20509,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -20406,6 +20650,17 @@ "minimalistic-assert": "^1.0.1" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hast-to-hyperscript": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", @@ -20820,7 +21075,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -20844,7 +21098,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -20955,8 +21208,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/inline-style-parser": { "version": "0.1.1", @@ -20964,6 +21216,85 @@ "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", "dev": true }, + "node_modules/inquirer": { + "version": "9.2.22", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.22.tgz", + "integrity": "sha512-SqLLa/Oe5rZUagTR9z+Zd6izyatHglbmbvVofo1KzuVB54YHleWzeHNLoR7FOICGOeQSqeLh1cordb3MzhGcEw==", + "dependencies": { + "@inquirer/figures": "^1.0.2", + "@ljharb/through": "^2.3.13", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/inquirer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/inquirer/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/internal-slot": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", @@ -21282,7 +21613,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -21315,6 +21645,14 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -21524,7 +21862,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, "engines": { "node": ">=10" }, @@ -22101,8 +22438,7 @@ "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -22327,8 +22663,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.camelcase": { "version": "4.3.0", @@ -22370,7 +22705,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -22386,7 +22720,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -22401,7 +22734,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -22417,7 +22749,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -22428,14 +22759,12 @@ "node_modules/log-symbols/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/log-symbols/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -22444,7 +22773,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -24002,7 +24330,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, "engines": { "node": ">=6" } @@ -24449,6 +24776,14 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", @@ -24817,9 +25152,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", - "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/nopt": { @@ -25401,7 +25736,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -25446,6 +25780,92 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ora/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -25462,6 +25882,14 @@ "node": ">=0.10.0" } }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-all": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-all/-/p-all-2.1.0.tgz", @@ -26436,7 +26864,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, "engines": { "node": ">=6" } @@ -26769,7 +27196,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -27500,6 +27926,14 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -27560,6 +27994,18 @@ "deprecated": "https://github.com/lydell/resolve-url#deprecated", "dev": true }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -27713,6 +28159,14 @@ "node": "6.* || >= 7.*" } }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -27752,10 +28206,9 @@ "dev": true }, "node_modules/rxjs": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", - "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", - "dev": true, + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dependencies": { "tslib": "^2.1.0" } @@ -27804,8 +28257,7 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sane": { "version": "4.1.0", @@ -28259,6 +28711,22 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -28379,8 +28847,7 @@ "node_modules/signal-exit": { "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 + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/simple-html-tokenizer": { "version": "0.1.1", @@ -29091,7 +29558,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -29100,7 +29566,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -29129,7 +29594,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -29239,7 +29703,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -29821,6 +30284,17 @@ "node": ">=0.6.0" } }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -30565,9 +31039,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "dev": true, "funding": [ { @@ -30577,30 +31051,33 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" } }, "node_modules/update-browserslist-db/node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -30704,8 +31181,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/util.promisify": { "version": "1.0.0", @@ -31246,6 +31722,14 @@ "node": ">=0.10.0" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/web-namespaces": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", @@ -32198,152 +32682,58 @@ "typescript": "^4.7.0" } }, - "packages/adaptive-ui-explorer": { - "name": "@adaptive-web/adaptive-ui-explorer", - "version": "0.0.1", + "packages/adaptive-ui-designer-core": { + "name": "@adaptive-web/adaptive-ui-designer-core", + "version": "0.0.0", "license": "MIT", "dependencies": { - "@adaptive-web/adaptive-ui": "0.3.0", - "@adaptive-web/adaptive-web-components": "0.5.0", - "@microsoft/fast-element": "2.0.0-beta.26", - "@microsoft/fast-foundation": "3.0.0-alpha.31", - "culori": "^3.2.0" + "@adaptive-web/adaptive-ui": "^0.3.0", + "@microsoft/fast-foundation": "^3.0.0-alpha.31" }, "devDependencies": { - "rimraf": "^3.0.2", - "typescript": "^4.7.0", - "vite": "^4.2.3" + "typescript": "^5.4.5" } }, - "packages/adaptive-ui-explorer/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "packages/adaptive-ui-designer-core/node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, - "optional": true, - "peer": true, "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "packages/adaptive-ui-explorer/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "optional": true, - "peer": true - }, - "packages/adaptive-ui-explorer/node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "packages/adaptive-ui-explorer/node_modules/postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "packages/adaptive-ui-explorer/node_modules/terser": { - "version": "5.16.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.3.tgz", - "integrity": "sha512-v8wWLaS/xt3nE9dgKEWhNUFP6q4kngO5B8eYFUuebsu7Dw/UNAnpUod6UHo04jSSkv8TzKHjZDSd7EXdDQAl8Q==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=10" + "node": ">=14.17" } }, - "packages/adaptive-ui-explorer/node_modules/vite": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", - "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", - "dev": true, + "packages/adaptive-ui-designer-figma": { + "name": "@adaptive-web/adaptive-ui-designer-figma", + "version": "0.0.0", + "license": "MIT", "dependencies": { - "esbuild": "^0.17.5", - "postcss": "^8.4.23", - "rollup": "^3.21.0" + "@adaptive-web/adaptive-ui": "^0.3.0", + "@adaptive-web/adaptive-ui-designer-core": "^0.0.0", + "@types/ajv": "^1.0.0", + "ajv": "^8.13.0", + "change-case": "^5.4.4", + "inquirer": "^9.2.22" }, "bin": { - "vite": "bin/vite.js" + "aui-figma-compiler": "bin/aui-figma-compiler.js" }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } + "devDependencies": { + "@figma/rest-api-spec": "^0.13.0", + "@types/inquirer": "^9.0.7" } }, - "packages/adaptive-ui-figma-designer": { - "name": "@adaptive-web/adaptive-ui-figma-designer", + "packages/adaptive-ui-designer-figma-plugin": { + "name": "@adaptive-web/adaptive-ui-designer-figma-plugin", "version": "0.0.1", "license": "MIT", "dependencies": { + "@adaptive-web/adaptive-ui-designer-core": "^0.0.0", + "@adaptive-web/adaptive-ui-designer-figma": "^0.0.0", "@adaptive-web/adaptive-web-components": "0.5.0", "change-case": "^5.4.4", "culori": "^3.2.0" @@ -32367,10 +32757,362 @@ "@microsoft/fast-foundation": "3.0.0-alpha.31" } }, - "packages/adaptive-ui-figma-designer/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "optional": true, "peer": true, @@ -32381,7 +33123,7 @@ "node": ">=0.4.0" } }, - "packages/adaptive-ui-figma-designer/node_modules/commander": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", @@ -32389,7 +33131,7 @@ "optional": true, "peer": true }, - "packages/adaptive-ui-figma-designer/node_modules/css-select": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", @@ -32405,7 +33147,7 @@ "url": "https://github.com/sponsors/fb55" } }, - "packages/adaptive-ui-figma-designer/node_modules/css-tree": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", @@ -32418,7 +33160,7 @@ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" } }, - "packages/adaptive-ui-figma-designer/node_modules/csso": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/csso": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", @@ -32431,7 +33173,7 @@ "npm": ">=7.0.0" } }, - "packages/adaptive-ui-figma-designer/node_modules/csso/node_modules/css-tree": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/csso/node_modules/css-tree": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", @@ -32445,13 +33187,13 @@ "npm": ">=7.0.0" } }, - "packages/adaptive-ui-figma-designer/node_modules/csso/node_modules/mdn-data": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/csso/node_modules/mdn-data": { "version": "2.0.28", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", "dev": true }, - "packages/adaptive-ui-figma-designer/node_modules/dom-serializer": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", @@ -32465,7 +33207,7 @@ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "packages/adaptive-ui-figma-designer/node_modules/domhandler": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/domhandler": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", @@ -32480,24 +33222,24 @@ "url": "https://github.com/fb55/domhandler?sponsor=1" } }, - "packages/adaptive-ui-figma-designer/node_modules/domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" + "domhandler": "^5.0.3" }, "funding": { "url": "https://github.com/fb55/domutils?sponsor=1" } }, - "packages/adaptive-ui-figma-designer/node_modules/entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "engines": { "node": ">=0.12" @@ -32506,22 +33248,22 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "packages/adaptive-ui-figma-designer/node_modules/mdn-data": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", "dev": true }, - "packages/adaptive-ui-figma-designer/node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, - "packages/adaptive-ui-figma-designer/node_modules/postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { @@ -32538,25 +33280,26 @@ } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" } }, - "packages/adaptive-ui-figma-designer/node_modules/svgo": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.2.tgz", - "integrity": "sha512-Z706C1U2pb1+JGP48fbazf3KxHrWOsLme6Rv7imFBn5EnuanDW1GPaA/P1/dvObE670JDePC3mnj0k0B7P0jjQ==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/svgo": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.4.tgz", + "integrity": "sha512-T+Xul3JwuJ6VGXKo/p2ndqx1ibxNKnLTvRc1ZTWKCfyKS/GgNjRZcYsK84fxTsy/izr91g/Rwx6fGnVgaFSI5g==", "dev": true, "dependencies": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^5.1.0", "css-tree": "^2.2.1", - "csso": "^5.0.5", + "css-what": "^6.1.0", + "csso": "5.0.5", "picocolors": "^1.0.0" }, "bin": { @@ -32570,7 +33313,7 @@ "url": "https://opencollective.com/svgo" } }, - "packages/adaptive-ui-figma-designer/node_modules/svgo/node_modules/commander": { + "packages/adaptive-ui-designer-figma-plugin/node_modules/svgo/node_modules/commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", @@ -32579,16 +33322,16 @@ "node": ">= 10" } }, - "packages/adaptive-ui-figma-designer/node_modules/terser": { - "version": "5.16.5", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.5.tgz", - "integrity": "sha512-qcwfg4+RZa3YvlFh0qjifnzBHjKGNbtDo9yivMqMFDy9Q6FSaQWSB/j1xKhsoUFJIqDOM3TsN6D5xbrMrFcHbg==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/terser": { + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", + "integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==", "dev": true, "optional": true, "peer": true, "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -32599,15 +33342,15 @@ "node": ">=10" } }, - "packages/adaptive-ui-figma-designer/node_modules/vite": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", - "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/vite": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.3.tgz", + "integrity": "sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==", "dev": true, "dependencies": { - "esbuild": "^0.17.5", - "postcss": "^8.4.23", - "rollup": "^3.21.0" + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "bin": { "vite": "bin/vite.js" @@ -32615,12 +33358,16 @@ "engines": { "node": "^14.18.0 || >=16.0.0" }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@types/node": ">= 14", "less": "*", + "lightningcss": "^1.21.0", "sass": "*", "stylus": "*", "sugarss": "*", @@ -32633,6 +33380,9 @@ "less": { "optional": true }, + "lightningcss": { + "optional": true + }, "sass": { "optional": true }, @@ -32647,10 +33397,10 @@ } } }, - "packages/adaptive-ui-figma-designer/node_modules/vite-plugin-singlefile": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-0.13.3.tgz", - "integrity": "sha512-5rfYJKnFa4h1E/uas6k7f8Ku9NRdL4SCPYaVlAwt4khYJ5yzQcs9xRRIha/OXVyVL2iDSPRMRqoijjGPVURR0w==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/vite-plugin-singlefile": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-0.13.5.tgz", + "integrity": "sha512-y/aRGh8qHmw2f1IhaI/C6PJAaov47ESYDvUv1am1YHMhpY+19B5k5Odp8P+tgs+zhfvak6QB1ykrALQErEAo7g==", "dev": true, "dependencies": { "micromatch": "^4.0.5" @@ -32663,19 +33413,248 @@ "vite": ">=3.2.0" } }, - "packages/adaptive-ui-figma-designer/node_modules/vite-plugin-svgo": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/vite-plugin-svgo/-/vite-plugin-svgo-1.3.0.tgz", - "integrity": "sha512-GPc8QYOKUuEGVM3WPEB1NDPW82QFRt6hImPgEgt3vP8IRQuhB+AcEYixxt+iLJPsZ3qgCBFLTLYsVxKC0SN5Ng==", + "packages/adaptive-ui-designer-figma-plugin/node_modules/vite-plugin-svgo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/vite-plugin-svgo/-/vite-plugin-svgo-1.4.0.tgz", + "integrity": "sha512-ZBXydVOVkpLftdYG55DIcgUZDNgEu41RAwjzrqdtZkMzpxvDD8s5pQkxTLy4nj9wD6AWtevNRvA2SdSJLFe6Iw==", "dev": true, "dependencies": { - "svgo": "3.0.2" + "svgo": "3.0.4" }, "peerDependencies": { "typescript": ">=4.9.4", "vite": ">=4.0.2" } }, + "packages/adaptive-ui-designer-figma-plugin/node_modules/vite/node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "packages/adaptive-ui-designer-figma/node_modules/ajv": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", + "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "packages/adaptive-ui-designer-figma/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "packages/adaptive-ui-explorer": { + "name": "@adaptive-web/adaptive-ui-explorer", + "version": "0.0.1", + "license": "MIT", + "dependencies": { + "@adaptive-web/adaptive-ui": "0.3.0", + "@adaptive-web/adaptive-web-components": "0.5.0", + "@microsoft/fast-element": "2.0.0-beta.26", + "@microsoft/fast-foundation": "3.0.0-alpha.31", + "culori": "^3.2.0" + }, + "devDependencies": { + "rimraf": "^3.0.2", + "typescript": "^4.7.0", + "vite": "^4.2.3" + } + }, + "packages/adaptive-ui-explorer/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "optional": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "packages/adaptive-ui-explorer/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true, + "peer": true + }, + "packages/adaptive-ui-explorer/node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "packages/adaptive-ui-explorer/node_modules/postcss": { + "version": "8.4.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", + "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "packages/adaptive-ui-explorer/node_modules/terser": { + "version": "5.16.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.3.tgz", + "integrity": "sha512-v8wWLaS/xt3nE9dgKEWhNUFP6q4kngO5B8eYFUuebsu7Dw/UNAnpUod6UHo04jSSkv8TzKHjZDSd7EXdDQAl8Q==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "packages/adaptive-ui-explorer/node_modules/vite": { + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", + "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", + "dev": true, + "dependencies": { + "esbuild": "^0.17.5", + "postcss": "^8.4.23", + "rollup": "^3.21.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "packages/adaptive-ui-figma-designer": { + "name": "@adaptive-web/adaptive-ui-figma-designer", + "version": "0.0.1", + "extraneous": true, + "license": "MIT", + "dependencies": { + "@adaptive-web/adaptive-ui-designer-core": "^0.0.0", + "@adaptive-web/adaptive-ui-designer-figma": "^0.0.0", + "@adaptive-web/adaptive-web-components": "0.5.0", + "change-case": "^5.4.4", + "culori": "^3.2.0" + }, + "devDependencies": { + "@csstools/css-calc": "^1.1.1", + "@csstools/css-parser-algorithms": "^2.2.0", + "@csstools/css-tokenizer": "^2.1.1", + "@figma/plugin-typings": "^1.80.0", + "concurrently": "^7.6.0", + "esbuild": "^0.17.10", + "rimraf": "^3.0.2", + "typescript": "^4.7.0", + "vite": "^4.2.3", + "vite-plugin-singlefile": "^0.13.3", + "vite-plugin-svgo": "^1.3.0" + }, + "peerDependencies": { + "@adaptive-web/adaptive-ui": "0.3.0", + "@microsoft/fast-element": "2.0.0-beta.26", + "@microsoft/fast-foundation": "3.0.0-alpha.31" + } + }, "packages/adaptive-ui/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -32935,6 +33914,19 @@ "node": ">=10" } }, + "packages/figma": { + "name": "@adaptive-web/figma", + "version": "0.0.0", + "extraneous": true, + "license": "MIT", + "dependencies": { + "@adaptive-web/adaptive-ui": "^0.3.0", + "change-case": "^5.4.4" + }, + "devDependencies": { + "@figma/rest-api-spec": "^0.13.0" + } + }, "packages/utilities": { "version": "0.0.0", "extraneous": true, @@ -33024,83 +34016,58 @@ } } }, - "@adaptive-web/adaptive-ui-explorer": { - "version": "file:packages/adaptive-ui-explorer", + "@adaptive-web/adaptive-ui-designer-core": { + "version": "file:packages/adaptive-ui-designer-core", "requires": { - "@adaptive-web/adaptive-ui": "0.3.0", - "@adaptive-web/adaptive-web-components": "0.5.0", - "@microsoft/fast-element": "2.0.0-beta.26", - "@microsoft/fast-foundation": "3.0.0-alpha.31", - "culori": "^3.2.0", - "rimraf": "^3.0.2", - "typescript": "^4.7.0", - "vite": "^4.2.3" + "@adaptive-web/adaptive-ui": "^0.3.0", + "@microsoft/fast-foundation": "^3.0.0-alpha.31", + "typescript": "^5.4.5" }, "dependencies": { - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "optional": true, - "peer": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "optional": true, - "peer": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true - }, - "postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", - "dev": true, - "requires": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - } - }, - "terser": { - "version": "5.16.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.3.tgz", - "integrity": "sha512-v8wWLaS/xt3nE9dgKEWhNUFP6q4kngO5B8eYFUuebsu7Dw/UNAnpUod6UHo04jSSkv8TzKHjZDSd7EXdDQAl8Q==", - "dev": true, - "optional": true, - "peer": true, + } + } + }, + "@adaptive-web/adaptive-ui-designer-figma": { + "version": "file:packages/adaptive-ui-designer-figma", + "requires": { + "@adaptive-web/adaptive-ui": "^0.3.0", + "@adaptive-web/adaptive-ui-designer-core": "^0.0.0", + "@figma/rest-api-spec": "^0.13.0", + "@types/ajv": "^1.0.0", + "@types/inquirer": "^9.0.7", + "ajv": "^8.13.0", + "change-case": "^5.4.4", + "inquirer": "^9.2.22" + }, + "dependencies": { + "ajv": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", + "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" } }, - "vite": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", - "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", - "dev": true, - "requires": { - "esbuild": "^0.17.5", - "fsevents": "~2.3.2", - "postcss": "^8.4.23", - "rollup": "^3.21.0" - } + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" } } }, - "@adaptive-web/adaptive-ui-figma-designer": { - "version": "file:packages/adaptive-ui-figma-designer", + "@adaptive-web/adaptive-ui-designer-figma-plugin": { + "version": "file:packages/adaptive-ui-designer-figma-plugin", "requires": { + "@adaptive-web/adaptive-ui-designer-core": "^0.0.0", + "@adaptive-web/adaptive-ui-designer-figma": "^0.0.0", "@adaptive-web/adaptive-web-components": "0.5.0", "@csstools/css-calc": "^1.1.1", "@csstools/css-parser-algorithms": "^2.2.0", @@ -33117,10 +34084,164 @@ "vite-plugin-svgo": "^1.3.0" }, "dependencies": { + "@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "dev": true, + "optional": true + }, "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "optional": true, "peer": true @@ -33204,20 +34325,20 @@ } }, "domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, "requires": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" + "domhandler": "^5.0.3" } }, "entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true }, "mdn-data": { @@ -33227,33 +34348,34 @@ "dev": true }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "requires": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" } }, "svgo": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.2.tgz", - "integrity": "sha512-Z706C1U2pb1+JGP48fbazf3KxHrWOsLme6Rv7imFBn5EnuanDW1GPaA/P1/dvObE670JDePC3mnj0k0B7P0jjQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.4.tgz", + "integrity": "sha512-T+Xul3JwuJ6VGXKo/p2ndqx1ibxNKnLTvRc1ZTWKCfyKS/GgNjRZcYsK84fxTsy/izr91g/Rwx6fGnVgaFSI5g==", "dev": true, "requires": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^5.1.0", "css-tree": "^2.2.1", - "csso": "^5.0.5", + "css-what": "^6.1.0", + "csso": "5.0.5", "picocolors": "^1.0.0" }, "dependencies": { @@ -33266,47 +34388,153 @@ } }, "terser": { - "version": "5.16.5", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.5.tgz", - "integrity": "sha512-qcwfg4+RZa3YvlFh0qjifnzBHjKGNbtDo9yivMqMFDy9Q6FSaQWSB/j1xKhsoUFJIqDOM3TsN6D5xbrMrFcHbg==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", + "integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==", "dev": true, "optional": true, "peer": true, "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" } }, "vite": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", - "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.3.tgz", + "integrity": "sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==", "dev": true, "requires": { - "esbuild": "^0.17.5", + "esbuild": "^0.18.10", "fsevents": "~2.3.2", - "postcss": "^8.4.23", - "rollup": "^3.21.0" + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "dependencies": { + "esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + } } }, "vite-plugin-singlefile": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-0.13.3.tgz", - "integrity": "sha512-5rfYJKnFa4h1E/uas6k7f8Ku9NRdL4SCPYaVlAwt4khYJ5yzQcs9xRRIha/OXVyVL2iDSPRMRqoijjGPVURR0w==", + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-0.13.5.tgz", + "integrity": "sha512-y/aRGh8qHmw2f1IhaI/C6PJAaov47ESYDvUv1am1YHMhpY+19B5k5Odp8P+tgs+zhfvak6QB1ykrALQErEAo7g==", "dev": true, "requires": { "micromatch": "^4.0.5" } }, "vite-plugin-svgo": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/vite-plugin-svgo/-/vite-plugin-svgo-1.3.0.tgz", - "integrity": "sha512-GPc8QYOKUuEGVM3WPEB1NDPW82QFRt6hImPgEgt3vP8IRQuhB+AcEYixxt+iLJPsZ3qgCBFLTLYsVxKC0SN5Ng==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/vite-plugin-svgo/-/vite-plugin-svgo-1.4.0.tgz", + "integrity": "sha512-ZBXydVOVkpLftdYG55DIcgUZDNgEu41RAwjzrqdtZkMzpxvDD8s5pQkxTLy4nj9wD6AWtevNRvA2SdSJLFe6Iw==", "dev": true, "requires": { - "svgo": "3.0.2" + "svgo": "3.0.4" + } + } + } + }, + "@adaptive-web/adaptive-ui-explorer": { + "version": "file:packages/adaptive-ui-explorer", + "requires": { + "@adaptive-web/adaptive-ui": "0.3.0", + "@adaptive-web/adaptive-web-components": "0.5.0", + "@microsoft/fast-element": "2.0.0-beta.26", + "@microsoft/fast-foundation": "3.0.0-alpha.31", + "culori": "^3.2.0", + "rimraf": "^3.0.2", + "typescript": "^4.7.0", + "vite": "^4.2.3" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "optional": true, + "peer": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true, + "peer": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "postcss": { + "version": "8.4.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", + "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "dev": true, + "requires": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "terser": { + "version": "5.16.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.3.tgz", + "integrity": "sha512-v8wWLaS/xt3nE9dgKEWhNUFP6q4kngO5B8eYFUuebsu7Dw/UNAnpUod6UHo04jSSkv8TzKHjZDSd7EXdDQAl8Q==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + } + }, + "vite": { + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", + "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", + "dev": true, + "requires": { + "esbuild": "^0.17.5", + "fsevents": "~2.3.2", + "postcss": "^8.4.23", + "rollup": "^3.21.0" } } } @@ -35628,6 +36856,12 @@ "integrity": "sha512-dosTVp5wj8u0pn5/pP+Ii7u/iurwbhEkT9kNbxkyrRf59cjsfbMKw5i7PyRrOUOyBmsH3edhCfh9jMff7G6tjQ==", "dev": true }, + "@figma/rest-api-spec": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@figma/rest-api-spec/-/rest-api-spec-0.13.0.tgz", + "integrity": "sha512-MxkWwH1POcqniItTXVYtUZQJUtrFpF6g93+eTbop52U/ffEP/vt9SqAmDyhOT0S75hscIGMiimPbMrPM5KyMiw==", + "dev": true + }, "@floating-ui/core": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.1.0.tgz", @@ -35685,6 +36919,11 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@inquirer/figures": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.2.tgz", + "integrity": "sha512-4F1MBwVr3c/m4bAUef6LgkvBfSjzwH+OfldgHqcuacWwSUetFebM2wi58WfG9uk1rR98U6GwLed4asLJbwdV5w==" + }, "@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -35969,30 +37208,30 @@ "dev": true }, "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true }, "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" } } } @@ -36004,13 +37243,21 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "@ljharb/through": { + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz", + "integrity": "sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==", + "requires": { + "call-bind": "^1.0.7" } }, "@mdx-js/mdx": { @@ -42793,6 +44040,14 @@ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", "dev": true }, + "@types/ajv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/ajv/-/ajv-1.0.0.tgz", + "integrity": "sha512-yGSqw9/QKd5FXbTNrSANcJ6IHWeNhA+gokXqmlPquJgLDC87d4g2FGPs+AlCeGG0GuZXmPq42hOFA2hnPymCLw==", + "requires": { + "ajv": "*" + } + }, "@types/argparse": { "version": "1.0.38", "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", @@ -42880,6 +44135,16 @@ "integrity": "sha512-h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w==", "dev": true }, + "@types/inquirer": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-9.0.7.tgz", + "integrity": "sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==", + "dev": true, + "requires": { + "@types/through": "*", + "rxjs": "^7.2.0" + } + }, "@types/is-function": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/is-function/-/is-function-1.0.1.tgz", @@ -43057,6 +44322,15 @@ "integrity": "sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ==", "dev": true }, + "@types/through": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.33.tgz", + "integrity": "sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/trusted-types": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", @@ -43711,7 +44985,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -43748,6 +45021,21 @@ "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", "dev": true }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + } + } + }, "ansi-html-community": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", @@ -43757,8 +45045,7 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "3.2.1", @@ -44294,8 +45581,7 @@ "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -44425,6 +45711,27 @@ "file-uri-to-path": "1.0.0" } }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } + } + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -44697,15 +46004,15 @@ } }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" } }, "bser": { @@ -44842,13 +46149,15 @@ } }, "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" } }, "call-me-maybe": { @@ -44906,9 +46215,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001441", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", - "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", + "version": "1.0.30001621", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz", + "integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==", "dev": true }, "capture-exit": { @@ -44987,6 +46296,11 @@ "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "dev": true }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -45144,6 +46458,19 @@ "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==" + }, "cli-table3": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", @@ -45154,6 +46481,11 @@ "string-width": "^4.2.0" } }, + "cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==" + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -45165,6 +46497,11 @@ "wrap-ansi": "^7.0.0" } }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==" + }, "clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -46262,6 +47599,24 @@ "untildify": "^2.0.0" } }, + "defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "requires": { + "clone": "^1.0.2" + } + }, + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } + }, "define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -46569,9 +47924,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.778", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.778.tgz", + "integrity": "sha512-C6q/xcUJf/2yODRxAVCfIk4j3y3LMsD0ehiE2RQNV2cxc8XU62gR6vvYh3+etSUzlgTfil+qDHI1vubpdf0TOA==", "dev": true }, "elliptic": { @@ -46600,8 +47955,7 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "emojis-list": { "version": "3.0.0", @@ -46774,6 +48128,19 @@ "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", "dev": true }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, "es-get-iterator": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.2.tgz", @@ -46859,9 +48226,9 @@ } }, "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true }, "escape-html": { @@ -47491,6 +48858,16 @@ "is-extendable": "^1.0.1" } }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", @@ -47542,8 +48919,7 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-glob": { "version": "3.3.2", @@ -47561,8 +48937,7 @@ "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "fast-levenshtein": { "version": "2.0.6", @@ -48174,10 +49549,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "function.prototype.name": { "version": "1.1.5", @@ -48233,14 +49607,15 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", - "dev": true, + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" } }, "get-package-type": { @@ -48393,7 +49768,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "requires": { "get-intrinsic": "^1.1.3" } @@ -48529,19 +49903,22 @@ } }, "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "requires": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" } }, + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, "has-tostringtag": { "version": "1.0.0", @@ -48645,6 +50022,14 @@ "minimalistic-assert": "^1.0.1" } }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } + }, "hast-to-hyperscript": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", @@ -48964,7 +50349,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -48981,8 +50365,7 @@ "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "iferr": { "version": "0.1.5", @@ -49060,8 +50443,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "inline-style-parser": { "version": "0.1.1", @@ -49069,6 +50451,66 @@ "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", "dev": true }, + "inquirer": { + "version": "9.2.22", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.22.tgz", + "integrity": "sha512-SqLLa/Oe5rZUagTR9z+Zd6izyatHglbmbvVofo1KzuVB54YHleWzeHNLoR7FOICGOeQSqeLh1cordb3MzhGcEw==", + "requires": { + "@inquirer/figures": "^1.0.2", + "@ljharb/through": "^2.3.13", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==" + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "internal-slot": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", @@ -49279,8 +50721,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-function": { "version": "1.0.2", @@ -49303,6 +50744,11 @@ "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", "dev": true }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" + }, "is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -49451,8 +50897,7 @@ "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" }, "is-utf8": { "version": "0.2.1", @@ -49881,8 +51326,7 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -50054,8 +51498,7 @@ "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.camelcase": { "version": "4.3.0", @@ -50097,7 +51540,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, "requires": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -50107,7 +51549,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -50116,7 +51557,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -50126,7 +51566,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "requires": { "color-name": "~1.1.4" } @@ -50134,20 +51573,17 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -51237,8 +52673,7 @@ "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "min-document": { "version": "2.19.0", @@ -51594,6 +53029,11 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==" + }, "nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", @@ -51910,9 +53350,9 @@ } }, "node-releases": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", - "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "nopt": { @@ -52365,7 +53805,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "requires": { "mimic-fn": "^2.1.0" } @@ -52395,6 +53834,67 @@ "word-wrap": "^1.2.3" } }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -52408,6 +53908,11 @@ "dev": true, "optional": true }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==" + }, "p-all": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-all/-/p-all-2.1.0.tgz", @@ -53179,8 +54684,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "qs": { "version": "6.11.0", @@ -53419,7 +54923,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -53975,6 +55478,11 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -54021,6 +55529,15 @@ "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", "dev": true }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -54135,6 +55652,11 @@ "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", "dev": true }, + "run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==" + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -54162,10 +55684,9 @@ } }, "rxjs": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", - "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", - "dev": true, + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "requires": { "tslib": "^2.1.0" } @@ -54208,8 +55729,7 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sane": { "version": "4.1.0", @@ -54588,6 +56108,19 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + } + }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -54683,8 +56216,7 @@ "signal-exit": { "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 + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "simple-html-tokenizer": { "version": "0.1.1", @@ -55290,7 +56822,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "requires": { "safe-buffer": "~5.2.0" }, @@ -55298,8 +56829,7 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" } } }, @@ -55313,7 +56843,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -55395,7 +56924,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -55842,6 +57370,14 @@ "setimmediate": "^1.0.4" } }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -56406,19 +57942,19 @@ "optional": true }, "update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "dev": true, "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "dependencies": { "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true } } @@ -56427,7 +57963,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "requires": { "punycode": "^2.1.0" } @@ -56516,8 +58051,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "util.promisify": { "version": "1.0.0", @@ -56971,6 +58505,14 @@ } } }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "requires": { + "defaults": "^1.0.3" + } + }, "web-namespaces": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", diff --git a/package.json b/package.json index 5c5a7df4..afb8ad45 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,10 @@ "workspaces": [ "./packages/adaptive-ui", "./packages/adaptive-web-components", + "./packages/adaptive-ui-designer-core", "./packages/adaptive-ui-explorer", - "./packages/adaptive-ui-figma-designer", + "./packages/adaptive-ui-designer-figma", + "./packages/adaptive-ui-designer-figma-plugin", "./examples/*" ], "engines": { diff --git a/packages/adaptive-ui-designer-core/package.json b/packages/adaptive-ui-designer-core/package.json new file mode 100644 index 00000000..ce238627 --- /dev/null +++ b/packages/adaptive-ui-designer-core/package.json @@ -0,0 +1,37 @@ +{ + "name": "@adaptive-web/adaptive-ui-designer-core", + "version": "0.0.0", + "description": "Core infrastructure for the Adaptive UI Designer", + "main": "dist/esm/index.js", + "exports": { + ".": { + "types": "./dist/dts/index.d.ts", + "default": "./dist/esm/index.js" + } + }, + "type": "module", + "scripts": { + "build": "tsc", + "watch": "tsc --watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/adaptive-web-community/adaptive-web-components.git" + }, + "author": { + "name": "Adaptive Web Community", + "url": "https://github.com/adaptive-web-community" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/adaptive-web-community/adaptive-web-components/issues" + }, + "homepage": "https://github.com/adaptive-web-community/adaptive-web-components#readme", + "dependencies": { + "@adaptive-web/adaptive-ui": "^0.3.0", + "@microsoft/fast-foundation": "^3.0.0-alpha.31" + }, + "devDependencies": { + "typescript": "^5.4.5" + } +} diff --git a/packages/adaptive-ui-figma-designer/src/core/controller.ts b/packages/adaptive-ui-designer-core/src/controller.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/core/controller.ts rename to packages/adaptive-ui-designer-core/src/controller.ts diff --git a/packages/adaptive-ui-designer-core/src/index.ts b/packages/adaptive-ui-designer-core/src/index.ts new file mode 100644 index 00000000..77641d83 --- /dev/null +++ b/packages/adaptive-ui-designer-core/src/index.ts @@ -0,0 +1,19 @@ +export { Controller, PluginUIState, STYLE_REMOVE } from "./controller.js"; +export { + PluginMessage, + PluginNodeData, + AppliedStyleModules, + AppliedStyleValues, + PluginUINodeData, + AdditionalDataKeys, + DesignTokenValue, + AppliedDesignToken, + AppliedStyleValue, + AdditionalData, + AppliedDesignTokens, + DesignTokenValues +} from "./model.js"; +export { mapReplacer, mapReviver, deserializeMap } from "./serialization.js"; +export { State, StatesState, PluginNode, focusIndicatorNodeName, } from "./node.js"; +export { DesignTokenDefinition, DesignTokenRegistry, FormControlId } from "./registry/design-token-registry.js"; +export { nameToTitle, registerAppliableTokens, registerTokens } from "./registry/recipes.js"; diff --git a/packages/adaptive-ui-figma-designer/src/core/model.ts b/packages/adaptive-ui-designer-core/src/model.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/core/model.ts rename to packages/adaptive-ui-designer-core/src/model.ts diff --git a/packages/adaptive-ui-figma-designer/src/core/node.ts b/packages/adaptive-ui-designer-core/src/node.ts similarity index 98% rename from packages/adaptive-ui-figma-designer/src/core/node.ts rename to packages/adaptive-ui-designer-core/src/node.ts index c90ab91d..46330b6f 100644 --- a/packages/adaptive-ui-figma-designer/src/core/node.ts +++ b/packages/adaptive-ui-designer-core/src/node.ts @@ -1,4 +1,3 @@ -import { ValuesOf } from "@microsoft/fast-foundation"; import { StyleProperty } from "@adaptive-web/adaptive-ui"; import { type Color, formatHex8 } from "culori/fn"; import { @@ -14,6 +13,11 @@ import { ReadonlyDesignTokenValues, } from "./model.js"; import { deserializeMap, serializeMap } from "./serialization.js"; +/** + * Helper for enumerating a type from a const object + * Example: export type Foo = ValuesOf\ + */ +type ValuesOf = T[keyof T]; /** * Layer name for special handling of the focus indicator in design tools. diff --git a/packages/adaptive-ui-figma-designer/src/core/registry/custom-recipes.ts b/packages/adaptive-ui-designer-core/src/registry/custom-recipes.ts similarity index 97% rename from packages/adaptive-ui-figma-designer/src/core/registry/custom-recipes.ts rename to packages/adaptive-ui-designer-core/src/registry/custom-recipes.ts index 4085c7c3..565a5098 100644 --- a/packages/adaptive-ui-figma-designer/src/core/registry/custom-recipes.ts +++ b/packages/adaptive-ui-designer-core/src/registry/custom-recipes.ts @@ -16,7 +16,7 @@ import { blackOrWhiteDiscernibleRecipe, blackOrWhiteReadableRecipe, fillColor -} from "@adaptive-web/adaptive-ui/reference" +} from "@adaptive-web/adaptive-ui/reference"; import { DesignTokenResolver } from "@microsoft/fast-foundation"; // Local recipes for use in documentation files. @@ -66,7 +66,7 @@ export const blackOrWhiteDiscernibleRest = createTokenSwatch("black-or-white-dis focus: fill, disabled: fill, } - return resolve(blackOrWhiteDiscernibleRecipe).evaluate(resolve, set).rest + return resolve(blackOrWhiteDiscernibleRecipe).evaluate(resolve, set).rest! } ); @@ -80,6 +80,6 @@ export const blackOrWhiteReadableRest = createTokenSwatch("black-or-white-readab focus: fill, disabled: fill, } - return resolve(blackOrWhiteReadableRecipe).evaluate(resolve, set).rest + return resolve(blackOrWhiteReadableRecipe).evaluate(resolve, set).rest! } ); diff --git a/packages/adaptive-ui-figma-designer/src/core/registry/design-token-registry.ts b/packages/adaptive-ui-designer-core/src/registry/design-token-registry.ts similarity index 97% rename from packages/adaptive-ui-figma-designer/src/core/registry/design-token-registry.ts rename to packages/adaptive-ui-designer-core/src/registry/design-token-registry.ts index 276d4af6..6d267f89 100644 --- a/packages/adaptive-ui-figma-designer/src/core/registry/design-token-registry.ts +++ b/packages/adaptive-ui-designer-core/src/registry/design-token-registry.ts @@ -1,4 +1,4 @@ -import type { DesignToken, ValuesOf } from "@microsoft/fast-foundation"; +import { DesignToken, ValuesOf } from "@microsoft/fast-foundation"; import { StyleProperty } from "@adaptive-web/adaptive-ui"; export const FormControlId = { @@ -104,4 +104,4 @@ export class DesignTokenRegistry { public find(target: StyleProperty): DesignTokenDefinition[] { return Object.values(this._entries).filter(value => value.intendedFor?.includes(target)); } -} +} \ No newline at end of file diff --git a/packages/adaptive-ui-figma-designer/src/core/registry/recipes.ts b/packages/adaptive-ui-designer-core/src/registry/recipes.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/core/registry/recipes.ts rename to packages/adaptive-ui-designer-core/src/registry/recipes.ts diff --git a/packages/adaptive-ui-figma-designer/src/core/serialization.ts b/packages/adaptive-ui-designer-core/src/serialization.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/core/serialization.ts rename to packages/adaptive-ui-designer-core/src/serialization.ts diff --git a/packages/adaptive-ui-designer-core/tsconfig.json b/packages/adaptive-ui-designer-core/tsconfig.json new file mode 100644 index 00000000..db443348 --- /dev/null +++ b/packages/adaptive-ui-designer-core/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "importHelpers": true, + "lib": ["DOM", "ES2020"], + "skipLibCheck": true, + "declarationDir": "dist/dts", + "outDir": "dist/esm", + "rootDir": "src" + }, +} diff --git a/packages/adaptive-ui-figma-designer/README.md b/packages/adaptive-ui-designer-figma-plugin/README.md similarity index 100% rename from packages/adaptive-ui-figma-designer/README.md rename to packages/adaptive-ui-designer-figma-plugin/README.md diff --git a/packages/adaptive-ui-figma-designer/manifest.json b/packages/adaptive-ui-designer-figma-plugin/manifest.json similarity index 100% rename from packages/adaptive-ui-figma-designer/manifest.json rename to packages/adaptive-ui-designer-figma-plugin/manifest.json diff --git a/packages/adaptive-ui-figma-designer/package.json b/packages/adaptive-ui-designer-figma-plugin/package.json similarity index 93% rename from packages/adaptive-ui-figma-designer/package.json rename to packages/adaptive-ui-designer-figma-plugin/package.json index 5bbd5402..ae88fb82 100644 --- a/packages/adaptive-ui-figma-designer/package.json +++ b/packages/adaptive-ui-designer-figma-plugin/package.json @@ -1,5 +1,5 @@ { - "name": "@adaptive-web/adaptive-ui-figma-designer", + "name": "@adaptive-web/adaptive-ui-designer-figma-plugin", "version": "0.0.1", "description": "A designer for working with Adaptive UI within Figma", "type": "module", @@ -35,6 +35,8 @@ "test": "npm run lint && npm run compile" }, "dependencies": { + "@adaptive-web/adaptive-ui-designer-core": "^0.0.0", + "@adaptive-web/adaptive-ui-designer-figma": "^0.0.0", "@adaptive-web/adaptive-web-components": "0.5.0", "change-case": "^5.4.4", "culori": "^3.2.0" diff --git a/packages/adaptive-ui-designer-figma-plugin/src/core/code-gen.ts b/packages/adaptive-ui-designer-figma-plugin/src/core/code-gen.ts new file mode 100644 index 00000000..95bf2ba7 --- /dev/null +++ b/packages/adaptive-ui-designer-figma-plugin/src/core/code-gen.ts @@ -0,0 +1,148 @@ +/* eslint-disable max-len */ +import { camelCase, kebabCase } from "change-case"; +import { StyleNameMapping } from "@adaptive-web/adaptive-ui/reference"; +import { Anatomy, BooleanCondition, Condition, StringCondition, StyleRule } from "@adaptive-web/adaptive-ui-designer-figma"; + +function makeClassName(value: string) { + return `.${kebabCase(value)}`; +} + +/** + * Code generation capabilities related to component anatomy and styling. + * + * @remarks + * The functionality here is split into two parts to facilitate reuse and customization: + * - Design tool node parsing into a component anatomy definition + * - Generating AUI code based on the anatomy definition (functions named "generate" or "gen") + * + * The common flow for all output is: + * ``` ts + * const codeGen = new CodeGen(); + * const anatomyOutput = codeGen.generateAnatomyCode(anatomy); + * const stylesOutput = codeGen.generateStylesCode(anatomy); + * ``` + */ +export class CodeGen { + /** + * Generates anatomy code for the provided anatomy definition. + * + * @param anatomy - The provided anatomy definition + * @returns The generated anatomy code + */ + public generateAnatomyCode(anatomy: Anatomy): string { + const conditionsSet = new Array(...anatomy.conditions.entries()) + .reduce((accumulated: Set, current: [string, Condition]): Set => { + if (current[1] instanceof BooleanCondition) { + accumulated.add(current[0]); + } else if (current[1] instanceof StringCondition) { + current[1].values.forEach(value => { + const currentValue = `${current[0]}${value}`; + accumulated.add(currentValue); + }); + } + + return accumulated; + }, new Set()); + const conditionsOut = this.#genTypeCode(anatomy.name, "Conditions", conditionsSet); + const partsOut = this.#genTypeCode(anatomy.name, "Parts", anatomy.parts); + + // TODO other states (json serialize?) + const interactivity = anatomy.interactivity ? `\n interactivity: {\n interactive: "${anatomy.interactivity.interactive}",\n disabled: "${anatomy.interactivity.disabled}",\n },` : ""; + const conditionsValues = new Array(...conditionsSet).map(property => `\n ${camelCase(property)}: "${makeClassName(property)}",`).join(""); + const partsValues = new Array(...anatomy.parts).map(property => `\n ${camelCase(property)}: "${makeClassName(property)}",`).join(""); + + const anatomyOut = +`export const ${anatomy.name}Anatomy: ComponentAnatomy<${anatomy.name}Conditions, ${anatomy.name}Parts> = {${interactivity} + conditions: {${conditionsValues} + }, + parts: {${partsValues} + }, +}; +`; + // TODO: + // focus: Focus.contextFocused(), + + const output = `${conditionsOut}\n${partsOut}\n${anatomyOut}\n`; + return output; + } + + #genTypeCode(componentName: string, type: "Parts" | "Conditions", properties: Set): string { + // const partsString = parts.map(part => ` ${camelCase(part)}: "${kebabCase(part)}"`).join("\n"); + // const code = `export const ${componentName}Parts = {\n${partsString}\n};`; + const propertiesString = new Array(...properties).map(property => ` ${camelCase(property)}: string;`).join("\n"); + return `export type ${componentName}${type} = {\n${propertiesString}\n};\n`; + } + + /** + * Generates styling code for the provided anatomy definition. + * + * @param anatomy - The provided anatomy definition + * @returns The generated style code + */ + public generateStylesCode(anatomy: Anatomy): string { + const imported = new Array(...anatomy.styleRules).reduce>((accumulated, current) => { + current.styles.forEach(style => { + const varName = StyleNameMapping[style as keyof typeof StyleNameMapping]; + accumulated.push(varName); + }); + current.tokens.forEach(token => { + const varName = this.tokenIDMap(token.tokenID); + accumulated.push(varName); + }); + return accumulated; + }, new Array()); + const importBase = `import { StyleRules } from "@adaptive-web/adaptive-ui";\n`; + const refImports = [...imported].sort().join(", "); + const importRef = `import { ${refImports} } from "@adaptive-web/adaptive-ui/reference";\n`; + const importAnatomy = `import { ${anatomy.name}Anatomy } from "./${kebabCase(anatomy.name)}.template.js";\n` + const styleRules = new Array(...anatomy.styleRules).map(styleRule => this.#genStyleRuleCode(anatomy.name, styleRule)).join("\n"); + const genStyleRules = `\nexport const styleRules: StyleRules = [\n${styleRules}\n];\n`; + + const output = `${importBase}${importRef}${importAnatomy}${genStyleRules}`; + return output; + } + + #genStyleRuleCode(componentName: string, styleRule: StyleRule): string { + let targetOut = ""; + const contextCondition = styleRule.contextCondition ? ` contextCondition: ${componentName}Anatomy.conditions.${camelCase(styleRule.contextCondition)},\n` : ""; + const part = styleRule.part ? ` part: ${componentName}Anatomy.parts.${camelCase(styleRule.part)},\n` : ""; + if (contextCondition || part) { + targetOut = ` target: {\n${part}${contextCondition} },\n`; + } + + let stylesOut = ""; + if (styleRule.styles.size > 0) { + stylesOut = ` styles: [\n ${new Array(...styleRule.styles).map(style => StyleNameMapping[style as keyof typeof StyleNameMapping] || style).join(",\n ")},\n ],\n`; + } + + let propertiesOut = ""; + if (styleRule.tokens.size > 0) { + // TODO Need to map tokens better + const tokens = new Array(...styleRule.tokens).map(token => `${token.target}: ${this.tokenIDMap(token.tokenID)}`); + propertiesOut = ` properties: {\n ${tokens.join(",\n ")},\n },\n`; + } + + return ` {\n${targetOut}${stylesOut}${propertiesOut} },`; + } + + private tokenIDMap(tokenID: string): string { + let adjustedID = tokenID; + + // TODO: Clean up naming and grouping + const densityGroups = ["control", "item-container", "layer"]; + if (tokenID.startsWith("density_")) { + for (let i = 0; i < densityGroups.length; i++) { + const group = densityGroups[i]; + const testGroup = `density_${group}-`; + const adjustedGroup = `density-${group}_`; + if (tokenID.startsWith(testGroup)) { + adjustedID = tokenID.replace(testGroup, adjustedGroup); + continue; + } + } + } + + const pieces = adjustedID.split("_"); + return pieces.map(piece => camelCase(piece)).join("."); + } +} diff --git a/packages/adaptive-ui-figma-designer/src/figma/controller.ts b/packages/adaptive-ui-designer-figma-plugin/src/figma/controller.ts similarity index 84% rename from packages/adaptive-ui-figma-designer/src/figma/controller.ts rename to packages/adaptive-ui-designer-figma-plugin/src/figma/controller.ts index 3f0aefb0..9d3a25cc 100644 --- a/packages/adaptive-ui-figma-designer/src/figma/controller.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/figma/controller.ts @@ -1,6 +1,6 @@ -import { Controller, PluginUIState } from "../core/controller.js"; -import type { PluginMessage } from "../core/model.js"; -import { mapReplacer } from "../core/serialization.js"; +import { Controller, PluginUIState } from "@adaptive-web/adaptive-ui-designer-core"; +import type { PluginMessage } from "@adaptive-web/adaptive-ui-designer-core"; +import { mapReplacer } from "@adaptive-web/adaptive-ui-designer-core"; import { FigmaPluginNode } from "./node.js"; export class FigmaController extends Controller { diff --git a/packages/adaptive-ui-figma-designer/src/figma/main.ts b/packages/adaptive-ui-designer-figma-plugin/src/figma/main.ts similarity index 93% rename from packages/adaptive-ui-figma-designer/src/figma/main.ts rename to packages/adaptive-ui-designer-figma-plugin/src/figma/main.ts index 3b8060d2..53de62ea 100644 --- a/packages/adaptive-ui-figma-designer/src/figma/main.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/figma/main.ts @@ -1,5 +1,5 @@ -import { PluginMessage } from "../core/model.js"; -import { mapReviver } from "../core/serialization.js"; +import { PluginMessage } from "@adaptive-web/adaptive-ui-designer-core"; +import { mapReviver } from "@adaptive-web/adaptive-ui-designer-core"; import { FigmaController } from "./controller.js"; const controller = new FigmaController(); diff --git a/packages/adaptive-ui-figma-designer/src/figma/node.ts b/packages/adaptive-ui-designer-figma-plugin/src/figma/node.ts similarity index 99% rename from packages/adaptive-ui-figma-designer/src/figma/node.ts rename to packages/adaptive-ui-designer-figma-plugin/src/figma/node.ts index 7e045564..30658861 100644 --- a/packages/adaptive-ui-figma-designer/src/figma/node.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/figma/node.ts @@ -1,8 +1,8 @@ import { Shadow, StyleProperty } from "@adaptive-web/adaptive-ui"; import { type Color, modeLrgb, modeRgb, parse, type Rgb, useMode, wcagLuminance } from "culori/fn"; -import { Controller, STYLE_REMOVE } from "../core/controller.js"; -import { AppliedStyleModules, AppliedStyleValues, PluginNodeData } from "../core/model.js"; -import { focusIndicatorNodeName, PluginNode, State, StatesState } from "../core/node.js"; +import { Controller, STYLE_REMOVE } from "@adaptive-web/adaptive-ui-designer-core"; +import { AppliedStyleModules, AppliedStyleValues, PluginNodeData } from "@adaptive-web/adaptive-ui-designer-core"; +import { focusIndicatorNodeName, PluginNode, State, StatesState } from "@adaptive-web/adaptive-ui-designer-core"; import { colorToRgba, variantBooleanHelper } from "./utility.js"; const rgb = useMode(modeRgb); diff --git a/packages/adaptive-ui-figma-designer/src/figma/tsconfig.json b/packages/adaptive-ui-designer-figma-plugin/src/figma/tsconfig.json similarity index 66% rename from packages/adaptive-ui-figma-designer/src/figma/tsconfig.json rename to packages/adaptive-ui-designer-figma-plugin/src/figma/tsconfig.json index b989519b..133ac789 100644 --- a/packages/adaptive-ui-figma-designer/src/figma/tsconfig.json +++ b/packages/adaptive-ui-designer-figma-plugin/src/figma/tsconfig.json @@ -2,13 +2,11 @@ "compilerOptions": { "outDir": "../../dist", "moduleResolution": "Node16", - "module": "ESNext", + "module": "Node16", "target": "ES2018", "lib": ["ES2018"], "strict": true, "skipLibCheck": true, - "typeRoots": [ - "../../../../node_modules/@figma" - ] + "types": ["@figma/plugin-typings"], } } diff --git a/packages/adaptive-ui-figma-designer/src/figma/utility.ts b/packages/adaptive-ui-designer-figma-plugin/src/figma/utility.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/figma/utility.ts rename to packages/adaptive-ui-designer-figma-plugin/src/figma/utility.ts diff --git a/packages/adaptive-ui-figma-designer/src/ui/app.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/app.ts similarity index 99% rename from packages/adaptive-ui-figma-designer/src/ui/app.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/app.ts index 3ef48ce7..4aa77805 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/app.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/app.ts @@ -13,9 +13,9 @@ import { neutralStrokeReadableRest, neutralStrokeStrongRest } from "@adaptive-web/adaptive-ui/reference"; -import type { PluginMessage, PluginUINodeData } from "../core/model.js"; -import { StatesState } from "../core/node.js"; -import { DesignTokenDefinition } from "../core/registry/design-token-registry.js"; +import type { PluginMessage, PluginUINodeData } from "@adaptive-web/adaptive-ui-designer-core"; +import { StatesState } from "@adaptive-web/adaptive-ui-designer-core"; +import { DesignTokenDefinition } from "@adaptive-web/adaptive-ui-designer-core"; import SubtractIcon from "./assets/subtract.svg"; import { UIController } from "./ui-controller.js"; import { AppliedDesignTokenItem, StyleModuleDisplay, StyleModuleDisplayList } from "./ui-controller-styles.js"; diff --git a/packages/adaptive-ui-figma-designer/src/ui/assets/blob.svg b/packages/adaptive-ui-designer-figma-plugin/src/ui/assets/blob.svg similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/assets/blob.svg rename to packages/adaptive-ui-designer-figma-plugin/src/ui/assets/blob.svg diff --git a/packages/adaptive-ui-figma-designer/src/ui/assets/checkmark.svg b/packages/adaptive-ui-designer-figma-plugin/src/ui/assets/checkmark.svg similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/assets/checkmark.svg rename to packages/adaptive-ui-designer-figma-plugin/src/ui/assets/checkmark.svg diff --git a/packages/adaptive-ui-figma-designer/src/ui/assets/detach.svg b/packages/adaptive-ui-designer-figma-plugin/src/ui/assets/detach.svg similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/assets/detach.svg rename to packages/adaptive-ui-designer-figma-plugin/src/ui/assets/detach.svg diff --git a/packages/adaptive-ui-figma-designer/src/ui/assets/refresh.svg b/packages/adaptive-ui-designer-figma-plugin/src/ui/assets/refresh.svg similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/assets/refresh.svg rename to packages/adaptive-ui-designer-figma-plugin/src/ui/assets/refresh.svg diff --git a/packages/adaptive-ui-figma-designer/src/ui/assets/revert.svg b/packages/adaptive-ui-designer-figma-plugin/src/ui/assets/revert.svg similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/assets/revert.svg rename to packages/adaptive-ui-designer-figma-plugin/src/ui/assets/revert.svg diff --git a/packages/adaptive-ui-figma-designer/src/ui/assets/subtract.svg b/packages/adaptive-ui-designer-figma-plugin/src/ui/assets/subtract.svg similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/assets/subtract.svg rename to packages/adaptive-ui-designer-figma-plugin/src/ui/assets/subtract.svg diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/corner-radius/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/corner-radius/index.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/components/corner-radius/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/corner-radius/index.ts diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/design-token-add/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/design-token-add/index.ts similarity index 96% rename from packages/adaptive-ui-figma-designer/src/ui/components/design-token-add/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/design-token-add/index.ts index 0ff9da69..1ad3b11e 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/components/design-token-add/index.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/design-token-add/index.ts @@ -9,8 +9,8 @@ import { repeat, } from "@microsoft/fast-element"; import { staticallyCompose } from "@microsoft/fast-foundation"; +import { DesignTokenDefinition } from "@adaptive-web/adaptive-ui-designer-core"; import CheckmarkIcon from "../../assets/checkmark.svg"; -import { DesignTokenDefinition } from "../../../core/registry/design-token-registry.js"; import { DesignTokenField } from "../design-token-field/index.js"; DesignTokenField; diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/design-token-field/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/design-token-field/index.ts similarity index 95% rename from packages/adaptive-ui-figma-designer/src/ui/components/design-token-field/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/design-token-field/index.ts index af355251..911a4eae 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/components/design-token-field/index.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/design-token-field/index.ts @@ -1,6 +1,6 @@ import { css, customElement, FASTElement, html, observable } from "@microsoft/fast-element"; import { twoWay } from "@microsoft/fast-element/binding/two-way.js"; -import { DesignTokenDefinition, FormControlId } from "../../../core/registry/design-token-registry.js"; +import { DesignTokenDefinition, FormControlId } from "@adaptive-web/adaptive-ui-designer-core"; const tokenTemplatesByType = { default: html` diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/design-tokens-form/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/design-tokens-form/index.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/components/design-tokens-form/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/design-tokens-form/index.ts diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/drawer/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/drawer/index.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/components/drawer/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/drawer/index.ts diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/index.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/components/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/index.ts diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/stealth-button/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/stealth-button/index.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/components/stealth-button/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/stealth-button/index.ts diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/style-token-item/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/style-token-item/index.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/components/style-token-item/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/style-token-item/index.ts diff --git a/packages/adaptive-ui-figma-designer/src/ui/components/token-glyph/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/components/token-glyph/index.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/components/token-glyph/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/components/token-glyph/index.ts diff --git a/packages/adaptive-ui-figma-designer/src/ui/global.css b/packages/adaptive-ui-designer-figma-plugin/src/ui/global.css similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/global.css rename to packages/adaptive-ui-designer-figma-plugin/src/ui/global.css diff --git a/packages/adaptive-ui-figma-designer/src/ui/index.html b/packages/adaptive-ui-designer-figma-plugin/src/ui/index.html similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/index.html rename to packages/adaptive-ui-designer-figma-plugin/src/ui/index.html diff --git a/packages/adaptive-ui-figma-designer/src/ui/index.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/index.ts similarity index 89% rename from packages/adaptive-ui-figma-designer/src/ui/index.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/index.ts index 2b677c6b..2e59bbd3 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/index.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/index.ts @@ -5,9 +5,7 @@ import { tabDefinition } from "@adaptive-web/adaptive-web-components/tab"; import { tabPanelDefinition } from "@adaptive-web/adaptive-web-components/tab-panel"; import { tabsDefinition } from "@adaptive-web/adaptive-web-components/tabs"; import { DesignToken } from "@microsoft/fast-foundation"; -import { PluginMessage } from '../core/model.js'; -import { PluginUIState } from '../core/controller.js'; -import { mapReplacer, mapReviver } from "../core/serialization.js"; +import { mapReplacer, mapReviver, PluginMessage, PluginUIState } from '@adaptive-web/adaptive-ui-designer-core'; import { App } from "./app.js"; AdaptiveDesignSystem.defineComponents({ diff --git a/packages/adaptive-ui-figma-designer/src/ui/tsconfig.json b/packages/adaptive-ui-designer-figma-plugin/src/ui/tsconfig.json similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/tsconfig.json rename to packages/adaptive-ui-designer-figma-plugin/src/ui/tsconfig.json diff --git a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-code.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-code.ts similarity index 85% rename from packages/adaptive-ui-figma-designer/src/ui/ui-controller-code.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-code.ts index 8842f800..4ad437ab 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-code.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-code.ts @@ -1,6 +1,7 @@ import { observable } from "@microsoft/fast-element"; +import { AdditionalDataKeys } from "@adaptive-web/adaptive-ui-designer-core"; +import { Anatomy } from "@adaptive-web/adaptive-ui-designer-figma"; import { CodeGen } from "../core/code-gen.js"; -import { AdditionalDataKeys } from "../core/model.js"; import { UIController } from "./ui-controller.js"; export class CodeController { @@ -33,7 +34,7 @@ export class CodeController { const selectedNode = this.controller.selectedNodes[0]; const codeGen = new CodeGen(); - const anatomy = codeGen.parseComponent(selectedNode); + const anatomy = Anatomy.fromPluginUINodeData(selectedNode); const genAnatomy = `${codeGen.generateAnatomyCode(anatomy)}\n`; const genStyles = `${codeGen.generateStylesCode(anatomy)}\n`; diff --git a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-elements.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-elements.ts similarity index 98% rename from packages/adaptive-ui-figma-designer/src/ui/ui-controller-elements.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-elements.ts index a8ea91d4..71abacbf 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-elements.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-elements.ts @@ -2,7 +2,7 @@ import { customElement, FASTElement, html } from "@microsoft/fast-element"; import type { DesignToken, StaticDesignTokenValue } from "@microsoft/fast-foundation"; import { Swatch } from "@adaptive-web/adaptive-ui"; import { fillColor } from "@adaptive-web/adaptive-ui/reference"; -import { DesignTokenValue, PluginUINodeData } from "../core/model.js"; +import { DesignTokenValue, PluginUINodeData } from "@adaptive-web/adaptive-ui-designer-core"; import { UIController } from "./ui-controller.js"; const providerElementName = "plugin-design-system-provider"; diff --git a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-states.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-states.ts similarity index 85% rename from packages/adaptive-ui-figma-designer/src/ui/ui-controller-states.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-states.ts index ba638a89..167b9f46 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-states.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-states.ts @@ -1,5 +1,4 @@ -import { AdditionalDataKeys, type PluginMessage } from "../core/model.js"; -import { StatesState } from "../core/node.js"; +import { AdditionalDataKeys, type PluginMessage, StatesState } from "@adaptive-web/adaptive-ui-designer-core"; import { UIController } from "./ui-controller.js"; export class StatesController { diff --git a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-styles.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-styles.ts similarity index 97% rename from packages/adaptive-ui-figma-designer/src/ui/ui-controller-styles.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-styles.ts index 8e7a4cbd..605b5ae7 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-styles.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-styles.ts @@ -1,8 +1,5 @@ import { StyleProperty, Styles } from "@adaptive-web/adaptive-ui"; -import { nameToTitle } from "../core/registry/recipes.js"; -import { DesignTokenDefinition } from "../core/registry/design-token-registry.js"; -import { STYLE_REMOVE } from "../core/controller.js"; -import { AppliedDesignToken } from "../core/model.js"; +import { AppliedDesignToken, DesignTokenDefinition, nameToTitle, STYLE_REMOVE } from "@adaptive-web/adaptive-ui-designer-core"; import { UIController } from "./ui-controller.js"; /** diff --git a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-tokens.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-tokens.ts similarity index 97% rename from packages/adaptive-ui-figma-designer/src/ui/ui-controller-tokens.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-tokens.ts index 3db8daf6..e75238ff 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/ui-controller-tokens.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller-tokens.ts @@ -3,8 +3,7 @@ import { observable } from "@microsoft/fast-element"; import { type DesignToken } from "@microsoft/fast-foundation"; import { Color } from "@adaptive-web/adaptive-ui"; import { formatHex8 } from 'culori'; -import { DesignTokenValue, PluginUINodeData } from "../core/model.js"; -import { DesignTokenDefinition } from "../core/registry/design-token-registry.js"; +import { DesignTokenDefinition, DesignTokenValue, PluginUINodeData } from "@adaptive-web/adaptive-ui-designer-core"; import { UIController } from "./ui-controller.js"; import { ElementsController } from "./ui-controller-elements.js"; diff --git a/packages/adaptive-ui-figma-designer/src/ui/ui-controller.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller.ts similarity index 97% rename from packages/adaptive-ui-figma-designer/src/ui/ui-controller.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller.ts index ec244f9f..ca15c4b9 100644 --- a/packages/adaptive-ui-figma-designer/src/ui/ui-controller.ts +++ b/packages/adaptive-ui-designer-figma-plugin/src/ui/ui-controller.ts @@ -4,10 +4,18 @@ import { CSSDesignToken, type ValuesOf } from "@microsoft/fast-foundation"; import { Color, InteractiveTokenGroup, StyleProperty, Styles, Swatch } from "@adaptive-web/adaptive-ui"; import { fillColor } from "@adaptive-web/adaptive-ui/reference"; import { formatHex8 } from 'culori'; -import { STYLE_REMOVE } from "../core/controller.js"; -import { AdditionalDataKeys, AppliedDesignToken, AppliedStyleModules, AppliedStyleValue, type PluginMessage, type PluginUINodeData } from "../core/model.js"; -import { DesignTokenRegistry } from "../core/registry/design-token-registry.js"; -import { registerAppliableTokens, registerTokens } from "../core/registry/recipes.js"; +import { + AdditionalDataKeys, + AppliedDesignToken, + AppliedStyleModules, + AppliedStyleValue, + DesignTokenRegistry, + type PluginMessage, + type PluginUINodeData, + registerAppliableTokens, + registerTokens, + STYLE_REMOVE +} from "@adaptive-web/adaptive-ui-designer-core"; import { CodeController } from './ui-controller-code.js'; import { ElementsController } from "./ui-controller-elements.js"; import { StatesController } from './ui-controller-states.js'; diff --git a/packages/adaptive-ui-figma-designer/src/ui/vite-env.d.ts b/packages/adaptive-ui-designer-figma-plugin/src/ui/vite-env.d.ts similarity index 100% rename from packages/adaptive-ui-figma-designer/src/ui/vite-env.d.ts rename to packages/adaptive-ui-designer-figma-plugin/src/ui/vite-env.d.ts diff --git a/packages/adaptive-ui-figma-designer/vite.config.js b/packages/adaptive-ui-designer-figma-plugin/vite.config.js similarity index 100% rename from packages/adaptive-ui-figma-designer/vite.config.js rename to packages/adaptive-ui-designer-figma-plugin/vite.config.js diff --git a/packages/adaptive-ui-designer-figma/README.md b/packages/adaptive-ui-designer-figma/README.md new file mode 100644 index 00000000..859d070e --- /dev/null +++ b/packages/adaptive-ui-designer-figma/README.md @@ -0,0 +1,17 @@ +# Adaptive UI Designer Figma +Figma utilities and CLI for Adaptive UI. + +## CLI +`@adaptive-web/adaptive-ui-designer-figma` exposes a CLI for generating component anatomies and stylesheets creating using the Adaptive UI Designer Figma Plugin. To use, first create a JSON library config file: +```JSON +{ + "libraryFile": "https//www.figma.com/file/path-to-file", + "outDir": "./out/dir" +} +``` + +To use the CLI, run `npx aui-figma-compiler` and provide the library file that you just created. You will be prompted for a Figma PAT to access the file. + +```shell +npx aui-figma-compiler -l ./library.json +``` diff --git a/packages/adaptive-ui-designer-figma/bin/aui-figma-compiler.js b/packages/adaptive-ui-designer-figma/bin/aui-figma-compiler.js new file mode 100755 index 00000000..12fcfa1c --- /dev/null +++ b/packages/adaptive-ui-designer-figma/bin/aui-figma-compiler.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import '../dist/cli/main.js'; \ No newline at end of file diff --git a/packages/adaptive-ui-designer-figma/package.json b/packages/adaptive-ui-designer-figma/package.json new file mode 100644 index 00000000..bf214265 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/package.json @@ -0,0 +1,45 @@ +{ + "name": "@adaptive-web/adaptive-ui-designer-figma", + "version": "0.0.0", + "description": "Figma integration for Adaptive Web.", + "main": "./dist/esm/lib/index.js", + "bin": { + "aui-figma-compiler": "./bin/aui-figma-compiler.js" + }, + "exports": { + ".": { + "types": "./dist/lib/index.d.ts", + "default": "./dist/lib/index.js" + } + }, + "type": "module", + "scripts": { + "build": "tsc --build", + "watch": "tsc --build --watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/adaptive-web-community/adaptive-web-components.git" + }, + "author": { + "name": "Adaptive Web Community", + "url": "https://github.com/adaptive-web-community" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/adaptive-web-community/adaptive-web-components/issues" + }, + "homepage": "https://github.com/adaptive-web-community/adaptive-web-components#readme", + "devDependencies": { + "@figma/rest-api-spec": "^0.13.0", + "@types/inquirer": "^9.0.7" + }, + "dependencies": { + "@adaptive-web/adaptive-ui": "^0.3.0", + "@adaptive-web/adaptive-ui-designer-core": "^0.0.0", + "@types/ajv": "^1.0.0", + "ajv": "^8.13.0", + "change-case": "^5.4.4", + "inquirer": "^9.2.22" + } +} diff --git a/packages/adaptive-ui-designer-figma/src/cli/anatomy.ts b/packages/adaptive-ui-designer-figma/src/cli/anatomy.ts new file mode 100644 index 00000000..edb0927b --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/anatomy.ts @@ -0,0 +1,53 @@ +/* eslint @typescript-eslint/naming-convention: off */ +import fs from 'fs/promises'; +import path from 'path'; +import type * as FigmaRestAPI from '@figma/rest-api-spec'; +import { kebabCase } from 'change-case'; +import { parseNode } from '../lib/node-parser.js'; +import { Anatomy, type SerializableAnatomy, } from '../lib/anatomy.js'; +import { ILibraryConfig } from './library-config.js'; +import { ILogger } from './logger.js'; + +export interface IAnatomyConfiguration { + readonly name: string; + readonly path: string; +} + +export class AnatomyConfiguration implements IAnatomyConfiguration { + public readonly name: string; + #anatomy: SerializableAnatomy; + + private constructor(anatomy: SerializableAnatomy, public readonly path: string) { + this.name = anatomy.name; + this.#anatomy = anatomy; + } + + public static async create( + library: ILibraryConfig, + node: FigmaRestAPI.Node, + logger: ILogger + ): Promise { + const name = kebabCase(node.name); + const configurationPath = AnatomyConfiguration.path(library, name); + + let anatomy: SerializableAnatomy; + try { + await fs.stat(configurationPath); + logger.neutral(`Anatomy file for ${name} already exists! Using existing anatomy.`); + anatomy = JSON.parse((await fs.readFile(configurationPath)).toString()) as unknown as SerializableAnatomy; + } catch { + logger.success(`Writing anatomy file for ${name}.`); + const nodeAnatomy = Anatomy.fromPluginUINodeData(parseNode(node)) + const nodeAnatomyFileData = JSON.stringify(nodeAnatomy, null, 2); + anatomy = JSON.parse(nodeAnatomyFileData); + await fs.mkdir(path.parse(configurationPath).dir, { recursive: true }); // ensure dir exists or fs.writeFile will throw + await fs.writeFile(configurationPath, nodeAnatomyFileData); + } + + return new AnatomyConfiguration(anatomy, configurationPath); + } + + public static path(config: ILibraryConfig, name: string): string { + return path.resolve(process.cwd(), config.outDir, 'anatomies', name + '.json'); + } +} diff --git a/packages/adaptive-ui-designer-figma/src/cli/dom-shim.ts b/packages/adaptive-ui-designer-figma/src/cli/dom-shim.ts new file mode 100644 index 00000000..0df95b54 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/dom-shim.ts @@ -0,0 +1,32 @@ +/** + * FAST accesses DOM globals during evaluation, so they need + * to exist to run the CLI + */ +class Document { + createElement() { + return new HTMLElement(); + } + adoptedStylesheets = [] + } + class HTMLElement {} + class MutationObserver {} + class Window { + Document = Document; + HTMLElement = HTMLElement; + MutationObserver = MutationObserver; + matchMedia = () => new this.MutationObserver; + document: Document; + constructor() { + this.document = new Document; + } + } + +export function installWindowOnGlobal() { + if (globalThis.window === undefined) { + const window = new Window; + Object.assign(globalThis, window); + globalThis.window = globalThis as any; + } +} + +installWindowOnGlobal(); \ No newline at end of file diff --git a/packages/adaptive-ui-designer-figma/src/cli/figma-rest-client.ts b/packages/adaptive-ui-designer-figma/src/cli/figma-rest-client.ts new file mode 100644 index 00000000..d56de1d4 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/figma-rest-client.ts @@ -0,0 +1,505 @@ +import type * as FigmaRestAPI from "@figma/rest-api-spec"; + +enum HTTPMethods { + GET = "GET", + POST = "POST", + DELETE = "DELETE", +} + +interface RequestParams { + queryParams?: Record; + bodyParams?: Record; + /** + * @default HTTPMethods.GET + */ + method?: HTTPMethods; +} + +export class Client implements FigmaRESTClient { + /** + * Personal access token + */ + #pat: string; + + /** + * API Origin + */ + #origin = "https://api.figma.com"; + + /** + * API version + */ + #version = "v1"; + + /** + * Figma headers + */ + #headers: HeadersInit; + + #apiPath: string = `${this.#origin}/${this.#version}`; + + private constructor(args: ClientArgs) { + this.#pat = args.pat; + this.#headers = { + "X-Figma-Token": this.#pat, + }; + } + + public static create(args: ClientArgs): FigmaRESTClient { + return new Client(args) + } + + public async getFile( + pathParams: FigmaRestAPI.GetFilePathParams, + queryParams?: FigmaRestAPI.GetFilePathParams | undefined + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}`); + return this.fetch(url, { queryParams }); + } + + public async getFileNodes( + pathParams: FigmaRestAPI.GetFileNodesPathParams, + queryParams: FigmaRestAPI.GetFileNodesQueryParams + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/nodes`); + return this.fetch(url, { queryParams }); + } + + public async getImages( + pathParams: FigmaRestAPI.GetImagesPathParams, + queryParams?: FigmaRestAPI.GetImagesQueryParams | undefined + ): Promise { + const url = new URL(`${this.#apiPath}/images/${pathParams.file_key}`); + return this.fetch(url, { queryParams }); + } + + public async getImageFill( + pathParams: FigmaRestAPI.GetImageFillsPathParams + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/images`); + return this.fetch(url); + } + + public async getComments( + pathParams: FigmaRestAPI.GetCommentsPathParams, + queryParams?: FigmaRestAPI.GetCommentsQueryParams | undefined + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/comments`); + return this.fetch(url, { queryParams }); + } + + public async postComments( + pathParams: FigmaRestAPI.PostCommentPathParams, + bodyParams: FigmaRestAPI.PostCommentRequestBody + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/comments`); + return this.fetch(url, { bodyParams, method: HTTPMethods.POST }); + } + + public async deleteComments( + pathParams: FigmaRestAPI.DeleteCommentPathParams + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/${pathParams.comment_id}`); + return this.fetch(url, { method: HTTPMethods.DELETE }); + } + + public async getCommentReactions( + pathParams: FigmaRestAPI.GetCommentReactionsPathParams, + queryParams?: FigmaRestAPI.GetCommentReactionsQueryParams | undefined + ): Promise { + const url = new URL( + `${this.#apiPath}/files/${pathParams.file_key}/comments/${pathParams.comment_id}/reactions` + ); + return this.fetch(url, { queryParams }); + } + + public async postCommentReactions( + pathParams: FigmaRestAPI.PostCommentReactionPathParams, + queryParams: FigmaRestAPI.PostCommentReactionRequestBody + ): Promise { + const url = new URL( + `${this.#apiPath}/files/${pathParams.file_key}/comments/${pathParams.comment_id}/reactions` + ); + return this.fetch(url, { queryParams, method: HTTPMethods.POST }); + } + + public async deleteCommentReactions( + pathParams: FigmaRestAPI.DeleteCommentReactionPathParams, + queryParams?: FigmaRestAPI.DeleteCommentReactionQueryParams | undefined + ): Promise { + const url = new URL( + `${this.#apiPath}/files/${pathParams.file_key}/comments/${pathParams.comment_id}/reactions` + ); + return this.fetch(url, { queryParams, method: HTTPMethods.DELETE }); + } + + public async getMe(): Promise { + const url = new URL(`${this.#apiPath}/me`); + return this.fetch(url); + } + + public async getVersion( + pathParams: FigmaRestAPI.GetFileVersionsPathParams, + queryParams?: FigmaRestAPI.GetFileVersionsQueryParams | undefined + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/versions`); + return this.fetch(url, { queryParams }); + } + + public async getTeamProjects( + pathParams: FigmaRestAPI.GetTeamProjectsPathParams + ): Promise { + const url = new URL(`${this.#apiPath}/teams/${pathParams.team_id}/projects`); + return this.fetch(url); + } + + public async getProjectFiles( + pathParams: FigmaRestAPI.GetProjectFilesPathParams, + queryParams?: FigmaRestAPI.GetProjectFilesQueryParams | undefined + ): Promise { + const url = new URL(`${this.#apiPath}/projects/${pathParams.project_id}/files`); + return this.fetch(url, { queryParams }); + } + + public async getTeamComponents( + pathParams: FigmaRestAPI.GetTeamComponentsPathParams, + queryParams?: FigmaRestAPI.GetTeamComponentsQueryParams | undefined + ): Promise { + const url = new URL(`${this.#apiPath}/teams/${pathParams.team_id}/components`); + return this.fetch(url, { queryParams }); + } + + public async getFileComponents( + pathParams: FigmaRestAPI.GetFileComponentsPathParams, + queryParams: FigmaRestAPI.GetFilePathParams + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/components`); + return this.fetch(url, { queryParams }); + } + + public async getComponent( + pathParams: FigmaRestAPI.GetComponentPathParams + ): Promise { + const url = new URL(`${this.#apiPath}/components/${pathParams.key}`); + return this.fetch(url); + } + + public async getTeamComponentSets( + pathParams: FigmaRestAPI.GetTeamComponentSetsPathParams, + queryParams?: FigmaRestAPI.GetTeamComponentSetsQueryParams | undefined + ): Promise { + const url = new URL(`${this.#apiPath}/teams/${pathParams.team_id}/component_sets`); + return this.fetch(url, { queryParams }); + } + + public async getFileComponentSets( + pathParams: FigmaRestAPI.GetFileComponentSetsPathParams, + queryParams?: FigmaRestAPI.GetFileQueryParams + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/component_sets`); + return this.fetch(url, { queryParams }); + } + + public async getComponentSets( + pathParams: FigmaRestAPI.GetComponentSetPathParams + ): Promise { + const url = new URL(`${this.#apiPath}/components_sets/${pathParams.key}`); + return this.fetch(url); + } + + public async getTeamStyles( + pathParams: FigmaRestAPI.GetTeamStylesPathParams, + queryParams?: FigmaRestAPI.GetTeamStylesQueryParams | undefined + ): Promise { + const url = new URL(`${this.#apiPath}/teams/${pathParams.team_id}/styles`); + return this.fetch(url, { queryParams }); + } + + public async getFileStyles( + pathParams: FigmaRestAPI.GetFileStylesPathParams + ): Promise { + const url = new URL(`${this.#apiPath}/files/${pathParams.file_key}/styles`); + return this.fetch(url); + } + + public async getStyle(pathParams: FigmaRestAPI.GetStylePathParams): Promise { + const url = new URL(`${this.#apiPath}/styles/${pathParams.key}`); + return this.fetch(url); + } + + private addQueryParams(url: URL, queryParams: RequestParams["queryParams"]) { + for (const key in queryParams) { + url.searchParams.append(key, queryParams[key].toString()); + } + } + + private async fetch(url: URL, requestParams?: RequestParams): Promise { + if (requestParams?.queryParams) { + this.addQueryParams(url, requestParams.queryParams); + } + + let body: BodyInit | undefined = undefined; + if (requestParams?.bodyParams) { + body = JSON.stringify(requestParams.bodyParams); + } + + const response = await fetch(url, { + headers: this.#headers, + method: requestParams?.method || HTTPMethods.GET, + body, + }); + // TODO Handle failed response + return response.json(); + } +} + +function isFigmaFileType(value: string | FileType): value is FileType { + return FileType[value as FileType] !== undefined; +} + +class FigmaFile implements File { + public readonly file_type: FileType; + + public readonly file_key: string; + + public readonly file_name: string; + + constructor(public readonly url: string) { + const figmaUrl = new URL(url); + const parts = figmaUrl.pathname.split("/"); + parts.shift(); // pathname begins with "/", so the first entry in the array will be empty string. Shift this off. + + if (parts.length !== 3) { + throw new Error(`Unable to parse Figma file URL ${url}`); + } + + const [type, key, name] = parts; + if (!isFigmaFileType(type)) { + throw new Error(`Error parsing Figma file URL ${url}\n'${type}' is not a valid Figma file type.`); + } + + this.file_type = FileType[type]; + this.file_key = key; + this.file_name = name; + } +} + +/** + * Figma file types + */ +export enum FileType { + file = "file", +} + +/** + * Interface describing the Figma REST api endpoints + */ +export interface FigmaRESTClient { + /** + * https://www.figma.com/developers/api#get-files-endpoint + */ + getFile( + pathParams: FigmaRestAPI.GetFilePathParams, + queryParams?: FigmaRestAPI.GetFilePathParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-file-nodes-endpoint + */ + getFileNodes( + pathParams: FigmaRestAPI.GetFileNodesPathParams, + queryParams?: FigmaRestAPI.GetFileNodesQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-images-endpoint + */ + getImages( + pathParams: FigmaRestAPI.GetImagesPathParams, + queryParams?: FigmaRestAPI.GetImagesQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-image-fills-endpoint + */ + getImageFill(pathParams: FigmaRestAPI.GetImageFillsPathParams): Promise; + + /** + * https://www.figma.com/developers/api#get-comments-endpoint + */ + getComments( + pathParams: FigmaRestAPI.GetCommentsPathParams, + queryParams?: FigmaRestAPI.GetCommentsQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#post-comments-endpoint + */ + postComments( + pathParams: FigmaRestAPI.PostCommentPathParams, + queryParams: FigmaRestAPI.PostCommentRequestBody + ): Promise; + + /** + * https://www.figma.com/developers/api#delete-comments-endpoint + */ + deleteComments(pathParams: FigmaRestAPI.DeleteCommentPathParams): Promise; + + /** + * https://www.figma.com/developers/api#get-comment-reactions-endpoint + */ + getCommentReactions( + pathParams: FigmaRestAPI.GetCommentReactionsPathParams, + queryParams?: FigmaRestAPI.GetCommentReactionsQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#post-comment-reactions-endpoint + */ + postCommentReactions( + pathParams: FigmaRestAPI.PostCommentReactionPathParams, + queryParams: FigmaRestAPI.PostCommentReactionRequestBody + ): Promise; + + /** + * https://www.figma.com/developers/api#delete-comment-reactions-endpoint + */ + deleteCommentReactions( + pathParams: FigmaRestAPI.DeleteCommentReactionPathParams, + queryParams?: FigmaRestAPI.DeleteCommentReactionQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#users-endpoints + * + * @remarks + * Requires OAuth authentication. + */ + getMe(): Promise; + + /** + * https://www.figma.com/developers/api#version-history-endpoints + */ + getVersion( + pathParams: FigmaRestAPI.GetFileVersionsPathParams, + queryParams?: FigmaRestAPI.GetFileVersionsQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-team-projects-endpoint + */ + getTeamProjects(pathParams: FigmaRestAPI.GetTeamProjectsPathParams): Promise; + + /** + * https://www.figma.com/developers/api#get-team-projects-endpoint + */ + getTeamProjects(pathParams: FigmaRestAPI.GetTeamProjectsPathParams): Promise; + + /** + * https://www.figma.com/developers/api#get-project-files-endpoint + */ + getProjectFiles( + pathParams: FigmaRestAPI.GetProjectFilesPathParams, + queryParams?: FigmaRestAPI.GetProjectFilesQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-team-components-endpoint + */ + getTeamComponents( + pathParams: FigmaRestAPI.GetTeamComponentsPathParams, + queryParams?: FigmaRestAPI.GetTeamComponentsQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-file-components-endpoint + */ + getFileComponents( + pathParams: FigmaRestAPI.GetFileComponentsPathParams, + queryParams: FigmaRestAPI.GetFilePathParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-component-endpoint + */ + getComponent(pathParams: FigmaRestAPI.GetComponentPathParams): Promise; + + /** + * https://www.figma.com/developers/api#get-team-component-sets-endpoint + */ + getTeamComponentSets( + pathParams: FigmaRestAPI.GetTeamComponentSetsPathParams, + queryParams?: FigmaRestAPI.GetTeamComponentSetsQueryParams + ): Promise; + + /* + * https://www.figma.com/developers/api#get-file-component-sets-endpoint + */ + getFileComponentSets( + pathParams: FigmaRestAPI.GetFileComponentSetsPathParams, + queryParams?: FigmaRestAPI.GetFileQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-component-sets-endpoint + */ + getComponentSets(pathParams: FigmaRestAPI.GetComponentSetPathParams): Promise; + + /** + * https://www.figma.com/developers/api#get-team-styles-endpoint + */ + getTeamStyles( + pathParams: FigmaRestAPI.GetTeamStylesPathParams, + queryParams?: FigmaRestAPI.GetTeamStylesQueryParams + ): Promise; + + /** + * https://www.figma.com/developers/api#get-file-styles-endpoint + */ + getFileStyles(pathParams: FigmaRestAPI.GetFileStylesPathParams): Promise; + + /** + * https://www.figma.com/developers/api#get-style-endpoint + */ + getStyle(pathParams: FigmaRestAPI.GetStylePathParams): Promise; +} + +/** + * Describes a parsed Figma file. + * https://www.figma.com/developers/api#files-endpoints + */ +export interface File { + /** + * The URL of the figma file + */ + readonly url: string; + + /** + * The type of a file + */ + readonly file_type: FileType; + + /** + * The file key + */ + readonly file_key: string; + + /** + * The name of the file + */ + readonly file_name: string; +} + +export interface ClientArgs { + /** + * Personal access token + */ + pat: string; +} + +/** + * Constructs a {@link @IFigmaFile} from a figma file URL. + */ +export function parseFilePath(fileUrl: string): File { + return new FigmaFile(fileUrl); +} diff --git a/packages/adaptive-ui-designer-figma/src/cli/library-config.ts b/packages/adaptive-ui-designer-figma/src/cli/library-config.ts new file mode 100644 index 00000000..9fffdd43 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/library-config.ts @@ -0,0 +1,69 @@ +/* eslint @typescript-eslint/naming-convention: off */ +import { readFile } from 'fs/promises'; +import { fileURLToPath } from 'url'; +import path from 'path'; +import fs from 'fs/promises'; +import { config } from 'process'; +import { File, FileType, parseFilePath } from './figma-rest-client.js'; +import librarySchema from './library-schema.js'; +import { ISchemaValidator, SchemaValidator } from './schema-validator.js'; + +/** + * This needs to stay aligned to {@link ./library-schema.json} + */ +interface LibrarySchema { + /** + * URL to the Figma Library file + */ + libraryFile: string; + + /** + * The directory to emit assets + */ + outDir: string; +} + +export interface ILibraryConfig { + readonly file: File; + readonly valid: boolean; + readonly outDir: string; +} + +class ErrorLibraryConfig implements ILibraryConfig { + public readonly file: File = { url: '', file_key: '', file_name: '', file_type: FileType.file }; + public readonly valid = false; + public readonly outDir: string = ''; +} + +export class LibraryConfig implements ILibraryConfig { + private static validator: ISchemaValidator | null = null; + private constructor(args: LibrarySchema, configDir: string) { + this.file = parseFilePath(args.libraryFile); + this.outDir = path.resolve(configDir, args.outDir); + } + + public readonly valid: boolean = true; + public readonly file: File; + public readonly outDir: string; + + public static async create(configPath: string): Promise { + const configData = (await fs.readFile(configPath)).toString(); + const validator = await LibraryConfig.getOrCreateValidator(); + const result = await validator.validate(configData); + + if (result === true) { + return new LibraryConfig(JSON.parse(configData), path.dirname(configPath)); + } else { + return new ErrorLibraryConfig(); + } + } + + private static async getOrCreateValidator(): Promise { + if (LibraryConfig.validator === null) { + const schema = JSON.stringify(librarySchema); + LibraryConfig.validator = SchemaValidator.create(schema); + } + + return LibraryConfig.validator; + } +} diff --git a/packages/adaptive-ui-designer-figma/src/cli/library-schema.ts b/packages/adaptive-ui-designer-figma/src/cli/library-schema.ts new file mode 100644 index 00000000..a732c936 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/library-schema.ts @@ -0,0 +1,19 @@ +export default { + $schema: 'http://json-schema.org/draft-07/schema#', + $id: 'https://www.adaptive-web-community/schemas/design-to-code-library.json', + title: 'Design to Code Library', + description: 'Describes a valid library file format for generating CSS Stylesheets from a Figma Component Library', + type: 'object', + properties: { + libraryFile: { + description: 'The URL of the Figma library file', + type: 'string', + pattern: '^https://www.figma.com/file/', + }, + outDir: { + description: 'Path to directory for created files', + type: 'string', + }, + }, + required: ['libraryFile', 'outDir'], +}; diff --git a/packages/adaptive-ui-designer-figma/src/cli/logger.ts b/packages/adaptive-ui-designer-figma/src/cli/logger.ts new file mode 100644 index 00000000..76dcb3a7 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/logger.ts @@ -0,0 +1,34 @@ +/* eslint @typescript-eslint/naming-convention: off */ +export interface ILogger { + /** + * Logs a message indicating success + */ + success(message: string): void; + fail(message: string): void; + warn(message: string): void; + neutral(message: string): void; +} +const successColor = '\x1b[32m%s\x1b[0m'; +const failColor = '\x1b[31m%s\x1b[0m'; +const warnColor = '\x1b[33m%s\x1b[0m'; + +export class Logger implements ILogger { + private constructor() { /* privatize constructor */} + + success(message: string): void { + console.log(successColor, message); + } + fail(message: string): void { + console.error(failColor, message); + } + warn(message: string): void { + console.warn(warnColor, message); + } + neutral(message: string): void { + console.log(message); + } + + public static create() { + return new Logger(); + } +} diff --git a/packages/adaptive-ui-designer-figma/src/cli/main.ts b/packages/adaptive-ui-designer-figma/src/cli/main.ts new file mode 100644 index 00000000..1fe99587 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/main.ts @@ -0,0 +1,141 @@ +import "./dom-shim.js"; +import path from 'path'; +import { Command } from 'commander'; +import inquirer from 'inquirer'; +import { Client } from './figma-rest-client.js'; +import { LibraryConfig } from './library-config.js'; +import { Logger } from './logger.js'; +import { AnatomyConfiguration } from './anatomy.js'; +import { StyleSheet } from './stylesheet.js'; +import { alphabetize } from './string-utils.js'; + +const program = new Command(); +const logger = Logger.create(); +const programName = 'Adaptive UI Figma Stylesheet generator'; + +program + .name(programName) + .description('A CLI tool for generating CSS stylesheets from Figma Library Components') + .requiredOption('-l, --library ', 'Path to the library configuration file.') + .action(main); + +interface ProgramOptions { + library: string; +} + +async function main({ library }: ProgramOptions) { + logger.neutral('Validating library config file...'); + const configPath = path.resolve(process.cwd(), library); + const libraryConfig = await LibraryConfig.create(configPath); + if (libraryConfig.valid !== true) { + logger.fail('Hmmm... there is something wrong with the config file you provided.'); + process.exit(1); + } + + logger.success('Library config is valid!'); + + const patRequest = { + type: 'password', + name: 'pat', + message: 'Please provide your Figma personal access token', + }; + + const response = await inquirer.prompt([patRequest]); + console.log(response.pat, response.pat.length) + const client = Client.create({ + pat: response.pat + }); + + logger.neutral('Requesting Figma Library.'); + const libraryComponentsResponse = await client.getFileComponentSets(libraryConfig.file); + + if (libraryComponentsResponse.error || libraryComponentsResponse.status !== 200) { + logger.fail(`Accessing Figma library failed with status code ${libraryComponentsResponse.status}`); + process.exit(1); + } + + logger.success('Your library was successfully retrieved!'); + + const { component_sets: allComponents } = libraryComponentsResponse.meta; + + const componentNames = allComponents.map((value) => value.name).sort(alphabetize); + const pickComponentsRequest = { + type: 'list', + name: 'all', + message: 'Which component stylesheets would you like to generate?', + choices: ['All', 'Choose which'], + }; + + const pickComponentsResponse = await inquirer.prompt([pickComponentsRequest]); + const componentNamesToRender: string[] = []; + + if (pickComponentsResponse.all !== 'All') { + const chooseComponentsRequest = { + type: 'checkbox', + name: 'which', + message: 'Choose components:', + choices: componentNames, + }; + const components = await inquirer.prompt([chooseComponentsRequest]); + componentNamesToRender.push(...components.which); + } else { + componentNamesToRender.push(...componentNames); + } + + if (componentNamesToRender.length === 0) { + logger.warn(`No components selected, exiting ${programName}.`); + process.exit(0); + } + + logger.warn( + `Generating stylesheets for ${componentNamesToRender.length} component${ + componentNamesToRender.length === 1 ? '' : 's' + }\n${componentNamesToRender.join(', ')}` + ); + + const confirm = await inquirer.prompt({ type: 'confirm', message: 'Would you like to continue?', name: 'confirm' }); + + if (confirm.confirm) { + logger.success('Generating component stylesheets. This may take a moment.'); + + const nameLookup = new Set(componentNamesToRender); + const componentsToRender = allComponents.filter((value) => { + return nameLookup.has(value.name); + }); + + const anatomies = await Promise.allSettled( + componentsToRender.map(async (value) => { + const file = await client.getFileNodes(libraryConfig.file, { ids: value.node_id, plugin_data: 'shared' }); + const nodeId = Object.keys(file.nodes)[0]; + const node = file.nodes[nodeId]; + + try { + const anatomy = await AnatomyConfiguration.create(libraryConfig, node.document, logger); + return anatomy; + } catch (e) { + logger.fail('Something went wrong compiling anatomy'); + logger.fail(e as any); + return null; + } + }) + ); + + await Promise.allSettled( + anatomies.map(async (anatomy) => { + if (anatomy.status === "fulfilled" && anatomy.value !== null) { + const stylesheet = StyleSheet.create(anatomy.value, logger); + await stylesheet.render(); + } + }) + ); + + // process components + } else { + logger.neutral(`Exiting ${programName}`); + } + + process.exit(0); +} + +// Init program +program.parse(); diff --git a/packages/adaptive-ui-designer-figma/src/cli/schema-validator.ts b/packages/adaptive-ui-designer-figma/src/cli/schema-validator.ts new file mode 100644 index 00000000..f7f5312a --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/schema-validator.ts @@ -0,0 +1,69 @@ +/* eslint @typescript-eslint/naming-convention: off */ +import { Ajv, type ErrorObject, ValidateFunction } from 'ajv'; + +const ajv = new Ajv(); + +export interface ISchemaValidator { + /** + * Validates a JSON schema against the validator + * @param json the JSON string to validate, or a JavaScript object + */ + validate(json: string | object): Promise; +} + +function* IdGenerator(): Generator { + let i = 0; + + do { + yield i.toString(); + i++; + } while (true); +} + +export class SchemaValidator implements ISchemaValidator { + private static nextId = IdGenerator(); + #schema: object; + #id: string; + protected constructor(schema: string | object) { + if (typeof schema === 'string') { + this.#schema = JSON.parse(schema); + } else { + this.#schema = schema; + } + this.#id = SchemaValidator.nextId.next().value; + this.#schema = this.normalize(schema); + } + + /** + * Normalizes JSON input + */ + private normalize(value: string | object): object { + if (typeof value === 'string') { + return JSON.parse(value); + } else { + return value; + } + } + + public static create(schema: string): ISchemaValidator { + return new SchemaValidator(schema); + } + + public async validate(json: string | object): Promise { + const validator = this.getValidator(); + const data = this.normalize(json); + const valid = validator(this.normalize(data)); + return valid || validator.errors || false; + } + + private getValidator(): ValidateFunction { + const validator = ajv.getSchema(this.#id); + + if (validator) { + return validator; + } else { + ajv.addSchema(this.#schema, this.#id); + return this.getValidator(); + } + } +} diff --git a/packages/adaptive-ui-designer-figma/src/cli/string-utils.ts b/packages/adaptive-ui-designer-figma/src/cli/string-utils.ts new file mode 100644 index 00000000..b7c6137b --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/string-utils.ts @@ -0,0 +1,9 @@ +export function alphabetize(a: string, b: string) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; +} diff --git a/packages/adaptive-ui-designer-figma/src/cli/stylesheet.ts b/packages/adaptive-ui-designer-figma/src/cli/stylesheet.ts new file mode 100644 index 00000000..1207a115 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/stylesheet.ts @@ -0,0 +1,39 @@ +/* eslint @typescript-eslint/naming-convention: off */ +import { spawn } from 'child_process'; +import fs from 'fs/promises'; +import path from 'path'; +import { kebabCase } from 'change-case'; +import type { ILogger } from './logger.js'; +import type { IAnatomyConfiguration } from './anatomy.js'; + +export interface IStylesheet { + render(): Promise; + readonly path: string; +} + +export class StyleSheet implements IStylesheet { + public readonly path: string; + + private constructor(private anatomy: IAnatomyConfiguration, private logger: ILogger) { + this.path = path.resolve(path.dirname(anatomy.path), `../stylesheets/${kebabCase(anatomy.name)}.css`); + } + + public static create(anatomy: IAnatomyConfiguration, logger: ILogger): IStylesheet { + return new StyleSheet(anatomy, logger); + } + + public async render(): Promise { + try { + const compiler = spawn('npx', ['aui', 'compile-json-anatomy', this.anatomy.path]); + compiler.stderr.on('data', (chunk) => { + this.logger.fail(chunk); + }); + await fs.mkdir(path.dirname(this.path), { recursive: true }); + await fs.writeFile(this.path, compiler.stdout); + this.logger.success(`Writing stylesheet file for ${kebabCase(this.anatomy.name)}.`); + } catch (e) { + this.logger.fail('Rendering stylesheet failed.'); + this.logger.fail(e as any); + } + } +} \ No newline at end of file diff --git a/packages/adaptive-ui-designer-figma/src/cli/tsconfig.json b/packages/adaptive-ui-designer-figma/src/cli/tsconfig.json new file mode 100644 index 00000000..4bf0bb65 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/cli/tsconfig.json @@ -0,0 +1,13 @@ +{ + "include": ["**/*"], + "compilerOptions": { + "strict": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", + "outDir": "../../dist/cli", + "target": "ESNext", + "composite": true, + "declaration": true + }, + "references": [{"path": "../lib"}] +} diff --git a/packages/adaptive-ui-designer-figma/src/lib/anatomy.ts b/packages/adaptive-ui-designer-figma/src/lib/anatomy.ts new file mode 100644 index 00000000..5d98ac83 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/lib/anatomy.ts @@ -0,0 +1,289 @@ +/* eslint-disable max-len */ +import { camelCase, kebabCase } from "change-case"; +import { + Interactivity, + InteractivityDefinition, +} from "@adaptive-web/adaptive-ui"; +import { AdditionalDataKeys, type PluginUINodeData } from "@adaptive-web/adaptive-ui-designer-core"; + +// A simple string for ignoring layers in the design tool +const ignoreLayerName = "(Figma)"; + +function makeClassName(value: string) { + return `.${kebabCase(value)}`; +} + +// TODO: All of these type definitions will be merged into the core AUI package, including simple interface and serialization support. + +export type SerializableBooleanCondition = string; + +export type SerializableStringCondition = Record; + +export type SerializableCondition = SerializableBooleanCondition | SerializableStringCondition; + +export interface SerializableToken { + target: string; + tokenID: string; +} + +export interface SerializableStyleRule { + contextCondition?: string; + part: string; + styles: string[]; + tokens: SerializableToken[]; +} + +export interface SerializableAnatomy { + name: string; + context: string; + interactivity?: InteractivityDefinition; + conditions: Record; + parts: Record; + styleRules: SerializableStyleRule[]; +} + +export abstract class Condition { + constructor( + public readonly name: string, + ) { } + + toJSON(): any { + return makeClassName(this.name); + } +} + +export class BooleanCondition extends Condition { + toJSON(): SerializableBooleanCondition { + return makeClassName(this.name); + } +} + +export class StringCondition extends Condition { + constructor( + name: string, + public values: Array, + ) { + super(name); + } + + toJSON(): SerializableStringCondition { + const values = this.values.reduce((prev, current) => { + prev[current[0]] = makeClassName(this.name + " " + current[1]); // Add space so that there is a kebab between name and value + return prev; + }, {} as SerializableStringCondition); + + return values; + } +} + +export class Token { + constructor( + public target: string, + public tokenID: string, + ) { } + + toJSON(): SerializableToken { + return { + target: this.target, + tokenID: this.tokenID, + }; + } +} + +export class StyleRule { + contextCondition?: string; + part: string = ""; + styles: Set = new Set(); + tokens: Set = new Set(); + + toJSON(): SerializableStyleRule { + const contextCondition = typeof this.contextCondition === "string" ? "." + kebabCase(this.contextCondition) : undefined; + return { + contextCondition, + part: this.part || "", + styles: Array.from(this.styles), + tokens: Array.from(this.tokens).map(token => token.toJSON()) + }; + } +} + +export class Anatomy implements Anatomy { + name: string = ""; + context: string = ""; + interactivity?: InteractivityDefinition; + conditions: Map = new Map(); + parts: Set = new Set(); + styleRules: Set = new Set(); + + toJSON(): SerializableAnatomy { + const conditions = Array.from(this.conditions.entries()).reduce((prev, next) => { + prev[next[0]] = next[1].toJSON() + return prev + }, {} as SerializableAnatomy['conditions']) + + const parts = Array.from(this.parts.entries()).reduce((prev, current) => { + prev[current[0]] = makeClassName(current[1]); + return prev; + }, {} as SerializableAnatomy['parts']) + + return { + name: this.name, + context: makeClassName(this.name), + interactivity: this.interactivity, + conditions, + parts, + styleRules: Array.from(this.styleRules).map(rule => rule.toJSON()), + } + } + + private constructor() { + /* Privatize constructor */ + } + + public static create(): Anatomy { + return new Anatomy(); + } + + public static fromPluginUINodeData(node: PluginUINodeData): Anatomy { + return parseComponent(node); + } +} + +function parseComponent(node: PluginUINodeData): Anatomy { + if (!node) { + throw new Error("Parameter `node` must be provided"); + } + if (!(node.type === "COMPONENT_SET" || node.type === "COMPONENT" || node.type === "INSTANCE")) { + throw new Error("Parameter `node` must have `type` = 'COMPONENT_SET', 'COMPONENT', or 'INSTANCE'"); + } + const componentName = node.additionalData.get(AdditionalDataKeys.codeGenName); + if (!componentName) { + throw new Error("Parameter `node` must provide `additionalData` value for `codeGenName`"); + } + + const anatomy: Anatomy = Anatomy.create(); + anatomy.name = componentName; + + if (node.type === "COMPONENT_SET") { + // Parse the component names into property and value sets + const properties = new Map>(); + node.children.forEach((child) => { + const propValues = child.name.split(","); + propValues.forEach((propValue) => { + const [prop, value] = propValue.trim().split("="); + const values = properties.get(prop) || []; + if (values.indexOf(value) === -1) { + values.push(value); + properties.set(prop, values); + } + }); + }); + + // TODO look for other interactivity models + if (properties.has("Disabled")) { + anatomy.interactivity = Interactivity.disabledClass; + } + + // Convert properties into anatomy conditions + // TODO: Validate known properties like "State" and "Disabled". Ignore for now. + properties.forEach((values, property) => { + if (property !== "State" && property !== "Disabled") { + if (values.length === 2 && + values.filter((value) => value.toLowerCase() === "true" || value.toLowerCase() === "false").length === 2) { + // boolean property, add once + anatomy.conditions.set(property, new BooleanCondition(property)); + } else { + // string property, add all + anatomy.conditions.set(property, new StringCondition(property, values)); + } + } + }); + + // The first child is the default (no conditions) + walkNode(node.children[0], componentName, "", anatomy); + const defaultName = node.children[0].name; + + const nodeHandler = (name: string, property: string): void => { + const found = node.children.find(node => node.name.toLowerCase() === name.toLowerCase()); + if (!found) { + // console.warn(`Expected component ${name}, property ${property}, not found`); + } else { + // console.log(" found node", name); + walkNode(found, componentName, property, anatomy); + } + }; + + // Find the component node for each condition + // Note that the current model treats conditions as additive, so condition A and condition B will be + // separate selectors which might both apply (in sequence) + anatomy.conditions.forEach((condition, property) => { + if (condition instanceof BooleanCondition) { + // Assume false is the default condition, find the `true` component + const name = defaultName.replace(`${property}=false`, `${property}=true`); + nodeHandler(name, property); + } else if (condition instanceof StringCondition) { + // The first value is the default, already handled + condition.values.slice(1).forEach(value => { + const name = defaultName.replace(`${property}=${condition.values[0]}`, `${property}=${value}`); + nodeHandler(name, camelCase(`${property} ${value}`)); + }); + } + }); + } else { + walkNode(node, componentName, "", anatomy); + } + + return anatomy; +} + +function cleanNodeName(nodeName: string): string { + // Remove non-ascii characters + return nodeName.replace(/[^\x20-\x7F]/g, "").trim(); +} + +function walkNode(node: PluginUINodeData, componentName: string, condition: string, anatomy: Anatomy): void { + const nodeName = cleanNodeName(node.name); + + if (nodeName === "Focus indicator") { + // Ignore for now + return; + } + + if (!node.name.endsWith(ignoreLayerName)) { + // TODO, not only frames, but what? + if (node.type === "FRAME" && nodeName !== componentName) { + anatomy.parts.add(node.name); + } + + const styleRule = new StyleRule(); + + if (condition) { + styleRule.contextCondition = condition; + } + + node.appliedStyleModules.forEach(style => { + const styleVariableName = style; + styleRule.styles.add(styleVariableName); + }); + + node.appliedDesignTokens.forEach((token, target) => { + const tokenRef = token.tokenID; + styleRule.tokens.add(new Token(target, tokenRef)); + }); + + if (nodeName !== componentName) { + styleRule.part = nodeName; + } + + if (styleRule.styles.size > 0 || styleRule.tokens.size > 0) { + if (nodeName !== componentName) { + anatomy.parts.add(node.name) + } + anatomy.styleRules.add(styleRule); + } + } + + node.children.forEach((child) => { + walkNode(child, componentName, condition, anatomy); + }); +} diff --git a/packages/adaptive-ui-designer-figma/src/lib/index.ts b/packages/adaptive-ui-designer-figma/src/lib/index.ts new file mode 100644 index 00000000..618dc3c0 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/lib/index.ts @@ -0,0 +1 @@ +export { Anatomy, Condition, BooleanCondition, StringCondition, StyleRule } from "./anatomy.js"; \ No newline at end of file diff --git a/packages/adaptive-ui-designer-figma/src/lib/node-parser.ts b/packages/adaptive-ui-designer-figma/src/lib/node-parser.ts new file mode 100644 index 00000000..fe92e851 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/lib/node-parser.ts @@ -0,0 +1,62 @@ +import FigmaRestAPI from "@figma/rest-api-spec"; +import { + AdditionalData, + AdditionalDataKeys, + AppliedDesignTokens, + AppliedStyleModules, + AppliedStyleValues, + deserializeMap, + DesignTokenValues, + PluginNodeData, + PluginUINodeData, +} from "@adaptive-web/adaptive-ui-designer-core"; + +const SHARED_PLUGIN_DATA_KEY = "adaptive_ui"; +function getPluginData(node: T, key: K): string | null { + const data = node.sharedPluginData; + if (data && (data as any)[SHARED_PLUGIN_DATA_KEY]) { + return (data as any)[SHARED_PLUGIN_DATA_KEY][key]; + } + + return null; +} +function hasChildren(node: T): node is FigmaRestAPI.HasChildrenTrait & T { + return "children" in node; +} + +/** + * Convert a Figma REST API node to a {@link PluginUINodeData} + * @param node + * @returns + */ +export function parseNode(node: FigmaRestAPI.Node): PluginUINodeData { + const children = hasChildren(node) ? node.children : []; + const additionalData: AdditionalData = new AdditionalData(); // Where do I get data for this? + + if (node.type === "COMPONENT_SET") { + additionalData.set(AdditionalDataKeys.codeGenName, node.name); + } + + const appliedTokensPluginData = getPluginData(node, "appliedDesignTokens"); + const appliedStylesPluginData = getPluginData(node, "appliedStyleModules"); + const appliedDesignTokens: AppliedDesignTokens = appliedTokensPluginData + ? deserializeMap(appliedTokensPluginData) + : new AppliedDesignTokens(); + const appliedStyleModules: AppliedStyleModules = appliedStylesPluginData + ? JSON.parse(appliedStylesPluginData) + : new AppliedStyleModules(); + + return { + id: node.id, + name: node.name, + type: node.type, + supports: [], + children: children.map(parseNode), + additionalData, + appliedDesignTokens, + appliedStyleModules, + effectiveAppliedStyleValues: new AppliedStyleValues(), + designTokens: new DesignTokenValues(), // Intentionally empty + inheritedDesignTokens: new DesignTokenValues(), // Intentionally empty + }; +} \ No newline at end of file diff --git a/packages/adaptive-ui-designer-figma/src/lib/tsconfig.json b/packages/adaptive-ui-designer-figma/src/lib/tsconfig.json new file mode 100644 index 00000000..79344db9 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/src/lib/tsconfig.json @@ -0,0 +1,13 @@ +{ + "include": ["**/*"], + "compilerOptions": { + "strict": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", + "target": "ESNext", + "resolveJsonModule": true, + "composite": true, + "outDir": "../../dist/lib", + "declaration": true + } +} diff --git a/packages/adaptive-ui-designer-figma/tsconfig.json b/packages/adaptive-ui-designer-figma/tsconfig.json new file mode 100644 index 00000000..45a238f7 --- /dev/null +++ b/packages/adaptive-ui-designer-figma/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "importHelpers": true, + "types": ["mocha"], + "lib": ["DOM", "ES2020"], + "skipLibCheck": true, + "rootDir": "./src", + "declaration": true, + }, + "files": [], + "references": [ + { "path": "./src/lib" }, + { "path": "./src/cli"} + ] +} diff --git a/packages/adaptive-ui-figma-designer/src/core/code-gen.ts b/packages/adaptive-ui-figma-designer/src/core/code-gen.ts deleted file mode 100644 index a8bd2fa8..00000000 --- a/packages/adaptive-ui-figma-designer/src/core/code-gen.ts +++ /dev/null @@ -1,426 +0,0 @@ -/* eslint-disable max-len */ -import { camelCase, kebabCase } from "change-case"; -import { - Interactivity, - InteractivityDefinition, -} from "@adaptive-web/adaptive-ui"; -import { StyleNameMapping } from "@adaptive-web/adaptive-ui/reference"; -import { AdditionalDataKeys } from "../core/model.js"; -import type { PluginUINodeData } from "../core/model.js"; - -// A simple string for ignoring layers in the design tool -const ignoreLayerName = "(Figma)"; - -function makeClassName(value: string) { - return `.${kebabCase(value)}`; -} - -// TODO: All of these type definitions will be merged into the core AUI package, including simple interface and serialization support. - -export type SerializableBooleanCondition = string; - -export type SerializableStringCondition = Record; - -export type SerializableCondition = SerializableBooleanCondition | SerializableStringCondition; - -export interface SerializableToken { - target: string; - tokenID: string; -} - -export interface SerializableStyleRule { - contextCondition?: string; - part: string; - styles: string[]; - tokens: SerializableToken[]; -} - -export interface SerializableAnatomy{ - name: string; - context: string; - interactivity?: InteractivityDefinition; - conditions: Record; - parts: Record; - styleRules: SerializableStyleRule[]; -} - -export abstract class Condition { - constructor( - public readonly name: string, - ) {} - - toJSON(): any { - return makeClassName(this.name); - } -} - -export class BooleanCondition extends Condition { - toJSON(): SerializableBooleanCondition { - return makeClassName(this.name); - } -} - -export class StringCondition extends Condition { - constructor( - name: string, - public values: Array, - ) { - super(name); - } - - toJSON(): SerializableStringCondition { - const values = this.values.reduce((prev, current) => { - prev[current[0]] = makeClassName(this.name + " " + current[1]); // Add space so that there is a kebab between name and value - return prev; - }, {} as SerializableStringCondition); - - return values; - } -} - -export class Token { - constructor( - public target: string, - public tokenID: string, - ) {} - - toJSON(): SerializableToken { - return { - target: this.target, - tokenID: this.tokenID, - }; - } -} - -export class StyleRule { - contextCondition?: string; - part: string; - styles: Set = new Set(); - tokens: Set = new Set(); - - toJSON(): SerializableStyleRule { - const contextCondition = typeof this.contextCondition === "string" ? "." + kebabCase(this.contextCondition): undefined; - return { - contextCondition, - part: this.part, - styles: Array.from(this.styles), - tokens: Array.from(this.tokens).map(token => token.toJSON()) - }; - } -} - -export class Anatomy { - name: string; - context: string; - interactivity?: InteractivityDefinition; - conditions: Map = new Map(); - parts: Set = new Set(); - styleRules: Set = new Set(); - - toJSON(): SerializableAnatomy { - const conditions = Array.from(this.conditions.entries()).reduce((prev, next) => { - prev[next[0]] = next[1].toJSON() - return prev - }, {} as SerializableAnatomy['conditions']) - - const parts = Array.from(this.parts.entries()).reduce((prev, current) => { - prev[current[0]] = makeClassName(current[1]); - return prev; - }, {} as SerializableAnatomy['parts']) - - return { - name: this.name, - context: makeClassName(this.name), - interactivity: this.interactivity, - conditions, - parts, - styleRules: Array.from(this.styleRules).map(rule => rule.toJSON()), - } - } -} - -/** - * Code generation capabilities related to component anatomy and styling. - * - * @remarks - * The functionality here is split into two parts to facilitate reuse and customization: - * - Design tool node parsing into a component anatomy definition - * - Generating AUI code based on the anatomy definition (functions named "generate" or "gen") - * - * The common flow for all output is: - * ``` ts - * const codeGen = new CodeGen(); - * const anatomy = codeGen.parseComponent(node); - * const anatomyOutput = codeGen.generateAnatomyCode(anatomy); - * const stylesOutput = codeGen.generateStylesCode(anatomy); - * ``` - */ -export class CodeGen { - /** - * Parses a component node into anatomy definition. - * - * @param node - The node - * @returns The parsed anatomy definition - */ - public parseComponent(node: PluginUINodeData): Anatomy { - if (!node) { - throw new Error("Parameter `node` must be provided"); - } - if (!(node.type === "COMPONENT_SET" || node.type === "COMPONENT" || node.type === "INSTANCE")) { - throw new Error("Parameter `node` must have `type` = 'COMPONENT_SET', 'COMPONENT', or 'INSTANCE'"); - } - const componentName = node.additionalData.get(AdditionalDataKeys.codeGenName); - if (!componentName) { - throw new Error("Parameter `node` must provide `additionalData` value for `codeGenName`"); - } - - const anatomy: Anatomy = new Anatomy(); - anatomy.name = componentName; - - if (node.type === "COMPONENT_SET") { - // Parse the component names into property and value sets - const properties = new Map>(); - node.children.forEach((child) => { - const propValues = child.name.split(","); - propValues.forEach((propValue) => { - const [prop, value] = propValue.trim().split("="); - const values = properties.get(prop) || []; - if (values.indexOf(value) === -1) { - values.push(value); - properties.set(prop, values); - } - }); - }); - - // TODO look for other interactivity models - if (properties.has("Disabled")) { - anatomy.interactivity = Interactivity.disabledClass; - } - - // Convert properties into anatomy conditions - // TODO: Validate known properties like "State" and "Disabled". Ignore for now. - properties.forEach((values, property) => { - if (property !== "State" && property !== "Disabled") { - if (values.length === 2 && - values.filter((value) => value.toLowerCase() === "true" || value.toLowerCase() === "false").length === 2) { - // boolean property, add once - anatomy.conditions.set(property, new BooleanCondition(property)); - } else { - // string property, add all - anatomy.conditions.set(property, new StringCondition(property, values)); - } - } - }); - - // The first child is the default (no conditions) - this.walkNode(node.children[0], componentName, "", anatomy); - const defaultName = node.children[0].name; - - const nodeHandler = (name: string, property: string): void => { - const found = node.children.find(node => node.name.toLowerCase() === name.toLowerCase()); - if (!found) { - // console.warn(`Expected component ${name}, property ${property}, not found`); - } else { - // console.log(" found node", name); - this.walkNode(found, componentName, property, anatomy); - } - }; - - // Find the component node for each condition - // Note that the current model treats conditions as additive, so condition A and condition B will be - // separate selectors which might both apply (in sequence) - anatomy.conditions.forEach((condition, property) => { - if (condition instanceof BooleanCondition) { - // Assume false is the default condition, find the `true` component - const name = defaultName.replace(`${property}=false`, `${property}=true`); - nodeHandler(name, property); - } else if (condition instanceof StringCondition) { - // The first value is the default, already handled - condition.values.slice(1).forEach(value => { - const name = defaultName.replace(`${property}=${condition.values[0]}`, `${property}=${value}`); - nodeHandler(name, camelCase(`${property} ${value}`)); - }); - } - }); - } else { - this.walkNode(node, componentName, "", anatomy); - } - - return anatomy; - } - - /** - * Generates anatomy code for the provided anatomy definition. - * - * @param anatomy - The provided anatomy definition - * @returns The generated anatomy code - */ - public generateAnatomyCode(anatomy: Anatomy): string { - const conditionsSet = new Array(...anatomy.conditions.entries()) - .reduce((accumulated: Set, current: [string, Condition]): Set => { - if (current[1] instanceof BooleanCondition) { - accumulated.add(current[0]); - } else if (current[1] instanceof StringCondition) { - current[1].values.forEach(value => { - const currentValue = `${current[0]}${value}`; - accumulated.add(currentValue); - }); - } - - return accumulated; - }, new Set()); - const conditionsOut = this.#genTypeCode(anatomy.name, "Conditions", conditionsSet); - const partsOut = this.#genTypeCode(anatomy.name, "Parts", anatomy.parts); - - // TODO other states (json serialize?) - const interactivity = anatomy.interactivity ? `\n interactivity: {\n interactive: "${anatomy.interactivity.interactive}",\n disabled: "${anatomy.interactivity.disabled}",\n },` : ""; - const conditionsValues = new Array(...conditionsSet).map(property => `\n ${camelCase(property)}: "${makeClassName(property)}",`).join(""); - const partsValues = new Array(...anatomy.parts).map(property => `\n ${camelCase(property)}: "${makeClassName(property)}",`).join(""); - - const anatomyOut = -`export const ${anatomy.name}Anatomy: ComponentAnatomy<${anatomy.name}Conditions, ${anatomy.name}Parts> = {${interactivity} - conditions: {${conditionsValues} - }, - parts: {${partsValues} - }, -}; -`; - // TODO: - // focus: Focus.contextFocused(), - - const output = `${conditionsOut}\n${partsOut}\n${anatomyOut}\n`; - return output; - } - - #genTypeCode(componentName: string, type: "Parts" | "Conditions", properties: Set): string { - // const partsString = parts.map(part => ` ${camelCase(part)}: "${kebabCase(part)}"`).join("\n"); - // const code = `export const ${componentName}Parts = {\n${partsString}\n};`; - const propertiesString = new Array(...properties).map(property => ` ${camelCase(property)}: string;`).join("\n"); - return `export type ${componentName}${type} = {\n${propertiesString}\n};\n`; - } - - /** - * Generates styling code for the provided anatomy definition. - * - * @param anatomy - The provided anatomy definition - * @returns The generated style code - */ - public generateStylesCode(anatomy: Anatomy): string { - const imported = new Array(...anatomy.styleRules).reduce>((accumulated, current) => { - current.styles.forEach(style => { - const varName = StyleNameMapping[style as keyof typeof StyleNameMapping]; - accumulated.push(varName); - }); - current.tokens.forEach(token => { - const varName = this.tokenIDMap(token.tokenID); - accumulated.push(varName); - }); - return accumulated; - }, new Array()); - const importBase = `import { StyleRules } from "@adaptive-web/adaptive-ui";\n`; - const refImports = [...imported].sort().join(", "); - const importRef = `import { ${refImports} } from "@adaptive-web/adaptive-ui/reference";\n`; - const importAnatomy = `import { ${anatomy.name}Anatomy } from "./${kebabCase(anatomy.name)}.template.js";\n` - const styleRules = new Array(...anatomy.styleRules).map(styleRule => this.#genStyleRuleCode(anatomy.name, styleRule)).join("\n"); - const genStyleRules = `\nexport const styleRules: StyleRules = [\n${styleRules}\n];\n`; - - const output = `${importBase}${importRef}${importAnatomy}${genStyleRules}`; - return output; - } - - #genStyleRuleCode(componentName: string, styleRule: StyleRule): string { - let targetOut = ""; - const contextCondition = styleRule.contextCondition ? ` contextCondition: ${componentName}Anatomy.conditions.${camelCase(styleRule.contextCondition)},\n` : ""; - const part = styleRule.part ? ` part: ${componentName}Anatomy.parts.${camelCase(styleRule.part)},\n` : ""; - if (contextCondition || part) { - targetOut = ` target: {\n${part}${contextCondition} },\n`; - } - - let stylesOut = ""; - if (styleRule.styles.size > 0) { - stylesOut = ` styles: [\n ${new Array(...styleRule.styles).map(style => StyleNameMapping[style as keyof typeof StyleNameMapping] || style).join(",\n ")},\n ],\n`; - } - - let propertiesOut = ""; - if (styleRule.tokens.size > 0) { - // TODO Need to map tokens better - const tokens = new Array(...styleRule.tokens).map(token => `${token.target}: ${this.tokenIDMap(token.tokenID)}`); - propertiesOut = ` properties: {\n ${tokens.join(",\n ")},\n },\n`; - } - - return ` {\n${targetOut}${stylesOut}${propertiesOut} },`; - } - - private cleanNodeName(nodeName: string): string { - // Remove non-ascii characters - return nodeName.replace(/[^\x20-\x7F]/g, "").trim(); - } - - private walkNode(node: PluginUINodeData, componentName: string, condition: string, anatomy: Anatomy): void { - const nodeName = this.cleanNodeName(node.name); - - if (nodeName === "Focus indicator") { - // Ignore for now - return; - } - - if (!node.name.endsWith(ignoreLayerName)) { - // TODO, not only frames, but what? - if (node.type === "FRAME" && nodeName !== componentName) { - anatomy.parts.add(node.name); - } - - const styleRule = new StyleRule(); - - if (condition) { - styleRule.contextCondition = condition; - } - - node.appliedStyleModules.forEach(style => { - const styleVariableName = style; - styleRule.styles.add(styleVariableName); - }); - - node.appliedDesignTokens.forEach((token, target) => { - const tokenRef = token.tokenID; - styleRule.tokens.add(new Token(target, tokenRef)); - }); - - if (nodeName !== componentName) { - styleRule.part = nodeName; - } - - if (styleRule.styles.size > 0 || styleRule.tokens.size > 0) { - if (nodeName !== componentName) { - anatomy.parts.add(node.name) - } - anatomy.styleRules.add(styleRule); - } - } - - node.children.forEach((child) => { - this.walkNode(child, componentName, condition, anatomy); - }); - } - - private tokenIDMap(tokenID: string): string { - let adjustedID = tokenID; - - // TODO: Clean up naming and grouping - const densityGroups = ["control", "item-container", "layer"]; - if (tokenID.startsWith("density_")) { - for (let i = 0; i < densityGroups.length; i++) { - const group = densityGroups[i]; - const testGroup = `density_${group}-`; - const adjustedGroup = `density-${group}_`; - if (tokenID.startsWith(testGroup)) { - adjustedID = tokenID.replace(testGroup, adjustedGroup); - continue; - } - } - } - - const pieces = adjustedID.split("_"); - return pieces.map(piece => camelCase(piece)).join("."); - } -} diff --git a/packages/adaptive-ui/docs/api-report.md b/packages/adaptive-ui/docs/api-report.md index a0dbd062..2cd04973 100644 --- a/packages/adaptive-ui/docs/api-report.md +++ b/packages/adaptive-ui/docs/api-report.md @@ -1,671 +1,716 @@ -## API Report File for "@adaptive-web/adaptive-ui" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { Color as Color_2 } from 'culori/fn'; -import { ComposableStyles } from '@microsoft/fast-element'; -import { CSSDesignToken } from '@microsoft/fast-foundation'; -import { CSSDirective } from '@microsoft/fast-element'; -import { DesignToken } from '@microsoft/fast-foundation'; -import { DesignTokenResolver } from '@microsoft/fast-foundation'; -import { ElementStyles } from '@microsoft/fast-element'; -import { TypedCSSDesignToken as TypedCSSDesignToken_2 } from '../adaptive-design-tokens.js'; -import { ValuesOf } from '@microsoft/fast-foundation'; - -// @public -export class BasePalette implements Palette { - constructor(source: Color, swatches: ReadonlyArray); - readonly closestIndexCache: Map; - closestIndexOf(reference: RelativeLuminance): number; - colorContrast(reference: RelativeLuminance, contrastTarget: number, initialSearchIndex?: number, direction?: PaletteDirection): T; - delta(reference: RelativeLuminance, delta: number, direction: PaletteDirection): T; - get(index: number): T; - readonly lastIndex: number; - readonly reversedSwatches: ReadonlyArray; - readonly source: Color; - readonly swatches: ReadonlyArray; -} - -// @internal -export const _black: Swatch; - -// @public -export function blackOrWhiteByContrast(reference: Swatch, minContrast: number, defaultBlack: boolean): Swatch; - -// @public -export function blackOrWhiteByContrastSet(set: InteractiveSwatchSet, minContrast: number, defaultBlack: boolean): InteractiveSwatchSet; - -// @public -export type BooleanCondition = string; - -// @public (undocumented) -export const BorderFill: { - all: (value: StyleValue) => StyleProperties; -}; - -// @public (undocumented) -export const BorderStyle: { - all: (value: StyleValue) => StyleProperties; -}; - -// @public (undocumented) -export const BorderThickness: { - all: (value: StyleValue) => StyleProperties; -}; - -// @public -export class Color implements RelativeLuminance, CSSDirective { - constructor(color: Color_2); - readonly color: Color_2; - contrast: any; - createCSS: () => string; - static from(obj: { - r: number; - g: number; - b: number; - alpha?: number; - }): Color; - static fromRgb(r: number, g: number, b: number, alpha?: number): Color; - static parse(color: string): Color | undefined; - get relativeLuminance(): number; - toColorString(): string; -} - -// @public -export type ColorRecipe = RecipeOptional; - -// @public -export type ColorRecipeBySet = Recipe; - -// @public -export type ColorRecipeBySetEvaluate = RecipeEvaluate; - -// @public -export type ColorRecipeEvaluate = RecipeEvaluateOptional; - -// @public -export type ColorRecipePalette = Recipe; - -// @public -export type ColorRecipePaletteEvaluate = RecipeEvaluate; - -// @public -export type ColorRecipePaletteParams = ColorRecipeParams & { - palette: Palette; -}; - -// @public -export type ColorRecipeParams = { - reference: Swatch | null; -}; - -// @public -export interface ComponentAnatomy { - conditions: TConditions; - context?: string; - focus?: FocusDefinition; - interactivity?: InteractivityDefinition; - name?: string; - parts: TParts; -} - -// @public -export type ComponentConditions = Record; - -// @public -export type ComponentParts = Record; - -// @public -export type Condition = BooleanCondition | StringCondition; - -// @public -export function contrast(a: RelativeLuminance, b: RelativeLuminance): number; - -// @public -export function contrastAndDeltaSwatchSet(palette: Palette, reference: Swatch, minContrast: number, restDelta: number, hoverDelta: number, activeDelta: number, focusDelta: number, disabledDelta: number, disabledPalette?: Palette, direction?: PaletteDirection, zeroAsTransparent?: boolean): InteractiveSwatchSet; - -// @public -export function contrastSwatch(palette: Palette, reference: Swatch, minContrast: number, direction?: PaletteDirection): Swatch; - -// @public (undocumented) -export const CornerRadius: { - all: (value: StyleValue) => StyleProperties; -}; - -// Warning: (ae-internal-missing-underscore) The name "create" should be prefixed with an underscore because the declaration is marked as @internal -// -// @internal @deprecated (undocumented) -export const create: typeof DesignToken.create; - -// @public -export function createForegroundSet(foregroundRecipe: TypedDesignToken, background: InteractiveTokenGroup): InteractiveTokenGroup; - -// @public -export function createForegroundSetBySet(foregroundRecipe: TypedDesignToken, background: InteractiveTokenGroup): InteractiveTokenGroup; - -// Warning: (ae-internal-missing-underscore) The name "createNonCss" should be prefixed with an underscore because the declaration is marked as @internal -// -// @internal @deprecated (undocumented) -export function createNonCss(name: string): DesignToken; - -// @public -export function createTokenColor(name: string, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; - -// @public -export function createTokenColorRecipe(baseName: string, intendedFor: StyleProperty | StyleProperty[], evaluate: ColorRecipeEvaluate): TypedDesignToken>; - -// @public -export function createTokenColorRecipeBySet(baseName: string, intendedFor: StyleProperty | StyleProperty[], evaluate: ColorRecipeBySetEvaluate): TypedDesignToken>; - -// @public -export function createTokenColorRecipeForPalette(baseName: string, intendedFor: StyleProperty | StyleProperty[], evaluate: ColorRecipePaletteEvaluate): TypedDesignToken>; - -// @public -export function createTokenColorRecipeValue(recipeToken: TypedDesignToken>): TypedCSSDesignToken; - -// @public -export function createTokenColorRecipeWithPalette(recipeToken: TypedDesignToken>, paletteToken: DesignToken): TypedDesignToken>; - -// @public -export function createTokenColorSet(recipeToken: TypedDesignToken): InteractiveTokenGroup; - -// @public -export function createTokenDelta(baseName: string, state: InteractiveState, value: number | DesignToken): TypedDesignToken; - -// @public -export function createTokenDimension(name: string, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; - -// @public -export function createTokenFontFamily(name: string): TypedCSSDesignToken; - -// @public -export function createTokenFontSize(name: string): TypedCSSDesignToken; - -// @public -export function createTokenFontStyle(name: string): TypedCSSDesignToken; - -// @public -export function createTokenFontVariations(name: string): TypedCSSDesignToken; - -// @public -export function createTokenFontWeight(name: string): TypedCSSDesignToken; - -// @public -export function createTokenLineHeight(name: string): TypedCSSDesignToken; - -// @public -export function createTokenMinContrast(baseName: string, value: number | DesignToken): TypedDesignToken; - -// @public -export function createTokenNonCss(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]): TypedDesignToken; - -// @public -export function createTokenNumber(name: string, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; - -// @public -export function createTokenRecipe(baseName: string, intendedFor: StyleProperty | StyleProperty[], evaluate: RecipeEvaluate): TypedDesignToken>; - -// @public -export const createTokenShadow: (name: string) => TypedCSSDesignToken_2; - -// @public -export function createTokenSwatch(name: string, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; - -// @public -export const createTyped: typeof TypedCSSDesignToken.createTyped; - -// @public -export function deltaSwatch(palette: Palette, reference: Swatch, delta: number, direction?: PaletteDirection): Swatch; - -// @public -export function deltaSwatchSet(palette: Palette, reference: Swatch, restDelta: number, hoverDelta: number, activeDelta: number, focusDelta: number, disabledDelta?: number, disabledPalette?: Palette, direction?: PaletteDirection, zeroAsTransparent?: boolean): InteractiveSwatchSet; - -// @public -export const densityAdjustmentUnits: TypedDesignToken; - -// @public -export class DensityPaddingAndGapTokenGroup implements TokenGroup { - constructor(name: string, horizontalPaddingUnits: number, horizontalGapUnits: number, verticalPaddingUnits: number, verticalGapUnits: number, designUnit: string | DesignToken, borderThickness: string | DesignToken); - readonly borderThickness: TypedCSSDesignToken; - readonly designUnit: TypedCSSDesignToken; - readonly horizontalGap: TypedCSSDesignToken; - readonly horizontalGapUnits: TypedDesignToken; - readonly horizontalPadding: TypedCSSDesignToken; - readonly horizontalPaddingUnits: TypedDesignToken; - // (undocumented) - readonly name: string; - get padding(): CSSDirective; - readonly verticalGap: TypedCSSDesignToken; - readonly verticalGapUnits: TypedDesignToken; - readonly verticalPadding: TypedCSSDesignToken; - readonly verticalPaddingUnits: TypedDesignToken; -} - -// @public -export class DesignTokenMetadata { - // (undocumented) - protected init(type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]): void; - get intendedFor(): StyleProperty[] | undefined; - protected set intendedFor(value: StyleProperty[] | undefined); - get type(): DesignTokenType; - protected set type(value: DesignTokenType); -} - -// @public -export class DesignTokenMultiValue extends Array implements CSSDirective { - // (undocumented) - createCSS(): string; -} - -// @public -export abstract class DesignTokenRegistry { - static Shared: Map>; -} - -// @public -export const DesignTokenType: { - readonly color: "color"; - readonly dimension: "dimension"; - readonly fontFamily: "fontFamily"; - readonly fontWeight: "fontWeight"; - readonly duration: "duration"; - readonly cubicBezier: "cubicBezier"; - readonly number: "number"; - readonly strokeStyle: "strokeStyle"; - readonly border: "border"; - readonly transition: "transition"; - readonly shadow: "shadow"; - readonly gradient: "gradient"; - readonly typography: "typography"; - readonly fontStyle: "fontStyle"; - readonly fontVariations: "fontVariations"; - readonly palette: "palette"; - readonly recipe: "recipe"; - readonly string: "string"; -}; - -// @public -export type DesignTokenType = ValuesOf | string; - -// @public -export function directionByIsDark(color: RelativeLuminance): PaletteDirectionValue; - -// @public -export class ElementStylesRenderer { - constructor(styles: Styles); - render(target: StyleModuleTarget, interactivity?: InteractivityDefinition): ElementStyles; - static renderStyleRules(baseStyles: ComposableStyles[] | undefined, styleRules: StyleRules, anatomy?: ComponentAnatomy): ElementStyles; -} - -// @public -export type ElevationRecipe = Recipe; - -// @public -export type ElevationRecipeEvaluate = RecipeEvaluate; - -// @public (undocumented) -export const Fill: { - backgroundAndForeground: (background: InteractiveTokenGroup, foregroundRecipe: TypedDesignToken) => StyleProperties; - backgroundAndForegroundBySet: (background: InteractiveTokenGroup, foregroundRecipe: TypedDesignToken) => StyleProperties; - foregroundNonInteractiveWithDisabled: (foreground: TypedCSSDesignToken, disabled: TypedCSSDesignToken) => StyleProperties; -}; - -// @public -export const Focus: { - readonly contextFocused: () => FocusDefinition; - readonly contextChildFocused: (indicatorPart: keyof TParts & string) => FocusDefinition; - readonly partFocused: (part: keyof TParts_1 & string) => FocusDefinition; - readonly partWithin: (indicatorPart: keyof TParts_2 & string, focusablePart: keyof TParts_2 & string) => FocusDefinition; -}; - -// @public -export interface FocusDefinition { - focusTarget: StyleModuleTarget; - resetTarget: StyleModuleTarget; -} - -// @public -export function idealColorDeltaSwatchSet(palette: Palette, reference: Swatch, minContrast: number, idealColor: Color, restDelta: number, hoverDelta: number, activeDelta: number, focusDelta: number, disabledDelta: number, disabledPalette?: Palette, direction?: PaletteDirection): InteractiveSwatchSet; - -// @public -export type InteractiveColorRecipe = ColorRecipe; - -// @public -export type InteractiveColorRecipeBySet = ColorRecipeBySet; - -// @public -export type InteractiveColorRecipeBySetEvaluate = ColorRecipeBySetEvaluate; - -// @public -export type InteractiveColorRecipeEvaluate = ColorRecipeEvaluate; - -// @public -export type InteractiveColorRecipePalette = ColorRecipePalette; - -// @public -export type InteractiveColorRecipePaletteEvaluate = ColorRecipePaletteEvaluate; - -// @public -export enum InteractiveState { - active = "active", - disabled = "disabled", - focus = "focus", - hover = "hover", - rest = "rest" -} - -// @public -export interface InteractiveSwatchSet extends InteractiveValues { -} - -// @public -export function interactiveSwatchSetAsOverlay(set: InteractiveSwatchSet, reference: Swatch, asOverlay: boolean): InteractiveSwatchSet; - -// @public -export interface InteractiveTokenGroup extends TokenGroup, InteractiveValues> { -} - -// @public -export type InteractiveValues = { - [key in InteractiveState]: T; -}; - -// @public -export const Interactivity: { - readonly disabledAttribute: InteractivityDefinition; - readonly disabledClass: InteractivityDefinition; - readonly hrefAttribute: InteractivityDefinition; - readonly always: InteractivityDefinition; - readonly never: InteractivityDefinition; -}; - -// @public -export type InteractivityDefinition = { - [key in InteractiveState]?: string; -} & { - interactive?: string; -}; - -// @public -export function isDark(color: RelativeLuminance): boolean; - -// @public -export function luminanceSwatch(luminance: number): Swatch; - -// @public -export function makeSelector(params: StyleModuleEvaluateParameters, state: InteractiveState): string; - -// @public (undocumented) -export const Padding: { - all: (value: StyleValue) => StyleProperties; - verticalHorizontal: (valueVertical: StyleValue, valueHorizontal: StyleValue) => StyleProperties; -}; - -// @public -export interface Palette { - closestIndexOf(reference: RelativeLuminance): number; - colorContrast(reference: RelativeLuminance, minContrast: number, initialIndex?: number, direction?: PaletteDirection): T; - delta(reference: RelativeLuminance, delta: number, direction: PaletteDirection): T; - get(index: number): T; - readonly source: Color; - readonly swatches: ReadonlyArray; -} - -// @public -export type PaletteDirection = PaletteDirectionValue | (() => PaletteDirectionValue); - -// @public -export const PaletteDirectionValue: Readonly<{ - readonly darker: 1; - readonly lighter: -1; -}>; - -// @public -export type PaletteDirectionValue = typeof PaletteDirectionValue[keyof typeof PaletteDirectionValue]; - -// @public -export class PaletteOkhsl extends BasePalette { - // (undocumented) - static from(source: Color | string): PaletteOkhsl; -} - -// @public -export class PaletteRGB extends BasePalette { - static from(source: Swatch | string, options?: Partial): PaletteRGB; -} - -// @public -export interface PaletteRGBOptions { - preserveSource: boolean; - stepContrast: number; - stepContrastRamp: number; -} - -// @public -export interface Recipe { - evaluate: RecipeEvaluate; -} - -// @public (undocumented) -export type RecipeEvaluate = (resolver: DesignTokenResolver, params: TParam) => TResult; - -// @public (undocumented) -export type RecipeEvaluateOptional = (resolver: DesignTokenResolver, params?: TParam) => TResult; - -// @public -export interface RecipeOptional { - evaluate: RecipeEvaluateOptional; -} - -// @public -export interface RelativeLuminance { - readonly relativeLuminance: number; -} - -// @public -export function resolvePaletteDirection(direction: PaletteDirection): PaletteDirectionValue; - -// @public -export class Shadow implements CSSDirective { - constructor(color: Swatch, xOffset: number, yOffset: number, blurRadius?: number | undefined, spread?: number | undefined); - // (undocumented) - blurRadius?: number | undefined; - // (undocumented) - color: Swatch; - // (undocumented) - createCSS(): string; - // (undocumented) - spread?: number | undefined; - // (undocumented) - xOffset: number; - // (undocumented) - yOffset: number; -} - -// @public -export type ShadowValue = Shadow | DesignTokenMultiValue | string; - -// @public -export type StringCondition = Record; - -// @public -export type StyleDeclaration = { - styles?: Styles | Iterable; - properties?: StyleProperties; -}; - -// @public -export type StyleModuleEvaluateParameters = StyleModuleTarget & InteractivityDefinition; - -// @public -export interface StyleModuleTarget { - context?: string; - contextCondition?: string; - // @beta - ignoreInteractivity?: boolean; - part?: string; - partCondition?: string; - stateOnContext?: boolean; -} - -// @public -export type StyleProperties = Partial>; - -// @public -export type StylePropertiesMap = Map; - -// @public -export const StyleProperty: { - readonly backgroundFill: "backgroundFill"; - readonly foregroundFill: "foregroundFill"; - readonly borderFillTop: "borderFillTop"; - readonly borderFillRight: "borderFillRight"; - readonly borderFillBottom: "borderFillBottom"; - readonly borderFillLeft: "borderFillLeft"; - readonly borderThicknessTop: "borderThicknessTop"; - readonly borderThicknessRight: "borderThicknessRight"; - readonly borderThicknessBottom: "borderThicknessBottom"; - readonly borderThicknessLeft: "borderThicknessLeft"; - readonly borderStyleTop: "borderStyleTop"; - readonly borderStyleRight: "borderStyleRight"; - readonly borderStyleBottom: "borderStyleBottom"; - readonly borderStyleLeft: "borderStyleLeft"; - readonly cornerRadiusTopLeft: "cornerRadiusTopLeft"; - readonly cornerRadiusTopRight: "cornerRadiusTopRight"; - readonly cornerRadiusBottomRight: "cornerRadiusBottomRight"; - readonly cornerRadiusBottomLeft: "cornerRadiusBottomLeft"; - readonly fontFamily: "fontFamily"; - readonly fontSize: "fontSize"; - readonly fontWeight: "fontWeight"; - readonly fontStyle: "fontStyle"; - readonly fontVariationSettings: "fontVariationSettings"; - readonly letterSpacing: "letterSpacing"; - readonly lineHeight: "lineHeight"; - readonly paddingTop: "paddingTop"; - readonly paddingRight: "paddingRight"; - readonly paddingBottom: "paddingBottom"; - readonly paddingLeft: "paddingLeft"; - readonly gap: "gap"; - readonly height: "height"; - readonly width: "width"; - readonly layoutDirection: "layoutDirection"; - readonly opacity: "opacity"; - readonly cursor: "cursor"; - readonly outlineColor: "outlineColor"; - readonly outlineOffset: "outlineOffset"; - readonly outlineStyle: "outlineStyle"; - readonly outlineWidth: "outlineWidth"; - readonly shadow: "shadow"; -}; - -// @public -export type StyleProperty = ValuesOf; - -// @public -export const stylePropertyBorderFillAll: ("borderFillTop" | "borderFillRight" | "borderFillBottom" | "borderFillLeft")[]; - -// @public -export const stylePropertyBorderStyleAll: ("borderStyleTop" | "borderStyleRight" | "borderStyleBottom" | "borderStyleLeft")[]; - -// @public -export const stylePropertyBorderThicknessAll: ("borderThicknessTop" | "borderThicknessRight" | "borderThicknessBottom" | "borderThicknessLeft")[]; - -// @public -export const stylePropertyCornerRadiusAll: ("cornerRadiusTopLeft" | "cornerRadiusTopRight" | "cornerRadiusBottomRight" | "cornerRadiusBottomLeft")[]; - -// @public -export type StylePropertyCss = StyleProperty | (string & Record); - -// @public -export const stylePropertyPaddingAll: ("paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft")[]; - -// @public -export type StyleRule = { - target?: StyleModuleTarget; -} & StyleDeclaration; - -// @public -export type StyleRules = Array; - -// @public -export class Styles { - // (undocumented) - appendComposed(styles: Styles): void; - clearComposed(): void; - static compose(styles: Styles[], properties?: StyleProperties, name?: string): Styles; - get composed(): Styles[] | undefined; - get effectiveAdaptiveProperties(): Map; - get effectiveProperties(): StylePropertiesMap; - static fromDeclaration(declaration: StyleDeclaration, name?: string): Styles; - static fromProperties(properties: StyleProperties, name?: string): Styles; - readonly name: string | undefined; - get properties(): StylePropertiesMap | undefined; - set properties(properties: StylePropertiesMap | undefined); - // (undocumented) - static Shared: Map; -} - -// @public -export type StyleValue = CSSDesignToken | InteractiveValues | CSSDirective | string | number; - -// @public -export class Swatch extends Color { - protected constructor(color: Color_2, intendedColor?: Swatch); - static asOverlay(intendedColor: Swatch, reference: Swatch): Swatch; - static from(obj: { - r: number; - g: number; - b: number; - alpha?: number; - }): Swatch; - static fromColor(color: Color): Swatch; - static fromRgb(r: number, g: number, b: number, alpha?: number): Swatch; - static parse(color: string): Swatch | undefined; - get relativeLuminance(): number; - toTransparent(alpha?: number): Swatch; -} - -// @public -export function swatchAsOverlay(swatch: Swatch | null, reference: Swatch, asOverlay: boolean): Swatch | null; - -// @public -export interface TokenGroup { - intendedFor?: StyleProperty | StyleProperty[]; - name: string; - type?: DesignTokenType; -} - -// Warning: (ae-different-release-tags) This symbol has another declaration with a different release tag -// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "TypedCSSDesignToken" because one of its declarations is marked as @internal -// -// @public -export class TypedCSSDesignToken extends CSSDesignToken implements DesignTokenMetadata { - constructor(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]); - static createTyped(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; -} - -// @internal (undocumented) -export interface TypedCSSDesignToken extends DesignTokenMetadata { -} - -// Warning: (ae-different-release-tags) This symbol has another declaration with a different release tag -// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "TypedDesignToken" because one of its declarations is marked as @internal -// -// @public -export class TypedDesignToken extends DesignToken implements DesignTokenMetadata { - constructor(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]); - static createTyped(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]): TypedDesignToken; -} - -// @internal (undocumented) -export interface TypedDesignToken extends DesignTokenMetadata { -} - -// @internal -export const _white: Swatch; - -// (No @packageDocumentation comment for this package) - -``` +## API Report File for "@adaptive-web/adaptive-ui" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Color as Color_2 } from 'culori/fn'; +import { ComposableStyles } from '@microsoft/fast-element'; +import { CSSDesignToken } from '@microsoft/fast-foundation'; +import { CSSDirective } from '@microsoft/fast-element'; +import { DesignToken } from '@microsoft/fast-foundation'; +import { DesignTokenResolver } from '@microsoft/fast-foundation'; +import { ElementStyles } from '@microsoft/fast-element'; +import { TypedCSSDesignToken as TypedCSSDesignToken_2 } from '../adaptive-design-tokens.js'; +import { ValuesOf } from '@microsoft/fast-foundation'; + +// @public +export class BasePalette implements Palette { + constructor(source: Color, swatches: ReadonlyArray); + readonly closestIndexCache: Map; + closestIndexOf(reference: RelativeLuminance): number; + colorContrast(reference: RelativeLuminance, contrastTarget: number, initialSearchIndex?: number, direction?: PaletteDirection): T; + delta(reference: RelativeLuminance, delta: number, direction: PaletteDirection): T; + get(index: number): T; + readonly lastIndex: number; + readonly reversedSwatches: ReadonlyArray; + readonly source: Color; + readonly swatches: ReadonlyArray; +} + +// @internal +export const _black: Swatch; + +// @public +export function blackOrWhiteByContrast(reference: Swatch, minContrast: number, defaultBlack: boolean): Swatch; + +// @public +export function blackOrWhiteByContrastSet(set: InteractiveSwatchSet, minContrast: number, defaultBlack: boolean): InteractiveSwatchSet; + +// @public +export type BooleanCondition = string; + +// @public (undocumented) +export const BorderFill: { + all: (value: StyleValue) => StyleProperties; +}; + +// @public (undocumented) +export const BorderStyle: { + all: (value: StyleValue) => StyleProperties; +}; + +// @public (undocumented) +export const BorderThickness: { + all: (value: StyleValue) => StyleProperties; +}; + +// @public +export class Color implements RelativeLuminance, CSSDirective { + constructor(color: Color_2); + readonly color: Color_2; + contrast: any; + createCSS: () => string; + static from(obj: { + r: number; + g: number; + b: number; + alpha?: number; + }): Color; + static fromRgb(r: number, g: number, b: number, alpha?: number): Color; + static parse(color: string): Color | undefined; + get relativeLuminance(): number; + toColorString(): string; +} + +// @public +export type ColorRecipe = RecipeOptional; + +// @public +export type ColorRecipeBySet = Recipe; + +// @public +export type ColorRecipeBySetEvaluate = RecipeEvaluate; + +// @public +export type ColorRecipeEvaluate = RecipeEvaluateOptional; + +// @public +export type ColorRecipePalette = Recipe; + +// @public +export type ColorRecipePaletteEvaluate = RecipeEvaluate; + +// @public +export type ColorRecipePaletteParams = ColorRecipeParams & { + palette: Palette; +}; + +// @public +export type ColorRecipeParams = { + reference: Swatch | null; +}; + +// @public +export interface ComponentAnatomy { + conditions: TConditions; + context?: string; + focus?: FocusDefinition; + interactivity?: InteractivityDefinition; + name?: string; + parts: TParts; +} + +// @public +export type ComponentConditions = Record; + +// @public +export type ComponentParts = Record; + +// @public +export type Condition = BooleanCondition | StringCondition; + +// @public +export function contrast(a: RelativeLuminance, b: RelativeLuminance): number; + +// @public +export function contrastAndDeltaSwatchSet(palette: Palette, reference: Swatch, minContrast: number, restDelta: number, hoverDelta: number, activeDelta: number, focusDelta: number, disabledDelta: number, disabledPalette?: Palette, direction?: PaletteDirection, zeroAsTransparent?: boolean): InteractiveSwatchSet; + +// @public +export function contrastSwatch(palette: Palette, reference: Swatch, minContrast: number, direction?: PaletteDirection): Swatch; + +// @public (undocumented) +export const CornerRadius: { + all: (value: StyleValue) => StyleProperties; +}; + +// Warning: (ae-internal-missing-underscore) The name "create" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal @deprecated (undocumented) +export const create: typeof DesignToken.create; + +// @public +export function createForegroundSet(foregroundRecipe: TypedDesignToken, background: InteractiveTokenGroup): InteractiveTokenGroup; + +// @public +export function createForegroundSetBySet(foregroundRecipe: TypedDesignToken, background: InteractiveTokenGroup): InteractiveTokenGroup; + +// Warning: (ae-internal-missing-underscore) The name "createNonCss" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal @deprecated (undocumented) +export function createNonCss(name: string): DesignToken; + +// @public +export function createTokenColor(name: string, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; + +// @public +export function createTokenColorRecipe(baseName: string, intendedFor: StyleProperty | StyleProperty[], evaluate: ColorRecipeEvaluate): TypedDesignToken>; + +// @public +export function createTokenColorRecipeBySet(baseName: string, intendedFor: StyleProperty | StyleProperty[], evaluate: ColorRecipeBySetEvaluate): TypedDesignToken>; + +// @public +export function createTokenColorRecipeForPalette(baseName: string, intendedFor: StyleProperty | StyleProperty[], evaluate: ColorRecipePaletteEvaluate): TypedDesignToken>; + +// @public +export function createTokenColorRecipeValue(recipeToken: TypedDesignToken>): TypedCSSDesignToken; + +// @public +export function createTokenColorRecipeWithPalette(recipeToken: TypedDesignToken>, paletteToken: DesignToken): TypedDesignToken>; + +// @public +export function createTokenColorSet(recipeToken: TypedDesignToken): InteractiveTokenGroup; + +// @public +export function createTokenDelta(baseName: string, state: InteractiveState, value: number | DesignToken): TypedDesignToken; + +// @public +export function createTokenDimension(name: string, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; + +// @public +export function createTokenFontFamily(name: string): TypedCSSDesignToken; + +// @public +export function createTokenFontSize(name: string): TypedCSSDesignToken; + +// @public +export function createTokenFontStyle(name: string): TypedCSSDesignToken; + +// @public +export function createTokenFontVariations(name: string): TypedCSSDesignToken; + +// @public +export function createTokenFontWeight(name: string): TypedCSSDesignToken; + +// @public +export function createTokenLineHeight(name: string): TypedCSSDesignToken; + +// @public +export function createTokenMinContrast(baseName: string, value: number | DesignToken): TypedDesignToken; + +// @public +export function createTokenNonCss(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]): TypedDesignToken; + +// @public +export function createTokenNumber(name: string, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; + +// @public +export function createTokenRecipe(baseName: string, intendedFor: StyleProperty | StyleProperty[], evaluate: RecipeEvaluate): TypedDesignToken>; + +// @public +export const createTokenShadow: (name: string) => TypedCSSDesignToken_2; + +// @public +export function createTokenSwatch(name: string, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; + +// @public +export const createTyped: typeof TypedCSSDesignToken.createTyped; + +// @public +export function deltaSwatch(palette: Palette, reference: Swatch, delta: number, direction?: PaletteDirection): Swatch; + +// @public +export function deltaSwatchSet(palette: Palette, reference: Swatch, restDelta: number, hoverDelta: number, activeDelta: number, focusDelta: number, disabledDelta?: number, disabledPalette?: Palette, direction?: PaletteDirection, zeroAsTransparent?: boolean): InteractiveSwatchSet; + +// @public +export const densityAdjustmentUnits: TypedDesignToken; + +// @public +export class DensityPaddingAndGapTokenGroup implements TokenGroup { + constructor(name: string, horizontalPaddingUnits: number, horizontalGapUnits: number, verticalPaddingUnits: number, verticalGapUnits: number, designUnit: string | DesignToken, borderThickness: string | DesignToken); + readonly borderThickness: TypedCSSDesignToken; + readonly designUnit: TypedCSSDesignToken; + readonly horizontalGap: TypedCSSDesignToken; + readonly horizontalGapUnits: TypedDesignToken; + readonly horizontalPadding: TypedCSSDesignToken; + readonly horizontalPaddingUnits: TypedDesignToken; + // (undocumented) + readonly name: string; + get padding(): CSSDirective; + readonly verticalGap: TypedCSSDesignToken; + readonly verticalGapUnits: TypedDesignToken; + readonly verticalPadding: TypedCSSDesignToken; + readonly verticalPaddingUnits: TypedDesignToken; +} + +// @public +export class DesignTokenMetadata { + // (undocumented) + protected init(type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]): void; + get intendedFor(): StyleProperty[] | undefined; + protected set intendedFor(value: StyleProperty[] | undefined); + get type(): DesignTokenType; + protected set type(value: DesignTokenType); +} + +// @public +export class DesignTokenMultiValue extends Array implements CSSDirective { + // (undocumented) + createCSS(): string; +} + +// @public +export abstract class DesignTokenRegistry { + static Shared: Map>; +} + +// @public +export const DesignTokenType: { + readonly color: "color"; + readonly dimension: "dimension"; + readonly fontFamily: "fontFamily"; + readonly fontWeight: "fontWeight"; + readonly duration: "duration"; + readonly cubicBezier: "cubicBezier"; + readonly number: "number"; + readonly strokeStyle: "strokeStyle"; + readonly border: "border"; + readonly transition: "transition"; + readonly shadow: "shadow"; + readonly gradient: "gradient"; + readonly typography: "typography"; + readonly fontStyle: "fontStyle"; + readonly fontVariations: "fontVariations"; + readonly palette: "palette"; + readonly recipe: "recipe"; + readonly string: "string"; +}; + +// @public +export type DesignTokenType = ValuesOf | string; + +// @public +export function directionByIsDark(color: RelativeLuminance): PaletteDirectionValue; + +// @public +export class ElementStylesRenderer { + constructor(styles: Styles); + render(target: StyleModuleTarget, interactivity?: InteractivityDefinition): ElementStyles; + static renderStyleRules(baseStyles: ComposableStyles[] | undefined, styleRules: StyleRules, anatomy?: ComponentAnatomy): ElementStyles; +} + +// @public +export type ElevationRecipe = Recipe; + +// @public +export type ElevationRecipeEvaluate = RecipeEvaluate; + +// @public (undocumented) +export const Fill: { + backgroundAndForeground: (background: InteractiveTokenGroup, foregroundRecipe: TypedDesignToken) => StyleProperties; + backgroundAndForegroundBySet: (background: InteractiveTokenGroup, foregroundRecipe: TypedDesignToken) => StyleProperties; + foregroundNonInteractiveWithDisabled: (foreground: TypedCSSDesignToken, disabled: TypedCSSDesignToken) => StyleProperties; +}; + +// @public +export const Focus: { + readonly contextFocused: () => FocusDefinition; + readonly contextChildFocused: (indicatorPart: keyof TParts & string) => FocusDefinition; + readonly partFocused: (part: keyof TParts_1 & string) => FocusDefinition; + readonly partWithin: (indicatorPart: keyof TParts_2 & string, focusablePart: keyof TParts_2 & string) => FocusDefinition; +}; + +// @public +export interface FocusDefinition { + focusTarget: StyleModuleTarget; + resetTarget: StyleModuleTarget; +} + +// @public +export function idealColorDeltaSwatchSet(palette: Palette, reference: Swatch, minContrast: number, idealColor: Color, restDelta: number, hoverDelta: number, activeDelta: number, focusDelta: number, disabledDelta: number, disabledPalette?: Palette, direction?: PaletteDirection): InteractiveSwatchSet; + +// @public +export type InteractiveColorRecipe = ColorRecipe; + +// @public +export type InteractiveColorRecipeBySet = ColorRecipeBySet; + +// @public +export type InteractiveColorRecipeBySetEvaluate = ColorRecipeBySetEvaluate; + +// @public +export type InteractiveColorRecipeEvaluate = ColorRecipeEvaluate; + +// @public +export type InteractiveColorRecipePalette = ColorRecipePalette; + +// @public +export type InteractiveColorRecipePaletteEvaluate = ColorRecipePaletteEvaluate; + +// @public +export enum InteractiveState { + active = "active", + disabled = "disabled", + focus = "focus", + hover = "hover", + rest = "rest" +} + +// @public +export interface InteractiveSwatchSet extends InteractiveValues { +} + +// @public +export function interactiveSwatchSetAsOverlay(set: InteractiveSwatchSet, reference: Swatch, asOverlay: boolean): InteractiveSwatchSet; + +// @public +export interface InteractiveTokenGroup extends TokenGroup, InteractiveValues> { +} + +// @public +export type InteractiveValues = { + [key in InteractiveState]: T; +}; + +// @public +export const Interactivity: { + readonly disabledAttribute: InteractivityDefinition; + readonly disabledClass: InteractivityDefinition; + readonly hrefAttribute: InteractivityDefinition; + readonly always: InteractivityDefinition; + readonly never: InteractivityDefinition; +}; + +// @public +export type InteractivityDefinition = { + [key in InteractiveState]?: string; +} & { + interactive?: string; +}; + +// @public +export function isDark(color: RelativeLuminance): boolean; + +// @public +export function luminanceSwatch(luminance: number): Swatch; + +// @public +export function makeSelector(params: StyleModuleEvaluateParameters, state: InteractiveState): string; + +// @public (undocumented) +export const Padding: { + all: (value: StyleValue) => StyleProperties; + verticalHorizontal: (valueVertical: StyleValue, valueHorizontal: StyleValue) => StyleProperties; +}; + +// @public +export interface Palette { + closestIndexOf(reference: RelativeLuminance): number; + colorContrast(reference: RelativeLuminance, minContrast: number, initialIndex?: number, direction?: PaletteDirection): T; + delta(reference: RelativeLuminance, delta: number, direction: PaletteDirection): T; + get(index: number): T; + readonly source: Color; + readonly swatches: ReadonlyArray; +} + +// @public +export type PaletteDirection = PaletteDirectionValue | (() => PaletteDirectionValue); + +// @public +export const PaletteDirectionValue: Readonly<{ + readonly darker: 1; + readonly lighter: -1; +}>; + +// @public +export type PaletteDirectionValue = typeof PaletteDirectionValue[keyof typeof PaletteDirectionValue]; + +// @public +export class PaletteOkhsl extends BasePalette { + // (undocumented) + static from(source: Color | string): PaletteOkhsl; +} + +// @public +export class PaletteRGB extends BasePalette { + static from(source: Swatch | string, options?: Partial): PaletteRGB; +} + +// @public +export interface PaletteRGBOptions { + preserveSource: boolean; + stepContrast: number; + stepContrastRamp: number; +} + +// @public +export interface Recipe { + evaluate: RecipeEvaluate; +} + +// @public (undocumented) +export type RecipeEvaluate = (resolver: DesignTokenResolver, params: TParam) => TResult; + +// @public (undocumented) +export type RecipeEvaluateOptional = (resolver: DesignTokenResolver, params?: TParam) => TResult; + +// @public +export interface RecipeOptional { + evaluate: RecipeEvaluateOptional; +} + +// @public +export interface RelativeLuminance { + readonly relativeLuminance: number; +} + +// @public +export function resolvePaletteDirection(direction: PaletteDirection): PaletteDirectionValue; + +// @beta (undocumented) +export interface SerializableAnatomy { + // (undocumented) + conditions: Record; + // (undocumented) + context: string; + // (undocumented) + interactivity?: InteractivityDefinition; + // (undocumented) + name: string; + // (undocumented) + parts: Record; + // (undocumented) + styleRules: SerializableStyleRule[]; +} + +// @beta (undocumented) +export type SerializableBooleanCondition = string; + +// @beta (undocumented) +export type SerializableCondition = SerializableBooleanCondition | SerializableStringCondition; + +// @beta (undocumented) +export type SerializableStringCondition = Record; + +// @beta (undocumented) +export interface SerializableStyleRule { + // (undocumented) + contextCondition?: string; + // (undocumented) + part: string; + // (undocumented) + styles: string[]; + // (undocumented) + tokens: SerializableToken[]; +} + +// @beta (undocumented) +export interface SerializableToken { + // (undocumented) + target: string; + // (undocumented) + tokenID: string; +} + +// @public +export class Shadow implements CSSDirective { + constructor(color: Swatch, xOffset: number, yOffset: number, blurRadius?: number | undefined, spread?: number | undefined); + // (undocumented) + blurRadius?: number | undefined; + // (undocumented) + color: Swatch; + // (undocumented) + createCSS(): string; + // (undocumented) + spread?: number | undefined; + // (undocumented) + xOffset: number; + // (undocumented) + yOffset: number; +} + +// @public +export type ShadowValue = Shadow | DesignTokenMultiValue | string; + +// @public +export type StringCondition = Record; + +// @public +export type StyleDeclaration = { + styles?: Styles | Iterable; + properties?: StyleProperties; +}; + +// @public +export type StyleModuleEvaluateParameters = StyleModuleTarget & InteractivityDefinition; + +// @public +export interface StyleModuleTarget { + context?: string; + contextCondition?: string; + // @beta + ignoreInteractivity?: boolean; + part?: string; + partCondition?: string; + stateOnContext?: boolean; +} + +// @public +export type StyleProperties = Partial>; + +// @public +export type StylePropertiesMap = Map; + +// @public +export const StyleProperty: { + readonly backgroundFill: "backgroundFill"; + readonly foregroundFill: "foregroundFill"; + readonly borderFillTop: "borderFillTop"; + readonly borderFillRight: "borderFillRight"; + readonly borderFillBottom: "borderFillBottom"; + readonly borderFillLeft: "borderFillLeft"; + readonly borderThicknessTop: "borderThicknessTop"; + readonly borderThicknessRight: "borderThicknessRight"; + readonly borderThicknessBottom: "borderThicknessBottom"; + readonly borderThicknessLeft: "borderThicknessLeft"; + readonly borderStyleTop: "borderStyleTop"; + readonly borderStyleRight: "borderStyleRight"; + readonly borderStyleBottom: "borderStyleBottom"; + readonly borderStyleLeft: "borderStyleLeft"; + readonly cornerRadiusTopLeft: "cornerRadiusTopLeft"; + readonly cornerRadiusTopRight: "cornerRadiusTopRight"; + readonly cornerRadiusBottomRight: "cornerRadiusBottomRight"; + readonly cornerRadiusBottomLeft: "cornerRadiusBottomLeft"; + readonly fontFamily: "fontFamily"; + readonly fontSize: "fontSize"; + readonly fontWeight: "fontWeight"; + readonly fontStyle: "fontStyle"; + readonly fontVariationSettings: "fontVariationSettings"; + readonly letterSpacing: "letterSpacing"; + readonly lineHeight: "lineHeight"; + readonly paddingTop: "paddingTop"; + readonly paddingRight: "paddingRight"; + readonly paddingBottom: "paddingBottom"; + readonly paddingLeft: "paddingLeft"; + readonly gap: "gap"; + readonly height: "height"; + readonly width: "width"; + readonly layoutDirection: "layoutDirection"; + readonly opacity: "opacity"; + readonly cursor: "cursor"; + readonly outlineColor: "outlineColor"; + readonly outlineOffset: "outlineOffset"; + readonly outlineStyle: "outlineStyle"; + readonly outlineWidth: "outlineWidth"; + readonly shadow: "shadow"; +}; + +// @public +export type StyleProperty = ValuesOf; + +// @public +export const stylePropertyBorderFillAll: ("borderFillTop" | "borderFillRight" | "borderFillBottom" | "borderFillLeft")[]; + +// @public +export const stylePropertyBorderStyleAll: ("borderStyleTop" | "borderStyleRight" | "borderStyleBottom" | "borderStyleLeft")[]; + +// @public +export const stylePropertyBorderThicknessAll: ("borderThicknessTop" | "borderThicknessRight" | "borderThicknessBottom" | "borderThicknessLeft")[]; + +// @public +export const stylePropertyCornerRadiusAll: ("cornerRadiusTopLeft" | "cornerRadiusTopRight" | "cornerRadiusBottomRight" | "cornerRadiusBottomLeft")[]; + +// @public +export type StylePropertyCss = StyleProperty | (string & Record); + +// @public +export const stylePropertyPaddingAll: ("paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft")[]; + +// @public +export type StyleRule = { + target?: StyleModuleTarget; +} & StyleDeclaration; + +// @public +export type StyleRules = Array; + +// @public +export class Styles { + // (undocumented) + appendComposed(styles: Styles): void; + clearComposed(): void; + static compose(styles: Styles[], properties?: StyleProperties, name?: string): Styles; + get composed(): Styles[] | undefined; + get effectiveAdaptiveProperties(): Map; + get effectiveProperties(): StylePropertiesMap; + static fromDeclaration(declaration: StyleDeclaration, name?: string): Styles; + static fromProperties(properties: StyleProperties, name?: string): Styles; + readonly name: string | undefined; + get properties(): StylePropertiesMap | undefined; + set properties(properties: StylePropertiesMap | undefined); + // (undocumented) + static Shared: Map; +} + +// @public +export type StyleValue = CSSDesignToken | InteractiveValues | CSSDirective | string | number; + +// @public +export class Swatch extends Color { + protected constructor(color: Color_2, intendedColor?: Swatch); + static asOverlay(intendedColor: Swatch, reference: Swatch): Swatch; + static from(obj: { + r: number; + g: number; + b: number; + alpha?: number; + }): Swatch; + static fromColor(color: Color): Swatch; + static fromRgb(r: number, g: number, b: number, alpha?: number): Swatch; + static parse(color: string): Swatch | undefined; + get relativeLuminance(): number; + toTransparent(alpha?: number): Swatch; +} + +// @public +export function swatchAsOverlay(swatch: Swatch | null, reference: Swatch, asOverlay: boolean): Swatch | null; + +// @public +export interface TokenGroup { + intendedFor?: StyleProperty | StyleProperty[]; + name: string; + type?: DesignTokenType; +} + +// Warning: (ae-different-release-tags) This symbol has another declaration with a different release tag +// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "TypedCSSDesignToken" because one of its declarations is marked as @internal +// +// @public +export class TypedCSSDesignToken extends CSSDesignToken implements DesignTokenMetadata { + constructor(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]); + static createTyped(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]): TypedCSSDesignToken; +} + +// @internal (undocumented) +export interface TypedCSSDesignToken extends DesignTokenMetadata { +} + +// Warning: (ae-different-release-tags) This symbol has another declaration with a different release tag +// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "TypedDesignToken" because one of its declarations is marked as @internal +// +// @public +export class TypedDesignToken extends DesignToken implements DesignTokenMetadata { + constructor(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]); + static createTyped(name: string, type: DesignTokenType, intendedFor?: StyleProperty | StyleProperty[]): TypedDesignToken; +} + +// @internal (undocumented) +export interface TypedDesignToken extends DesignTokenMetadata { +} + +// @internal +export const _white: Swatch; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/adaptive-ui/src/bin/aui.ts b/packages/adaptive-ui/src/bin/aui.ts index fb660c8f..7c059136 100644 --- a/packages/adaptive-ui/src/bin/aui.ts +++ b/packages/adaptive-ui/src/bin/aui.ts @@ -1,13 +1,28 @@ import "./install-dom-shim.js"; import path from "path"; import fs from "fs"; +import fsp from "fs/promises"; import { matcher } from "matcher" import * as prettier from "prettier"; import { ComposableStyles, ElementStyles } from '@microsoft/fast-element'; import { Command } from 'commander'; import { glob } from "glob"; import { ElementStylesRenderer } from '../core/modules/element-styles-renderer.js'; -import { ComponentAnatomy, ComponentConditions, ComponentParts, StyleRules } from '../core/modules/types.js'; +import { + ComponentAnatomy, + ComponentConditions, + ComponentParts, + SerializableAnatomy, + StyleModuleTarget, + StyleRules + } from '../core/modules/types.js'; +import { + DesignTokenRegistry, + StyleProperties, + StyleRule, + Styles, + TypedCSSDesignToken + } from "../core/index.js"; const program = new Command(); @@ -56,6 +71,21 @@ program.command("compile-styles ").description("") process.exit(0); }) }); +program.command("compile-json-anatomy ") +.description("Compile a stylesheet from a JSON anatomy") +.action(async (path: string) => { + const data = (await fsp.readFile(path)).toString(); + await import("../reference/index.js"); + + const jsonData = JSON.parse(data); + const compiler = new SheetCompilerImpl(); + const sheet = jsonToAUIStyleSheet(jsonData); + const compiledSheet = compiler.compile(sheet); + const formatted = await prettier.format(compiledSheet, { filepath: "foo.css" }); + process.stdout.write("/* This file is generated. Do not edit directly */\n", ); + process.stdout.write(formatted) + process.stdout.end(); +}); program.parse() @@ -170,4 +200,41 @@ class SheetCompilerImpl implements SheetCompiler { ) .reduce((prev: string, curr: string) => prev.concat(curr), ""); } +} +function jsonToAUIStyleSheet(obj: SerializableAnatomy): AUIStyleSheet { + const sheet:AUIStyleSheet = { + anatomy: { + conditions: obj.conditions, + parts: obj.parts, + interactivity: obj.interactivity + }, + rules: obj.styleRules.map(style => { + + const styles = style.styles.map(name => { + return Styles.Shared.get(name)! + }); + const properties = style.tokens.reduce((prev, current) => { + prev[current.target] = DesignTokenRegistry.Shared.get(current.tokenID) as TypedCSSDesignToken + return prev; + }, {} as StyleProperties) + + // TODO this is incomplete + // TODO add + const target: StyleModuleTarget = { + part: obj.parts[style.part], + context: obj.context, + contextCondition: style.contextCondition + } + + const rule: StyleRule = { + styles, + properties, + target, + } + + return rule; + }) + } + + return sheet; } \ No newline at end of file diff --git a/packages/adaptive-ui/src/core/modules/types.ts b/packages/adaptive-ui/src/core/modules/types.ts index bac22e6c..a901215d 100644 --- a/packages/adaptive-ui/src/core/modules/types.ts +++ b/packages/adaptive-ui/src/core/modules/types.ts @@ -426,3 +426,44 @@ export const stylePropertyPaddingAll = [ * @public */ export type StyleRules = Array; + +/** + * @beta + */ +export type SerializableBooleanCondition = string; +/** + * @beta + */ +export type SerializableStringCondition = Record; +/** + * @beta + */ +export type SerializableCondition = SerializableBooleanCondition | SerializableStringCondition; + +/** + * @beta + */ +export interface SerializableToken { + target: string, + tokenID: string +} +/** + * @beta + */ +export interface SerializableStyleRule { + contextCondition?: string; + part: string, + styles: string[], + tokens: SerializableToken[]; +} +/** + * @beta + */ +export interface SerializableAnatomy{ + name: string, + context: string, + interactivity?: InteractivityDefinition, + conditions: Record, + parts: Record, + styleRules: SerializableStyleRule[] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 07424461..ef66c558 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,6 @@ "sourceMap": true, "strictNullChecks": true, "target": "ES2020", - "types": ["node"], + "types": ["node"] } }