diff --git a/.pnp.cjs b/.pnp.cjs index 6eb235fef..5ad6019d7 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -75,6 +75,7 @@ const RAW_RUNTIME_STATE = ["@types/yargs", "npm:17.0.29"],\ ["@typescript-eslint/eslint-plugin", "virtual:4a4dfdd9a7df5ec5e275841a43fbecdb97f28d7f31447ab74c1dd2a4d56fe264664aa1dc4ad44cc92e46e533864e6b71f8d1474657f30ffd4d572a69c55bcf0b#npm:8.24.0"],\ ["@typescript-eslint/parser", "virtual:4a4dfdd9a7df5ec5e275841a43fbecdb97f28d7f31447ab74c1dd2a4d56fe264664aa1dc4ad44cc92e46e533864e6b71f8d1474657f30ffd4d572a69c55bcf0b#npm:8.24.0"],\ + ["ajv", "npm:8.18.0"],\ ["chalk", "npm:5.4.1"],\ ["esbuild", "npm:0.19.5"],\ ["eslint", "virtual:36b10b38a2f3e49d8cd162fbeda8e49e065ae2d0ebbbd25b0a3339d0203e0ec0394d852d27989cf9f4297d5cf181367ebbc4ea51690fe53337f9c0c2783178a4#npm:9.20.1"],\ @@ -85,6 +86,7 @@ const RAW_RUNTIME_STATE = ["eslint-plugin-promise", "virtual:4a4dfdd9a7df5ec5e275841a43fbecdb97f28d7f31447ab74c1dd2a4d56fe264664aa1dc4ad44cc92e46e533864e6b71f8d1474657f30ffd4d572a69c55bcf0b#npm:6.1.1"],\ ["eslint-plugin-react-hooks", "virtual:4a4dfdd9a7df5ec5e275841a43fbecdb97f28d7f31447ab74c1dd2a4d56fe264664aa1dc4ad44cc92e46e533864e6b71f8d1474657f30ffd4d572a69c55bcf0b#npm:5.1.0"],\ ["globals", "npm:15.14.0"],\ + ["js-yaml", "npm:4.1.1"],\ ["prettier", "npm:3.2.5"],\ ["rollup", "npm:4.34.6"],\ ["ts-node", "virtual:74fcc7b6256f60a89945acc6b1c62e6158616c0dcf2312663cfe08ceda598b7d943e5de97f39a415e4491198cfa92535d8e40310ec84839b8241ca342059e353#npm:10.9.1"],\ @@ -6807,6 +6809,7 @@ const RAW_RUNTIME_STATE = ["@types/yargs", "npm:17.0.29"],\ ["@typescript-eslint/eslint-plugin", "virtual:4a4dfdd9a7df5ec5e275841a43fbecdb97f28d7f31447ab74c1dd2a4d56fe264664aa1dc4ad44cc92e46e533864e6b71f8d1474657f30ffd4d572a69c55bcf0b#npm:8.24.0"],\ ["@typescript-eslint/parser", "virtual:4a4dfdd9a7df5ec5e275841a43fbecdb97f28d7f31447ab74c1dd2a4d56fe264664aa1dc4ad44cc92e46e533864e6b71f8d1474657f30ffd4d572a69c55bcf0b#npm:8.24.0"],\ + ["ajv", "npm:8.18.0"],\ ["chalk", "npm:5.4.1"],\ ["esbuild", "npm:0.19.5"],\ ["eslint", "virtual:36b10b38a2f3e49d8cd162fbeda8e49e065ae2d0ebbbd25b0a3339d0203e0ec0394d852d27989cf9f4297d5cf181367ebbc4ea51690fe53337f9c0c2783178a4#npm:9.20.1"],\ @@ -6817,6 +6820,7 @@ const RAW_RUNTIME_STATE = ["eslint-plugin-promise", "virtual:4a4dfdd9a7df5ec5e275841a43fbecdb97f28d7f31447ab74c1dd2a4d56fe264664aa1dc4ad44cc92e46e533864e6b71f8d1474657f30ffd4d572a69c55bcf0b#npm:6.1.1"],\ ["eslint-plugin-react-hooks", "virtual:4a4dfdd9a7df5ec5e275841a43fbecdb97f28d7f31447ab74c1dd2a4d56fe264664aa1dc4ad44cc92e46e533864e6b71f8d1474657f30ffd4d572a69c55bcf0b#npm:5.1.0"],\ ["globals", "npm:15.14.0"],\ + ["js-yaml", "npm:4.1.1"],\ ["prettier", "npm:3.2.5"],\ ["rollup", "npm:4.34.6"],\ ["ts-node", "virtual:74fcc7b6256f60a89945acc6b1c62e6158616c0dcf2312663cfe08ceda598b7d943e5de97f39a415e4491198cfa92535d8e40310ec84839b8241ca342059e353#npm:10.9.1"],\ @@ -6864,6 +6868,9 @@ const RAW_RUNTIME_STATE = ["@ironclad/rivet-core", "workspace:packages/core"],\ ["@ironclad/trivet", "workspace:packages/trivet"],\ ["@recoiljs/refine", "npm:0.1.1"],\ + ["@rjsf/core", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ + ["@rjsf/utils", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ + ["@rjsf/validator-ajv8", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ ["@swc/core", "virtual:36b10b38a2f3e49d8cd162fbeda8e49e065ae2d0ebbbd25b0a3339d0203e0ec0394d852d27989cf9f4297d5cf181367ebbc4ea51690fe53337f9c0c2783178a4#npm:1.3.94"],\ ["@tanstack/react-query", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:5.4.3"],\ ["@tauri-apps/api", "npm:1.5.1"],\ @@ -8165,6 +8172,91 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["@rjsf/core", [\ + ["npm:6.4.1", {\ + "packageLocation": "./.yarn/cache/@rjsf-core-npm-6.4.1-888b78e645-0cc3324ae3.zip/node_modules/@rjsf/core/",\ + "packageDependencies": [\ + ["@rjsf/core", "npm:6.4.1"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1", {\ + "packageLocation": "./.yarn/__virtual__/@rjsf-core-virtual-a499d8a6b5/0/cache/@rjsf-core-npm-6.4.1-888b78e645-0cc3324ae3.zip/node_modules/@rjsf/core/",\ + "packageDependencies": [\ + ["@rjsf/core", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ + ["@rjsf/utils", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ + ["@rjsf/validator-ajv8", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ + ["@types/react", "npm:18.2.31"],\ + ["@types/rjsf__utils", null],\ + ["lodash", "npm:4.17.23"],\ + ["lodash-es", "npm:4.17.23"],\ + ["markdown-to-jsx", "virtual:a499d8a6b53d1bd7863b640984fe507c8522ce2cdb7d21a844e582239ee2fb69027a4e9c4d310d114f9355423f0a7aed65d02bb562645d5f927130d3b471fbe2#npm:8.0.0"],\ + ["prop-types", "npm:15.8.1"],\ + ["react", "npm:18.2.0"]\ + ],\ + "packagePeers": [\ + "@rjsf/utils",\ + "@types/react",\ + "@types/rjsf__utils",\ + "react"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@rjsf/utils", [\ + ["npm:6.4.1", {\ + "packageLocation": "./.yarn/cache/@rjsf-utils-npm-6.4.1-0331d97eb7-b8967b731f.zip/node_modules/@rjsf/utils/",\ + "packageDependencies": [\ + ["@rjsf/utils", "npm:6.4.1"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1", {\ + "packageLocation": "./.yarn/__virtual__/@rjsf-utils-virtual-4d394ed644/0/cache/@rjsf-utils-npm-6.4.1-0331d97eb7-b8967b731f.zip/node_modules/@rjsf/utils/",\ + "packageDependencies": [\ + ["@rjsf/utils", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ + ["@types/react", "npm:18.2.31"],\ + ["@x0k/json-schema-merge", "npm:1.0.2"],\ + ["fast-uri", "npm:3.1.0"],\ + ["jsonpointer", "npm:5.0.1"],\ + ["lodash", "npm:4.17.23"],\ + ["lodash-es", "npm:4.17.23"],\ + ["react", "npm:18.2.0"],\ + ["react-is", "npm:18.3.1"]\ + ],\ + "packagePeers": [\ + "@types/react",\ + "react"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@rjsf/validator-ajv8", [\ + ["npm:6.4.1", {\ + "packageLocation": "./.yarn/cache/@rjsf-validator-ajv8-npm-6.4.1-0acab8696a-27bfe8d740.zip/node_modules/@rjsf/validator-ajv8/",\ + "packageDependencies": [\ + ["@rjsf/validator-ajv8", "npm:6.4.1"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1", {\ + "packageLocation": "./.yarn/__virtual__/@rjsf-validator-ajv8-virtual-1024b1dd8a/0/cache/@rjsf-validator-ajv8-npm-6.4.1-0acab8696a-27bfe8d740.zip/node_modules/@rjsf/validator-ajv8/",\ + "packageDependencies": [\ + ["@rjsf/validator-ajv8", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ + ["@rjsf/utils", "virtual:388c29633752d7c364e0487c276ae72861ce5d69c069bff16a49b35801303d87d39cb24723bbac1721c48df59f346575324fe3c6de8ead4fb7d83d6ae4a0e521#npm:6.4.1"],\ + ["@types/rjsf__utils", null],\ + ["ajv", "npm:8.18.0"],\ + ["ajv-formats", "virtual:1024b1dd8a216519ccbcdfc8b629cc8666e0722379630aec8a796328c6c267c837e6b244e33ab161786f3fa0e0bf070095105e95066ba0713845dfb2d4531c14#npm:2.1.1"],\ + ["lodash", "npm:4.17.23"],\ + ["lodash-es", "npm:4.17.23"]\ + ],\ + "packagePeers": [\ + "@rjsf/utils",\ + "@types/rjsf__utils"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@rollup/plugin-virtual", [\ ["npm:3.0.1", {\ "packageLocation": "./.yarn/cache/@rollup-plugin-virtual-npm-3.0.1-aed0b67c3d-9380088495.zip/node_modules/@rollup/plugin-virtual/",\ @@ -11171,6 +11263,16 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["@x0k/json-schema-merge", [\ + ["npm:1.0.2", {\ + "packageLocation": "./.yarn/cache/@x0k-json-schema-merge-npm-1.0.2-4f3e0d6ee2-73e6e6e445.zip/node_modules/@x0k/json-schema-merge/",\ + "packageDependencies": [\ + ["@x0k/json-schema-merge", "npm:1.0.2"],\ + ["@types/json-schema", "npm:7.0.15"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@xtuc/ieee754", [\ ["npm:1.2.0", {\ "packageLocation": "./.yarn/cache/@xtuc-ieee754-npm-1.2.0-ec0ce4e025-ab033b0329.zip/node_modules/@xtuc/ieee754/",\ @@ -11410,6 +11512,17 @@ const RAW_RUNTIME_STATE = ["uri-js", "npm:4.4.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:8.18.0", {\ + "packageLocation": "./.yarn/cache/ajv-npm-8.18.0-6e5e062765-bfed9de827.zip/node_modules/ajv/",\ + "packageDependencies": [\ + ["ajv", "npm:8.18.0"],\ + ["fast-deep-equal", "npm:3.1.3"],\ + ["fast-uri", "npm:3.1.0"],\ + ["json-schema-traverse", "npm:1.0.0"],\ + ["require-from-string", "npm:2.0.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["ajv-formats", [\ @@ -11420,6 +11533,19 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ + ["virtual:1024b1dd8a216519ccbcdfc8b629cc8666e0722379630aec8a796328c6c267c837e6b244e33ab161786f3fa0e0bf070095105e95066ba0713845dfb2d4531c14#npm:2.1.1", {\ + "packageLocation": "./.yarn/__virtual__/ajv-formats-virtual-c20f6a369e/0/cache/ajv-formats-npm-2.1.1-3cec02eae9-70c263ded2.zip/node_modules/ajv-formats/",\ + "packageDependencies": [\ + ["ajv-formats", "virtual:1024b1dd8a216519ccbcdfc8b629cc8666e0722379630aec8a796328c6c267c837e6b244e33ab161786f3fa0e0bf070095105e95066ba0713845dfb2d4531c14#npm:2.1.1"],\ + ["@types/ajv", null],\ + ["ajv", "npm:8.18.0"]\ + ],\ + "packagePeers": [\ + "@types/ajv",\ + "ajv"\ + ],\ + "linkType": "HARD"\ + }],\ ["virtual:6f0a75e2e24507b64e23679df5b98c6b0a9e9a8621a95c9f8c1ae8bd406eb857104f4065344af3a2d6d0a9ff549b8adbd3d15f60ef166628999040bd862e7a27#npm:2.1.1", {\ "packageLocation": "./.yarn/__virtual__/ajv-formats-virtual-c2f25a3c34/0/cache/ajv-formats-npm-2.1.1-3cec02eae9-70c263ded2.zip/node_modules/ajv-formats/",\ "packageDependencies": [\ @@ -16699,6 +16825,15 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["fast-uri", [\ + ["npm:3.1.0", {\ + "packageLocation": "./.yarn/cache/fast-uri-npm-3.1.0-57fa0b3f3c-818b2c96dc.zip/node_modules/fast-uri/",\ + "packageDependencies": [\ + ["fast-uri", "npm:3.1.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["fast-url-parser", [\ ["npm:1.1.3", {\ "packageLocation": "./.yarn/cache/fast-url-parser-npm-1.1.3-9be698120a-6d33f46ce9.zip/node_modules/fast-url-parser/",\ @@ -19405,6 +19540,14 @@ const RAW_RUNTIME_STATE = ["argparse", "npm:2.0.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:4.1.1", {\ + "packageLocation": "./.yarn/cache/js-yaml-npm-4.1.1-86ec786790-a52d0519f0.zip/node_modules/js-yaml/",\ + "packageDependencies": [\ + ["js-yaml", "npm:4.1.1"],\ + ["argparse", "npm:2.0.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["jsdom", [\ @@ -19589,6 +19732,15 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["jsonpointer", [\ + ["npm:5.0.1", {\ + "packageLocation": "./.yarn/cache/jsonpointer-npm-5.0.1-8e4c22e512-0b40f71290.zip/node_modules/jsonpointer/",\ + "packageDependencies": [\ + ["jsonpointer", "npm:5.0.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["jsonwebtoken", [\ ["npm:9.0.2", {\ "packageLocation": "./.yarn/cache/jsonwebtoken-npm-9.0.2-42c6b14d02-6e9b6d879c.zip/node_modules/jsonwebtoken/",\ @@ -19839,6 +19991,13 @@ const RAW_RUNTIME_STATE = ["lodash", "npm:4.17.21"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:4.17.23", {\ + "packageLocation": "./.yarn/cache/lodash-npm-4.17.23-50bdb1c01a-82504c8825.zip/node_modules/lodash/",\ + "packageDependencies": [\ + ["lodash", "npm:4.17.23"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["lodash-es", [\ @@ -19848,6 +20007,13 @@ const RAW_RUNTIME_STATE = ["lodash-es", "npm:4.17.21"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:4.17.23", {\ + "packageLocation": "./.yarn/cache/lodash-es-npm-4.17.23-b4279789e6-1feae200df.zip/node_modules/lodash-es/",\ + "packageDependencies": [\ + ["lodash-es", "npm:4.17.23"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["lodash.curry", [\ @@ -20132,6 +20298,28 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["markdown-to-jsx", [\ + ["npm:8.0.0", {\ + "packageLocation": "./.yarn/cache/markdown-to-jsx-npm-8.0.0-d0f01b3768-5b9bb1f189.zip/node_modules/markdown-to-jsx/",\ + "packageDependencies": [\ + ["markdown-to-jsx", "npm:8.0.0"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:a499d8a6b53d1bd7863b640984fe507c8522ce2cdb7d21a844e582239ee2fb69027a4e9c4d310d114f9355423f0a7aed65d02bb562645d5f927130d3b471fbe2#npm:8.0.0", {\ + "packageLocation": "./.yarn/__virtual__/markdown-to-jsx-virtual-8af2ff0599/0/cache/markdown-to-jsx-npm-8.0.0-d0f01b3768-5b9bb1f189.zip/node_modules/markdown-to-jsx/",\ + "packageDependencies": [\ + ["markdown-to-jsx", "virtual:a499d8a6b53d1bd7863b640984fe507c8522ce2cdb7d21a844e582239ee2fb69027a4e9c4d310d114f9355423f0a7aed65d02bb562645d5f927130d3b471fbe2#npm:8.0.0"],\ + ["@types/react", "npm:18.2.31"],\ + ["react", "npm:18.2.0"]\ + ],\ + "packagePeers": [\ + "@types/react",\ + "react"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["marked", [\ ["npm:9.1.2", {\ "packageLocation": "./.yarn/cache/marked-npm-9.1.2-737b5af742-aaa7140852.zip/node_modules/marked/",\ @@ -24013,6 +24201,13 @@ const RAW_RUNTIME_STATE = ["react-is", "npm:18.2.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:18.3.1", {\ + "packageLocation": "./.yarn/cache/react-is-npm-18.3.1-370a81e1e9-d5f60c87d2.zip/node_modules/react-is/",\ + "packageDependencies": [\ + ["react-is", "npm:18.3.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["react-json-view", [\ diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..4076189a8 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 20.6.1 diff --git a/.yarn/cache/@img-sharp-libvips-linux-arm64-npm-1.0.4-24a3d8b19a-10.zip b/.yarn/cache/@img-sharp-libvips-linux-arm64-npm-1.0.4-24a3d8b19a-10.zip deleted file mode 100644 index 80ea3901a..000000000 Binary files a/.yarn/cache/@img-sharp-libvips-linux-arm64-npm-1.0.4-24a3d8b19a-10.zip and /dev/null differ diff --git a/.yarn/cache/@img-sharp-linux-arm64-npm-0.33.5-9d6c17ffc3-10.zip b/.yarn/cache/@img-sharp-linux-arm64-npm-0.33.5-9d6c17ffc3-10.zip deleted file mode 100644 index 8954f2864..000000000 Binary files a/.yarn/cache/@img-sharp-linux-arm64-npm-0.33.5-9d6c17ffc3-10.zip and /dev/null differ diff --git a/.yarn/cache/@next-swc-linux-arm64-gnu-npm-15.1.7-9f0ea36a85-10.zip b/.yarn/cache/@next-swc-linux-arm64-gnu-npm-15.1.7-9f0ea36a85-10.zip deleted file mode 100644 index d6ab69a8b..000000000 Binary files a/.yarn/cache/@next-swc-linux-arm64-gnu-npm-15.1.7-9f0ea36a85-10.zip and /dev/null differ diff --git a/.yarn/cache/@rjsf-core-npm-6.4.1-888b78e645-0cc3324ae3.zip b/.yarn/cache/@rjsf-core-npm-6.4.1-888b78e645-0cc3324ae3.zip new file mode 100644 index 000000000..37f1652aa Binary files /dev/null and b/.yarn/cache/@rjsf-core-npm-6.4.1-888b78e645-0cc3324ae3.zip differ diff --git a/.yarn/cache/@rjsf-utils-npm-6.4.1-0331d97eb7-b8967b731f.zip b/.yarn/cache/@rjsf-utils-npm-6.4.1-0331d97eb7-b8967b731f.zip new file mode 100644 index 000000000..f639f2526 Binary files /dev/null and b/.yarn/cache/@rjsf-utils-npm-6.4.1-0331d97eb7-b8967b731f.zip differ diff --git a/.yarn/cache/@rjsf-validator-ajv8-npm-6.4.1-0acab8696a-27bfe8d740.zip b/.yarn/cache/@rjsf-validator-ajv8-npm-6.4.1-0acab8696a-27bfe8d740.zip new file mode 100644 index 000000000..323c01e48 Binary files /dev/null and b/.yarn/cache/@rjsf-validator-ajv8-npm-6.4.1-0acab8696a-27bfe8d740.zip differ diff --git a/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.34.6-16388c222e-10.zip b/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.34.6-16388c222e-10.zip deleted file mode 100644 index 0d5e00005..000000000 Binary files a/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.34.6-16388c222e-10.zip and /dev/null differ diff --git a/.yarn/cache/@swc-core-linux-arm64-gnu-npm-1.3.94-a693efa0ab-10.zip b/.yarn/cache/@swc-core-linux-arm64-gnu-npm-1.3.94-a693efa0ab-10.zip deleted file mode 100644 index fa0128420..000000000 Binary files a/.yarn/cache/@swc-core-linux-arm64-gnu-npm-1.3.94-a693efa0ab-10.zip and /dev/null differ diff --git a/.yarn/cache/@tauri-apps-cli-linux-arm64-gnu-npm-1.6.0-b3e992168d-10.zip b/.yarn/cache/@tauri-apps-cli-linux-arm64-gnu-npm-1.6.0-b3e992168d-10.zip deleted file mode 100644 index 0a48e148d..000000000 Binary files a/.yarn/cache/@tauri-apps-cli-linux-arm64-gnu-npm-1.6.0-b3e992168d-10.zip and /dev/null differ diff --git a/.yarn/cache/@x0k-json-schema-merge-npm-1.0.2-4f3e0d6ee2-73e6e6e445.zip b/.yarn/cache/@x0k-json-schema-merge-npm-1.0.2-4f3e0d6ee2-73e6e6e445.zip new file mode 100644 index 000000000..965c5ce87 Binary files /dev/null and b/.yarn/cache/@x0k-json-schema-merge-npm-1.0.2-4f3e0d6ee2-73e6e6e445.zip differ diff --git a/.yarn/cache/ajv-npm-8.18.0-6e5e062765-bfed9de827.zip b/.yarn/cache/ajv-npm-8.18.0-6e5e062765-bfed9de827.zip new file mode 100644 index 000000000..ff78d4b5d Binary files /dev/null and b/.yarn/cache/ajv-npm-8.18.0-6e5e062765-bfed9de827.zip differ diff --git a/.yarn/cache/fast-uri-npm-3.1.0-57fa0b3f3c-818b2c96dc.zip b/.yarn/cache/fast-uri-npm-3.1.0-57fa0b3f3c-818b2c96dc.zip new file mode 100644 index 000000000..7059a1007 Binary files /dev/null and b/.yarn/cache/fast-uri-npm-3.1.0-57fa0b3f3c-818b2c96dc.zip differ diff --git a/.yarn/cache/js-yaml-npm-4.1.1-86ec786790-a52d0519f0.zip b/.yarn/cache/js-yaml-npm-4.1.1-86ec786790-a52d0519f0.zip new file mode 100644 index 000000000..b32cf91ae Binary files /dev/null and b/.yarn/cache/js-yaml-npm-4.1.1-86ec786790-a52d0519f0.zip differ diff --git a/.yarn/cache/jsonpointer-npm-5.0.1-8e4c22e512-0b40f71290.zip b/.yarn/cache/jsonpointer-npm-5.0.1-8e4c22e512-0b40f71290.zip new file mode 100644 index 000000000..3216800d4 Binary files /dev/null and b/.yarn/cache/jsonpointer-npm-5.0.1-8e4c22e512-0b40f71290.zip differ diff --git a/.yarn/cache/lodash-es-npm-4.17.23-b4279789e6-1feae200df.zip b/.yarn/cache/lodash-es-npm-4.17.23-b4279789e6-1feae200df.zip new file mode 100644 index 000000000..71ff05d42 Binary files /dev/null and b/.yarn/cache/lodash-es-npm-4.17.23-b4279789e6-1feae200df.zip differ diff --git a/.yarn/cache/lodash-npm-4.17.23-50bdb1c01a-82504c8825.zip b/.yarn/cache/lodash-npm-4.17.23-50bdb1c01a-82504c8825.zip new file mode 100644 index 000000000..8050b2fb0 Binary files /dev/null and b/.yarn/cache/lodash-npm-4.17.23-50bdb1c01a-82504c8825.zip differ diff --git a/.yarn/cache/markdown-to-jsx-npm-8.0.0-d0f01b3768-5b9bb1f189.zip b/.yarn/cache/markdown-to-jsx-npm-8.0.0-d0f01b3768-5b9bb1f189.zip new file mode 100644 index 000000000..6fdf953ff Binary files /dev/null and b/.yarn/cache/markdown-to-jsx-npm-8.0.0-d0f01b3768-5b9bb1f189.zip differ diff --git a/.yarn/cache/react-is-npm-18.3.1-370a81e1e9-d5f60c87d2.zip b/.yarn/cache/react-is-npm-18.3.1-370a81e1e9-d5f60c87d2.zip new file mode 100644 index 000000000..9dbb5c43a Binary files /dev/null and b/.yarn/cache/react-is-npm-18.3.1-370a81e1e9-d5f60c87d2.zip differ diff --git a/.yarnrc.yml b/.yarnrc.yml index fcd74275c..618f7553b 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -9,6 +9,9 @@ packageExtensions: '@modelcontextprotocol/sdk@*': dependencies: 'eventsource-parser': '*' + '@rjsf/core@*': + dependencies: + '@rjsf/validator-ajv8': '*' pnpEnableEsmLoader: true diff --git a/package.json b/package.json index d49d0df38..d22d697bb 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@types/yargs": "^17.0.29", "@typescript-eslint/eslint-plugin": "^8.24.0", "@typescript-eslint/parser": "^8.24.0", + "ajv": "^8.18.0", "chalk": "^5.3.0", "esbuild": "^0.19.5", "eslint": "^9.20.1", @@ -35,6 +36,7 @@ "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react-hooks": "^5.1.0", "globals": "^15.14.0", + "js-yaml": "^4.1.1", "prettier": "^3.2.5", "rollup": "^4.34.6", "ts-node": "^10.9.1", diff --git a/packages/app/package.json b/packages/app/package.json index 23e2302e2..1572a0d70 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -61,6 +61,9 @@ "@ironclad/rivet-core": "workspace:^", "@ironclad/trivet": "workspace:^", "@recoiljs/refine": "^0.1.1", + "@rjsf/core": "^6.4.1", + "@rjsf/utils": "^6.4.1", + "@rjsf/validator-ajv8": "^6.4.1", "@swc/core": "^1.3.94", "@tanstack/react-query": "^5.4.3", "@tauri-apps/api": "^1.5.1", diff --git a/packages/app/src/components/CodeEditor.tsx b/packages/app/src/components/CodeEditor.tsx index dbe83b746..ab9e753cb 100644 --- a/packages/app/src/components/CodeEditor.tsx +++ b/packages/app/src/components/CodeEditor.tsx @@ -77,10 +77,7 @@ export const CodeEditor: FC<{ editorRef.current = editor; } - const latestBeforeDispose = onChangeLatest.current; - return () => { - latestBeforeDispose?.(editor.getValue()); editor.dispose(); window.removeEventListener('resize', onResize); }; diff --git a/packages/app/src/components/editors/CodeEditor.tsx b/packages/app/src/components/editors/CodeEditor.tsx index 9e00ec07c..196b71d6b 100644 --- a/packages/app/src/components/editors/CodeEditor.tsx +++ b/packages/app/src/components/editors/CodeEditor.tsx @@ -17,6 +17,12 @@ export const DefaultCodeEditor: FC< const debouncedOnChange = useDebounceFn<(node: ChartNode) => void>(onChange, { wait: 100 }); + useEffect(() => { + return () => { + debouncedOnChange.flush(); + }; + }, [debouncedOnChange]); + const onEditorChange = (newText: string) => { debouncedOnChange.run({ ...nodeLatest.current, @@ -38,6 +44,9 @@ export const DefaultCodeEditor: FC< name={editorDef.dataKey} helperMessage={helperMessage} onClose={onClose} + onBlur={() => { + debouncedOnChange.flush(); + }} language={editorDef.language} theme={editorDef.theme} id={node.id} @@ -55,6 +64,7 @@ export const CodeEditor: FC<{ name?: string; helperMessage?: string; onClose?: () => void; + onBlur?: () => void; theme?: string; language?: string; id?: string; @@ -68,6 +78,7 @@ export const CodeEditor: FC<{ name, helperMessage, onClose, + onBlur, theme, language, id, @@ -118,6 +129,7 @@ export const CodeEditor: FC<{ onChange={(newValue) => { onChangeLatest.current?.(newValue); }} + onBlur={onBlur} theme={theme} language={language} isReadonly={isReadonly || isDisabled} diff --git a/packages/app/src/components/editors/CustomEditor.tsx b/packages/app/src/components/editors/CustomEditor.tsx index 14d161e6c..eb354c603 100644 --- a/packages/app/src/components/editors/CustomEditor.tsx +++ b/packages/app/src/components/editors/CustomEditor.tsx @@ -1,4 +1,8 @@ -import { type CustomEditorDefinition, type ChartNode } from '@ironclad/rivet-core'; +import { + type CustomEditorDefinition, + type ChartNode, + type JsonSchemaFormCustomEditorDefinition, +} from '@ironclad/rivet-core'; import { type FC } from 'react'; import { type SharedEditorProps } from './SharedEditorProps'; import { match } from 'ts-pattern'; @@ -9,6 +13,7 @@ import { ObjectNodeAiAssistEditor } from './custom/ObjectNodeAiAssistEditor'; import { GptFunctionNodeJsonSchemaAiAssistEditor } from './custom/GptFunctionJsonSchemaAiAssistEditor'; import { PromptNodeAiAssistEditor } from './custom/PromptNodeAiAssistEditor'; import { TextNodeAiAssistEditor } from './custom/TextNodeAiAssistEditor'; +import { JsonSchemaFormEditor } from './custom/JsonSchemaFormEditor'; export const CustomEditor: FC< SharedEditorProps & { @@ -25,5 +30,8 @@ export const CustomEditor: FC< )) .with('PromptNodeAiAssist', () => ) .with('TextNodeAiAssist', () => ) + .with('JsonSchemaForm', () => ( + } /> + )) .otherwise(() => null); }; diff --git a/packages/app/src/components/editors/custom/JsonSchemaFormEditor.tsx b/packages/app/src/components/editors/custom/JsonSchemaFormEditor.tsx new file mode 100644 index 000000000..19c01ac08 --- /dev/null +++ b/packages/app/src/components/editors/custom/JsonSchemaFormEditor.tsx @@ -0,0 +1,762 @@ +import { Field, HelperMessage } from '@atlaskit/form'; +import Button from '@atlaskit/button'; +import Portal from '@atlaskit/portal'; +import Select from '@atlaskit/select'; +import TextArea from '@atlaskit/textarea'; +import TextField from '@atlaskit/textfield'; +import Toggle from '@atlaskit/toggle'; +import { css } from '@emotion/react'; +import Form from '@rjsf/core'; +import { + ADDITIONAL_PROPERTY_FLAG, + type ArrayFieldItemTemplateProps, + type ArrayFieldTemplateProps, + buttonId, + canExpand, + errorId, + type ErrorListProps, + type FieldErrorProps, + type FieldHelpProps, + type FieldTemplateProps, + getTemplate, + getUiOptions, + type IconButtonProps, + type ObjectFieldTemplateProps, + type RJSFSchema, + type UiSchema, + type WidgetProps, + type WrapIfAdditionalTemplateProps, + TranslatableString, +} from '@rjsf/utils'; +import validator from '@rjsf/validator-ajv8'; +import { + type ChartNode, + type JsonSchemaFormCustomEditorDefinition, + type JsonSchemaFormEditorData, +} from '@ironclad/rivet-core'; +import { type FC, type ReactNode, useCallback, useMemo, useRef, useState } from 'react'; +import { getHelperMessage } from '../editorUtils'; +import { type SharedEditorProps } from '../SharedEditorProps'; + +const styles = css` + display: flex; + flex-direction: column; + gap: 8px; + + .json-schema-form-surface { + display: flex; + flex-direction: column; + gap: 12px; + padding: 12px; + border: 1px solid var(--grey-darkish); + border-radius: 8px; + background: var(--grey-subtle-accent); + } + + .json-schema-form-root { + display: flex; + flex-direction: column; + gap: 12px; + } + + .json-schema-form-field, + .json-schema-form-field > div, + .json-schema-form-object, + .json-schema-form-array { + display: flex; + flex-direction: column; + gap: 8px; + min-width: 0; + } + + .json-schema-form-object, + .json-schema-form-array { + border: 1px solid var(--grey-darkish); + border-radius: 8px; + padding: 12px; + background: var(--grey-dark-seethrougher); + } + + .json-schema-form-title { + margin: 0; + color: var(--label-color); + font-family: var(--label-font-family); + font-weight: var(--label-font-weight); + font-size: 0.95rem; + } + + .json-schema-form-description { + color: var(--foreground-muted); + font-size: 0.9rem; + } + + .json-schema-form-array-items { + display: flex; + flex-direction: column; + gap: 12px; + } + + .json-schema-form-array-item { + display: flex; + gap: 8px; + align-items: flex-start; + } + + .json-schema-form-array-item-body { + flex: 1 1 auto; + min-width: 0; + } + + .json-schema-form-array-item-toolbar, + .json-schema-form-actions { + display: flex; + gap: 8px; + flex-wrap: wrap; + align-items: flex-start; + } + + .json-schema-form-error-list, + .json-schema-form-config-error { + display: flex; + flex-direction: column; + gap: 8px; + padding: 12px; + border: 1px solid var(--error-dark); + border-radius: 8px; + background: rgba(231, 76, 60, 0.12); + color: var(--foreground); + } + + .json-schema-form-error-list-title, + .json-schema-form-config-error-title { + margin: 0; + color: var(--error-light); + font-family: var(--label-font-family); + font-weight: var(--label-font-weight); + } + + .json-schema-form-errors { + margin: 0; + padding-left: 20px; + color: var(--error-light); + } + + .json-schema-form-help { + color: var(--foreground-muted); + } + + .json-schema-form-hidden { + display: none; + } + + .json-schema-form-additional-prop { + display: flex; + gap: 8px; + align-items: center; + } + + .json-schema-form-additional-prop-key { + flex: 0 0 40%; + min-width: 0; + } + + .json-schema-form-additional-prop-value { + flex: 1 1 auto; + min-width: 0; + } + + .json-schema-form-additional-prop-value .json-schema-form-field { + gap: 0; + } + + .json-schema-form-additional-prop-value .json-schema-form-field label { + display: none; + } + + .json-schema-form-additional-prop-value .json-schema-form-field > div { + margin-top: 0; + } +`; + +type JsonSchemaFormEditorProps = SharedEditorProps & { + editor: JsonSchemaFormCustomEditorDefinition; +}; + +const isRecord = (value: unknown): value is Record => + typeof value === 'object' && value != null && !Array.isArray(value); + +const isJsonSchemaFormEditorData = (value: unknown): value is JsonSchemaFormEditorData => + isRecord(value) && isRecord(value.schema); + +const getFormData = (value: unknown) => (isRecord(value) ? value : {}); + +const RjsfTextWidget = ({ id, value, disabled, readonly, autofocus, placeholder, onChange, options }: WidgetProps) => ( + onChange((event.target as HTMLInputElement).value)} + /> +); + +const RjsfTextareaWidget = ({ + id, + value, + disabled, + readonly, + autofocus, + placeholder, + onChange, +}: WidgetProps) => ( +