diff --git a/.pnp.cjs b/.pnp.cjs index 067fd887a..46503a5e2 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -26,6 +26,10 @@ const RAW_RUNTIME_STATE = "name": "@stackflow/demo",\ "reference": "workspace:demo"\ },\ + {\ + "name": "@stackflow/demo-solid",\ + "reference": "workspace:demo-solid"\ + },\ {\ "name": "@stackflow/docs",\ "reference": "workspace:docs"\ @@ -78,10 +82,18 @@ const RAW_RUNTIME_STATE = "name": "@stackflow/react-ui-core",\ "reference": "workspace:extensions/react-ui-core"\ },\ + {\ + "name": "@stackflow/solid-ui-core",\ + "reference": "workspace:extensions/solid-ui-core"\ + },\ {\ "name": "@stackflow/react",\ "reference": "workspace:integrations/react"\ },\ + {\ + "name": "@stackflow/solid",\ + "reference": "workspace:integrations/solid"\ + },\ {\ "name": "@stackflow/esbuild-config",\ "reference": "workspace:packages/esbuild-config"\ @@ -90,25 +102,28 @@ const RAW_RUNTIME_STATE = "enableTopLevelFallback": true,\ "ignorePatternData": "(^(?:\\\\.yarn\\\\/sdks(?:\\\\/(?!\\\\.{1,2}(?:\\\\/|$))(?:(?:(?!(?:^|\\\\/)\\\\.{1,2}(?:\\\\/|$)).)*?)|$))$)",\ "fallbackExclusionList": [\ - ["@stackflow/compat-await-push", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/compat-await-push", "workspace:extensions/compat-await-push"]],\ + ["@stackflow/compat-await-push", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/compat-await-push", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/compat-await-push", "workspace:extensions/compat-await-push"]],\ ["@stackflow/config", ["workspace:config"]],\ ["@stackflow/core", ["workspace:core"]],\ ["@stackflow/demo", ["workspace:demo"]],\ + ["@stackflow/demo-solid", ["workspace:demo-solid"]],\ ["@stackflow/docs", ["workspace:docs"]],\ ["@stackflow/esbuild-config", ["workspace:packages/esbuild-config"]],\ - ["@stackflow/link", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/link", "workspace:extensions/link"]],\ + ["@stackflow/link", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/link", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/link", "workspace:extensions/link"]],\ ["@stackflow/monorepo", ["workspace:."]],\ - ["@stackflow/plugin-basic-ui", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-basic-ui", "workspace:extensions/plugin-basic-ui"]],\ + ["@stackflow/plugin-basic-ui", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-basic-ui", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-basic-ui", "workspace:extensions/plugin-basic-ui"]],\ ["@stackflow/plugin-devtools", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-devtools", "workspace:extensions/plugin-devtools"]],\ ["@stackflow/plugin-google-analytics-4", ["workspace:extensions/plugin-google-analytics-4"]],\ - ["@stackflow/plugin-history-sync", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-history-sync", "workspace:extensions/plugin-history-sync"]],\ + ["@stackflow/plugin-history-sync", ["virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-history-sync", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-history-sync", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-history-sync", "workspace:extensions/plugin-history-sync"]],\ ["@stackflow/plugin-map-initial-activity", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-map-initial-activity", "workspace:extensions/plugin-map-initial-activity"]],\ - ["@stackflow/plugin-preload", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-preload", "workspace:extensions/plugin-preload"]],\ - ["@stackflow/plugin-renderer-basic", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-renderer-basic", "workspace:extensions/plugin-renderer-basic"]],\ + ["@stackflow/plugin-preload", ["virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-preload", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-preload", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-preload", "workspace:extensions/plugin-preload"]],\ + ["@stackflow/plugin-renderer-basic", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-renderer-basic", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-renderer-basic", "workspace:extensions/plugin-renderer-basic"]],\ ["@stackflow/plugin-renderer-web", ["workspace:extensions/plugin-renderer-web"]],\ ["@stackflow/plugin-stack-depth-change", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-stack-depth-change", "workspace:extensions/plugin-stack-depth-change"]],\ ["@stackflow/react", ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react", "workspace:integrations/react"]],\ - ["@stackflow/react-ui-core", ["virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/react-ui-core", "workspace:extensions/react-ui-core"]]\ + ["@stackflow/react-ui-core", ["virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/react-ui-core", "workspace:extensions/react-ui-core"]],\ + ["@stackflow/solid", ["virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid", "workspace:integrations/solid"]],\ + ["@stackflow/solid-ui-core", ["virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/solid-ui-core", "workspace:extensions/solid-ui-core"]]\ ],\ "fallbackPool": [\ ],\ @@ -157,6 +172,16 @@ const RAW_RUNTIME_STATE = ["picocolors", "npm:1.0.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.26.2", {\ + "packageLocation": "./.yarn/cache/@babel-code-frame-npm-7.26.2-4902b56813-db2c2122af.zip/node_modules/@babel/code-frame/",\ + "packageDependencies": [\ + ["@babel/code-frame", "npm:7.26.2"],\ + ["@babel/helper-validator-identifier", "npm:7.25.9"],\ + ["js-tokens", "npm:4.0.0"],\ + ["picocolors", "npm:1.0.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/compat-data", [\ @@ -166,6 +191,13 @@ const RAW_RUNTIME_STATE = ["@babel/compat-data", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.26.2", {\ + "packageLocation": "./.yarn/cache/@babel-compat-data-npm-7.26.2-0f1eb3d38a-ed9eed6b62.zip/node_modules/@babel/compat-data/",\ + "packageDependencies": [\ + ["@babel/compat-data", "npm:7.26.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/core", [\ @@ -190,6 +222,28 @@ const RAW_RUNTIME_STATE = ["semver", "npm:6.3.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.26.0", {\ + "packageLocation": "./.yarn/cache/@babel-core-npm-7.26.0-6f14d37f26-65767bfdb1.zip/node_modules/@babel/core/",\ + "packageDependencies": [\ + ["@babel/core", "npm:7.26.0"],\ + ["@ampproject/remapping", "npm:2.3.0"],\ + ["@babel/code-frame", "npm:7.26.2"],\ + ["@babel/generator", "npm:7.26.2"],\ + ["@babel/helper-compilation-targets", "npm:7.25.9"],\ + ["@babel/helper-module-transforms", "virtual:6f14d37f26f87c55654e510172561c825f7eb822527d5aaba60d24913853c925a2338249715305c87baadd7e7b73f94aba8cb62d407d8bb26b18bd6b90ca945f#npm:7.26.0"],\ + ["@babel/helpers", "npm:7.26.0"],\ + ["@babel/parser", "npm:7.26.2"],\ + ["@babel/template", "npm:7.25.9"],\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"],\ + ["convert-source-map", "npm:2.0.0"],\ + ["debug", "virtual:b26422bd59fa17e008d6bc0175738ae8cd421c0bdf97531bc9d7ba8df7eb875cf3586702fdab2ad784dd2bd788b2ef7d413cd512768add7bfe10a3e1b04e9659#npm:4.3.5"],\ + ["gensync", "npm:1.0.0-beta.2"],\ + ["json5", "npm:2.2.3"],\ + ["semver", "npm:6.3.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/generator", [\ @@ -203,6 +257,28 @@ const RAW_RUNTIME_STATE = ["jsesc", "npm:2.5.2"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.26.2", {\ + "packageLocation": "./.yarn/cache/@babel-generator-npm-7.26.2-5061e18ae4-71ace82b5b.zip/node_modules/@babel/generator/",\ + "packageDependencies": [\ + ["@babel/generator", "npm:7.26.2"],\ + ["@babel/parser", "npm:7.26.2"],\ + ["@babel/types", "npm:7.26.0"],\ + ["@jridgewell/gen-mapping", "npm:0.3.5"],\ + ["@jridgewell/trace-mapping", "npm:0.3.25"],\ + ["jsesc", "npm:3.0.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@babel/helper-annotate-as-pure", [\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-annotate-as-pure-npm-7.25.9-a0f89e14a0-41edda10df.zip/node_modules/@babel/helper-annotate-as-pure/",\ + "packageDependencies": [\ + ["@babel/helper-annotate-as-pure", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/helper-compilation-targets", [\ @@ -217,6 +293,47 @@ const RAW_RUNTIME_STATE = ["semver", "npm:6.3.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-compilation-targets-npm-7.25.9-1e2a209538-8053fbfc21.zip/node_modules/@babel/helper-compilation-targets/",\ + "packageDependencies": [\ + ["@babel/helper-compilation-targets", "npm:7.25.9"],\ + ["@babel/compat-data", "npm:7.26.2"],\ + ["@babel/helper-validator-option", "npm:7.25.9"],\ + ["browserslist", "npm:4.24.2"],\ + ["lru-cache", "npm:5.1.1"],\ + ["semver", "npm:6.3.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@babel/helper-create-class-features-plugin", [\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-create-class-features-plugin-npm-7.25.9-1efda825e9-d1d47a7b5f.zip/node_modules/@babel/helper-create-class-features-plugin/",\ + "packageDependencies": [\ + ["@babel/helper-create-class-features-plugin", "npm:7.25.9"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:e29dbacbdbb9cf5ab60e7f5e21073f41f2fd5be5501fe828d8cea18c2ea5655e03a9116bcf28130b22857808dcfdcb9eeb3e87386ea5e1bc4fca61f423698b03#npm:7.25.9", {\ + "packageLocation": "./.yarn/__virtual__/@babel-helper-create-class-features-plugin-virtual-85735bf9b2/0/cache/@babel-helper-create-class-features-plugin-npm-7.25.9-1efda825e9-d1d47a7b5f.zip/node_modules/@babel/helper-create-class-features-plugin/",\ + "packageDependencies": [\ + ["@babel/helper-create-class-features-plugin", "virtual:e29dbacbdbb9cf5ab60e7f5e21073f41f2fd5be5501fe828d8cea18c2ea5655e03a9116bcf28130b22857808dcfdcb9eeb3e87386ea5e1bc4fca61f423698b03#npm:7.25.9"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-annotate-as-pure", "npm:7.25.9"],\ + ["@babel/helper-member-expression-to-functions", "npm:7.25.9"],\ + ["@babel/helper-optimise-call-expression", "npm:7.25.9"],\ + ["@babel/helper-replace-supers", "virtual:85735bf9b22fb966aa5234a5d7d9d9ae374adbc1b3391e90fd479bc3f4d4f2dc74ba0e5c391645d65703514ae4a72a594097574aec311fadb6a43210c6485aae#npm:7.25.9"],\ + ["@babel/helper-skip-transparent-expression-wrappers", "npm:7.25.9"],\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@types/babel__core", null],\ + ["semver", "npm:6.3.1"]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/helper-environment-visitor", [\ @@ -250,7 +367,26 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["@babel/helper-member-expression-to-functions", [\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-member-expression-to-functions-npm-7.25.9-761e6fec27-ef8cc1c1e6.zip/node_modules/@babel/helper-member-expression-to-functions/",\ + "packageDependencies": [\ + ["@babel/helper-member-expression-to-functions", "npm:7.25.9"],\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@babel/helper-module-imports", [\ + ["npm:7.18.6", {\ + "packageLocation": "./.yarn/cache/@babel-helper-module-imports-npm-7.18.6-1031faa864-75b0d51027.zip/node_modules/@babel/helper-module-imports/",\ + "packageDependencies": [\ + ["@babel/helper-module-imports", "npm:7.18.6"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ + }],\ ["npm:7.24.7", {\ "packageLocation": "./.yarn/cache/@babel-helper-module-imports-npm-7.24.7-f60e66adbf-df8bfb2bb1.zip/node_modules/@babel/helper-module-imports/",\ "packageDependencies": [\ @@ -259,6 +395,15 @@ const RAW_RUNTIME_STATE = ["@babel/types", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-module-imports-npm-7.25.9-b86e31bde9-e090be5dee.zip/node_modules/@babel/helper-module-imports/",\ + "packageDependencies": [\ + ["@babel/helper-module-imports", "npm:7.25.9"],\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/helper-module-transforms", [\ @@ -269,6 +414,29 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ + ["npm:7.26.0", {\ + "packageLocation": "./.yarn/cache/@babel-helper-module-transforms-npm-7.26.0-7557a3558f-9841d2a62f.zip/node_modules/@babel/helper-module-transforms/",\ + "packageDependencies": [\ + ["@babel/helper-module-transforms", "npm:7.26.0"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:6f14d37f26f87c55654e510172561c825f7eb822527d5aaba60d24913853c925a2338249715305c87baadd7e7b73f94aba8cb62d407d8bb26b18bd6b90ca945f#npm:7.26.0", {\ + "packageLocation": "./.yarn/__virtual__/@babel-helper-module-transforms-virtual-5ddb520440/0/cache/@babel-helper-module-transforms-npm-7.26.0-7557a3558f-9841d2a62f.zip/node_modules/@babel/helper-module-transforms/",\ + "packageDependencies": [\ + ["@babel/helper-module-transforms", "virtual:6f14d37f26f87c55654e510172561c825f7eb822527d5aaba60d24913853c925a2338249715305c87baadd7e7b73f94aba8cb62d407d8bb26b18bd6b90ca945f#npm:7.26.0"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-module-imports", "npm:7.25.9"],\ + ["@babel/helper-validator-identifier", "npm:7.25.9"],\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@types/babel__core", null]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }],\ ["virtual:e0c71653c5fbb0fc4c6fcff328e1a9abaf7b1db8fb5373ec2e2820e573cb8648c0a685e152d1394329e463b95be638d13a197919b7602affe3038a4b03df1acd#npm:7.24.7", {\ "packageLocation": "./.yarn/__virtual__/@babel-helper-module-transforms-virtual-3edbce477e/0/cache/@babel-helper-module-transforms-npm-7.24.7-34219c1829-4f2b232bf6.zip/node_modules/@babel/helper-module-transforms/",\ "packageDependencies": [\ @@ -288,6 +456,16 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["@babel/helper-optimise-call-expression", [\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-optimise-call-expression-npm-7.25.9-d8006fbada-f09d0ad60c.zip/node_modules/@babel/helper-optimise-call-expression/",\ + "packageDependencies": [\ + ["@babel/helper-optimise-call-expression", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@babel/helper-plugin-utils", [\ ["npm:7.24.7", {\ "packageLocation": "./.yarn/cache/@babel-helper-plugin-utils-npm-7.24.7-5a3089ad88-dad51622f0.zip/node_modules/@babel/helper-plugin-utils/",\ @@ -295,6 +473,38 @@ const RAW_RUNTIME_STATE = ["@babel/helper-plugin-utils", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-plugin-utils-npm-7.25.9-462b7ade58-e347d87728.zip/node_modules/@babel/helper-plugin-utils/",\ + "packageDependencies": [\ + ["@babel/helper-plugin-utils", "npm:7.25.9"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@babel/helper-replace-supers", [\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-replace-supers-npm-7.25.9-664068b76b-8ebf787016.zip/node_modules/@babel/helper-replace-supers/",\ + "packageDependencies": [\ + ["@babel/helper-replace-supers", "npm:7.25.9"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:85735bf9b22fb966aa5234a5d7d9d9ae374adbc1b3391e90fd479bc3f4d4f2dc74ba0e5c391645d65703514ae4a72a594097574aec311fadb6a43210c6485aae#npm:7.25.9", {\ + "packageLocation": "./.yarn/__virtual__/@babel-helper-replace-supers-virtual-6a9a172dcd/0/cache/@babel-helper-replace-supers-npm-7.25.9-664068b76b-8ebf787016.zip/node_modules/@babel/helper-replace-supers/",\ + "packageDependencies": [\ + ["@babel/helper-replace-supers", "virtual:85735bf9b22fb966aa5234a5d7d9d9ae374adbc1b3391e90fd479bc3f4d4f2dc74ba0e5c391645d65703514ae4a72a594097574aec311fadb6a43210c6485aae#npm:7.25.9"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-member-expression-to-functions", "npm:7.25.9"],\ + ["@babel/helper-optimise-call-expression", "npm:7.25.9"],\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@types/babel__core", null]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/helper-simple-access", [\ @@ -306,6 +516,26 @@ const RAW_RUNTIME_STATE = ["@babel/types", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-simple-access-npm-7.25.9-477a4a7937-a16a6cfa5e.zip/node_modules/@babel/helper-simple-access/",\ + "packageDependencies": [\ + ["@babel/helper-simple-access", "npm:7.25.9"],\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@babel/helper-skip-transparent-expression-wrappers", [\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-skip-transparent-expression-wrappers-npm-7.25.9-215072fae0-fdbb524893.zip/node_modules/@babel/helper-skip-transparent-expression-wrappers/",\ + "packageDependencies": [\ + ["@babel/helper-skip-transparent-expression-wrappers", "npm:7.25.9"],\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/helper-split-export-declaration", [\ @@ -325,6 +555,13 @@ const RAW_RUNTIME_STATE = ["@babel/helper-string-parser", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-string-parser-npm-7.25.9-eade578078-c28656c52b.zip/node_modules/@babel/helper-string-parser/",\ + "packageDependencies": [\ + ["@babel/helper-string-parser", "npm:7.25.9"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/helper-validator-identifier", [\ @@ -334,6 +571,13 @@ const RAW_RUNTIME_STATE = ["@babel/helper-validator-identifier", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-validator-identifier-npm-7.25.9-2634b947a4-3f9b649be0.zip/node_modules/@babel/helper-validator-identifier/",\ + "packageDependencies": [\ + ["@babel/helper-validator-identifier", "npm:7.25.9"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/helper-validator-option", [\ @@ -343,6 +587,13 @@ const RAW_RUNTIME_STATE = ["@babel/helper-validator-option", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-helper-validator-option-npm-7.25.9-6450027d5d-9491b27559.zip/node_modules/@babel/helper-validator-option/",\ + "packageDependencies": [\ + ["@babel/helper-validator-option", "npm:7.25.9"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/helpers", [\ @@ -354,6 +605,15 @@ const RAW_RUNTIME_STATE = ["@babel/types", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.26.0", {\ + "packageLocation": "./.yarn/cache/@babel-helpers-npm-7.26.0-d7ff09b837-fd4757f65d.zip/node_modules/@babel/helpers/",\ + "packageDependencies": [\ + ["@babel/helpers", "npm:7.26.0"],\ + ["@babel/template", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/highlight", [\ @@ -377,6 +637,14 @@ const RAW_RUNTIME_STATE = ["@babel/types", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.26.2", {\ + "packageLocation": "./.yarn/cache/@babel-parser-npm-7.26.2-5b22b96c42-8baee43752.zip/node_modules/@babel/parser/",\ + "packageDependencies": [\ + ["@babel/parser", "npm:7.26.2"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/plugin-syntax-async-generators", [\ @@ -572,6 +840,13 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-plugin-syntax-jsx-npm-7.25.9-3df022f433-bb609d1ffb.zip/node_modules/@babel/plugin-syntax-jsx/",\ + "packageDependencies": [\ + ["@babel/plugin-syntax-jsx", "npm:7.25.9"]\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:15ef0a4ad61c166598c4d195dc64a0b7270b186e9a584ea25871b4181189fa5a61a49aa37f6bcda6ffed25499ff900f1a33224b0c22868c8eb1eaf1dd4f0dc11#npm:7.18.6", {\ "packageLocation": "./.yarn/__virtual__/@babel-plugin-syntax-jsx-virtual-921fb75805/0/cache/@babel-plugin-syntax-jsx-npm-7.18.6-3e378d5f11-6d37ea9729.zip/node_modules/@babel/plugin-syntax-jsx/",\ "packageDependencies": [\ @@ -585,6 +860,34 @@ const RAW_RUNTIME_STATE = "@types/babel__core"\ ],\ "linkType": "HARD"\ + }],\ + ["virtual:6f7be4a147fdf0bc67a3375b010c46f7dee9875566361602bea80272632cf920e38a32700e835a49907c57b0aaaf68e50614208bfb785e4a7a697ee1070edf3b#npm:7.25.9", {\ + "packageLocation": "./.yarn/__virtual__/@babel-plugin-syntax-jsx-virtual-4aa86ae525/0/cache/@babel-plugin-syntax-jsx-npm-7.25.9-3df022f433-bb609d1ffb.zip/node_modules/@babel/plugin-syntax-jsx/",\ + "packageDependencies": [\ + ["@babel/plugin-syntax-jsx", "virtual:6f7be4a147fdf0bc67a3375b010c46f7dee9875566361602bea80272632cf920e38a32700e835a49907c57b0aaaf68e50614208bfb785e4a7a697ee1070edf3b#npm:7.25.9"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-plugin-utils", "npm:7.25.9"],\ + ["@types/babel__core", "npm:7.20.5"]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }],\ + ["virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9", {\ + "packageLocation": "./.yarn/__virtual__/@babel-plugin-syntax-jsx-virtual-4778de2772/0/cache/@babel-plugin-syntax-jsx-npm-7.25.9-3df022f433-bb609d1ffb.zip/node_modules/@babel/plugin-syntax-jsx/",\ + "packageDependencies": [\ + ["@babel/plugin-syntax-jsx", "virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-plugin-utils", "npm:7.25.9"],\ + ["@types/babel__core", null]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/plugin-syntax-logical-assignment-operators", [\ @@ -854,6 +1157,13 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-plugin-syntax-typescript-npm-7.25.9-5201e4ba77-0e9821e8ba.zip/node_modules/@babel/plugin-syntax-typescript/",\ + "packageDependencies": [\ + ["@babel/plugin-syntax-typescript", "npm:7.25.9"]\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:cf020c7449686297fcba1e9af61c861df9a11b630c2e9e8a2866372f651af78a6a88fae84bf6e8c35ce574d3e754ca851b114b13b06e50f1415d7c777f57bfd0#npm:7.24.7", {\ "packageLocation": "./.yarn/__virtual__/@babel-plugin-syntax-typescript-virtual-88b5d3e225/0/cache/@babel-plugin-syntax-typescript-npm-7.24.7-099e795473-2518cc0632.zip/node_modules/@babel/plugin-syntax-typescript/",\ "packageDependencies": [\ @@ -867,6 +1177,45 @@ const RAW_RUNTIME_STATE = "@types/babel__core"\ ],\ "linkType": "HARD"\ + }],\ + ["virtual:e29dbacbdbb9cf5ab60e7f5e21073f41f2fd5be5501fe828d8cea18c2ea5655e03a9116bcf28130b22857808dcfdcb9eeb3e87386ea5e1bc4fca61f423698b03#npm:7.25.9", {\ + "packageLocation": "./.yarn/__virtual__/@babel-plugin-syntax-typescript-virtual-379c44d4b9/0/cache/@babel-plugin-syntax-typescript-npm-7.25.9-5201e4ba77-0e9821e8ba.zip/node_modules/@babel/plugin-syntax-typescript/",\ + "packageDependencies": [\ + ["@babel/plugin-syntax-typescript", "virtual:e29dbacbdbb9cf5ab60e7f5e21073f41f2fd5be5501fe828d8cea18c2ea5655e03a9116bcf28130b22857808dcfdcb9eeb3e87386ea5e1bc4fca61f423698b03#npm:7.25.9"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-plugin-utils", "npm:7.25.9"],\ + ["@types/babel__core", null]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@babel/plugin-transform-modules-commonjs", [\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-plugin-transform-modules-commonjs-npm-7.25.9-64aa5f0173-a7390ca999.zip/node_modules/@babel/plugin-transform-modules-commonjs/",\ + "packageDependencies": [\ + ["@babel/plugin-transform-modules-commonjs", "npm:7.25.9"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9", {\ + "packageLocation": "./.yarn/__virtual__/@babel-plugin-transform-modules-commonjs-virtual-754937d8fd/0/cache/@babel-plugin-transform-modules-commonjs-npm-7.25.9-64aa5f0173-a7390ca999.zip/node_modules/@babel/plugin-transform-modules-commonjs/",\ + "packageDependencies": [\ + ["@babel/plugin-transform-modules-commonjs", "virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-module-transforms", "virtual:6f14d37f26f87c55654e510172561c825f7eb822527d5aaba60d24913853c925a2338249715305c87baadd7e7b73f94aba8cb62d407d8bb26b18bd6b90ca945f#npm:7.26.0"],\ + ["@babel/helper-plugin-utils", "npm:7.25.9"],\ + ["@babel/helper-simple-access", "npm:7.25.9"],\ + ["@types/babel__core", null]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/plugin-transform-react-jsx-self", [\ @@ -915,6 +1264,60 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["@babel/plugin-transform-typescript", [\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-plugin-transform-typescript-npm-7.25.9-706910d8c9-91e2ec805f.zip/node_modules/@babel/plugin-transform-typescript/",\ + "packageDependencies": [\ + ["@babel/plugin-transform-typescript", "npm:7.25.9"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9", {\ + "packageLocation": "./.yarn/__virtual__/@babel-plugin-transform-typescript-virtual-e29dbacbdb/0/cache/@babel-plugin-transform-typescript-npm-7.25.9-706910d8c9-91e2ec805f.zip/node_modules/@babel/plugin-transform-typescript/",\ + "packageDependencies": [\ + ["@babel/plugin-transform-typescript", "virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-annotate-as-pure", "npm:7.25.9"],\ + ["@babel/helper-create-class-features-plugin", "virtual:e29dbacbdbb9cf5ab60e7f5e21073f41f2fd5be5501fe828d8cea18c2ea5655e03a9116bcf28130b22857808dcfdcb9eeb3e87386ea5e1bc4fca61f423698b03#npm:7.25.9"],\ + ["@babel/helper-plugin-utils", "npm:7.25.9"],\ + ["@babel/helper-skip-transparent-expression-wrappers", "npm:7.25.9"],\ + ["@babel/plugin-syntax-typescript", "virtual:e29dbacbdbb9cf5ab60e7f5e21073f41f2fd5be5501fe828d8cea18c2ea5655e03a9116bcf28130b22857808dcfdcb9eeb3e87386ea5e1bc4fca61f423698b03#npm:7.25.9"],\ + ["@types/babel__core", null]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@babel/preset-typescript", [\ + ["npm:7.26.0", {\ + "packageLocation": "./.yarn/cache/@babel-preset-typescript-npm-7.26.0-0771d290dd-81a6082616.zip/node_modules/@babel/preset-typescript/",\ + "packageDependencies": [\ + ["@babel/preset-typescript", "npm:7.26.0"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:30523e0320b77a20a0266ec34425fc07d216bb133c98555796dafcc7504a600a04601308e97af4d0846f858723b6d99dc1fc059b89216938130ba8afafbf7611#npm:7.26.0", {\ + "packageLocation": "./.yarn/__virtual__/@babel-preset-typescript-virtual-f52403d8aa/0/cache/@babel-preset-typescript-npm-7.26.0-0771d290dd-81a6082616.zip/node_modules/@babel/preset-typescript/",\ + "packageDependencies": [\ + ["@babel/preset-typescript", "virtual:30523e0320b77a20a0266ec34425fc07d216bb133c98555796dafcc7504a600a04601308e97af4d0846f858723b6d99dc1fc059b89216938130ba8afafbf7611#npm:7.26.0"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-plugin-utils", "npm:7.25.9"],\ + ["@babel/helper-validator-option", "npm:7.25.9"],\ + ["@babel/plugin-syntax-jsx", "virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9"],\ + ["@babel/plugin-transform-modules-commonjs", "virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9"],\ + ["@babel/plugin-transform-typescript", "virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9"],\ + ["@types/babel__core", null]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@babel/runtime", [\ ["npm:7.25.0", {\ "packageLocation": "./.yarn/cache/@babel-runtime-npm-7.25.0-a7bca33687-6870e9e0e9.zip/node_modules/@babel/runtime/",\ @@ -935,6 +1338,16 @@ const RAW_RUNTIME_STATE = ["@babel/types", "npm:7.24.7"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-template-npm-7.25.9-d903b7b6d5-e861180881.zip/node_modules/@babel/template/",\ + "packageDependencies": [\ + ["@babel/template", "npm:7.25.9"],\ + ["@babel/code-frame", "npm:7.26.2"],\ + ["@babel/parser", "npm:7.26.2"],\ + ["@babel/types", "npm:7.26.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/traverse", [\ @@ -954,6 +1367,20 @@ const RAW_RUNTIME_STATE = ["globals", "npm:11.12.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.25.9", {\ + "packageLocation": "./.yarn/cache/@babel-traverse-npm-7.25.9-6230e12b1d-7431614d76.zip/node_modules/@babel/traverse/",\ + "packageDependencies": [\ + ["@babel/traverse", "npm:7.25.9"],\ + ["@babel/code-frame", "npm:7.26.2"],\ + ["@babel/generator", "npm:7.26.2"],\ + ["@babel/parser", "npm:7.26.2"],\ + ["@babel/template", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"],\ + ["debug", "virtual:b26422bd59fa17e008d6bc0175738ae8cd421c0bdf97531bc9d7ba8df7eb875cf3586702fdab2ad784dd2bd788b2ef7d413cd512768add7bfe10a3e1b04e9659#npm:4.3.5"],\ + ["globals", "npm:11.12.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@babel/types", [\ @@ -966,6 +1393,15 @@ const RAW_RUNTIME_STATE = ["to-fast-properties", "npm:2.0.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.26.0", {\ + "packageLocation": "./.yarn/cache/@babel-types-npm-7.26.0-ae81de0a93-40780741ec.zip/node_modules/@babel/types/",\ + "packageDependencies": [\ + ["@babel/types", "npm:7.26.0"],\ + ["@babel/helper-string-parser", "npm:7.25.9"],\ + ["@babel/helper-validator-identifier", "npm:7.25.9"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@bcoe/v8-coverage", [\ @@ -2802,6 +3238,28 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ + ["virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/compat-await-push", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-compat-await-push-virtual-8d13959a30/1/extensions/compat-await-push/",\ + "packageDependencies": [\ + ["@stackflow/compat-await-push", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/compat-await-push"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__react", null],\ + ["esbuild", "npm:0.23.0"],\ + ["react", "npm:18.3.1"],\ + ["rimraf", "npm:3.0.2"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "packagePeers": [\ + "@stackflow/core",\ + "@types/stackflow__core",\ + "@types/stackflow__react"\ + ],\ + "linkType": "SOFT"\ + }],\ ["workspace:extensions/compat-await-push", {\ "packageLocation": "./extensions/compat-await-push/",\ "packageDependencies": [\ @@ -2876,7 +3334,7 @@ const RAW_RUNTIME_STATE = ["@types/react-dom", "npm:18.3.0"],\ ["@types/react-lazy-load-image-component", "npm:1.6.4"],\ ["@vanilla-extract/css", "npm:1.15.3"],\ - ["@vanilla-extract/vite-plugin", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#npm:4.0.12"],\ + ["@vanilla-extract/vite-plugin", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch::version=4.0.12&hash=d3aa99"],\ ["@vitejs/plugin-react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#npm:4.3.1"],\ ["esbuild", "npm:0.23.0"],\ ["lorem-ipsum", "npm:2.0.8"],\ @@ -2894,6 +3352,43 @@ const RAW_RUNTIME_STATE = "linkType": "SOFT"\ }]\ ]],\ + ["@stackflow/demo-solid", [\ + ["workspace:demo-solid", {\ + "packageLocation": "./demo-solid/",\ + "packageDependencies": [\ + ["@stackflow/demo-solid", "workspace:demo-solid"],\ + ["@seed-design/design-token", "npm:1.0.3"],\ + ["@seed-design/stylesheet", "npm:1.0.4"],\ + ["@stackflow/compat-await-push", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/compat-await-push"],\ + ["@stackflow/config", "workspace:config"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/link", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/link"],\ + ["@stackflow/plugin-basic-ui", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-basic-ui"],\ + ["@stackflow/plugin-devtools", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-devtools"],\ + ["@stackflow/plugin-history-sync", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-history-sync"],\ + ["@stackflow/plugin-map-initial-activity", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-map-initial-activity"],\ + ["@stackflow/plugin-preload", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-preload"],\ + ["@stackflow/plugin-renderer-basic", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-renderer-basic"],\ + ["@stackflow/plugin-stack-depth-change", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-stack-depth-change"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@vanilla-extract/css", "npm:1.15.3"],\ + ["@vanilla-extract/vite-plugin", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch::version=4.0.12&hash=d3aa99"],\ + ["esbuild", "npm:0.23.0"],\ + ["lorem-ipsum", "npm:2.0.8"],\ + ["lz-string", "npm:1.5.0"],\ + ["normalize.css", "npm:8.0.1"],\ + ["random-picture", "npm:4.0.6"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"],\ + ["vite", "virtual:2c30557d8ca5e7c67e7558d45bc44bef6c7a622b34a97fa8102f3235f92769c87777d34ed37059c12d8f3a21841ea06cf4badc5dc796697b0f765c17db6e24e5#npm:5.3.2"],\ + ["vite-plugin-solid", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#npm:2.10.2"],\ + ["zod", "npm:3.23.8"]\ + ],\ + "linkType": "SOFT"\ + }]\ + ]],\ ["@stackflow/docs", [\ ["workspace:docs", {\ "packageLocation": "./docs/",\ @@ -2950,15 +3445,20 @@ const RAW_RUNTIME_STATE = ["@stackflow/plugin-history-sync", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-history-sync"],\ ["@stackflow/plugin-preload", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-preload"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ ["@types/stackflow__core", null],\ ["@types/stackflow__plugin-history-sync", null],\ ["@types/stackflow__plugin-preload", null],\ ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ ["esbuild", "npm:0.23.0"],\ ["esbuild-plugin-file-path-extensions", "npm:2.1.3"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "packagePeers": [\ @@ -2967,14 +3467,57 @@ const RAW_RUNTIME_STATE = "@stackflow/plugin-preload",\ "@stackflow/react",\ "@types/react",\ + "@types/solid-js",\ "@types/stackflow__core",\ "@types/stackflow__plugin-history-sync",\ "@types/stackflow__plugin-preload",\ "@types/stackflow__react",\ + "@types/stackflow__solid",\ "react"\ ],\ "linkType": "SOFT"\ }],\ + ["virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/link", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-link-virtual-19ad45f132/1/extensions/link/",\ + "packageDependencies": [\ + ["@stackflow/link", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/link"],\ + ["@stackflow/config", "workspace:config"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/plugin-history-sync", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-history-sync"],\ + ["@stackflow/plugin-preload", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-preload"],\ + ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__plugin-history-sync", null],\ + ["@types/stackflow__plugin-preload", null],\ + ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-file-path-extensions", "npm:2.1.3"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["react", "npm:18.3.1"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "packagePeers": [\ + "@stackflow/core",\ + "@stackflow/plugin-history-sync",\ + "@stackflow/plugin-preload",\ + "@stackflow/solid",\ + "@types/solid-js",\ + "@types/stackflow__core",\ + "@types/stackflow__plugin-history-sync",\ + "@types/stackflow__plugin-preload",\ + "@types/stackflow__react",\ + "@types/stackflow__solid",\ + "solid-js"\ + ],\ + "linkType": "SOFT"\ + }],\ ["workspace:extensions/link", {\ "packageLocation": "./extensions/link/",\ "packageDependencies": [\ @@ -2982,14 +3525,17 @@ const RAW_RUNTIME_STATE = ["@stackflow/config", "workspace:config"],\ ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ - ["@stackflow/plugin-history-sync", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-history-sync"],\ - ["@stackflow/plugin-preload", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-preload"],\ + ["@stackflow/plugin-history-sync", "virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-history-sync"],\ + ["@stackflow/plugin-preload", "virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-preload"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@types/react", "npm:18.3.3"],\ ["esbuild", "npm:0.23.0"],\ ["esbuild-plugin-file-path-extensions", "npm:2.1.3"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "linkType": "SOFT"\ @@ -3020,28 +3566,73 @@ const RAW_RUNTIME_STATE = ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ ["@stackflow/react-ui-core", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/react-ui-core"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@stackflow/solid-ui-core", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/solid-ui-core"],\ ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ ["@types/stackflow__core", null],\ ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ ["@vanilla-extract/css", "npm:1.15.3"],\ ["@vanilla-extract/dynamic", "npm:2.1.1"],\ ["@vanilla-extract/private", "npm:1.0.5"],\ ["@vanilla-extract/recipes", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#npm:0.5.3"],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "packagePeers": [\ "@stackflow/core",\ "@stackflow/react",\ "@types/react",\ + "@types/solid-js",\ "@types/stackflow__core",\ "@types/stackflow__react",\ + "@types/stackflow__solid",\ "react"\ ],\ "linkType": "SOFT"\ }],\ + ["virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-basic-ui", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-basic-ui-virtual-eac40ba00e/1/extensions/plugin-basic-ui/",\ + "packageDependencies": [\ + ["@stackflow/plugin-basic-ui", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-basic-ui"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/react-ui-core", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/react-ui-core"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@stackflow/solid-ui-core", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/solid-ui-core"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ + ["@vanilla-extract/css", "npm:1.15.3"],\ + ["@vanilla-extract/dynamic", "npm:2.1.1"],\ + ["@vanilla-extract/private", "npm:1.0.5"],\ + ["@vanilla-extract/recipes", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#npm:0.5.3"],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["react", "npm:18.3.1"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "packagePeers": [\ + "@stackflow/core",\ + "@stackflow/solid",\ + "@types/solid-js",\ + "@types/stackflow__core",\ + "@types/stackflow__react",\ + "@types/stackflow__solid",\ + "solid-js"\ + ],\ + "linkType": "SOFT"\ + }],\ ["workspace:extensions/plugin-basic-ui", {\ "packageLocation": "./extensions/plugin-basic-ui/",\ "packageDependencies": [\ @@ -3050,14 +3641,18 @@ const RAW_RUNTIME_STATE = ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ ["@stackflow/react-ui-core", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/react-ui-core"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@stackflow/solid-ui-core", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/solid-ui-core"],\ ["@types/react", "npm:18.3.3"],\ ["@vanilla-extract/css", "npm:1.15.3"],\ ["@vanilla-extract/dynamic", "npm:2.1.1"],\ ["@vanilla-extract/private", "npm:1.0.5"],\ ["@vanilla-extract/recipes", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#npm:0.5.3"],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "linkType": "SOFT"\ @@ -3115,6 +3710,59 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@stackflow/plugin-history-sync", [\ + ["virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-history-sync", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-history-sync-virtual-0b16c4696c/1/extensions/plugin-history-sync/",\ + "packageDependencies": [\ + ["@stackflow/plugin-history-sync", "virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-history-sync"],\ + ["@graphql-tools/schema", "virtual:991015ceb8acca106af7e64cf676369bf8fb98370003b1af0559fb22931c330c3a09d064107412d6cc26ef286f0afdd26340443bd43177eeda3558644ba5f206#npm:10.0.5"],\ + ["@stackflow/config", "workspace:config"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@swc/core", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:1.6.6"],\ + ["@swc/jest", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:0.2.36"],\ + ["@types/jest", "npm:29.5.12"],\ + ["@types/node", "npm:20.14.9"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/react-relay", "npm:16.0.6"],\ + ["@types/relay-runtime", "npm:17.0.4"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__config", null],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["flatted", "npm:3.3.1"],\ + ["graphql", "npm:16.9.0"],\ + ["history", "npm:5.3.0"],\ + ["jest", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:29.7.0"],\ + ["react", "npm:18.3.1"],\ + ["react-relay", "virtual:991015ceb8acca106af7e64cf676369bf8fb98370003b1af0559fb22931c330c3a09d064107412d6cc26ef286f0afdd26340443bd43177eeda3558644ba5f206#npm:17.0.0"],\ + ["relay-compiler", "npm:17.0.0"],\ + ["relay-runtime", "npm:17.0.0"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"],\ + ["url-pattern", "npm:1.0.3"]\ + ],\ + "packagePeers": [\ + "@stackflow/config",\ + "@stackflow/core",\ + "@stackflow/react",\ + "@stackflow/solid",\ + "@types/react",\ + "@types/solid-js",\ + "@types/stackflow__config",\ + "@types/stackflow__core",\ + "@types/stackflow__react",\ + "@types/stackflow__solid",\ + "react",\ + "solid-js"\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-history-sync", {\ "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-history-sync-virtual-991015ceb8/1/extensions/plugin-history-sync/",\ "packageDependencies": [\ @@ -3124,6 +3772,7 @@ const RAW_RUNTIME_STATE = ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@swc/core", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:1.6.6"],\ ["@swc/jest", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:0.2.36"],\ ["@types/jest", "npm:29.5.12"],\ @@ -3131,10 +3780,13 @@ const RAW_RUNTIME_STATE = ["@types/react", "npm:18.3.3"],\ ["@types/react-relay", "npm:16.0.6"],\ ["@types/relay-runtime", "npm:17.0.4"],\ + ["@types/solid-js", null],\ ["@types/stackflow__config", null],\ ["@types/stackflow__core", null],\ ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["flatted", "npm:3.3.1"],\ ["graphql", "npm:16.9.0"],\ ["history", "npm:5.3.0"],\ @@ -3144,6 +3796,7 @@ const RAW_RUNTIME_STATE = ["relay-compiler", "npm:17.0.0"],\ ["relay-runtime", "npm:17.0.0"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"],\ ["url-pattern", "npm:1.0.3"]\ ],\ @@ -3152,13 +3805,65 @@ const RAW_RUNTIME_STATE = "@stackflow/core",\ "@stackflow/react",\ "@types/react",\ + "@types/solid-js",\ "@types/stackflow__config",\ "@types/stackflow__core",\ "@types/stackflow__react",\ + "@types/stackflow__solid",\ "react"\ ],\ "linkType": "SOFT"\ }],\ + ["virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-history-sync", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-history-sync-virtual-77031793bf/1/extensions/plugin-history-sync/",\ + "packageDependencies": [\ + ["@stackflow/plugin-history-sync", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-history-sync"],\ + ["@graphql-tools/schema", "virtual:991015ceb8acca106af7e64cf676369bf8fb98370003b1af0559fb22931c330c3a09d064107412d6cc26ef286f0afdd26340443bd43177eeda3558644ba5f206#npm:10.0.5"],\ + ["@stackflow/config", "workspace:config"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@swc/core", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:1.6.6"],\ + ["@swc/jest", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:0.2.36"],\ + ["@types/jest", "npm:29.5.12"],\ + ["@types/node", "npm:20.14.9"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/react-relay", "npm:16.0.6"],\ + ["@types/relay-runtime", "npm:17.0.4"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__config", null],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["flatted", "npm:3.3.1"],\ + ["graphql", "npm:16.9.0"],\ + ["history", "npm:5.3.0"],\ + ["jest", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:29.7.0"],\ + ["react", "npm:18.3.1"],\ + ["react-relay", "virtual:991015ceb8acca106af7e64cf676369bf8fb98370003b1af0559fb22931c330c3a09d064107412d6cc26ef286f0afdd26340443bd43177eeda3558644ba5f206#npm:17.0.0"],\ + ["relay-compiler", "npm:17.0.0"],\ + ["relay-runtime", "npm:17.0.0"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"],\ + ["url-pattern", "npm:1.0.3"]\ + ],\ + "packagePeers": [\ + "@stackflow/config",\ + "@stackflow/core",\ + "@stackflow/solid",\ + "@types/solid-js",\ + "@types/stackflow__config",\ + "@types/stackflow__core",\ + "@types/stackflow__react",\ + "@types/stackflow__solid",\ + "solid-js"\ + ],\ + "linkType": "SOFT"\ + }],\ ["workspace:extensions/plugin-history-sync", {\ "packageLocation": "./extensions/plugin-history-sync/",\ "packageDependencies": [\ @@ -3168,6 +3873,7 @@ const RAW_RUNTIME_STATE = ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@swc/core", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:1.6.6"],\ ["@swc/jest", "virtual:b327d7e228fba669b88a8bb23bcf526374e46fa67e617b1e6848e8a205357fee5ce94b47c49b5a570fd9e8a44fa218a13cd00e2eca327c99114cbd21d72ecf9c#npm:0.2.36"],\ ["@types/jest", "npm:29.5.12"],\ @@ -3176,6 +3882,7 @@ const RAW_RUNTIME_STATE = ["@types/react-relay", "npm:16.0.6"],\ ["@types/relay-runtime", "npm:17.0.4"],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["flatted", "npm:3.3.1"],\ ["graphql", "npm:16.9.0"],\ ["history", "npm:5.3.0"],\ @@ -3185,6 +3892,7 @@ const RAW_RUNTIME_STATE = ["relay-compiler", "npm:17.0.0"],\ ["relay-runtime", "npm:17.0.0"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"],\ ["url-pattern", "npm:1.0.3"]\ ],\ @@ -3198,18 +3906,14 @@ const RAW_RUNTIME_STATE = ["@stackflow/plugin-map-initial-activity", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-map-initial-activity"],\ ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ - ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ ["@types/stackflow__core", null],\ - ["@types/stackflow__react", null],\ ["esbuild", "npm:0.23.0"],\ ["rimraf", "npm:3.0.2"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "packagePeers": [\ "@stackflow/core",\ - "@stackflow/react",\ - "@types/stackflow__core",\ - "@types/stackflow__react"\ + "@types/stackflow__core"\ ],\ "linkType": "SOFT"\ }],\ @@ -3219,7 +3923,6 @@ const RAW_RUNTIME_STATE = ["@stackflow/plugin-map-initial-activity", "workspace:extensions/plugin-map-initial-activity"],\ ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ - ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ ["esbuild", "npm:0.23.0"],\ ["rimraf", "npm:3.0.2"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ @@ -3228,6 +3931,44 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@stackflow/plugin-preload", [\ + ["virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-preload", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-preload-virtual-da38519506/1/extensions/plugin-preload/",\ + "packageDependencies": [\ + ["@stackflow/plugin-preload", "virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-preload"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/plugin-history-sync", "virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-history-sync"],\ + ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__plugin-history-sync", null],\ + ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["react", "npm:18.3.1"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "packagePeers": [\ + "@stackflow/core",\ + "@stackflow/plugin-history-sync",\ + "@stackflow/react",\ + "@stackflow/solid",\ + "@types/react",\ + "@types/solid-js",\ + "@types/stackflow__core",\ + "@types/stackflow__plugin-history-sync",\ + "@types/stackflow__react",\ + "@types/stackflow__solid",\ + "react",\ + "solid-js"\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-preload", {\ "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-preload-virtual-78b2f9bad9/1/extensions/plugin-preload/",\ "packageDependencies": [\ @@ -3236,13 +3977,18 @@ const RAW_RUNTIME_STATE = ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ ["@stackflow/plugin-history-sync", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-history-sync"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ ["@types/stackflow__core", null],\ ["@types/stackflow__plugin-history-sync", null],\ ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "packagePeers": [\ @@ -3250,53 +3996,131 @@ const RAW_RUNTIME_STATE = "@stackflow/plugin-history-sync",\ "@stackflow/react",\ "@types/react",\ + "@types/solid-js",\ "@types/stackflow__core",\ "@types/stackflow__plugin-history-sync",\ "@types/stackflow__react",\ + "@types/stackflow__solid",\ "react"\ ],\ "linkType": "SOFT"\ }],\ + ["virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-preload", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-preload-virtual-39d8b0e9e9/1/extensions/plugin-preload/",\ + "packageDependencies": [\ + ["@stackflow/plugin-preload", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-preload"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/plugin-history-sync", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-history-sync"],\ + ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__plugin-history-sync", null],\ + ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["react", "npm:18.3.1"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "packagePeers": [\ + "@stackflow/core",\ + "@stackflow/plugin-history-sync",\ + "@stackflow/solid",\ + "@types/solid-js",\ + "@types/stackflow__core",\ + "@types/stackflow__plugin-history-sync",\ + "@types/stackflow__react",\ + "@types/stackflow__solid",\ + "solid-js"\ + ],\ + "linkType": "SOFT"\ + }],\ ["workspace:extensions/plugin-preload", {\ "packageLocation": "./extensions/plugin-preload/",\ "packageDependencies": [\ ["@stackflow/plugin-preload", "workspace:extensions/plugin-preload"],\ ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ - ["@stackflow/plugin-history-sync", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-history-sync"],\ + ["@stackflow/plugin-history-sync", "virtual:0892efb9b4f386c24dba440a9d2a0ff9dd8aabcfd8ef5403c4c5f10c0d1c23fd4bad505b8db6b1207f29fb736fee165114aaa48c8dc6b509afc29633adbfcc46#workspace:extensions/plugin-history-sync"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@types/react", "npm:18.3.3"],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "linkType": "SOFT"\ - }]\ - ]],\ - ["@stackflow/plugin-renderer-basic", [\ - ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-renderer-basic", {\ - "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-renderer-basic-virtual-84c5c2a317/1/extensions/plugin-renderer-basic/",\ + }]\ + ]],\ + ["@stackflow/plugin-renderer-basic", [\ + ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-renderer-basic", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-renderer-basic-virtual-84c5c2a317/1/extensions/plugin-renderer-basic/",\ + "packageDependencies": [\ + ["@stackflow/plugin-renderer-basic", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-renderer-basic"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["react", "npm:18.3.1"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "packagePeers": [\ + "@stackflow/core",\ + "@stackflow/react",\ + "@types/react",\ + "@types/solid-js",\ + "@types/stackflow__core",\ + "@types/stackflow__react",\ + "@types/stackflow__solid",\ + "react"\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-renderer-basic", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-plugin-renderer-basic-virtual-6025075581/1/extensions/plugin-renderer-basic/",\ "packageDependencies": [\ - ["@stackflow/plugin-renderer-basic", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:extensions/plugin-renderer-basic"],\ + ["@stackflow/plugin-renderer-basic", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#workspace:extensions/plugin-renderer-basic"],\ ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@types/react", "npm:18.3.3"],\ + ["@types/solid-js", null],\ ["@types/stackflow__core", null],\ ["@types/stackflow__react", null],\ + ["@types/stackflow__solid", null],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "packagePeers": [\ "@stackflow/core",\ - "@stackflow/react",\ - "@types/react",\ + "@stackflow/solid",\ + "@types/solid-js",\ "@types/stackflow__core",\ "@types/stackflow__react",\ - "react"\ + "@types/stackflow__solid",\ + "solid-js"\ ],\ "linkType": "SOFT"\ }],\ @@ -3307,10 +4131,13 @@ const RAW_RUNTIME_STATE = ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@types/react", "npm:18.3.3"],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "linkType": "SOFT"\ @@ -3324,10 +4151,13 @@ const RAW_RUNTIME_STATE = ["@stackflow/core", "workspace:core"],\ ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ ["@stackflow/react", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#workspace:integrations/react"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ ["@types/react", "npm:18.3.3"],\ ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ ["react", "npm:18.3.1"],\ ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ "linkType": "SOFT"\ @@ -3458,6 +4288,94 @@ const RAW_RUNTIME_STATE = "linkType": "SOFT"\ }]\ ]],\ + ["@stackflow/solid", [\ + ["virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-solid-virtual-62a4b57cf5/1/integrations/solid/",\ + "packageDependencies": [\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@stackflow/config", "workspace:config"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__config", null],\ + ["@types/stackflow__core", null],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-file-path-extensions", "npm:2.1.3"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "packagePeers": [\ + "@stackflow/config",\ + "@stackflow/core",\ + "@types/solid-js",\ + "@types/stackflow__config",\ + "@types/stackflow__core",\ + "solid-js"\ + ],\ + "linkType": "SOFT"\ + }],\ + ["workspace:integrations/solid", {\ + "packageLocation": "./integrations/solid/",\ + "packageDependencies": [\ + ["@stackflow/solid", "workspace:integrations/solid"],\ + ["@stackflow/config", "workspace:config"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-file-path-extensions", "npm:2.1.3"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "linkType": "SOFT"\ + }]\ + ]],\ + ["@stackflow/solid-ui-core", [\ + ["virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/solid-ui-core", {\ + "packageLocation": "./.yarn/__virtual__/@stackflow-solid-ui-core-virtual-7b9c7bae74/1/extensions/solid-ui-core/",\ + "packageDependencies": [\ + ["@stackflow/solid-ui-core", "virtual:669046a185e83900af978519e5adddf8e8f1f8fed824849248ba56cf8fcd4e4208872f27e14c3c844d3b769f42be1ba6e0aa90f12df9fa6c38a55aedee211f53#workspace:extensions/solid-ui-core"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["@types/solid-js", null],\ + ["@types/stackflow__core", null],\ + ["@types/stackflow__solid", null],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "packagePeers": [\ + "@stackflow/core",\ + "@stackflow/solid",\ + "@types/solid-js",\ + "@types/stackflow__core",\ + "@types/stackflow__solid",\ + "solid-js"\ + ],\ + "linkType": "SOFT"\ + }],\ + ["workspace:extensions/solid-ui-core", {\ + "packageLocation": "./extensions/solid-ui-core/",\ + "packageDependencies": [\ + ["@stackflow/solid-ui-core", "workspace:extensions/solid-ui-core"],\ + ["@stackflow/core", "workspace:core"],\ + ["@stackflow/esbuild-config", "workspace:packages/esbuild-config"],\ + ["@stackflow/solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#workspace:integrations/solid"],\ + ["esbuild", "npm:0.23.0"],\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["rimraf", "npm:3.0.2"],\ + ["solid-js", "npm:1.9.3"],\ + ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ + ],\ + "linkType": "SOFT"\ + }]\ + ]],\ ["@swc/core", [\ ["npm:1.6.6", {\ "packageLocation": "./.yarn/unplugged/@swc-core-virtual-40237c0e04/node_modules/@swc/core/",\ @@ -4262,17 +5180,17 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@vanilla-extract/vite-plugin", [\ - ["npm:4.0.12", {\ - "packageLocation": "./.yarn/cache/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b-d6d7931529.zip/node_modules/@vanilla-extract/vite-plugin/",\ + ["patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch::version=4.0.12&hash=d3aa99", {\ + "packageLocation": "./.yarn/cache/@vanilla-extract-vite-plugin-patch-3bf68dc431-a111359785.zip/node_modules/@vanilla-extract/vite-plugin/",\ "packageDependencies": [\ - ["@vanilla-extract/vite-plugin", "npm:4.0.12"]\ + ["@vanilla-extract/vite-plugin", "patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch::version=4.0.12&hash=d3aa99"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#npm:4.0.12", {\ - "packageLocation": "./.yarn/__virtual__/@vanilla-extract-vite-plugin-virtual-95d29a2f0d/0/cache/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b-d6d7931529.zip/node_modules/@vanilla-extract/vite-plugin/",\ + ["virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch::version=4.0.12&hash=d3aa99", {\ + "packageLocation": "./.yarn/__virtual__/@vanilla-extract-vite-plugin-virtual-710011da93/0/cache/@vanilla-extract-vite-plugin-patch-3bf68dc431-a111359785.zip/node_modules/@vanilla-extract/vite-plugin/",\ "packageDependencies": [\ - ["@vanilla-extract/vite-plugin", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#npm:4.0.12"],\ + ["@vanilla-extract/vite-plugin", "virtual:413bca98ff76262f6f1f73762ccc4b7edee04a5da42f3d6b9ed2cb2d6dbc397b2094da59b50f6e828091c88e7b5f86990feff596c43f0eb50a58fc42aae64a20#patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch::version=4.0.12&hash=d3aa99"],\ ["@types/vite", null],\ ["@vanilla-extract/integration", "npm:7.1.7"],\ ["vite", "virtual:2c30557d8ca5e7c67e7558d45bc44bef6c7a622b34a97fa8102f3235f92769c87777d34ed37059c12d8f3a21841ea06cf4badc5dc796697b0f765c17db6e24e5#npm:5.3.2"]\ @@ -4687,6 +5605,53 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["babel-plugin-jsx-dom-expressions", [\ + ["npm:0.39.3", {\ + "packageLocation": "./.yarn/cache/babel-plugin-jsx-dom-expressions-npm-0.39.3-33d2b7639b-2bcab150bb.zip/node_modules/babel-plugin-jsx-dom-expressions/",\ + "packageDependencies": [\ + ["babel-plugin-jsx-dom-expressions", "npm:0.39.3"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:2cc9532478ad408d13f9f6c50e2391bd27d4a52766352dd14d1799f1909f4e8531471030a9a7dd7460294057faf0f45d920150e7fccd1375249133f408d868c2#npm:0.39.3", {\ + "packageLocation": "./.yarn/__virtual__/babel-plugin-jsx-dom-expressions-virtual-103b93ad51/0/cache/babel-plugin-jsx-dom-expressions-npm-0.39.3-33d2b7639b-2bcab150bb.zip/node_modules/babel-plugin-jsx-dom-expressions/",\ + "packageDependencies": [\ + ["babel-plugin-jsx-dom-expressions", "virtual:2cc9532478ad408d13f9f6c50e2391bd27d4a52766352dd14d1799f1909f4e8531471030a9a7dd7460294057faf0f45d920150e7fccd1375249133f408d868c2#npm:0.39.3"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-module-imports", "npm:7.18.6"],\ + ["@babel/plugin-syntax-jsx", "virtual:f52403d8aa20eada309b4f7b37afc8684930ba2699abc1b494636b824f1f125e1f3cdb4a8fa1cb414725ac0ba00a75f85cd4aad575a8b168ba1652f26d4cbbe7#npm:7.25.9"],\ + ["@babel/types", "npm:7.24.7"],\ + ["@types/babel__core", null],\ + ["html-entities", "npm:2.3.3"],\ + ["parse5", "npm:7.2.1"],\ + ["validate-html-nesting", "npm:1.2.2"]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }],\ + ["virtual:61a53887dc7af15c524239899b9d46fcf33749d0438dc5c61698d864c4bc51612c35993678d917dd917ac74cdc97d9f1eaad184dc727e36a72327a365d9edc28#npm:0.39.3", {\ + "packageLocation": "./.yarn/__virtual__/babel-plugin-jsx-dom-expressions-virtual-6f7be4a147/0/cache/babel-plugin-jsx-dom-expressions-npm-0.39.3-33d2b7639b-2bcab150bb.zip/node_modules/babel-plugin-jsx-dom-expressions/",\ + "packageDependencies": [\ + ["babel-plugin-jsx-dom-expressions", "virtual:61a53887dc7af15c524239899b9d46fcf33749d0438dc5c61698d864c4bc51612c35993678d917dd917ac74cdc97d9f1eaad184dc727e36a72327a365d9edc28#npm:0.39.3"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/helper-module-imports", "npm:7.18.6"],\ + ["@babel/plugin-syntax-jsx", "virtual:6f7be4a147fdf0bc67a3375b010c46f7dee9875566361602bea80272632cf920e38a32700e835a49907c57b0aaaf68e50614208bfb785e4a7a697ee1070edf3b#npm:7.25.9"],\ + ["@babel/types", "npm:7.24.7"],\ + ["@types/babel__core", "npm:7.20.5"],\ + ["html-entities", "npm:2.3.3"],\ + ["parse5", "npm:7.2.1"],\ + ["validate-html-nesting", "npm:1.2.2"]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["babel-preset-current-node-syntax", [\ ["npm:1.0.1", {\ "packageLocation": "./.yarn/cache/babel-preset-current-node-syntax-npm-1.0.1-849ec71e32-94561959cb.zip/node_modules/babel-preset-current-node-syntax/",\ @@ -4770,6 +5735,43 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["babel-preset-solid", [\ + ["npm:1.9.3", {\ + "packageLocation": "./.yarn/cache/babel-preset-solid-npm-1.9.3-e7d89b8f97-144f7b1cd2.zip/node_modules/babel-preset-solid/",\ + "packageDependencies": [\ + ["babel-preset-solid", "npm:1.9.3"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:30523e0320b77a20a0266ec34425fc07d216bb133c98555796dafcc7504a600a04601308e97af4d0846f858723b6d99dc1fc059b89216938130ba8afafbf7611#npm:1.9.3", {\ + "packageLocation": "./.yarn/__virtual__/babel-preset-solid-virtual-2cc9532478/0/cache/babel-preset-solid-npm-1.9.3-e7d89b8f97-144f7b1cd2.zip/node_modules/babel-preset-solid/",\ + "packageDependencies": [\ + ["babel-preset-solid", "virtual:30523e0320b77a20a0266ec34425fc07d216bb133c98555796dafcc7504a600a04601308e97af4d0846f858723b6d99dc1fc059b89216938130ba8afafbf7611#npm:1.9.3"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@types/babel__core", null],\ + ["babel-plugin-jsx-dom-expressions", "virtual:2cc9532478ad408d13f9f6c50e2391bd27d4a52766352dd14d1799f1909f4e8531471030a9a7dd7460294057faf0f45d920150e7fccd1375249133f408d868c2#npm:0.39.3"]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }],\ + ["virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:1.9.3", {\ + "packageLocation": "./.yarn/__virtual__/babel-preset-solid-virtual-61a53887dc/0/cache/babel-preset-solid-npm-1.9.3-e7d89b8f97-144f7b1cd2.zip/node_modules/babel-preset-solid/",\ + "packageDependencies": [\ + ["babel-preset-solid", "virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:1.9.3"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@types/babel__core", "npm:7.20.5"],\ + ["babel-plugin-jsx-dom-expressions", "virtual:61a53887dc7af15c524239899b9d46fcf33749d0438dc5c61698d864c4bc51612c35993678d917dd917ac74cdc97d9f1eaad184dc727e36a72327a365d9edc28#npm:0.39.3"]\ + ],\ + "packagePeers": [\ + "@babel/core",\ + "@types/babel__core"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["bail", [\ ["npm:2.0.2", {\ "packageLocation": "./.yarn/cache/bail-npm-2.0.2-42130cb251-aab4e8ccdc.zip/node_modules/bail/",\ @@ -4866,6 +5868,17 @@ const RAW_RUNTIME_STATE = ["update-browserslist-db", "virtual:6b67324c878ea06e56ed3caefea53f7683e6ecc2f59a5ccb4eed038528684d5d9ad5763adbad2b939021498b8316c469d622a567bb66012ffd14e8022cf45739#npm:1.1.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:4.24.2", {\ + "packageLocation": "./.yarn/cache/browserslist-npm-4.24.2-0bc5f13e3b-f8a9d78bba.zip/node_modules/browserslist/",\ + "packageDependencies": [\ + ["browserslist", "npm:4.24.2"],\ + ["caniuse-lite", "npm:1.0.30001677"],\ + ["electron-to-chromium", "npm:1.5.50"],\ + ["node-releases", "npm:2.0.18"],\ + ["update-browserslist-db", "virtual:0bc5f13e3b070c660ccf3396ff30b6fc44ede2343c6543d593ce4624807ab1bafdbcd764ac20b4d55e6854e63e2568f1c6d09371eb639766b95e2d401b5b05cb#npm:1.1.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["bser", [\ @@ -4981,6 +5994,13 @@ const RAW_RUNTIME_STATE = ["caniuse-lite", "npm:1.0.30001667"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:1.0.30001677", {\ + "packageLocation": "./.yarn/cache/caniuse-lite-npm-1.0.30001677-11c12e06e9-e07439bdea.zip/node_modules/caniuse-lite/",\ + "packageDependencies": [\ + ["caniuse-lite", "npm:1.0.30001677"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["ccount", [\ @@ -5434,6 +6454,13 @@ const RAW_RUNTIME_STATE = ["csstype", "npm:3.0.11"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:3.1.3", {\ + "packageLocation": "./.yarn/cache/csstype-npm-3.1.3-e9a1c85013-f593cce41f.zip/node_modules/csstype/",\ + "packageDependencies": [\ + ["csstype", "npm:3.1.3"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["cytoscape", [\ @@ -6109,6 +7136,13 @@ const RAW_RUNTIME_STATE = ["electron-to-chromium", "npm:1.5.35"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:1.5.50", {\ + "packageLocation": "./.yarn/cache/electron-to-chromium-npm-1.5.50-c2eeb3c362-635ca4b593.zip/node_modules/electron-to-chromium/",\ + "packageDependencies": [\ + ["electron-to-chromium", "npm:1.5.50"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["elkjs", [\ @@ -6275,6 +7309,35 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["esbuild-plugin-solid", [\ + ["patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52", {\ + "packageLocation": "./.yarn/cache/esbuild-plugin-solid-patch-6ed6ca3665-3f3b173176.zip/node_modules/esbuild-plugin-solid/",\ + "packageDependencies": [\ + ["esbuild-plugin-solid", "patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52", {\ + "packageLocation": "./.yarn/__virtual__/esbuild-plugin-solid-virtual-30523e0320/0/cache/esbuild-plugin-solid-patch-6ed6ca3665-3f3b173176.zip/node_modules/esbuild-plugin-solid/",\ + "packageDependencies": [\ + ["esbuild-plugin-solid", "virtual:9ebc34fcb6f35d6a144c2c0e54526b8c8bc3fb282b451cd82514ec7c8eaa6e61fde3c84d5c25e8add468cb1f45a42f8fe2d8b659771afa10fe0f729c49f5cb3f#patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@babel/preset-typescript", "virtual:30523e0320b77a20a0266ec34425fc07d216bb133c98555796dafcc7504a600a04601308e97af4d0846f858723b6d99dc1fc059b89216938130ba8afafbf7611#npm:7.26.0"],\ + ["@types/esbuild", null],\ + ["@types/solid-js", null],\ + ["babel-preset-solid", "virtual:30523e0320b77a20a0266ec34425fc07d216bb133c98555796dafcc7504a600a04601308e97af4d0846f858723b6d99dc1fc059b89216938130ba8afafbf7611#npm:1.9.3"],\ + ["esbuild", "npm:0.23.0"],\ + ["solid-js", "npm:1.9.3"]\ + ],\ + "packagePeers": [\ + "@types/esbuild",\ + "@types/solid-js",\ + "esbuild",\ + "solid-js"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["escalade", [\ ["npm:3.1.2", {\ "packageLocation": "./.yarn/cache/escalade-npm-3.1.2-5826d31cf8-a1e07fea2f.zip/node_modules/escalade/",\ @@ -7227,6 +8290,15 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["html-entities", [\ + ["npm:2.3.3", {\ + "packageLocation": "./.yarn/cache/html-entities-npm-2.3.3-e0aac656af-24f6b77ce2.zip/node_modules/html-entities/",\ + "packageDependencies": [\ + ["html-entities", "npm:2.3.3"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["html-escaper", [\ ["npm:2.0.2", {\ "packageLocation": "./.yarn/cache/html-escaper-npm-2.0.2-38e51ef294-034d74029d.zip/node_modules/html-escaper/",\ @@ -7662,6 +8734,15 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["is-what", [\ + ["npm:4.1.16", {\ + "packageLocation": "./.yarn/cache/is-what-npm-4.1.16-1622ed8fd8-f6400634ba.zip/node_modules/is-what/",\ + "packageDependencies": [\ + ["is-what", "npm:4.1.16"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["is-windows", [\ ["npm:1.0.2", {\ "packageLocation": "./.yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-438b7e5265.zip/node_modules/is-windows/",\ @@ -8343,6 +9424,13 @@ const RAW_RUNTIME_STATE = ["jsesc", "npm:2.5.2"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:3.0.2", {\ + "packageLocation": "./.yarn/cache/jsesc-npm-3.0.2-3b3b74ec0d-8e5a7de6b7.zip/node_modules/jsesc/",\ + "packageDependencies": [\ + ["jsesc", "npm:3.0.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["json-parse-even-better-errors", [\ @@ -8992,6 +10080,16 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["merge-anything", [\ + ["npm:5.1.7", {\ + "packageLocation": "./.yarn/cache/merge-anything-npm-5.1.7-6cc5f839be-53d034b2a1.zip/node_modules/merge-anything/",\ + "packageDependencies": [\ + ["merge-anything", "npm:5.1.7"],\ + ["is-what", "npm:4.1.16"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["merge-stream", [\ ["npm:2.0.0", {\ "packageLocation": "./.yarn/cache/merge-stream-npm-2.0.0-2ac83efea5-6fa4dcc8d8.zip/node_modules/merge-stream/",\ @@ -10431,6 +11529,14 @@ const RAW_RUNTIME_STATE = ["entities", "npm:4.5.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:7.2.1", {\ + "packageLocation": "./.yarn/cache/parse5-npm-7.2.1-c48f333f28-fd1a8ad154.zip/node_modules/parse5/",\ + "packageDependencies": [\ + ["parse5", "npm:7.2.1"],\ + ["entities", "npm:4.5.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["path-exists", [\ @@ -11492,6 +12598,37 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["seroval", [\ + ["npm:1.1.1", {\ + "packageLocation": "./.yarn/cache/seroval-npm-1.1.1-2a0e13c7a6-06053be759.zip/node_modules/seroval/",\ + "packageDependencies": [\ + ["seroval", "npm:1.1.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["seroval-plugins", [\ + ["npm:1.1.1", {\ + "packageLocation": "./.yarn/cache/seroval-plugins-npm-1.1.1-94e315ca17-79188bd16f.zip/node_modules/seroval-plugins/",\ + "packageDependencies": [\ + ["seroval-plugins", "npm:1.1.1"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:16b4808c182b2bbd635c23701c1007f2233b65e5d2f7258b411c53d4481b50648f51f09af5eb0ddf83e8f12fc9966983eabc548ed6e7d7ff6a664ec23862ef1a#npm:1.1.1", {\ + "packageLocation": "./.yarn/__virtual__/seroval-plugins-virtual-eed301c736/0/cache/seroval-plugins-npm-1.1.1-94e315ca17-79188bd16f.zip/node_modules/seroval-plugins/",\ + "packageDependencies": [\ + ["seroval-plugins", "virtual:16b4808c182b2bbd635c23701c1007f2233b65e5d2f7258b411c53d4481b50648f51f09af5eb0ddf83e8f12fc9966983eabc548ed6e7d7ff6a664ec23862ef1a#npm:1.1.1"],\ + ["@types/seroval", null],\ + ["seroval", "npm:1.1.1"]\ + ],\ + "packagePeers": [\ + "@types/seroval",\ + "seroval"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["set-blocking", [\ ["npm:2.0.0", {\ "packageLocation": "./.yarn/cache/set-blocking-npm-2.0.0-49e2cffa24-8980ebf7ae.zip/node_modules/set-blocking/",\ @@ -11654,6 +12791,43 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["solid-js", [\ + ["npm:1.9.3", {\ + "packageLocation": "./.yarn/cache/solid-js-npm-1.9.3-16b4808c18-01c932a700.zip/node_modules/solid-js/",\ + "packageDependencies": [\ + ["solid-js", "npm:1.9.3"],\ + ["csstype", "npm:3.1.3"],\ + ["seroval", "npm:1.1.1"],\ + ["seroval-plugins", "virtual:16b4808c182b2bbd635c23701c1007f2233b65e5d2f7258b411c53d4481b50648f51f09af5eb0ddf83e8f12fc9966983eabc548ed6e7d7ff6a664ec23862ef1a#npm:1.1.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["solid-refresh", [\ + ["npm:0.6.3", {\ + "packageLocation": "./.yarn/cache/solid-refresh-npm-0.6.3-52ce4eab8e-2ca43f894f.zip/node_modules/solid-refresh/",\ + "packageDependencies": [\ + ["solid-refresh", "npm:0.6.3"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:0.6.3", {\ + "packageLocation": "./.yarn/__virtual__/solid-refresh-virtual-e987124cc4/0/cache/solid-refresh-npm-0.6.3-52ce4eab8e-2ca43f894f.zip/node_modules/solid-refresh/",\ + "packageDependencies": [\ + ["solid-refresh", "virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:0.6.3"],\ + ["@babel/generator", "npm:7.26.2"],\ + ["@babel/helper-module-imports", "npm:7.25.9"],\ + ["@babel/types", "npm:7.26.0"],\ + ["@types/solid-js", null],\ + ["solid-js", "npm:1.9.3"]\ + ],\ + "packagePeers": [\ + "@types/solid-js",\ + "solid-js"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["sort-keys", [\ ["npm:5.0.0", {\ "packageLocation": "./.yarn/cache/sort-keys-npm-5.0.0-10c1d08986-9c0b7a4683.zip/node_modules/sort-keys/",\ @@ -12563,6 +13737,21 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ + ["virtual:0bc5f13e3b070c660ccf3396ff30b6fc44ede2343c6543d593ce4624807ab1bafdbcd764ac20b4d55e6854e63e2568f1c6d09371eb639766b95e2d401b5b05cb#npm:1.1.1", {\ + "packageLocation": "./.yarn/__virtual__/update-browserslist-db-virtual-594dc17320/0/cache/update-browserslist-db-npm-1.1.1-16e34017b1-7678dd8609.zip/node_modules/update-browserslist-db/",\ + "packageDependencies": [\ + ["update-browserslist-db", "virtual:0bc5f13e3b070c660ccf3396ff30b6fc44ede2343c6543d593ce4624807ab1bafdbcd764ac20b4d55e6854e63e2568f1c6d09371eb639766b95e2d401b5b05cb#npm:1.1.1"],\ + ["@types/browserslist", null],\ + ["browserslist", "npm:4.24.2"],\ + ["escalade", "npm:3.2.0"],\ + ["picocolors", "npm:1.1.0"]\ + ],\ + "packagePeers": [\ + "@types/browserslist",\ + "browserslist"\ + ],\ + "linkType": "HARD"\ + }],\ ["virtual:5d546adfd40497567a2beaa05ac4b4ad48276a2420121d97df67ea4556d0bdf92c4336a43dcb6a63e246890704267e5510f16f5288829796be62a2f7fd8b1ff5#npm:1.0.16", {\ "packageLocation": "./.yarn/__virtual__/update-browserslist-db-virtual-e68c537dc0/0/cache/update-browserslist-db-npm-1.0.16-ca365328e3-071bf0b2fb.zip/node_modules/update-browserslist-db/",\ "packageDependencies": [\ @@ -12646,6 +13835,15 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["validate-html-nesting", [\ + ["npm:1.2.2", {\ + "packageLocation": "./.yarn/cache/validate-html-nesting-npm-1.2.2-92d08f7d17-2c13f75b93.zip/node_modules/validate-html-nesting/",\ + "packageDependencies": [\ + ["validate-html-nesting", "npm:1.2.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["value-or-promise", [\ ["npm:1.0.12", {\ "packageLocation": "./.yarn/cache/value-or-promise-npm-1.0.12-4f73820639-a4cc31fc9c.zip/node_modules/value-or-promise/",\ @@ -12792,6 +13990,64 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["vite-plugin-solid", [\ + ["npm:2.10.2", {\ + "packageLocation": "./.yarn/cache/vite-plugin-solid-npm-2.10.2-24ad614544-f7c3d857c7.zip/node_modules/vite-plugin-solid/",\ + "packageDependencies": [\ + ["vite-plugin-solid", "npm:2.10.2"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#npm:2.10.2", {\ + "packageLocation": "./.yarn/__virtual__/vite-plugin-solid-virtual-e79e1ac27d/0/cache/vite-plugin-solid-npm-2.10.2-24ad614544-f7c3d857c7.zip/node_modules/vite-plugin-solid/",\ + "packageDependencies": [\ + ["vite-plugin-solid", "virtual:f02c81452ff867c51068ba24d1154dc4fd3d1c7604f453ffee4229d2511559426c90d236211f3a0cdc7936f57f86390b27d2faabd3ea70d6ab368b4517c54f80#npm:2.10.2"],\ + ["@babel/core", "npm:7.26.0"],\ + ["@testing-library/jest-dom", null],\ + ["@types/babel__core", "npm:7.20.5"],\ + ["@types/solid-js", null],\ + ["@types/testing-library__jest-dom", null],\ + ["@types/vite", null],\ + ["babel-preset-solid", "virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:1.9.3"],\ + ["merge-anything", "npm:5.1.7"],\ + ["solid-js", "npm:1.9.3"],\ + ["solid-refresh", "virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:0.6.3"],\ + ["vite", "virtual:2c30557d8ca5e7c67e7558d45bc44bef6c7a622b34a97fa8102f3235f92769c87777d34ed37059c12d8f3a21841ea06cf4badc5dc796697b0f765c17db6e24e5#npm:5.3.2"],\ + ["vitefu", "virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:0.2.5"]\ + ],\ + "packagePeers": [\ + "@testing-library/jest-dom",\ + "@types/solid-js",\ + "@types/testing-library__jest-dom",\ + "@types/vite",\ + "solid-js",\ + "vite"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["vitefu", [\ + ["npm:0.2.5", {\ + "packageLocation": "./.yarn/cache/vitefu-npm-0.2.5-df1798d310-65ef98208c.zip/node_modules/vitefu/",\ + "packageDependencies": [\ + ["vitefu", "npm:0.2.5"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:0.2.5", {\ + "packageLocation": "./.yarn/__virtual__/vitefu-virtual-33d0301a6d/0/cache/vitefu-npm-0.2.5-df1798d310-65ef98208c.zip/node_modules/vitefu/",\ + "packageDependencies": [\ + ["vitefu", "virtual:e79e1ac27d85b4c061542c7709548f2b7f3b073515c083bfcaa3daa14f9c6c6970df484c5c33a7ff2e975949349459f62456481a41fea449e711220b8807bbfb#npm:0.2.5"],\ + ["@types/vite", null],\ + ["vite", "virtual:2c30557d8ca5e7c67e7558d45bc44bef6c7a622b34a97fa8102f3235f92769c87777d34ed37059c12d8f3a21841ea06cf4badc5dc796697b0f765c17db6e24e5#npm:5.3.2"]\ + ],\ + "packagePeers": [\ + "@types/vite",\ + "vite"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["vscode-oniguruma", [\ ["npm:1.7.0", {\ "packageLocation": "./.yarn/cache/vscode-oniguruma-npm-1.7.0-07cc55fbcc-7da9d21459.zip/node_modules/vscode-oniguruma/",\ diff --git a/.yarn/cache/@babel-code-frame-npm-7.26.2-4902b56813-db2c2122af.zip b/.yarn/cache/@babel-code-frame-npm-7.26.2-4902b56813-db2c2122af.zip new file mode 100644 index 000000000..0c47a20c2 Binary files /dev/null and b/.yarn/cache/@babel-code-frame-npm-7.26.2-4902b56813-db2c2122af.zip differ diff --git a/.yarn/cache/@babel-compat-data-npm-7.26.2-0f1eb3d38a-ed9eed6b62.zip b/.yarn/cache/@babel-compat-data-npm-7.26.2-0f1eb3d38a-ed9eed6b62.zip new file mode 100644 index 000000000..2fbdfff85 Binary files /dev/null and b/.yarn/cache/@babel-compat-data-npm-7.26.2-0f1eb3d38a-ed9eed6b62.zip differ diff --git a/.yarn/cache/@babel-core-npm-7.26.0-6f14d37f26-65767bfdb1.zip b/.yarn/cache/@babel-core-npm-7.26.0-6f14d37f26-65767bfdb1.zip new file mode 100644 index 000000000..c9e41a41a Binary files /dev/null and b/.yarn/cache/@babel-core-npm-7.26.0-6f14d37f26-65767bfdb1.zip differ diff --git a/.yarn/cache/@babel-generator-npm-7.26.2-5061e18ae4-71ace82b5b.zip b/.yarn/cache/@babel-generator-npm-7.26.2-5061e18ae4-71ace82b5b.zip new file mode 100644 index 000000000..d3bd2a2ed Binary files /dev/null and b/.yarn/cache/@babel-generator-npm-7.26.2-5061e18ae4-71ace82b5b.zip differ diff --git a/.yarn/cache/@babel-helper-annotate-as-pure-npm-7.25.9-a0f89e14a0-41edda10df.zip b/.yarn/cache/@babel-helper-annotate-as-pure-npm-7.25.9-a0f89e14a0-41edda10df.zip new file mode 100644 index 000000000..6d3fee33c Binary files /dev/null and b/.yarn/cache/@babel-helper-annotate-as-pure-npm-7.25.9-a0f89e14a0-41edda10df.zip differ diff --git a/.yarn/cache/@babel-helper-compilation-targets-npm-7.25.9-1e2a209538-8053fbfc21.zip b/.yarn/cache/@babel-helper-compilation-targets-npm-7.25.9-1e2a209538-8053fbfc21.zip new file mode 100644 index 000000000..ae6057e48 Binary files /dev/null and b/.yarn/cache/@babel-helper-compilation-targets-npm-7.25.9-1e2a209538-8053fbfc21.zip differ diff --git a/.yarn/cache/@babel-helper-create-class-features-plugin-npm-7.25.9-1efda825e9-d1d47a7b5f.zip b/.yarn/cache/@babel-helper-create-class-features-plugin-npm-7.25.9-1efda825e9-d1d47a7b5f.zip new file mode 100644 index 000000000..4801ac6ce Binary files /dev/null and b/.yarn/cache/@babel-helper-create-class-features-plugin-npm-7.25.9-1efda825e9-d1d47a7b5f.zip differ diff --git a/.yarn/cache/@babel-helper-member-expression-to-functions-npm-7.25.9-761e6fec27-ef8cc1c1e6.zip b/.yarn/cache/@babel-helper-member-expression-to-functions-npm-7.25.9-761e6fec27-ef8cc1c1e6.zip new file mode 100644 index 000000000..6bc4bf409 Binary files /dev/null and b/.yarn/cache/@babel-helper-member-expression-to-functions-npm-7.25.9-761e6fec27-ef8cc1c1e6.zip differ diff --git a/.yarn/cache/@babel-helper-module-imports-npm-7.18.6-1031faa864-75b0d51027.zip b/.yarn/cache/@babel-helper-module-imports-npm-7.18.6-1031faa864-75b0d51027.zip new file mode 100644 index 000000000..275df062c Binary files /dev/null and b/.yarn/cache/@babel-helper-module-imports-npm-7.18.6-1031faa864-75b0d51027.zip differ diff --git a/.yarn/cache/@babel-helper-module-imports-npm-7.25.9-b86e31bde9-e090be5dee.zip b/.yarn/cache/@babel-helper-module-imports-npm-7.25.9-b86e31bde9-e090be5dee.zip new file mode 100644 index 000000000..92d15073e Binary files /dev/null and b/.yarn/cache/@babel-helper-module-imports-npm-7.25.9-b86e31bde9-e090be5dee.zip differ diff --git a/.yarn/cache/@babel-helper-module-transforms-npm-7.26.0-7557a3558f-9841d2a62f.zip b/.yarn/cache/@babel-helper-module-transforms-npm-7.26.0-7557a3558f-9841d2a62f.zip new file mode 100644 index 000000000..e56392ab1 Binary files /dev/null and b/.yarn/cache/@babel-helper-module-transforms-npm-7.26.0-7557a3558f-9841d2a62f.zip differ diff --git a/.yarn/cache/@babel-helper-optimise-call-expression-npm-7.25.9-d8006fbada-f09d0ad60c.zip b/.yarn/cache/@babel-helper-optimise-call-expression-npm-7.25.9-d8006fbada-f09d0ad60c.zip new file mode 100644 index 000000000..f11caa2ec Binary files /dev/null and b/.yarn/cache/@babel-helper-optimise-call-expression-npm-7.25.9-d8006fbada-f09d0ad60c.zip differ diff --git a/.yarn/cache/@babel-helper-plugin-utils-npm-7.25.9-462b7ade58-e347d87728.zip b/.yarn/cache/@babel-helper-plugin-utils-npm-7.25.9-462b7ade58-e347d87728.zip new file mode 100644 index 000000000..0e2d24b53 Binary files /dev/null and b/.yarn/cache/@babel-helper-plugin-utils-npm-7.25.9-462b7ade58-e347d87728.zip differ diff --git a/.yarn/cache/@babel-helper-replace-supers-npm-7.25.9-664068b76b-8ebf787016.zip b/.yarn/cache/@babel-helper-replace-supers-npm-7.25.9-664068b76b-8ebf787016.zip new file mode 100644 index 000000000..b7da1bb45 Binary files /dev/null and b/.yarn/cache/@babel-helper-replace-supers-npm-7.25.9-664068b76b-8ebf787016.zip differ diff --git a/.yarn/cache/@babel-helper-simple-access-npm-7.25.9-477a4a7937-a16a6cfa5e.zip b/.yarn/cache/@babel-helper-simple-access-npm-7.25.9-477a4a7937-a16a6cfa5e.zip new file mode 100644 index 000000000..206b7625d Binary files /dev/null and b/.yarn/cache/@babel-helper-simple-access-npm-7.25.9-477a4a7937-a16a6cfa5e.zip differ diff --git a/.yarn/cache/@babel-helper-skip-transparent-expression-wrappers-npm-7.25.9-215072fae0-fdbb524893.zip b/.yarn/cache/@babel-helper-skip-transparent-expression-wrappers-npm-7.25.9-215072fae0-fdbb524893.zip new file mode 100644 index 000000000..857a2ad76 Binary files /dev/null and b/.yarn/cache/@babel-helper-skip-transparent-expression-wrappers-npm-7.25.9-215072fae0-fdbb524893.zip differ diff --git a/.yarn/cache/@babel-helper-string-parser-npm-7.25.9-eade578078-c28656c52b.zip b/.yarn/cache/@babel-helper-string-parser-npm-7.25.9-eade578078-c28656c52b.zip new file mode 100644 index 000000000..284b33641 Binary files /dev/null and b/.yarn/cache/@babel-helper-string-parser-npm-7.25.9-eade578078-c28656c52b.zip differ diff --git a/.yarn/cache/@babel-helper-validator-identifier-npm-7.25.9-2634b947a4-3f9b649be0.zip b/.yarn/cache/@babel-helper-validator-identifier-npm-7.25.9-2634b947a4-3f9b649be0.zip new file mode 100644 index 000000000..dbd05a465 Binary files /dev/null and b/.yarn/cache/@babel-helper-validator-identifier-npm-7.25.9-2634b947a4-3f9b649be0.zip differ diff --git a/.yarn/cache/@babel-helper-validator-option-npm-7.25.9-6450027d5d-9491b27559.zip b/.yarn/cache/@babel-helper-validator-option-npm-7.25.9-6450027d5d-9491b27559.zip new file mode 100644 index 000000000..dd45f0be2 Binary files /dev/null and b/.yarn/cache/@babel-helper-validator-option-npm-7.25.9-6450027d5d-9491b27559.zip differ diff --git a/.yarn/cache/@babel-helpers-npm-7.26.0-d7ff09b837-fd4757f65d.zip b/.yarn/cache/@babel-helpers-npm-7.26.0-d7ff09b837-fd4757f65d.zip new file mode 100644 index 000000000..7a7d3bdb0 Binary files /dev/null and b/.yarn/cache/@babel-helpers-npm-7.26.0-d7ff09b837-fd4757f65d.zip differ diff --git a/.yarn/cache/@babel-parser-npm-7.26.2-5b22b96c42-8baee43752.zip b/.yarn/cache/@babel-parser-npm-7.26.2-5b22b96c42-8baee43752.zip new file mode 100644 index 000000000..08edb32b2 Binary files /dev/null and b/.yarn/cache/@babel-parser-npm-7.26.2-5b22b96c42-8baee43752.zip differ diff --git a/.yarn/cache/@babel-plugin-syntax-jsx-npm-7.25.9-3df022f433-bb609d1ffb.zip b/.yarn/cache/@babel-plugin-syntax-jsx-npm-7.25.9-3df022f433-bb609d1ffb.zip new file mode 100644 index 000000000..5dfc3dde6 Binary files /dev/null and b/.yarn/cache/@babel-plugin-syntax-jsx-npm-7.25.9-3df022f433-bb609d1ffb.zip differ diff --git a/.yarn/cache/@babel-plugin-syntax-typescript-npm-7.25.9-5201e4ba77-0e9821e8ba.zip b/.yarn/cache/@babel-plugin-syntax-typescript-npm-7.25.9-5201e4ba77-0e9821e8ba.zip new file mode 100644 index 000000000..a210abd42 Binary files /dev/null and b/.yarn/cache/@babel-plugin-syntax-typescript-npm-7.25.9-5201e4ba77-0e9821e8ba.zip differ diff --git a/.yarn/cache/@babel-plugin-transform-modules-commonjs-npm-7.25.9-64aa5f0173-a7390ca999.zip b/.yarn/cache/@babel-plugin-transform-modules-commonjs-npm-7.25.9-64aa5f0173-a7390ca999.zip new file mode 100644 index 000000000..51202a5e6 Binary files /dev/null and b/.yarn/cache/@babel-plugin-transform-modules-commonjs-npm-7.25.9-64aa5f0173-a7390ca999.zip differ diff --git a/.yarn/cache/@babel-plugin-transform-typescript-npm-7.25.9-706910d8c9-91e2ec805f.zip b/.yarn/cache/@babel-plugin-transform-typescript-npm-7.25.9-706910d8c9-91e2ec805f.zip new file mode 100644 index 000000000..9b2d2fa6c Binary files /dev/null and b/.yarn/cache/@babel-plugin-transform-typescript-npm-7.25.9-706910d8c9-91e2ec805f.zip differ diff --git a/.yarn/cache/@babel-preset-typescript-npm-7.26.0-0771d290dd-81a6082616.zip b/.yarn/cache/@babel-preset-typescript-npm-7.26.0-0771d290dd-81a6082616.zip new file mode 100644 index 000000000..b70e2f4e0 Binary files /dev/null and b/.yarn/cache/@babel-preset-typescript-npm-7.26.0-0771d290dd-81a6082616.zip differ diff --git a/.yarn/cache/@babel-template-npm-7.25.9-d903b7b6d5-e861180881.zip b/.yarn/cache/@babel-template-npm-7.25.9-d903b7b6d5-e861180881.zip new file mode 100644 index 000000000..dfcd54f5a Binary files /dev/null and b/.yarn/cache/@babel-template-npm-7.25.9-d903b7b6d5-e861180881.zip differ diff --git a/.yarn/cache/@babel-traverse-npm-7.25.9-6230e12b1d-7431614d76.zip b/.yarn/cache/@babel-traverse-npm-7.25.9-6230e12b1d-7431614d76.zip new file mode 100644 index 000000000..f12476422 Binary files /dev/null and b/.yarn/cache/@babel-traverse-npm-7.25.9-6230e12b1d-7431614d76.zip differ diff --git a/.yarn/cache/@babel-types-npm-7.26.0-ae81de0a93-40780741ec.zip b/.yarn/cache/@babel-types-npm-7.26.0-ae81de0a93-40780741ec.zip new file mode 100644 index 000000000..f1b0571f9 Binary files /dev/null and b/.yarn/cache/@babel-types-npm-7.26.0-ae81de0a93-40780741ec.zip differ diff --git a/.yarn/cache/@vanilla-extract-vite-plugin-patch-3bf68dc431-a111359785.zip b/.yarn/cache/@vanilla-extract-vite-plugin-patch-3bf68dc431-a111359785.zip new file mode 100644 index 000000000..83a9354f9 Binary files /dev/null and b/.yarn/cache/@vanilla-extract-vite-plugin-patch-3bf68dc431-a111359785.zip differ diff --git a/.yarn/cache/babel-plugin-jsx-dom-expressions-npm-0.39.3-33d2b7639b-2bcab150bb.zip b/.yarn/cache/babel-plugin-jsx-dom-expressions-npm-0.39.3-33d2b7639b-2bcab150bb.zip new file mode 100644 index 000000000..637f4ffe4 Binary files /dev/null and b/.yarn/cache/babel-plugin-jsx-dom-expressions-npm-0.39.3-33d2b7639b-2bcab150bb.zip differ diff --git a/.yarn/cache/babel-preset-solid-npm-1.9.3-e7d89b8f97-144f7b1cd2.zip b/.yarn/cache/babel-preset-solid-npm-1.9.3-e7d89b8f97-144f7b1cd2.zip new file mode 100644 index 000000000..77aded958 Binary files /dev/null and b/.yarn/cache/babel-preset-solid-npm-1.9.3-e7d89b8f97-144f7b1cd2.zip differ diff --git a/.yarn/cache/browserslist-npm-4.24.2-0bc5f13e3b-f8a9d78bba.zip b/.yarn/cache/browserslist-npm-4.24.2-0bc5f13e3b-f8a9d78bba.zip new file mode 100644 index 000000000..e944ce5ae Binary files /dev/null and b/.yarn/cache/browserslist-npm-4.24.2-0bc5f13e3b-f8a9d78bba.zip differ diff --git a/.yarn/cache/caniuse-lite-npm-1.0.30001677-11c12e06e9-e07439bdea.zip b/.yarn/cache/caniuse-lite-npm-1.0.30001677-11c12e06e9-e07439bdea.zip new file mode 100644 index 000000000..4502f21ce Binary files /dev/null and b/.yarn/cache/caniuse-lite-npm-1.0.30001677-11c12e06e9-e07439bdea.zip differ diff --git a/.yarn/cache/csstype-npm-3.1.3-e9a1c85013-f593cce41f.zip b/.yarn/cache/csstype-npm-3.1.3-e9a1c85013-f593cce41f.zip new file mode 100644 index 000000000..b08ed9c0d Binary files /dev/null and b/.yarn/cache/csstype-npm-3.1.3-e9a1c85013-f593cce41f.zip differ diff --git a/.yarn/cache/electron-to-chromium-npm-1.5.50-c2eeb3c362-635ca4b593.zip b/.yarn/cache/electron-to-chromium-npm-1.5.50-c2eeb3c362-635ca4b593.zip new file mode 100644 index 000000000..d9130fa31 Binary files /dev/null and b/.yarn/cache/electron-to-chromium-npm-1.5.50-c2eeb3c362-635ca4b593.zip differ diff --git a/.yarn/cache/esbuild-plugin-solid-npm-0.6.0-49835b85dc-91d0ae9aa2.zip b/.yarn/cache/esbuild-plugin-solid-npm-0.6.0-49835b85dc-91d0ae9aa2.zip new file mode 100644 index 000000000..7dac169ea Binary files /dev/null and b/.yarn/cache/esbuild-plugin-solid-npm-0.6.0-49835b85dc-91d0ae9aa2.zip differ diff --git a/.yarn/cache/esbuild-plugin-solid-patch-6ed6ca3665-3f3b173176.zip b/.yarn/cache/esbuild-plugin-solid-patch-6ed6ca3665-3f3b173176.zip new file mode 100644 index 000000000..d1fae6fb7 Binary files /dev/null and b/.yarn/cache/esbuild-plugin-solid-patch-6ed6ca3665-3f3b173176.zip differ diff --git a/.yarn/cache/html-entities-npm-2.3.3-e0aac656af-24f6b77ce2.zip b/.yarn/cache/html-entities-npm-2.3.3-e0aac656af-24f6b77ce2.zip new file mode 100644 index 000000000..de5a944f7 Binary files /dev/null and b/.yarn/cache/html-entities-npm-2.3.3-e0aac656af-24f6b77ce2.zip differ diff --git a/.yarn/cache/is-what-npm-4.1.16-1622ed8fd8-f6400634ba.zip b/.yarn/cache/is-what-npm-4.1.16-1622ed8fd8-f6400634ba.zip new file mode 100644 index 000000000..d09d43025 Binary files /dev/null and b/.yarn/cache/is-what-npm-4.1.16-1622ed8fd8-f6400634ba.zip differ diff --git a/.yarn/cache/jsesc-npm-3.0.2-3b3b74ec0d-8e5a7de6b7.zip b/.yarn/cache/jsesc-npm-3.0.2-3b3b74ec0d-8e5a7de6b7.zip new file mode 100644 index 000000000..a2056f3f0 Binary files /dev/null and b/.yarn/cache/jsesc-npm-3.0.2-3b3b74ec0d-8e5a7de6b7.zip differ diff --git a/.yarn/cache/merge-anything-npm-5.1.7-6cc5f839be-53d034b2a1.zip b/.yarn/cache/merge-anything-npm-5.1.7-6cc5f839be-53d034b2a1.zip new file mode 100644 index 000000000..b4ccfbecb Binary files /dev/null and b/.yarn/cache/merge-anything-npm-5.1.7-6cc5f839be-53d034b2a1.zip differ diff --git a/.yarn/cache/parse5-npm-7.2.1-c48f333f28-fd1a8ad154.zip b/.yarn/cache/parse5-npm-7.2.1-c48f333f28-fd1a8ad154.zip new file mode 100644 index 000000000..d3595034d Binary files /dev/null and b/.yarn/cache/parse5-npm-7.2.1-c48f333f28-fd1a8ad154.zip differ diff --git a/.yarn/cache/seroval-npm-1.1.1-2a0e13c7a6-06053be759.zip b/.yarn/cache/seroval-npm-1.1.1-2a0e13c7a6-06053be759.zip new file mode 100644 index 000000000..32675b273 Binary files /dev/null and b/.yarn/cache/seroval-npm-1.1.1-2a0e13c7a6-06053be759.zip differ diff --git a/.yarn/cache/seroval-plugins-npm-1.1.1-94e315ca17-79188bd16f.zip b/.yarn/cache/seroval-plugins-npm-1.1.1-94e315ca17-79188bd16f.zip new file mode 100644 index 000000000..fa8891483 Binary files /dev/null and b/.yarn/cache/seroval-plugins-npm-1.1.1-94e315ca17-79188bd16f.zip differ diff --git a/.yarn/cache/solid-js-npm-1.9.3-16b4808c18-01c932a700.zip b/.yarn/cache/solid-js-npm-1.9.3-16b4808c18-01c932a700.zip new file mode 100644 index 000000000..b9e5ded18 Binary files /dev/null and b/.yarn/cache/solid-js-npm-1.9.3-16b4808c18-01c932a700.zip differ diff --git a/.yarn/cache/solid-refresh-npm-0.6.3-52ce4eab8e-2ca43f894f.zip b/.yarn/cache/solid-refresh-npm-0.6.3-52ce4eab8e-2ca43f894f.zip new file mode 100644 index 000000000..c2dc16bf2 Binary files /dev/null and b/.yarn/cache/solid-refresh-npm-0.6.3-52ce4eab8e-2ca43f894f.zip differ diff --git a/.yarn/cache/validate-html-nesting-npm-1.2.2-92d08f7d17-2c13f75b93.zip b/.yarn/cache/validate-html-nesting-npm-1.2.2-92d08f7d17-2c13f75b93.zip new file mode 100644 index 000000000..f1b0495ed Binary files /dev/null and b/.yarn/cache/validate-html-nesting-npm-1.2.2-92d08f7d17-2c13f75b93.zip differ diff --git a/.yarn/cache/vite-plugin-solid-npm-2.10.2-24ad614544-f7c3d857c7.zip b/.yarn/cache/vite-plugin-solid-npm-2.10.2-24ad614544-f7c3d857c7.zip new file mode 100644 index 000000000..b7375c0d8 Binary files /dev/null and b/.yarn/cache/vite-plugin-solid-npm-2.10.2-24ad614544-f7c3d857c7.zip differ diff --git a/.yarn/cache/vitefu-npm-0.2.5-df1798d310-65ef98208c.zip b/.yarn/cache/vitefu-npm-0.2.5-df1798d310-65ef98208c.zip new file mode 100644 index 000000000..8df9c9ced Binary files /dev/null and b/.yarn/cache/vitefu-npm-0.2.5-df1798d310-65ef98208c.zip differ diff --git a/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch b/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch new file mode 100644 index 000000000..a4b3ef359 --- /dev/null +++ b/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch @@ -0,0 +1,88 @@ +diff --git a/dist/vanilla-extract-vite-plugin.cjs.d.ts b/dist/vanilla-extract-vite-plugin.cjs.d.ts +index 894123b02572365e9179a39fad2f896de87e383d..c18d10bc97270a768999a91d3b17b27f4eda14fa 100644 +--- a/dist/vanilla-extract-vite-plugin.cjs.d.ts ++++ b/dist/vanilla-extract-vite-plugin.cjs.d.ts +@@ -1,9 +1,10 @@ +-import { Plugin } from 'vite'; ++import { UserConfig, Plugin } from 'vite'; + import { IdentifierOption } from '@vanilla-extract/integration'; + + interface Options { + identifiers?: IdentifierOption; + unstable_mode?: 'transform' | 'emitCss'; ++ viteConfigOverrides?: Partial; + } + declare function vanillaExtractPlugin({ identifiers, unstable_mode: mode, }?: Options): Plugin; + +diff --git a/dist/vanilla-extract-vite-plugin.cjs.dev.js b/dist/vanilla-extract-vite-plugin.cjs.dev.js +index de4b386d46daa7b6a8f8d3760ce84d0817ba2be9..718e09874b971002ed03f4640a18a230896716e4 100644 +--- a/dist/vanilla-extract-vite-plugin.cjs.dev.js ++++ b/dist/vanilla-extract-vite-plugin.cjs.dev.js +@@ -27,7 +27,8 @@ plugin.name !== 'vanilla-extract' && + !plugin.name.startsWith('remix'); + function vanillaExtractPlugin({ + identifiers, +- unstable_mode: mode = 'emitCss' ++ unstable_mode: mode = 'emitCss', ++ viteConfigOverrides, + } = {}) { + let config; + let configEnv; +@@ -116,7 +117,8 @@ function vanillaExtractPlugin({ + } + const viteConfig = { + ...configForViteCompiler, +- plugins: (_configForViteCompile = configForViteCompiler) === null || _configForViteCompile === void 0 || (_configForViteCompile = _configForViteCompile.plugins) === null || _configForViteCompile === void 0 ? void 0 : _configForViteCompile.flat().filter(removeIncompatiblePlugins) ++ plugins: (_configForViteCompile = configForViteCompiler) === null || _configForViteCompile === void 0 || (_configForViteCompile = _configForViteCompile.plugins) === null || _configForViteCompile === void 0 ? void 0 : _configForViteCompile.flat().filter(removeIncompatiblePlugins), ++ ...viteConfigOverrides + }; + compiler = integration.createCompiler({ + root: config.root, +diff --git a/dist/vanilla-extract-vite-plugin.cjs.prod.js b/dist/vanilla-extract-vite-plugin.cjs.prod.js +index de4b386d46daa7b6a8f8d3760ce84d0817ba2be9..718e09874b971002ed03f4640a18a230896716e4 100644 +--- a/dist/vanilla-extract-vite-plugin.cjs.prod.js ++++ b/dist/vanilla-extract-vite-plugin.cjs.prod.js +@@ -27,7 +27,8 @@ plugin.name !== 'vanilla-extract' && + !plugin.name.startsWith('remix'); + function vanillaExtractPlugin({ + identifiers, +- unstable_mode: mode = 'emitCss' ++ unstable_mode: mode = 'emitCss', ++ viteConfigOverrides, + } = {}) { + let config; + let configEnv; +@@ -116,7 +117,8 @@ function vanillaExtractPlugin({ + } + const viteConfig = { + ...configForViteCompiler, +- plugins: (_configForViteCompile = configForViteCompiler) === null || _configForViteCompile === void 0 || (_configForViteCompile = _configForViteCompile.plugins) === null || _configForViteCompile === void 0 ? void 0 : _configForViteCompile.flat().filter(removeIncompatiblePlugins) ++ plugins: (_configForViteCompile = configForViteCompiler) === null || _configForViteCompile === void 0 || (_configForViteCompile = _configForViteCompile.plugins) === null || _configForViteCompile === void 0 ? void 0 : _configForViteCompile.flat().filter(removeIncompatiblePlugins), ++ ...viteConfigOverrides + }; + compiler = integration.createCompiler({ + root: config.root, +diff --git a/dist/vanilla-extract-vite-plugin.esm.js b/dist/vanilla-extract-vite-plugin.esm.js +index c810206ef529e2c071add16ac4df50cffdf68485..14f314f8b19533b90a94afad47f88ffc4ca36647 100644 +--- a/dist/vanilla-extract-vite-plugin.esm.js ++++ b/dist/vanilla-extract-vite-plugin.esm.js +@@ -19,7 +19,8 @@ plugin.name !== 'vanilla-extract' && + !plugin.name.startsWith('remix'); + function vanillaExtractPlugin({ + identifiers, +- unstable_mode: mode = 'emitCss' ++ unstable_mode: mode = 'emitCss', ++ viteConfigOverrides, + } = {}) { + let config; + let configEnv; +@@ -108,7 +109,8 @@ function vanillaExtractPlugin({ + } + const viteConfig = { + ...configForViteCompiler, +- plugins: (_configForViteCompile = configForViteCompiler) === null || _configForViteCompile === void 0 || (_configForViteCompile = _configForViteCompile.plugins) === null || _configForViteCompile === void 0 ? void 0 : _configForViteCompile.flat().filter(removeIncompatiblePlugins) ++ plugins: (_configForViteCompile = configForViteCompiler) === null || _configForViteCompile === void 0 || (_configForViteCompile = _configForViteCompile.plugins) === null || _configForViteCompile === void 0 ? void 0 : _configForViteCompile.flat().filter(removeIncompatiblePlugins), ++ ...viteConfigOverrides + }; + compiler = createCompiler({ + root: config.root, diff --git a/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch b/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch new file mode 100644 index 000000000..430484116 --- /dev/null +++ b/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch @@ -0,0 +1,65 @@ +diff --git a/dist/index.cjs b/dist/index.cjs +index d9013dcb4901fafc9f2fb2f23b2504cfb3a7b13e..da57f1a7fd60aeeaaf72d57be718d031a1ded40a 100644 +--- a/dist/index.cjs ++++ b/dist/index.cjs +@@ -15,7 +15,7 @@ function solidPlugin(options) { + return { + name: "esbuild:solid", + setup(build) { +- build.onLoad({ filter: /\.(t|j)sx$/ }, async (args) => { ++ build.onLoad({ filter: options?.filter ?? /\.(t|j)sx$/ }, async (args) => { + const source = await promises.readFile(args.path, { encoding: "utf-8" }); + const { name, ext } = node_path.parse(args.path); + const filename = name + ext; +diff --git a/dist/index.d.cts b/dist/index.d.cts +index 8f1e6a571a710cf5dde33c8e569f1955840b5f48..c3b607aa413ab96f87b6c6de69e68a97cfee3631 100644 +--- a/dist/index.d.cts ++++ b/dist/index.d.cts +@@ -3,6 +3,8 @@ import { TransformOptions } from '@babel/core'; + + /** Configuration options for esbuild-plugin-solid */ + interface Options { ++ /** The filter to use for deciding which files to transform @default /\.(t|j)sx$/ */ ++ filter?: RegExp; + /** The options to use for @babel/preset-typescript @default {} */ + typescript?: object; + /** +diff --git a/dist/index.d.mts b/dist/index.d.mts +index 8f1e6a571a710cf5dde33c8e569f1955840b5f48..c3b607aa413ab96f87b6c6de69e68a97cfee3631 100644 +--- a/dist/index.d.mts ++++ b/dist/index.d.mts +@@ -3,6 +3,8 @@ import { TransformOptions } from '@babel/core'; + + /** Configuration options for esbuild-plugin-solid */ + interface Options { ++ /** The filter to use for deciding which files to transform @default /\.(t|j)sx$/ */ ++ filter?: RegExp; + /** The options to use for @babel/preset-typescript @default {} */ + typescript?: object; + /** +diff --git a/dist/index.d.ts b/dist/index.d.ts +index 8f1e6a571a710cf5dde33c8e569f1955840b5f48..c3b607aa413ab96f87b6c6de69e68a97cfee3631 100644 +--- a/dist/index.d.ts ++++ b/dist/index.d.ts +@@ -3,6 +3,8 @@ import { TransformOptions } from '@babel/core'; + + /** Configuration options for esbuild-plugin-solid */ + interface Options { ++ /** The filter to use for deciding which files to transform @default /\.(t|j)sx$/ */ ++ filter?: RegExp; + /** The options to use for @babel/preset-typescript @default {} */ + typescript?: object; + /** +diff --git a/dist/index.mjs b/dist/index.mjs +index 6b50f5fd2507bf613fcdebd4fd0338741c0acea2..9077e2cd0b61f7d8d54af296a54d9c0c5bf387f9 100644 +--- a/dist/index.mjs ++++ b/dist/index.mjs +@@ -8,7 +8,7 @@ function solidPlugin(options) { + return { + name: "esbuild:solid", + setup(build) { +- build.onLoad({ filter: /\.(t|j)sx$/ }, async (args) => { ++ build.onLoad({ filter: options?.filter ?? /\.(t|j)sx$/ }, async (args) => { + const source = await readFile(args.path, { encoding: "utf-8" }); + const { name, ext } = parse(args.path); + const filename = name + ext; diff --git a/biome.json b/biome.json index daa15db1b..35bf54c59 100644 --- a/biome.json +++ b/biome.json @@ -57,5 +57,17 @@ ".ultra.cache.json", "package.json" ] - } + }, + "overrides": [ + { + "include": ["**/solid/**"], + "linter": { + "rules": { + "correctness": { + "useJsxKeyInIterable": "off" + } + } + } + } + ] } diff --git a/demo-solid/README.md b/demo-solid/README.md new file mode 100644 index 000000000..bdb4ff7da --- /dev/null +++ b/demo-solid/README.md @@ -0,0 +1,12 @@ +# @stackflow/demo-solid + +This is an example of using Stackflow in a basic Single Page Application environment. The entry point where the app starts is `./src/main.ts` + +## Getting Started + +```bash +$ yarn dev + +# or +$ yarn dev:app +``` diff --git a/demo-solid/esbuild.config.js b/demo-solid/esbuild.config.js new file mode 100644 index 000000000..1eb1ce185 --- /dev/null +++ b/demo-solid/esbuild.config.js @@ -0,0 +1,38 @@ +import config from "@stackflow/esbuild-config"; +import { context } from "esbuild"; + +import pkg from "./package.json" assert { type: "json" }; + +const watch = process.argv.includes("--watch"); +const external = Object.keys({ + ...pkg.dependencies, + ...pkg.peerDependencies, +}); + +Promise.all([ + context({ + ...config({ + entryPoints: ["./src/stackflow/stackflow.docs.tsx"], + outdir: "./dist/stackflow", + vanillaExtractExternal: ["@seed-design"], + }), + format: "cjs", + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + context({ + ...config({ + entryPoints: ["./src/stackflow/stackflow.docs.tsx"], + outdir: "./dist/stackflow", + vanillaExtractExternal: ["@seed-design"], + }), + format: "esm", + outExtension: { + ".js": ".mjs", + }, + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), +]).catch(() => process.exit(1)); diff --git a/demo-solid/index.html b/demo-solid/index.html new file mode 100644 index 000000000..6270bceb2 --- /dev/null +++ b/demo-solid/index.html @@ -0,0 +1,29 @@ + + + + @stackflow/demo + + + + + +
+ + + diff --git a/demo-solid/package.json b/demo-solid/package.json new file mode 100644 index 000000000..075f19dac --- /dev/null +++ b/demo-solid/package.json @@ -0,0 +1,70 @@ +{ + "name": "@stackflow/demo-solid", + "version": "1.4.0", + "private": true, + "license": "MIT", + "type": "module", + "exports": { + ".": { + "types": "./dist/stackflow/stackflow.docs.d.ts", + "require": "./dist/stackflow/stackflow.docs.js", + "import": "./dist/stackflow/stackflow.docs.mjs" + }, + "./style.css": "./dist/stackflow/stackflow.docs.css" + }, + "main": "./dist/stackflow/stackflow.docs.js", + "module": "./dist/stackflow/stackflow.docs.mjs", + "types": "./dist/stackflow/stackflow.docs.d.ts", + "files": [ + "dist", + "src" + ], + "scripts": { + "build": "yarn build:js && yarn build:dts && yarn build:app", + "build:app": "yarn vite build", + "build:dts": "tsc --emitDeclarationOnly", + "build:js": "node ./esbuild.config.js", + "clean": "rimraf dist && rimraf build", + "dev": "yarn dev:app && yarn build:js --watch && yarn build:dts --watch", + "dev:app": "yarn vite --host 0.0.0.0", + "typecheck": "tsc --noEmit" + }, + "dependencies": { + "@seed-design/design-token": "^1.0.3", + "@seed-design/stylesheet": "^1.0.4", + "@stackflow/compat-await-push": "^1.1.13", + "@stackflow/config": "^1.1.0", + "@stackflow/core": "^1.1.0", + "@stackflow/link": "^1.5.0", + "@stackflow/plugin-basic-ui": "^1.9.2", + "@stackflow/plugin-devtools": "^0.1.11", + "@stackflow/plugin-history-sync": "^1.7.0", + "@stackflow/plugin-map-initial-activity": "^1.0.11", + "@stackflow/plugin-preload": "^1.4.3", + "@stackflow/plugin-renderer-basic": "^1.1.13", + "@stackflow/plugin-stack-depth-change": "^1.1.5", + "@stackflow/solid": "^1.3.1", + "lorem-ipsum": "^2.0.8", + "lz-string": "^1.5.0", + "normalize.css": "^8.0.1", + "random-picture": "^4.0.6", + "solid-js": "^1.9.2", + "vite": "^5.3.2" + }, + "devDependencies": { + "@stackflow/esbuild-config": "^1.0.3", + "@vanilla-extract/css": "^1.15.3", + "@vanilla-extract/vite-plugin": "^4.0.12", + "esbuild": "^0.23.0", + "rimraf": "^3.0.2", + "typescript": "^5.5.3", + "vite-plugin-solid": "^2.10.2", + "zod": "^3.23.8" + }, + "ultra": { + "concurrent": [ + "dev", + "build" + ] + } +} diff --git a/demo-solid/src/App.tsx b/demo-solid/src/App.tsx new file mode 100644 index 000000000..10992a256 --- /dev/null +++ b/demo-solid/src/App.tsx @@ -0,0 +1,10 @@ +import { type Component, Suspense } from "solid-js"; +import { Stack } from "./stackflow"; + +const App: Component = () => ( + + + +); + +export default App; diff --git a/demo-solid/src/activities/Article.css.ts b/demo-solid/src/activities/Article.css.ts new file mode 100644 index 000000000..677367496 --- /dev/null +++ b/demo-solid/src/activities/Article.css.ts @@ -0,0 +1,68 @@ +import { vars } from "@seed-design/design-token"; +import { style } from "@vanilla-extract/css"; + +import { f } from "../styles"; + +export const container = style([ + f.posAbsFull, + f.overflowScroll, + f.rootLineHeight, +]); + +export const image = style([ + f.posRel, + { + width: "100%", + height: 0, + paddingBottom: "100%", + background: vars.$scale.color.gray100, + }, +]); + +export const imageInner = style([f.posAbsFull]); + +export const content = style({ + margin: "1.5rem 1rem 0", + paddingBottom: "0.25rem", + boxShadow: `0 1px 0 0 ${vars.$semantic.color.divider1}`, +}); + +export const title = style({ + fontSize: "1.25rem", + fontWeight: "bold", + marginBottom: ".625rem", +}); + +export const subtitle = style({ + fontSize: ".8125rem", + color: vars.$scale.color.gray600, + marginBottom: "1rem", +}); + +export const body = style({ + fontSize: "1rem", + lineHeight: "1.375rem", + marginBottom: "1.25rem", +}); + +export const section = style({ + boxShadow: `0 1px 0 0 ${vars.$semantic.color.divider1}`, + ":last-child": { + boxShadow: "none", + }, +}); + +export const sectionTitle = style({ + padding: "1.25rem 1rem", + fontSize: "1rem", + fontWeight: "bold", +}); + +export const recommenderGrid = style([ + f.grid, + { + gridTemplateColumns: "1fr 1fr", + padding: ".25rem 1rem 1rem", + gap: "1.25rem", + }, +]); diff --git a/demo-solid/src/activities/Article.loader.ts b/demo-solid/src/activities/Article.loader.ts new file mode 100644 index 000000000..9bdd81325 --- /dev/null +++ b/demo-solid/src/activities/Article.loader.ts @@ -0,0 +1,63 @@ +import type { ActivityLoaderArgs } from "@stackflow/config"; + +export function articleLoader({ params }: ActivityLoaderArgs<"Article">) { + const imageUrl = `https://picsum.photos/800/800/?id=${params.articleId}`; + + const recommenderCards = [ + { + articleId: "25140667", + price: 41, + title: "Ran", + }, + { + articleId: "60547101", + price: 24, + title: "Rest", + }, + { + articleId: "34751776", + price: 42, + title: "Those", + }, + { + articleId: "04114554", + price: 12, + title: "Beauty", + }, + { + articleId: "81339443", + price: 3, + title: "Mighty", + }, + { + articleId: "44738871", + price: 1, + title: "Afternoon", + }, + { + articleId: "57388513", + price: 31, + title: "Brown", + }, + { + articleId: "60883443", + price: 49, + title: "Musical", + }, + { + articleId: "00932094", + price: 26, + title: "Occasionally", + }, + { + articleId: "10749683", + price: 35, + title: "Having", + }, + ]; + + return { + imageUrl, + recommenderCards, + }; +} diff --git a/demo-solid/src/activities/Article.tsx b/demo-solid/src/activities/Article.tsx new file mode 100644 index 000000000..32e166373 --- /dev/null +++ b/demo-solid/src/activities/Article.tsx @@ -0,0 +1,64 @@ +import { + type ActivityComponentType, + useActivityParams, + useLoaderData, +} from "@stackflow/solid/future"; +import { For } from "solid-js"; + +import ArticleCard from "../components/ArticleCard"; +import ArticleProfile from "../components/ArticleProfile"; +import Layout from "../components/Layout"; +import * as css from "./Article.css"; +import type { articleLoader } from "./Article.loader"; + +declare module "@stackflow/config" { + interface Register { + Article: { + articleId: string; + title?: string; + }; + } +} + +const Article: ActivityComponentType<"Article"> = () => { + const activityParams = useActivityParams<"Article">(); + const data = useLoaderData(); + + return ( + +
+
+
+ {activityParams()?.title} +
+
+ +
+
{activityParams()?.title}
+
Baby & Kids ∙ 3 days ago
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean + elementum sit sem ullamcorper urna, lacinia eu tortor, mattis. + Venenatis ut cursus amet in. +
+
1 chats ∙ 2 favorites ∙ 212 views
+
+
+
Other Items by Emila
+
+ + {(card) => } + +
+
+
+
+ ); +}; + +export default Article; diff --git a/demo-solid/src/activities/Main.css.ts b/demo-solid/src/activities/Main.css.ts new file mode 100644 index 000000000..08a618f0f --- /dev/null +++ b/demo-solid/src/activities/Main.css.ts @@ -0,0 +1,34 @@ +import { style } from "@vanilla-extract/css"; + +import { f } from "../styles"; + +export const wrapper = style([f.posAbsFull, f.flexColumn, f.rootLineHeight]); + +export const appBarLeft = style([ + f.flex, + { + fontSize: "1.125rem", + fontWeight: 700, + marginLeft: ".5rem", + }, +]); + +export const appBarLeftIcon = style([ + f.flexAlignCenter, + { + marginLeft: ".5rem", + }, +]); + +export const appBarRight = style([ + { + display: "grid", + gridTemplateColumns: "1.5rem 1.5rem 1.5rem", + gap: "1rem", + marginRight: ".5rem", + }, +]); + +export const scrollable = style([f.flex1, f.overflowScroll]); + +export const bottom = style({}); diff --git a/demo-solid/src/activities/Main.loader.ts b/demo-solid/src/activities/Main.loader.ts new file mode 100644 index 000000000..041c04814 --- /dev/null +++ b/demo-solid/src/activities/Main.loader.ts @@ -0,0 +1,76 @@ +export function mainLoader() { + return { + cards: [ + { + articleId: "02542470", + price: 41, + title: "Master", + region: "Nagevan", + daysAgo: 4, + }, + { + articleId: "11257089", + price: 24, + title: "Wild", + region: "Inguima", + daysAgo: 4, + }, + { + articleId: "08407137", + price: 42, + title: "Universe", + region: "Litenego", + daysAgo: 4, + }, + { + articleId: "32979422", + price: 12, + title: "Private", + region: "Umumtaw", + daysAgo: 6, + }, + { + articleId: "37998208", + price: 3, + title: "Harbor", + region: "Gubdidgi", + daysAgo: 3, + }, + { + articleId: "01695878", + price: 1, + title: "Valuable", + region: "Jumjelewu", + daysAgo: 1, + }, + { + articleId: "09792471", + price: 31, + title: "Also", + region: "Salhega", + daysAgo: 1, + }, + { + articleId: "23939055", + price: 49, + title: "Ever", + region: "Jaifuup", + daysAgo: 9, + }, + { + articleId: "94689745", + price: 26, + title: "Production", + region: "Idcipwel", + daysAgo: 3, + }, + { + articleId: "49322156", + price: 35, + title: "Chest", + region: "Ajapaktar", + daysAgo: 7, + }, + ], + }; +} diff --git a/demo-solid/src/activities/Main.tsx b/demo-solid/src/activities/Main.tsx new file mode 100644 index 000000000..3e6986fab --- /dev/null +++ b/demo-solid/src/activities/Main.tsx @@ -0,0 +1,59 @@ +import type { ActivityComponentType } from "@stackflow/solid/future"; +import { useLoaderData } from "@stackflow/solid/future"; +import { For } from "solid-js"; + +import IconBell from "../assets/IconBell"; +import IconExpandMore from "../assets/IconExpandMore"; +import IconSearch from "../assets/IconSearch"; +import IconSettings from "../assets/IconSettings"; +import BottomTab from "../components/BottomTab"; +import FeedCard from "../components/FeedCard"; +import Layout from "../components/Layout"; +import * as css from "./Main.css"; +import type { mainLoader } from "./Main.loader"; + +declare module "@stackflow/config" { + interface Register { + Main: {}; + } +} + +const Main: ActivityComponentType<"Main"> = () => { + const data = useLoaderData(); + const appBarLeft = () => ( +
+ Woolston +
+ +
+
+ ); + + const appBarRight = () => ( +
+ + + +
+ ); + + return ( + +
+
+ {(card) => } +
+
+ +
+
+
+ ); +}; + +export default Main; diff --git a/demo-solid/src/assets/IconBell.tsx b/demo-solid/src/assets/IconBell.tsx new file mode 100644 index 000000000..b3d392293 --- /dev/null +++ b/demo-solid/src/assets/IconBell.tsx @@ -0,0 +1,12 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + +`; + +const IconBell: Component = () =>
; + +export default IconBell; diff --git a/demo-solid/src/assets/IconChatting.tsx b/demo-solid/src/assets/IconChatting.tsx new file mode 100644 index 000000000..f5ed6b5c1 --- /dev/null +++ b/demo-solid/src/assets/IconChatting.tsx @@ -0,0 +1,12 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + +`; + +const IconChatting: Component = () =>
; + +export default IconChatting; diff --git a/demo-solid/src/assets/IconExpandMore.tsx b/demo-solid/src/assets/IconExpandMore.tsx new file mode 100644 index 000000000..541a62264 --- /dev/null +++ b/demo-solid/src/assets/IconExpandMore.tsx @@ -0,0 +1,12 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + +`; + +const IconExpandMore: Component = () =>
; + +export default IconExpandMore; diff --git a/demo-solid/src/assets/IconHome.tsx b/demo-solid/src/assets/IconHome.tsx new file mode 100644 index 000000000..41597b369 --- /dev/null +++ b/demo-solid/src/assets/IconHome.tsx @@ -0,0 +1,12 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + +`; + +const IconHome: Component = () =>
; + +export default IconHome; diff --git a/demo-solid/src/assets/IconMenu.tsx b/demo-solid/src/assets/IconMenu.tsx new file mode 100644 index 000000000..eeac6b5cb --- /dev/null +++ b/demo-solid/src/assets/IconMenu.tsx @@ -0,0 +1,14 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + + + +`; + +const IconMenu: Component = () =>
; + +export default IconMenu; diff --git a/demo-solid/src/assets/IconProfile.tsx b/demo-solid/src/assets/IconProfile.tsx new file mode 100644 index 000000000..557580d79 --- /dev/null +++ b/demo-solid/src/assets/IconProfile.tsx @@ -0,0 +1,13 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + + +`; + +const IconProfile: Component = () =>
; + +export default IconProfile; diff --git a/demo-solid/src/assets/IconSearch.tsx b/demo-solid/src/assets/IconSearch.tsx new file mode 100644 index 000000000..1a56af62b --- /dev/null +++ b/demo-solid/src/assets/IconSearch.tsx @@ -0,0 +1,12 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + +`; + +const IconSearch: Component = () =>
; + +export default IconSearch; diff --git a/demo-solid/src/assets/IconSell.tsx b/demo-solid/src/assets/IconSell.tsx new file mode 100644 index 000000000..a0f0328c1 --- /dev/null +++ b/demo-solid/src/assets/IconSell.tsx @@ -0,0 +1,14 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + + + +`; + +const IconSell: Component = () =>
; + +export default IconSell; diff --git a/demo-solid/src/assets/IconSettings.tsx b/demo-solid/src/assets/IconSettings.tsx new file mode 100644 index 000000000..89a7e69d6 --- /dev/null +++ b/demo-solid/src/assets/IconSettings.tsx @@ -0,0 +1,13 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + + +`; + +const IconSettings: Component = () =>
; + +export default IconSettings; diff --git a/demo-solid/src/assets/ImageProfileRating.tsx b/demo-solid/src/assets/ImageProfileRating.tsx new file mode 100644 index 000000000..79861c020 --- /dev/null +++ b/demo-solid/src/assets/ImageProfileRating.tsx @@ -0,0 +1,50 @@ +import type { Component } from "solid-js"; +import { f } from "../styles"; + +const SVG = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`; + +const ImageProfileRating: Component = () => ( +
+); + +export default ImageProfileRating; diff --git a/demo-solid/src/components/ArticleCard.css.ts b/demo-solid/src/components/ArticleCard.css.ts new file mode 100644 index 000000000..bda58a02e --- /dev/null +++ b/demo-solid/src/components/ArticleCard.css.ts @@ -0,0 +1,34 @@ +import { vars } from "@seed-design/design-token"; +import { style } from "@vanilla-extract/css"; + +import { f } from "../styles"; + +export const container = style([f.resetButton, f.cursorPointer]); + +export const thumbnail = style([ + f.posRel, + { + paddingBottom: "75%", + marginBottom: ".5rem", + }, +]); + +export const innerImage = style([ + f.posAbsFull, + f.overflowHidden, + { + borderRadius: ".375rem", + backgroundColor: vars.$scale.color.gray100, + }, +]); + +export const title = style({ + fontSize: ".875rem", + lineHeight: "1.25rem", +}); + +export const price = style({ + fontSize: ".875rem", + fontWeight: "bold", + lineHeight: "1.25rem", +}); diff --git a/demo-solid/src/components/ArticleCard.tsx b/demo-solid/src/components/ArticleCard.tsx new file mode 100644 index 000000000..d9d06a76c --- /dev/null +++ b/demo-solid/src/components/ArticleCard.tsx @@ -0,0 +1,37 @@ +import { useFlow } from "@stackflow/solid/future"; +import { type Component, createMemo } from "solid-js"; +import * as css from "./ArticleCard.css"; + +interface ArticleCardProps { + articleId: string; + title: string; + price: number; +} +const ArticleCard: Component = (props) => { + const { push } = useFlow(); + + const imageUrl = createMemo( + () => `https://picsum.photos/800/800/?id=${props.articleId}`, + ); + + const onClick = () => { + push("Article", { + articleId: String(props.articleId), + title: props.title, + }); + }; + + return ( + + ); +}; + +export default ArticleCard; diff --git a/demo-solid/src/components/ArticleProfile.css.ts b/demo-solid/src/components/ArticleProfile.css.ts new file mode 100644 index 000000000..98689f33f --- /dev/null +++ b/demo-solid/src/components/ArticleProfile.css.ts @@ -0,0 +1,53 @@ +import { vars } from "@seed-design/design-token"; +import { style } from "@vanilla-extract/css"; + +import { f } from "../styles"; + +export const container = style([ + f.flexAlignCenter, + { + margin: "1rem 1rem 0", + paddingBottom: "1rem", + boxShadow: `0 1px 0 0 ${vars.$semantic.color.divider1}`, + }, +]); + +export const avatar = style([ + f.overflowHidden, + { + width: "2.5rem", + height: "2.5rem", + borderRadius: "50%", + backgroundColor: vars.$scale.color.gray100, + marginRight: ".75rem", + }, +]); + +export const labels = style([f.flex1]); + +export const name = style({ + fontSize: "1rem", + fontWeight: "bold", + marginBottom: ".25rem", +}); + +export const region = style({ + fontSize: ".8125rem", + color: vars.$scale.color.gray700, +}); + +export const rating = style({ + textAlign: "right", + margin: "-.375rem 0", +}); + +export const ratingImg = style({ + marginBottom: ".125rem", + color: vars.$scale.color.gray200, +}); + +export const ratingCaption = style({ + textDecoration: "underline", + color: vars.$scale.color.gray600, + fontSize: ".75rem", +}); diff --git a/demo-solid/src/components/ArticleProfile.tsx b/demo-solid/src/components/ArticleProfile.tsx new file mode 100644 index 000000000..ed9f7e194 --- /dev/null +++ b/demo-solid/src/components/ArticleProfile.tsx @@ -0,0 +1,27 @@ +import type { Component } from "solid-js"; +import ImageProfileRating from "../assets/ImageProfileRating"; +import * as css from "./ArticleProfile.css"; + +const ArticleProfile: Component = () => { + const imageUrl = "https://picsum.photos/120/120/"; + + return ( +
+
+ Avatar +
+
+
Emilia
+
Woolston
+
+
+
+ +
+
Rating
+
+
+ ); +}; + +export default ArticleProfile; diff --git a/demo-solid/src/components/BottomTab.css.ts b/demo-solid/src/components/BottomTab.css.ts new file mode 100644 index 000000000..9c5ae8d93 --- /dev/null +++ b/demo-solid/src/components/BottomTab.css.ts @@ -0,0 +1,43 @@ +import { vars } from "@seed-design/design-token"; +import { style } from "@vanilla-extract/css"; + +import { f } from "../styles"; + +export const container = style([ + f.grid, + { + gridTemplateColumns: "1.5rem 1.5rem 1.5rem 1.5rem 1.5rem", + justifyContent: "space-between", + padding: ".5rem 7.25% 0", + paddingBottom: ".375rem", + "@supports": { + "(padding-bottom: constant(safe-area-inset-bottom))": { + paddingBottom: "calc(.375rem + constant(safe-area-inset-bottom))", + }, + "(padding-bottom: env(safe-area-inset-bottom))": { + paddingBottom: "calc(.375rem + env(safe-area-inset-bottom))", + }, + }, + boxShadow: `0 -1px 0 0 ${vars.$semantic.color.divider2}`, + }, +]); + +export const button = style([ + f.flexColumn, + f.flexAlignCenter, + f.resetButton, + f.cursorPointer, +]); + +export const buttonIcon = style([ + { + marginBottom: ".375rem", + }, +]); + +export const buttonLabel = style([ + f.nowrap, + { + fontSize: ".75rem", + }, +]); diff --git a/demo-solid/src/components/BottomTab.tsx b/demo-solid/src/components/BottomTab.tsx new file mode 100644 index 000000000..2bf23c625 --- /dev/null +++ b/demo-solid/src/components/BottomTab.tsx @@ -0,0 +1,44 @@ +import type { Component } from "solid-js"; +import IconChatting from "../assets/IconChatting"; +import IconHome from "../assets/IconHome"; +import IconMenu from "../assets/IconMenu"; +import IconProfile from "../assets/IconProfile"; +import IconSell from "../assets/IconSell"; +import * as css from "./BottomTab.css"; + +const BottomTab: Component = () => ( +
+ + + + + +
+); + +export default BottomTab; diff --git a/demo-solid/src/components/FeedCard.css.ts b/demo-solid/src/components/FeedCard.css.ts new file mode 100644 index 000000000..f10a4cb8c --- /dev/null +++ b/demo-solid/src/components/FeedCard.css.ts @@ -0,0 +1,58 @@ +import { vars } from "@seed-design/design-token"; +import { style } from "@vanilla-extract/css"; + +import { f } from "../styles"; + +export const container = style([ + f.flex, + { + padding: "1rem 1rem 0", + }, +]); + +export const button = style([ + f.cursorPointer, + f.resetButton, + f.flex, + { + boxShadow: `0 1px 0 0 ${vars.$semantic.color.divider1}`, + paddingBottom: "1rem", + width: "100%", + }, +]); + +export const thumbnail = style([ + f.overflowHidden, + { + width: "6.75rem", + height: "6.75rem", + backgroundColor: vars.$scale.color.gray100, + borderRadius: ".375rem", + marginRight: "1rem", + backgroundSize: "cover", + backgroundPosition: "50% 50%", + }, +]); + +export const right = style([f.flex1]); + +export const title = style([ + { + fontSize: "1rem", + lineHeight: "1.375rem", + }, +]); + +export const subtitle = style([ + { + fontSize: ".8125rem", + lineHeight: "1.25rem", + color: vars.$scale.color.gray600, + }, +]); + +export const price = style({ + fontSize: ".875rem", + fontWeight: "bold", + lineHeight: "1.25rem", +}); diff --git a/demo-solid/src/components/FeedCard.tsx b/demo-solid/src/components/FeedCard.tsx new file mode 100644 index 000000000..5daf1a5c4 --- /dev/null +++ b/demo-solid/src/components/FeedCard.tsx @@ -0,0 +1,44 @@ +import { useFlow } from "@stackflow/solid/future"; +import { type Component, createMemo } from "solid-js"; +import * as css from "./FeedCard.css"; + +interface FeedCardProps { + articleId: string; + title: string; + region: string; + price: number; + daysAgo: number; +} +const FeedCard: Component = (props) => { + const { push } = useFlow(); + + const imageUrl = createMemo( + () => `https://picsum.photos/800/800/?id=${props.articleId}`, + ); + + const onClick = () => { + push("Article", { + articleId: String(props.articleId), + title: props.title, + }); + }; + + return ( +
+ +
+ ); +}; + +export default FeedCard; diff --git a/demo-solid/src/components/Layout.tsx b/demo-solid/src/components/Layout.tsx new file mode 100644 index 000000000..6aa4a38da --- /dev/null +++ b/demo-solid/src/components/Layout.tsx @@ -0,0 +1,14 @@ +import { AppScreen } from "@stackflow/plugin-basic-ui/solid"; +import type { Component, JSXElement } from "solid-js"; + +type PropOf = T extends Component ? U : never; + +interface LayoutProps { + appBar?: PropOf["appBar"]; + children: JSXElement; +} +const Layout: Component = ({ appBar, children }) => ( + {children} +); + +export default Layout; diff --git a/demo-solid/src/main.tsx b/demo-solid/src/main.tsx new file mode 100644 index 000000000..41bfe89d1 --- /dev/null +++ b/demo-solid/src/main.tsx @@ -0,0 +1,10 @@ +import "normalize.css"; +import "@seed-design/stylesheet/global.css"; +import "@stackflow/plugin-basic-ui/index.css"; +import "./styles/index.css"; + +import { render } from "solid-js/web"; + +import App from "./App"; + +render(() => , document.getElementById("root")!); diff --git a/demo-solid/src/stackflow/Stack.ts b/demo-solid/src/stackflow/Stack.ts new file mode 100644 index 000000000..8fc8cba27 --- /dev/null +++ b/demo-solid/src/stackflow/Stack.ts @@ -0,0 +1,41 @@ +import { vars } from "@seed-design/design-token"; +import { basicUIPlugin } from "@stackflow/plugin-basic-ui/solid"; +import { historySyncPlugin } from "@stackflow/plugin-history-sync/solid"; +import { basicRendererPlugin } from "@stackflow/plugin-renderer-basic/solid"; +import { stackflow } from "@stackflow/solid/future"; +import { config } from "./stackflow.config"; + +import Article from "../activities/Article"; +import Main from "../activities/Main"; + +export const { Stack, actions } = stackflow({ + config, + components: { + Main, + Article, + }, + plugins: [ + basicRendererPlugin(), + basicUIPlugin({ + theme: "cupertino", + backgroundColor: vars.$semantic.color.paperDefault, + appBar: { + textColor: vars.$scale.color.gray900, + iconColor: vars.$scale.color.gray900, + borderColor: vars.$semantic.color.divider3, + backButton: { + ariaLabel: "뒤로 가기", + }, + closeButton: { + ariaLabel: "닫기", + }, + }, + }), + historySyncPlugin({ + config, + fallbackActivity: () => "Main", + }), + ], +}); + +export type Actions = typeof actions; diff --git a/demo-solid/src/stackflow/index.ts b/demo-solid/src/stackflow/index.ts new file mode 100644 index 000000000..92c29a03d --- /dev/null +++ b/demo-solid/src/stackflow/index.ts @@ -0,0 +1 @@ +export * from "./Stack"; diff --git a/demo-solid/src/stackflow/stackflow.config.ts b/demo-solid/src/stackflow/stackflow.config.ts new file mode 100644 index 000000000..daa478073 --- /dev/null +++ b/demo-solid/src/stackflow/stackflow.config.ts @@ -0,0 +1,20 @@ +import { defineConfig } from "@stackflow/config"; +import { articleLoader } from "../activities/Article.loader"; +import { mainLoader } from "../activities/Main.loader"; + +export const config = defineConfig({ + activities: [ + { + name: "Main", + path: "/", + loader: mainLoader, + }, + { + name: "Article", + path: "/articles/:articleId", + loader: articleLoader, + }, + ], + transitionDuration: 270, + initialActivity: () => "Main", +}); diff --git a/demo-solid/src/stackflow/stackflow.docs.tsx b/demo-solid/src/stackflow/stackflow.docs.tsx new file mode 100644 index 000000000..c33a08073 --- /dev/null +++ b/demo-solid/src/stackflow/stackflow.docs.tsx @@ -0,0 +1,33 @@ +import { vars } from "@seed-design/design-token"; +import { basicUIPlugin } from "@stackflow/plugin-basic-ui/solid"; +import { basicRendererPlugin } from "@stackflow/plugin-renderer-basic/solid"; +import { stackflow } from "@stackflow/solid/future"; +import { render } from "solid-js/web"; +import { config } from "./stackflow.config"; + +import Article from "../activities/Article"; +import Main from "../activities/Main"; + +const { Stack } = stackflow({ + config, + components: { + Main, + Article, + }, + plugins: [ + basicRendererPlugin(), + basicUIPlugin({ + theme: "cupertino", + backgroundColor: vars.$semantic.color.paperDefault, + appBar: { + textColor: vars.$scale.color.gray900, + iconColor: vars.$scale.color.gray900, + borderColor: vars.$semantic.color.divider3, + }, + }), + ], +}); + +export const renderApp = (el: HTMLElement) => { + render(() => , el); +}; diff --git a/demo-solid/src/styles/f.css.ts b/demo-solid/src/styles/f.css.ts new file mode 100644 index 000000000..49d940fd5 --- /dev/null +++ b/demo-solid/src/styles/f.css.ts @@ -0,0 +1,97 @@ +import { vars } from "@seed-design/design-token"; +import { style } from "@vanilla-extract/css"; + +export const grid = style({ + display: "grid", +}); + +export const flex = style({ + display: "flex", +}); + +export const flexAlignCenter = style([ + flex, + { + alignItems: "center", + }, +]); + +export const flexJustifyCenter = style([ + flex, + { + justifyContent: "center", + }, +]); + +export const flexColumn = style([ + flex, + { + flexDirection: "column", + }, +]); + +export const flex1 = style({ + flex: 1, +}); + +export const posAbs = style({ + position: "absolute", +}); + +export const posRel = style({ + position: "relative", +}); + +export const top0 = style({ + top: 0, +}); + +export const left0 = style({ + left: 0, +}); + +export const fullWidth = style({ + width: "100%", +}); + +export const fullHeight = style({ + height: "100%", +}); + +export const posAbsFull = style([posAbs, top0, left0, fullWidth, fullHeight]); + +export const nowrap = style({ + whiteSpace: "nowrap", +}); + +export const resetButton = style({ + appearance: "none", + border: 0, + padding: 0, + background: "none", + color: vars.$scale.color.gray900, + textAlign: "left", +}); + +export const cursorPointer = style({ + cursor: "pointer", + WebkitTapHighlightColor: "transparent", +}); + +export const overflowHidden = style({ + overflow: "hidden", + transform: "translate3d(0, 0, 0)", + maskImage: "-webkit-radial-gradient(white, black)", +}); + +export const overflowScroll = style({ + overflowY: "scroll", + WebkitOverflowScrolling: "touch", + "::-webkit-scrollbar": { + display: "none", + }, +}); + +export const rootLineHeight = style({ + lineHeight: "1.15", +}); diff --git a/demo-solid/src/styles/index.css b/demo-solid/src/styles/index.css new file mode 100644 index 000000000..592dc5599 --- /dev/null +++ b/demo-solid/src/styles/index.css @@ -0,0 +1,8 @@ +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: var(--seed-scale-color-gray-900); +} diff --git a/extensions/plugin-basic-ui/src/styles/index.ts b/demo-solid/src/styles/index.ts similarity index 100% rename from extensions/plugin-basic-ui/src/styles/index.ts rename to demo-solid/src/styles/index.ts diff --git a/demo-solid/tsconfig.json b/demo-solid/tsconfig.json new file mode 100644 index 000000000..89e7a7bf9 --- /dev/null +++ b/demo-solid/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "baseUrl": "./src", + "outDir": "./dist", + "module": "ESNext", + "moduleResolution": "Bundler", + "jsx": "preserve", + "jsxImportSource": "solid-js" + }, + "exclude": ["./dist", "./build"] +} diff --git a/demo-solid/vite.config.js b/demo-solid/vite.config.js new file mode 100644 index 000000000..62278fe4c --- /dev/null +++ b/demo-solid/vite.config.js @@ -0,0 +1,17 @@ +import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin"; +import { defineConfig } from "vite"; +import solid from "vite-plugin-solid"; + +export default defineConfig({ + build: { + outDir: "./build", + }, + plugins: [ + solid(), + vanillaExtractPlugin({ + viteConfigOverrides: { + plugins: [], + }, + }), + ], +}); diff --git a/extensions/link/esbuild.config.js b/extensions/link/esbuild.config.js index 99e9806fd..1af49090f 100644 --- a/extensions/link/esbuild.config.js +++ b/extensions/link/esbuild.config.js @@ -1,8 +1,6 @@ const { context } = require("esbuild"); const config = require("@stackflow/esbuild-config"); -const { - esbuildPluginFilePathExtensions, -} = require("esbuild-plugin-file-path-extensions"); +const { solidPlugin } = require("esbuild-plugin-solid"); const pkg = require("./package.json"); const watch = process.argv.includes("--watch"); @@ -11,36 +9,48 @@ const external = Object.keys({ ...pkg.peerDependencies, }); -Promise.all([ - context({ - ...config({ - entryPoints: ["./src/**/*"], - outdir: "dist", - }), - bundle: false, - sourcemap: false, - external: undefined, - format: "cjs", - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), - ), - context({ - ...config({ - entryPoints: ["./src/**/*"], - outdir: "dist", - }), - bundle: true, - sourcemap: false, - external, - format: "esm", - outExtension: { - ".js": ".mjs", - }, - plugins: [esbuildPluginFilePathExtensions()], +const solidEntryPoints = [ + "./src/stable/solid/index.ts", + "./src/future/solid/index.ts", +]; +const allEntryPoints = [ + "./src/stable/react/index.ts", + "./src/future/react/index.ts", + ...solidEntryPoints, +]; - // https://github.com/favware/esbuild-plugin-file-path-extensions/blob/b8efeff0489c1b02540109f6ea8c39fcd90f9dfc/src/index.ts#L202 - platform: "node", - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), +Promise.all( + [ + { jsx: true, browser: false, entryPoints: solidEntryPoints }, + { jsx: false, browser: true, entryPoints: solidEntryPoints }, + { jsx: false, browser: false, entryPoints: allEntryPoints }, + ].flatMap(({ jsx, browser, entryPoints }) => + [ + { format: "cjs", extPrefix: "" }, + { format: "esm", extPrefix: "m" }, + ].map(({ format, extPrefix }) => + context({ + ...config({ + entryPoints, + plugins: !jsx + ? [ + solidPlugin({ + filter: /\.solid\.[cm]?[jt]sx$/, + solid: { generate: browser ? "dom" : "ssr" }, + }), + ] + : [], + }), + outbase: "src", + format, + outExtension: jsx + ? { ".js": `${browser ? ".browser" : ""}.${extPrefix}jsx` } + : { ".js": `${browser ? ".browser" : ""}.${extPrefix}js` }, + jsx: jsx ? "preserve" : undefined, + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + ), ), -]).catch(() => process.exit(1)); +).catch(() => process.exit(1)); diff --git a/extensions/link/package.json b/extensions/link/package.json index 4227f0e25..4100e8cb7 100644 --- a/extensions/link/package.json +++ b/extensions/link/package.json @@ -9,24 +9,106 @@ "license": "MIT", "exports": { ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.mjs" + "types": "./dist/stable/react/index.d.ts", + "require": "./dist/stable/react/index.js", + "import": "./dist/stable/react/index.mjs" + }, + "./react": { + "types": "./dist/stable/react/index.d.ts", + "require": "./dist/stable/react/index.js", + "import": "./dist/stable/react/index.mjs" + }, + "./solid": { + "types": "./dist/stable/solid/index.d.ts", + "solid": { + "require": "./dist/stable/solid/index.jsx", + "import": "./dist/stable/solid/index.mjsx" + }, + "browser": { + "require": "./dist/stable/solid/index.browser.js", + "import": "./dist/stable/solid/index.browser.mjs" + }, + "default": { + "require": "./dist/stable/solid/index.js", + "import": "./dist/stable/solid/index.mjs" + } }, "./stable": { - "types": "./dist/stable/index.d.ts", - "require": "./dist/stable/index.js", - "import": "./dist/stable/index.mjs" + "types": "./dist/stable/react/index.d.ts", + "require": "./dist/stable/react/index.js", + "import": "./dist/stable/react/index.mjs" + }, + "./stable/react": { + "types": "./dist/stable/react/index.d.ts", + "require": "./dist/stable/react/index.js", + "import": "./dist/stable/react/index.mjs" + }, + "./stable/solid": { + "types": "./dist/stable/solid/index.d.ts", + "solid": { + "require": "./dist/stable/solid/index.jsx", + "import": "./dist/stable/solid/index.mjsx" + }, + "browser": { + "require": "./dist/stable/solid/index.browser.js", + "import": "./dist/stable/solid/index.browser.mjs" + }, + "default": { + "require": "./dist/stable/solid/index.js", + "import": "./dist/stable/solid/index.mjs" + } }, "./future": { - "types": "./dist/future/index.d.ts", - "require": "./dist/future/index.js", - "import": "./dist/future/index.mjs" + "types": "./dist/future/react/index.d.ts", + "require": "./dist/future/react/index.js", + "import": "./dist/future/react/index.mjs" + }, + "./future/react": { + "types": "./dist/future/react/index.d.ts", + "require": "./dist/future/react/index.js", + "import": "./dist/future/react/index.mjs" + }, + "./future/solid": { + "types": "./dist/future/solid/index.d.ts", + "solid": { + "require": "./dist/future/solid/index.jsx", + "import": "./dist/future/solid/index.mjsx" + }, + "browser": { + "require": "./dist/future/solid/index.browser.js", + "import": "./dist/future/solid/index.browser.mjs" + }, + "default": { + "require": "./dist/future/solid/index.js", + "import": "./dist/future/solid/index.mjs" + } } }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "main": "./dist/stable/react/index.js", + "module": "./dist/stable/react/index.mjs", + "types": "./dist/stable/react/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/stable/react/index.d.ts" + ], + "future": [ + "dist/future/react/index.d.ts" + ], + "future/react": [ + "dist/future/react/index.d.ts" + ], + "solid": [ + "dist/stable/solid/index.d.ts" + ], + "stable/solid": [ + "dist/stable/solid/index.d.ts" + ], + "future/solid": [ + "dist/future/solid/index.d.ts" + ] + } + }, "files": [ "dist", "src", @@ -47,11 +129,14 @@ "@stackflow/plugin-history-sync": "^1.7.0", "@stackflow/plugin-preload": "^1.4.3", "@stackflow/react": "^1.4.0", + "@stackflow/solid": "^1.4.0", "@types/react": "^18.3.3", "esbuild": "^0.23.0", "esbuild-plugin-file-path-extensions": "^2.1.3", + "esbuild-plugin-solid": "^0.6.0", "react": "^18.3.1", "rimraf": "^3.0.2", + "solid-js": "^1.8.18", "typescript": "^5.5.3" }, "peerDependencies": { @@ -59,8 +144,27 @@ "@stackflow/plugin-history-sync": "^1.6.4-canary.0", "@stackflow/plugin-preload": "^1.4.3-canary.0", "@stackflow/react": "^1.3.2-canary.0", + "@stackflow/solid": "^1.3.2-canary.0", "@types/react": ">=16.8.0", - "react": ">=16.8.0" + "react": ">=16.8.0", + "solid-js": ">=1.4.0" + }, + "peerDependenciesMeta": { + "@stackflow/react": { + "optional": true + }, + "@stackflow/solid": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "solid-js": { + "optional": true + } }, "publishConfig": { "access": "public" diff --git a/extensions/link/src/common/makeOnClick.ts b/extensions/link/src/common/makeOnClick.ts new file mode 100644 index 000000000..f868dd40b --- /dev/null +++ b/extensions/link/src/common/makeOnClick.ts @@ -0,0 +1,64 @@ +import type React from "react"; + +export const makeOnClick = + < + T extends + | (MouseEvent & { currentTarget: HTMLAnchorElement }) + | React.MouseEvent, + >(options: { + activityName: string; + activityParams: Record; + actions: { + push: ( + activityName: string, + activityParams: Record, + options?: { animate?: boolean }, + ) => void; + replace: ( + activityName: string, + activityParams: Record, + options?: { animate?: boolean }, + ) => void; + }; + animate?: boolean; + replace?: boolean; + onClick?: (e: T) => void; + }) => + (e: T) => { + if (options.onClick) { + options.onClick(e); + } + + const which = "nativeEvent" in e ? e.nativeEvent.which : e.which; + + if ( + (e.button === 0 && + !(e.currentTarget.target && e.currentTarget.target !== "_self")) || + (!e.defaultPrevented && + !e.metaKey && + !e.altKey && // triggers resource download + !e.ctrlKey && + !e.shiftKey && + !(which === 2)) + ) { + e.preventDefault(); + + if (options.replace) { + options.actions.replace( + options.activityName, + options.activityParams, + typeof options.animate === "undefined" || options.animate === null + ? {} + : { animate: options.animate }, + ); + } else { + options.actions.push( + options.activityName, + options.activityParams, + typeof options.animate === "undefined" || options.animate === null + ? {} + : { animate: options.animate }, + ); + } + } + }; diff --git a/extensions/link/src/future/Link.tsx b/extensions/link/src/future/react/Link.tsx similarity index 60% rename from extensions/link/src/future/Link.tsx rename to extensions/link/src/future/react/Link.tsx index 614cba4c2..71bf2497c 100644 --- a/extensions/link/src/future/Link.tsx +++ b/extensions/link/src/future/react/Link.tsx @@ -6,6 +6,8 @@ import type { } from "@stackflow/config"; import { useConfig, useFlow } from "@stackflow/react/future"; import { useMemo } from "react"; + +import { makeOnClick } from "../../common/makeOnClick"; import { omit } from "./omit"; type AnchorProps = Omit< @@ -27,7 +29,7 @@ export interface LinkProps export function Link(props: LinkProps) { const config = useConfig(); - const { push, replace } = useFlow(); + const actions = useFlow(); const href = useMemo(() => { const match = config.activities.find((r) => r.name === props.activityName); @@ -60,44 +62,14 @@ export function Link(props: LinkProps) { "onClick", ]); - const onClick = (e: React.MouseEvent) => { - if (props.onClick) { - props.onClick(e); - } - - /** - * https://github.com/gatsbyjs/gatsby/blob/33f18ba7a98780a887d33e72936da57a6c58932a/packages/gatsby-link/src/index.js#L182-L190 - */ - if ( - e.button === 0 && // ignore right clicks - !props.target && // let browser handle "target=_blank" - !e.defaultPrevented && // onClick prevented default - !e.metaKey && // ignore clicks with modifier keys... - !e.altKey && - !e.ctrlKey && - !e.shiftKey - ) { - e.preventDefault(); - - if (props.replace) { - replace( - props.activityName, - props.activityParams, - typeof props.animate === "undefined" || props.animate === null - ? {} - : { animate: props.animate }, - ); - } else { - push( - props.activityName, - props.activityParams, - typeof props.animate === "undefined" || props.animate === null - ? {} - : { animate: props.animate }, - ); - } - } - }; + const onClick = makeOnClick>({ + activityName: props.activityName, + activityParams: props.activityParams, + actions, + animate: props.animate, + replace: props.replace, + onClick: props.onClick, + }); return ( + +import type { + InferActivityParams, + RegisteredActivityName, +} from "@stackflow/config"; +import { useConfig, useFlow } from "@stackflow/solid/future"; +import { type JSX, createMemo, splitProps } from "solid-js"; + +import { makeOnClick } from "../../common/makeOnClick"; + +type AnchorProps = Omit< + JSX.AnchorHTMLAttributes, + "href" | "onClick" +>; + +export interface LinkProps + extends AnchorProps { + activityName: K; + activityParams: InferActivityParams; + animate?: boolean; + replace?: boolean; + onClick?: ( + e: MouseEvent & { currentTarget: HTMLAnchorElement; target: Element }, + ) => void; +} + +export function Link(props: LinkProps) { + const [locals, others] = splitProps(props, [ + "ref", + "children", + + // Custom Props + "activityName", + "activityParams", + "animate", + "replace", + + // Overriden Props + "onClick", + ]); + + const config = useConfig(); + const actions = useFlow(); + + const match = createMemo(() => + config?.activities.find((r) => r.name === locals.activityName), + ); + const href = createMemo(() => { + const m = match(); + + if (!m || !m.path || typeof m.path !== "string" || !config?.historySync) { + return undefined; + } + + const { makeTemplate, urlPatternOptions } = config.historySync; + + const template = makeTemplate({ path: m.path }, urlPatternOptions); + + return template.fill(locals.activityParams); + }); + + const onClick = createMemo(() => + makeOnClick({ + activityName: props.activityName, + activityParams: props.activityParams, + actions, + animate: props.animate, + replace: props.replace, + onClick: props.onClick, + }), + ); + + return ( + + {locals.children} + + ); +} diff --git a/extensions/link/src/future/solid/index.ts b/extensions/link/src/future/solid/index.ts new file mode 100644 index 000000000..e71b8592b --- /dev/null +++ b/extensions/link/src/future/solid/index.ts @@ -0,0 +1 @@ +export * from "./Link.solid"; diff --git a/extensions/link/src/stable/Link.tsx b/extensions/link/src/stable/react/Link.tsx similarity index 72% rename from extensions/link/src/stable/Link.tsx rename to extensions/link/src/stable/react/Link.tsx index 28d7a65a7..dfcab3752 100644 --- a/extensions/link/src/stable/Link.tsx +++ b/extensions/link/src/stable/react/Link.tsx @@ -5,6 +5,7 @@ import type { ActivityComponentType } from "@stackflow/react"; import { useActions } from "@stackflow/react"; import { forwardRef, useEffect, useMemo, useReducer, useRef } from "react"; +import { makeOnClick } from "../../common/makeOnClick"; import { mergeRefs } from "./mergeRefs"; import { omit } from "./omit"; @@ -36,7 +37,7 @@ export const Link: TypeLink = forwardRef( const { preload } = usePreloader({ urlPatternOptions: props.urlPatternOptions, }); - const { push, replace } = useActions(); + const actions = useActions(); const anchorRef = useRef(null); const [preloaded, flagPreloaded] = useReducer(() => true, false); @@ -92,42 +93,14 @@ export const Link: TypeLink = forwardRef( "onClick", ]); - const onClick = (e: React.MouseEvent) => { - if (props.onClick) { - props.onClick(e); - } - - if ( - (e.button === 0 && - !(e.currentTarget.target && e.currentTarget.target !== "_self")) || - (!e.defaultPrevented && - !e.metaKey && - !e.altKey && // triggers resource download - !e.ctrlKey && - !e.shiftKey && - !(e.nativeEvent && e.nativeEvent.which === 2)) - ) { - e.preventDefault(); - - if (props.replace) { - replace( - props.activityName, - props.activityParams, - typeof props.animate === "undefined" || props.animate === null - ? {} - : { animate: props.animate }, - ); - } else { - push( - props.activityName, - props.activityParams, - typeof props.animate === "undefined" || props.animate === null - ? {} - : { animate: props.animate }, - ); - } - } - }; + const onClick = makeOnClick>({ + activityName: props.activityName, + activityParams: props.activityParams, + actions: actions, + animate: props.animate, + replace: props.replace, + onClick: props.onClick, + }); return ( , + "href" | "onClick" +>; + +export type LinkProps = { + activityName: K; + activityParams: P; + animate?: boolean; + replace?: boolean; + urlPatternOptions?: UrlPatternOptions; + onClick?: ( + e: MouseEvent & { currentTarget: HTMLAnchorElement; target: Element }, + ) => void; +} & AnchorProps; + +export type TypeLink = < + K extends Extract, +>( + props: LinkProps ? U : never>, +) => JSX.Element; + +export const Link: TypeLink = (props) => { + const [locals, others] = splitProps(props, [ + "ref", + "children", + + // Custom Props + "activityName", + "activityParams", + "animate", + "replace", + "urlPatternOptions", + + // Overriden Props + "onClick", + ]); + + const routes = useRoutes(); + const preloader = usePreloader({ + get urlPatternOptions() { + return locals.urlPatternOptions; + }, + }); + const actions = useActions(); + + const [anchorRef, setAnchorRef] = createSignal(); + const [preloaded, setPreloaded] = createSignal(false); + + const match = createMemo(() => + routes.find((r) => r.activityName === locals.activityName), + ); + const href = createMemo(() => { + const m = match(); + + if (!m) { + return undefined; + } + + const template = makeTemplate(m, locals.urlPatternOptions); + const path = template.fill(locals.activityParams); + + return path; + }); + + createEffect(() => { + const $anchor = anchorRef(); + + if (preloaded() || !$anchor) { + return; + } + + const observer = new IntersectionObserver(([{ isIntersecting }]) => { + if (isIntersecting) { + preloader().preload(locals.activityName, locals.activityParams, { + activityContext: { + path: href(), + }, + }); + setPreloaded(true); + } + }); + + observer.observe($anchor); + + onCleanup(() => { + observer.unobserve($anchor); + observer.disconnect(); + }); + }); + + const onClick = createMemo(() => + makeOnClick({ + activityName: locals.activityName, + activityParams: locals.activityParams, + actions, + animate: locals.animate, + replace: locals.replace, + onClick: locals.onClick, + }), + ); + + return ( + { + setAnchorRef(el); + (locals.ref as ((el: HTMLAnchorElement) => void) | undefined)?.(el); + }} + href={href()} + onClick={onClick()} + draggable="false" // Disable long press behavior by default in iOS + {...others} + > + {locals.children} + + ); +}; diff --git a/extensions/link/src/stable/solid/createLinkComponent.tsx b/extensions/link/src/stable/solid/createLinkComponent.tsx new file mode 100644 index 000000000..0a2abfe5f --- /dev/null +++ b/extensions/link/src/stable/solid/createLinkComponent.tsx @@ -0,0 +1,12 @@ +import type { TypeLink } from "./Link.solid"; +import { Link } from "./Link.solid"; + +export function createLinkComponent< + T extends { [activityName: string]: unknown }, +>(): { + Link: TypeLink; +} { + return { + Link, + }; +} diff --git a/extensions/link/src/stable/solid/index.ts b/extensions/link/src/stable/solid/index.ts new file mode 100644 index 000000000..4315fb86f --- /dev/null +++ b/extensions/link/src/stable/solid/index.ts @@ -0,0 +1,2 @@ +export * from "./createLinkComponent"; +export * from "./Link.solid"; diff --git a/extensions/plugin-basic-ui/esbuild.config.js b/extensions/plugin-basic-ui/esbuild.config.js index 0b3b67bbc..ed8c30685 100644 --- a/extensions/plugin-basic-ui/esbuild.config.js +++ b/extensions/plugin-basic-ui/esbuild.config.js @@ -1,5 +1,6 @@ const { context } = require("esbuild"); const config = require("@stackflow/esbuild-config"); +const { solidPlugin } = require("esbuild-plugin-solid"); const pkg = require("./package.json"); const watch = process.argv.includes("--watch"); @@ -8,26 +9,41 @@ const external = Object.keys({ ...pkg.peerDependencies, }); -Promise.all([ - context({ - ...config({ - vanillaExtractIdentifiers: watch ? "debug" : "short", - }), - format: "cjs", - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), - ), - context({ - ...config({ - vanillaExtractIdentifiers: watch ? "debug" : "short", - }), - format: "esm", - outExtension: { - ".js": ".mjs", - }, - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), +const solidEntryPoints = ["./src/solid/index.ts"]; +const allEntryPoints = ["./src/react/index.ts", ...solidEntryPoints]; + +Promise.all( + [ + { jsx: true, browser: false, entryPoints: solidEntryPoints }, + { jsx: false, browser: true, entryPoints: solidEntryPoints }, + { jsx: false, browser: false, entryPoints: allEntryPoints }, + ].flatMap(({ jsx, browser, entryPoints }) => + [ + { format: "cjs", extPrefix: "" }, + { format: "esm", extPrefix: "m" }, + ].map(({ format, extPrefix }) => + context({ + ...config({ + entryPoints, + plugins: !jsx + ? [ + solidPlugin({ + filter: /\.solid\.[cm]?[jt]sx$/, + solid: { generate: browser ? "dom" : "ssr" }, + }), + ] + : [], + }), + outbase: "src", + format, + outExtension: jsx + ? { ".js": `${browser ? ".browser" : ""}.${extPrefix}jsx` } + : { ".js": `${browser ? ".browser" : ""}.${extPrefix}js` }, + jsx: jsx ? "preserve" : undefined, + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + ), ), -]).catch(() => process.exit(1)); +).catch(() => process.exit(1)); diff --git a/extensions/plugin-basic-ui/package.json b/extensions/plugin-basic-ui/package.json index 965aa8381..c107b4314 100644 --- a/extensions/plugin-basic-ui/package.json +++ b/extensions/plugin-basic-ui/package.json @@ -9,15 +9,45 @@ "license": "MIT", "exports": { ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.mjs" + "types": "./dist/react/index.d.ts", + "require": "./dist/react/index.js", + "import": "./dist/react/index.mjs" }, - "./index.css": "./dist/index.css" + "./react": { + "types": "./dist/react/index.d.ts", + "require": "./dist/react/index.js", + "import": "./dist/react/index.mjs" + }, + "./solid": { + "types": "./dist/solid/index.d.ts", + "solid": { + "require": "./dist/solid/index.jsx", + "import": "./dist/solid/index.mjsx" + }, + "browser": { + "require": "./dist/solid/index.browser.js", + "import": "./dist/solid/index.browser.mjs" + }, + "default": { + "require": "./dist/solid/index.js", + "import": "./dist/solid/index.mjs" + } + }, + "./index.css": "./dist/react/index.css" + }, + "main": "./dist/react/index.js", + "module": "./dist/react/index.mjs", + "types": "./dist/react/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/react/index.d.ts" + ], + "solid": [ + "dist/solid/index.d.ts" + ] + } }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", "files": [ "dist", "src", @@ -33,6 +63,7 @@ }, "dependencies": { "@stackflow/react-ui-core": "^1.1.2", + "@stackflow/solid-ui-core": "^1.1.1", "@vanilla-extract/css": "^1.15.3", "@vanilla-extract/dynamic": "^2.1.1", "@vanilla-extract/private": "^1.0.5", @@ -42,17 +73,39 @@ "@stackflow/core": "^1.1.0", "@stackflow/esbuild-config": "^1.0.3", "@stackflow/react": "^1.3.2", + "@stackflow/solid": "^1.3.0", "@types/react": "^18.3.3", "esbuild": "^0.23.0", + "esbuild-plugin-solid": "patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch", "react": "^18.3.1", "rimraf": "^3.0.2", + "solid-js": "^1.8.18", "typescript": "^5.5.3" }, "peerDependencies": { "@stackflow/core": "^1.1.0-canary.0", "@stackflow/react": "^1.3.2-canary.0", + "@stackflow/solid": "^1.3.2-canary.0", "@types/react": ">=16.8.0", - "react": ">=16.8.0" + "react": ">=16.8.0", + "solid-js": ">=1.4.0" + }, + "peerDependenciesMeta": { + "@stackflow/react": { + "optional": true + }, + "@stackflow/solid": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "solid-js": { + "optional": true + } }, "publishConfig": { "access": "public" diff --git a/extensions/plugin-basic-ui/src/assets/IconBack.tsx b/extensions/plugin-basic-ui/src/assets/IconBack.tsx deleted file mode 100644 index a3f1302ab..000000000 --- a/extensions/plugin-basic-ui/src/assets/IconBack.tsx +++ /dev/null @@ -1,19 +0,0 @@ -const IconBack: React.FC<{ - className?: string; -}> = (props) => ( - - - -); - -export default IconBack; diff --git a/extensions/plugin-basic-ui/src/assets/IconClose.tsx b/extensions/plugin-basic-ui/src/assets/IconClose.tsx deleted file mode 100644 index e0e5edb77..000000000 --- a/extensions/plugin-basic-ui/src/assets/IconClose.tsx +++ /dev/null @@ -1,23 +0,0 @@ -const IconClose: React.FC<{ - className?: string; -}> = (props) => ( - - - - -); - -export default IconClose; diff --git a/extensions/plugin-basic-ui/src/common/assets/IconBack.tsx b/extensions/plugin-basic-ui/src/common/assets/IconBack.tsx new file mode 100644 index 000000000..b13b5f4df --- /dev/null +++ b/extensions/plugin-basic-ui/src/common/assets/IconBack.tsx @@ -0,0 +1,4 @@ +const IconBack = (className?: string) => + ``; + +export default IconBack; diff --git a/extensions/plugin-basic-ui/src/common/assets/IconClose.tsx b/extensions/plugin-basic-ui/src/common/assets/IconClose.tsx new file mode 100644 index 000000000..5c2703cd2 --- /dev/null +++ b/extensions/plugin-basic-ui/src/common/assets/IconClose.tsx @@ -0,0 +1,4 @@ +const IconClose = (className?: string) => + ``; + +export default IconClose; diff --git a/extensions/plugin-basic-ui/src/assets/index.ts b/extensions/plugin-basic-ui/src/common/assets/index.ts similarity index 100% rename from extensions/plugin-basic-ui/src/assets/index.ts rename to extensions/plugin-basic-ui/src/common/assets/index.ts diff --git a/extensions/plugin-basic-ui/src/basicUIPlugin.css.ts b/extensions/plugin-basic-ui/src/common/basicUIPlugin.css.ts similarity index 100% rename from extensions/plugin-basic-ui/src/basicUIPlugin.css.ts rename to extensions/plugin-basic-ui/src/common/basicUIPlugin.css.ts diff --git a/extensions/plugin-basic-ui/src/components/AppBar.css.ts b/extensions/plugin-basic-ui/src/common/components/AppBar.css.ts similarity index 100% rename from extensions/plugin-basic-ui/src/components/AppBar.css.ts rename to extensions/plugin-basic-ui/src/common/components/AppBar.css.ts diff --git a/extensions/plugin-basic-ui/src/components/AppScreen.css.ts b/extensions/plugin-basic-ui/src/common/components/AppScreen.css.ts similarity index 100% rename from extensions/plugin-basic-ui/src/components/AppScreen.css.ts rename to extensions/plugin-basic-ui/src/common/components/AppScreen.css.ts diff --git a/extensions/plugin-basic-ui/src/components/BottomSheet.css.ts b/extensions/plugin-basic-ui/src/common/components/BottomSheet.css.ts similarity index 100% rename from extensions/plugin-basic-ui/src/components/BottomSheet.css.ts rename to extensions/plugin-basic-ui/src/common/components/BottomSheet.css.ts diff --git a/extensions/plugin-basic-ui/src/components/Modal.css.ts b/extensions/plugin-basic-ui/src/common/components/Modal.css.ts similarity index 100% rename from extensions/plugin-basic-ui/src/components/Modal.css.ts rename to extensions/plugin-basic-ui/src/common/components/Modal.css.ts diff --git a/extensions/plugin-basic-ui/src/styles/f.css.ts b/extensions/plugin-basic-ui/src/common/styles/f.css.ts similarity index 100% rename from extensions/plugin-basic-ui/src/styles/f.css.ts rename to extensions/plugin-basic-ui/src/common/styles/f.css.ts diff --git a/extensions/plugin-basic-ui/src/common/styles/index.ts b/extensions/plugin-basic-ui/src/common/styles/index.ts new file mode 100644 index 000000000..773ae6c30 --- /dev/null +++ b/extensions/plugin-basic-ui/src/common/styles/index.ts @@ -0,0 +1 @@ +export * as f from "./f.css"; diff --git a/extensions/plugin-basic-ui/src/common/utils/PropOf.ts b/extensions/plugin-basic-ui/src/common/utils/PropOf.ts new file mode 100644 index 000000000..afe16e9c2 --- /dev/null +++ b/extensions/plugin-basic-ui/src/common/utils/PropOf.ts @@ -0,0 +1 @@ +export type PropOf = T extends (props: infer U) => any ? U : never; diff --git a/extensions/plugin-basic-ui/src/utils/RecursivePartial.ts b/extensions/plugin-basic-ui/src/common/utils/RecursivePartial.ts similarity index 100% rename from extensions/plugin-basic-ui/src/utils/RecursivePartial.ts rename to extensions/plugin-basic-ui/src/common/utils/RecursivePartial.ts diff --git a/extensions/plugin-basic-ui/src/utils/compact.ts b/extensions/plugin-basic-ui/src/common/utils/compact.ts similarity index 100% rename from extensions/plugin-basic-ui/src/utils/compact.ts rename to extensions/plugin-basic-ui/src/common/utils/compact.ts diff --git a/extensions/plugin-basic-ui/src/utils/compactMap.ts b/extensions/plugin-basic-ui/src/common/utils/compactMap.ts similarity index 100% rename from extensions/plugin-basic-ui/src/utils/compactMap.ts rename to extensions/plugin-basic-ui/src/common/utils/compactMap.ts diff --git a/extensions/plugin-basic-ui/src/utils/index.ts b/extensions/plugin-basic-ui/src/common/utils/index.ts similarity index 100% rename from extensions/plugin-basic-ui/src/utils/index.ts rename to extensions/plugin-basic-ui/src/common/utils/index.ts diff --git a/extensions/plugin-basic-ui/src/utils/isBrowser.ts b/extensions/plugin-basic-ui/src/common/utils/isBrowser.ts similarity index 100% rename from extensions/plugin-basic-ui/src/utils/isBrowser.ts rename to extensions/plugin-basic-ui/src/common/utils/isBrowser.ts diff --git a/extensions/plugin-basic-ui/src/utils/isServer.ts b/extensions/plugin-basic-ui/src/common/utils/isServer.ts similarity index 100% rename from extensions/plugin-basic-ui/src/utils/isServer.ts rename to extensions/plugin-basic-ui/src/common/utils/isServer.ts diff --git a/extensions/plugin-basic-ui/src/index.ts b/extensions/plugin-basic-ui/src/index.ts deleted file mode 100644 index 451d9e24d..000000000 --- a/extensions/plugin-basic-ui/src/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -export { IconBack, IconClose } from "./assets"; -export { basicUIPlugin } from "./basicUIPlugin"; -export { globalVars as cssVars } from "./basicUIPlugin.css"; -export { - default as AppScreen, - AppScreenContext, - AppScreenProps, - useAppScreen, -} from "./components/AppScreen"; -export { vars as appScreenVars } from "./components/AppScreen.css"; -export { - default as BottomSheet, - BottomSheetProps, -} from "./components/BottomSheet"; -export { vars as bottomSheetVars } from "./components/BottomSheet.css"; -export { default as Modal, ModalProps } from "./components/Modal"; -export { vars as modalVars } from "./components/Modal.css"; diff --git a/extensions/plugin-basic-ui/src/basicUIPlugin.tsx b/extensions/plugin-basic-ui/src/react/basicUIPlugin.tsx similarity index 94% rename from extensions/plugin-basic-ui/src/basicUIPlugin.tsx rename to extensions/plugin-basic-ui/src/react/basicUIPlugin.tsx index 36bf02c7b..9ee87e3ef 100644 --- a/extensions/plugin-basic-ui/src/basicUIPlugin.tsx +++ b/extensions/plugin-basic-ui/src/react/basicUIPlugin.tsx @@ -2,9 +2,9 @@ import type { StackflowReactPlugin } from "@stackflow/react"; import { assignInlineVars } from "@vanilla-extract/dynamic"; import { createContext, useContext } from "react"; -import * as css from "./basicUIPlugin.css"; -import type { RecursivePartial } from "./utils"; -import { compact, compactMap, isBrowser } from "./utils"; +import * as css from "../common/basicUIPlugin.css"; +import type { RecursivePartial } from "../common/utils"; +import { compact, compactMap } from "../common/utils"; type BasicUIPluginOptions = RecursivePartial & { theme: "android" | "cupertino"; diff --git a/extensions/plugin-basic-ui/src/components/AppBar.tsx b/extensions/plugin-basic-ui/src/react/components/AppBar.tsx similarity index 93% rename from extensions/plugin-basic-ui/src/components/AppBar.tsx rename to extensions/plugin-basic-ui/src/react/components/AppBar.tsx index 8ce9ae268..5064b4cda 100644 --- a/extensions/plugin-basic-ui/src/components/AppBar.tsx +++ b/extensions/plugin-basic-ui/src/react/components/AppBar.tsx @@ -6,14 +6,13 @@ import { useAppBarTitleMaxWidth, useNullableActivity, } from "@stackflow/react-ui-core"; -import { IconBack, IconClose } from "../assets"; +import { IconBack, IconClose } from "../../common/assets"; +import type { GlobalVars } from "../../common/basicUIPlugin.css"; +import { globalVars } from "../../common/basicUIPlugin.css"; +import * as css from "../../common/components/AppBar.css"; +import * as appScreenCss from "../../common/components/AppScreen.css"; +import { compactMap } from "../../common/utils"; import { useGlobalOptions } from "../basicUIPlugin"; -import type { GlobalVars } from "../basicUIPlugin.css"; -import { globalVars } from "../basicUIPlugin.css"; - -import { compactMap } from "../utils"; -import * as css from "./AppBar.css"; -import * as appScreenCss from "./AppScreen.css"; type AppBarProps = Partial< Pick< @@ -127,9 +126,8 @@ const AppBar = forwardRef( aria-label="Go Back" className={css.backButton} onClick={onBackClick} - > - - + dangerouslySetInnerHTML={{ __html: IconBack() }} + /> ); } @@ -174,10 +172,10 @@ const AppBar = forwardRef( } if (modalPresentationStyle === "fullScreen") { - return ; + return
; } - return ; + return
; })()} ); @@ -256,7 +254,7 @@ const AppBar = forwardRef( return globalCloseButton.renderIcon(); } - return ; + return
; })()} ); diff --git a/extensions/plugin-basic-ui/src/components/AppScreen.tsx b/extensions/plugin-basic-ui/src/react/components/AppScreen.tsx similarity index 96% rename from extensions/plugin-basic-ui/src/components/AppScreen.tsx rename to extensions/plugin-basic-ui/src/react/components/AppScreen.tsx index 7bb81de63..970417b95 100644 --- a/extensions/plugin-basic-ui/src/components/AppScreen.tsx +++ b/extensions/plugin-basic-ui/src/react/components/AppScreen.tsx @@ -11,13 +11,13 @@ import { useStyleEffectSwipeBack, useZIndexBase, } from "@stackflow/react-ui-core"; +import type { GlobalVars } from "../../common/basicUIPlugin.css"; +import { globalVars } from "../../common/basicUIPlugin.css"; +import * as css from "../../common/components/AppScreen.css"; +import type { PropOf } from "../../common/utils"; +import { compactMap } from "../../common/utils"; import { useGlobalOptions } from "../basicUIPlugin"; -import type { GlobalVars } from "../basicUIPlugin.css"; -import { globalVars } from "../basicUIPlugin.css"; -import type { PropOf } from "../utils"; -import { compactMap } from "../utils"; import AppBar from "./AppBar"; -import * as css from "./AppScreen.css"; export const OFFSET_PX_ANDROID = 32; export const OFFSET_PX_CUPERTINO = 80; diff --git a/extensions/plugin-basic-ui/src/components/BottomSheet.tsx b/extensions/plugin-basic-ui/src/react/components/BottomSheet.tsx similarity index 91% rename from extensions/plugin-basic-ui/src/components/BottomSheet.tsx rename to extensions/plugin-basic-ui/src/react/components/BottomSheet.tsx index f2e86cb81..1c1f6beb3 100644 --- a/extensions/plugin-basic-ui/src/components/BottomSheet.tsx +++ b/extensions/plugin-basic-ui/src/react/components/BottomSheet.tsx @@ -8,10 +8,10 @@ import { useStyleEffect, useZIndexBase, } from "@stackflow/react-ui-core"; -import type { GlobalVars } from "../basicUIPlugin.css"; -import { globalVars } from "../basicUIPlugin.css"; -import { compactMap } from "../utils"; -import * as css from "./BottomSheet.css"; +import type { GlobalVars } from "../../common/basicUIPlugin.css"; +import { globalVars } from "../../common/basicUIPlugin.css"; +import * as css from "../../common/components/BottomSheet.css"; +import { compactMap } from "../../common/utils"; export type BottomSheetProps = Partial< Pick diff --git a/extensions/plugin-basic-ui/src/components/Modal.tsx b/extensions/plugin-basic-ui/src/react/components/Modal.tsx similarity index 92% rename from extensions/plugin-basic-ui/src/components/Modal.tsx rename to extensions/plugin-basic-ui/src/react/components/Modal.tsx index 92d1dfcd0..181658c55 100644 --- a/extensions/plugin-basic-ui/src/components/Modal.tsx +++ b/extensions/plugin-basic-ui/src/react/components/Modal.tsx @@ -8,10 +8,10 @@ import { useStyleEffect, useZIndexBase, } from "@stackflow/react-ui-core"; -import type { GlobalVars } from "../basicUIPlugin.css"; -import { globalVars } from "../basicUIPlugin.css"; -import { compactMap } from "../utils"; -import * as css from "./Modal.css"; +import type { GlobalVars } from "../../common/basicUIPlugin.css"; +import { globalVars } from "../../common/basicUIPlugin.css"; +import * as css from "../../common/components/Modal.css"; +import { compactMap } from "../../common/utils"; export type ModalProps = Partial< Pick diff --git a/extensions/plugin-basic-ui/src/react/index.ts b/extensions/plugin-basic-ui/src/react/index.ts new file mode 100644 index 000000000..121d1ce9c --- /dev/null +++ b/extensions/plugin-basic-ui/src/react/index.ts @@ -0,0 +1,17 @@ +export { IconBack, IconClose } from "../common/assets"; +export { globalVars as cssVars } from "../common/basicUIPlugin.css"; +export { vars as appScreenVars } from "../common/components/AppScreen.css"; +export { vars as bottomSheetVars } from "../common/components/BottomSheet.css"; +export { vars as modalVars } from "../common/components/Modal.css"; +export { basicUIPlugin } from "./basicUIPlugin"; +export { + default as AppScreen, + AppScreenContext, + AppScreenProps, + useAppScreen, +} from "./components/AppScreen"; +export { + default as BottomSheet, + BottomSheetProps, +} from "./components/BottomSheet"; +export { default as Modal, ModalProps } from "./components/Modal"; diff --git a/extensions/plugin-basic-ui/src/solid/basicUIPlugin.solid.tsx b/extensions/plugin-basic-ui/src/solid/basicUIPlugin.solid.tsx new file mode 100644 index 000000000..7d12fd477 --- /dev/null +++ b/extensions/plugin-basic-ui/src/solid/basicUIPlugin.solid.tsx @@ -0,0 +1,99 @@ +/* @jsxImportSource solid-js */ + +import type { StackflowSolidPlugin } from "@stackflow/solid"; +import { assignInlineVars } from "@vanilla-extract/dynamic"; +import type { JSXElement } from "solid-js"; +import { createContext, useContext } from "solid-js"; + +import * as css from "../common/basicUIPlugin.css"; +import type { RecursivePartial } from "../common/utils"; +import { compact, compactMap } from "../common/utils"; + +type BasicUIPluginOptions = RecursivePartial & { + theme: "android" | "cupertino"; + rootClassName?: string; + appBar?: { + backButton?: + | { + renderIcon?: () => JSXElement; + ariaLabel?: string; + } + | { + render?: () => JSXElement; + }; + closeButton?: + | { + renderIcon?: () => JSXElement; + ariaLabel?: string; + onClick?: (e: MouseEvent) => void; + } + | { + render?: () => JSXElement; + }; + }; +}; + +const GlobalOptionsContext = createContext({ + theme: "android", +}); + +export const GlobalOptionsProvider = GlobalOptionsContext.Provider; + +export function useGlobalOptions() { + return useContext(GlobalOptionsContext); +} + +export const basicUIPlugin: ( + options: + | BasicUIPluginOptions + | ((args: { initialContext?: any }) => BasicUIPluginOptions), +) => StackflowSolidPlugin = (options) => () => ({ + key: "basic-ui", + wrapStack({ stack, initialContext }) { + const _options = + typeof options === "function" ? options({ initialContext }) : options; + + return ( + +
+ {stack.render()} +
+
+ ); + }, +}); diff --git a/extensions/plugin-basic-ui/src/solid/components/AppBar.solid.tsx b/extensions/plugin-basic-ui/src/solid/components/AppBar.solid.tsx new file mode 100644 index 000000000..7774b4ba7 --- /dev/null +++ b/extensions/plugin-basic-ui/src/solid/components/AppBar.solid.tsx @@ -0,0 +1,339 @@ +/* @jsxImportSource solid-js */ + +import { useActions, useActivity } from "@stackflow/solid"; +import { assignInlineVars } from "@vanilla-extract/dynamic"; +import type { JSXElement } from "solid-js"; +import { Match, Show, Switch, createMemo, mergeProps } from "solid-js"; + +import { useAppBarTitleMaxWidth } from "@stackflow/solid-ui-core"; +import { IconBack, IconClose } from "../../common/assets"; +import type { GlobalVars } from "../../common/basicUIPlugin.css"; +import { globalVars } from "../../common/basicUIPlugin.css"; +import { useGlobalOptions } from "../basicUIPlugin.solid"; + +import * as css from "../../common/components/AppBar.css"; +import * as appScreenCss from "../../common/components/AppScreen.css"; +import { compactMap } from "../../common/utils"; + +type AppBarProps = Partial< + Pick< + GlobalVars["appBar"], + | "borderColor" + | "borderColorTransitionDuration" + | "borderSize" + | "height" + | "heightTransitionDuration" + | "overflow" + | "iconColor" + | "iconColorTransitionDuration" + | "textColor" + | "textColorTransitionDuration" + | "backgroundColor" + | "backgroundColorTransitionDuration" + > +> & { + ref?: HTMLDivElement; + title?: JSXElement; + renderLeft?: () => JSXElement; + renderRight?: () => JSXElement; + backButton?: + | { + renderIcon?: () => JSXElement; + ariaLabel?: string; + onClick?: (e: MouseEvent) => void; + } + | { + render?: () => JSXElement; + }; + closeButton?: + | { + renderIcon?: () => JSXElement; + ariaLabel?: string; + onClick?: (e: MouseEvent) => void; + } + | { + render?: () => JSXElement; + }; + closeButtonLocation?: "left" | "right"; + border?: boolean; + modalPresentationStyle?: "fullScreen"; + activityEnterStyle?: "slideInLeft"; + onTopClick?: (e: MouseEvent) => void; +}; +const AppBar = (_props: AppBarProps) => { + const props = mergeProps(_props, { + closeButtonLocation: "left", + border: true, + }); + const actions = useActions(); + const activity = useActivity(); + + const globalOptions = useGlobalOptions(); + const globalCloseButton = globalOptions.appBar?.closeButton; + const globalBackButton = globalOptions.appBar?.backButton; + + let centerRef: HTMLDivElement | undefined; + + const { maxWidth } = useAppBarTitleMaxWidth({ + outerRef: props.ref, + innerRef: centerRef, + enable: globalOptions.theme === "cupertino", + }); + + const onBackClick = (e: MouseEvent) => { + if ( + props.backButton && + "onClick" in props.backButton && + props.backButton.onClick + ) { + props.backButton.onClick(e); + } + + if (!e.defaultPrevented) { + actions.pop(); + } + }; + + const BackButton = () => ( + + + } + > + + {(render) => render()()} + + + {(render) => render()()} + + + + + + + ); + + const onCloseClick = (e: MouseEvent) => { + if ( + props.closeButton && + "onClick" in props.closeButton && + props.closeButton.onClick + ) { + props.closeButton.onClick(e); + } + + if ( + !e.defaultPrevented && + globalCloseButton && + "onClick" in globalCloseButton + ) { + globalCloseButton.onClick?.(e); + } + }; + + const CloseButton = () => { + const isRoot = createMemo(() => !activity() || !!activity()?.isRoot); + + const showCloseButton = (closeButton: AppBarProps["closeButton"]) => + (closeButton && "render" in closeButton && closeButton.render) || + (closeButton && "renderIcon" in closeButton && closeButton.renderIcon) || + (closeButton && "onClick" in closeButton && closeButton.onClick); + + return ( + + + + {(render) => render()()} + + + {(render) => render()()} + + + + + + + ); + }; + + const hasLeft = createMemo( + () => + !!( + (props.closeButtonLocation === "left" && props.closeButton) || + props.backButton || + props.renderLeft + ), + ); + + const closeButton = ; + + return ( +
+
+
+
+ {closeButton} + + {props.renderLeft?.()} +
+
+
+ +
{props.title}
+
+
+
+
+ {props.renderRight?.()} + + {closeButton} + +
+
+
+ ); +}; + +export default AppBar; diff --git a/extensions/plugin-basic-ui/src/solid/components/AppScreen.solid.tsx b/extensions/plugin-basic-ui/src/solid/components/AppScreen.solid.tsx new file mode 100644 index 000000000..f96cca03c --- /dev/null +++ b/extensions/plugin-basic-ui/src/solid/components/AppScreen.solid.tsx @@ -0,0 +1,279 @@ +/* @jsxImportSource solid-js */ + +import { useActions, useActivity } from "@stackflow/solid"; +import { assignInlineVars } from "@vanilla-extract/dynamic"; +import type { Accessor, Component, JSXElement } from "solid-js"; +import { createContext, createMemo, useContext } from "solid-js"; + +import { + createLazy, + createStyleEffectHide, + createStyleEffectOffset, + createStyleEffectSwipeBack, + createZIndexBase, + useMounted, +} from "@stackflow/solid-ui-core"; +import type { GlobalVars } from "../../common/basicUIPlugin.css"; +import { globalVars } from "../../common/basicUIPlugin.css"; +import * as css from "../../common/components/AppScreen.css"; +import type { PropOf } from "../../common/utils"; +import { compactMap } from "../../common/utils"; +import { useGlobalOptions } from "../basicUIPlugin.solid"; +import AppBar from "./AppBar.solid"; + +export const OFFSET_PX_ANDROID = 32; +export const OFFSET_PX_CUPERTINO = 80; + +export type AppScreenContext = { + scroll: (args: { top: number }) => void; + zIndices: { + dim: Accessor; + paper: Accessor; + edge: Accessor; + appBar: Accessor; + }; +}; +const Context = createContext(null as any); + +export function useAppScreen() { + return useContext(Context); +} + +export type AppScreenProps = Partial< + Pick +> & { + appBar?: Omit< + PropOf, + "theme" | "modalPresentationStyle" | "ref" | "key" + >; + preventSwipeBack?: boolean; + CUPERTINO_ONLY_modalPresentationStyle?: "fullScreen"; + ANDROID_ONLY_activityEnterStyle?: "slideInLeft"; + children: JSXElement; +}; +const AppScreen: Component = (props) => { + const globalOptions = useGlobalOptions(); + const activity = useActivity(); + const mounted = useMounted(); + + const { pop } = useActions(); + + let appScreenRef: HTMLDivElement | undefined; + let dimRef: HTMLDivElement | undefined; + let paperRef: HTMLDivElement | undefined; + let edgeRef: HTMLDivElement | undefined; + let appBarRef: HTMLDivElement | undefined; + + const modalPresentationStyle = + globalOptions.theme === "cupertino" + ? () => props.CUPERTINO_ONLY_modalPresentationStyle + : undefined; + const activityEnterStyle = + globalOptions.theme === "android" + ? () => props.ANDROID_ONLY_activityEnterStyle + : undefined; + + const isSwipeBackPrevented = createMemo( + () => props.preventSwipeBack || modalPresentationStyle?.() === "fullScreen", + ); + + const hasAppBar = createMemo(() => !!props.appBar); + + const zIndexBase = createZIndexBase(); + + const { zIndexDim, zIndexPaper, zIndexEdge, zIndexAppBar } = (() => { + switch (globalOptions.theme) { + case "cupertino": + return { + zIndexDim: createMemo( + () => + zIndexBase() + + (modalPresentationStyle?.() === "fullScreen" ? 2 : 0), + ), + zIndexPaper: createMemo( + () => + zIndexBase() + + (hasAppBar() && modalPresentationStyle?.() !== "fullScreen" + ? 1 + : 3), + ), + zIndexEdge: () => zIndexBase() + 4, + zIndexAppBar: () => zIndexBase() + 7, + }; + default: + return { + zIndexDim: () => zIndexBase(), + zIndexPaper: createMemo( + () => + zIndexBase() + (activityEnterStyle?.() === "slideInLeft" ? 1 : 3), + ), + zIndexEdge: () => zIndexBase() + 4, + zIndexAppBar: createMemo( + () => + zIndexBase() + (activityEnterStyle?.() === "slideInLeft" ? 7 : 4), + ), + }; + } + })(); + + const transitionState = createMemo( + () => activity()?.transitionState ?? "enter-done", + ); + const lazyTransitionState = createLazy(transitionState); + + createStyleEffectHide({ + refs: [() => appScreenRef], + }); + createStyleEffectOffset({ + refs: + globalOptions.theme === "cupertino" || + activityEnterStyle?.() === "slideInLeft" + ? [() => paperRef] + : [() => paperRef, () => appBarRef], + offsetStyles: + globalOptions.theme === "cupertino" + ? { + transform: `translate3d(-${OFFSET_PX_CUPERTINO / 16}rem, 0, 0)`, + opacity: "1", + } + : activityEnterStyle?.() === "slideInLeft" + ? { + transform: "translate3d(-50%, 0, 0)", + opacity: "0", + } + : { + transform: `translate3d(0, -${OFFSET_PX_ANDROID / 16}rem, 0)`, + opacity: "1", + }, + transitionDuration: globalVars.computedTransitionDuration, + hasEffect: modalPresentationStyle?.() !== "fullScreen", + }); + createStyleEffectSwipeBack({ + dimRef: () => dimRef, + edgeRef: () => edgeRef, + paperRef: () => paperRef, + offset: OFFSET_PX_CUPERTINO, + transitionDuration: globalVars.transitionDuration, + preventSwipeBack: () => + isSwipeBackPrevented() || globalOptions.theme !== "cupertino", + getActivityTransitionState() { + const $appScreen = paperRef?.parentElement; + + if (!$appScreen) { + return null; + } + + if ($appScreen.classList.contains(css.enterActive)) { + return "enter-active"; + } + if ($appScreen.classList.contains(css.enterDone)) { + return "enter-done"; + } + if ($appScreen.classList.contains(css.exitActive)) { + return "exit-active"; + } + if ($appScreen.classList.contains(css.exitDone)) { + return "exit-done"; + } + + return null; + }, + onSwiped() { + pop(); + }, + }); + + const onAppBarTopClick = (e: MouseEvent) => { + props.appBar?.onTopClick?.(e); + + if (!e.defaultPrevented) { + paperRef?.scroll({ + top: 0, + behavior: "smooth", + }); + } + }; + + return ( + +
+ {activityEnterStyle?.() !== "slideInLeft" && ( +
+ )} + {props.appBar && ( + + )} +
+ {props.children} +
+ {!activity()?.isRoot && + globalOptions.theme === "cupertino" && + !isSwipeBackPrevented && ( +
+ )} +
+ + ); +}; + +export default AppScreen; diff --git a/extensions/plugin-basic-ui/src/solid/components/BottomSheet.solid.tsx b/extensions/plugin-basic-ui/src/solid/components/BottomSheet.solid.tsx new file mode 100644 index 000000000..846f9609f --- /dev/null +++ b/extensions/plugin-basic-ui/src/solid/components/BottomSheet.solid.tsx @@ -0,0 +1,107 @@ +/* @jsxImportSource solid-js */ + +import { useActions, useActivity } from "@stackflow/solid"; +import { assignInlineVars } from "@vanilla-extract/dynamic"; +import type { Accessor, Component, JSXElement } from "solid-js"; +import { createMemo } from "solid-js"; + +import { + createLazy, + createStyleEffect, + createZIndexBase, +} from "@stackflow/solid-ui-core"; +import type { GlobalVars } from "../../common/basicUIPlugin.css"; +import { globalVars } from "../../common/basicUIPlugin.css"; +import * as css from "../../common/components/BottomSheet.css"; +import { compactMap } from "../../common/utils"; + +export type BottomSheetProps = Partial< + Pick +> & + Partial & { + paperRef?: Accessor; + onOutsideClick?: (e: MouseEvent) => void; + children: JSXElement; + }; +const BottomSheet: Component = (props) => { + const activity = useActivity(); + const { pop } = useActions(); + + let containerRef: HTMLDivElement | undefined; + let dimRef: HTMLDivElement | undefined; + + createStyleEffect({ + styleName: "hide", + refs: [() => containerRef], + }); + createStyleEffect({ + styleName: "offset", + refs: [() => dimRef], + }); + createStyleEffect({ + styleName: "swipe-back", + refs: [() => dimRef], + }); + + let popLock = false; + + const onDimClick = (e: MouseEvent) => { + props.onOutsideClick?.(e); + + if (e.defaultPrevented) { + return; + } + + if (popLock) { + return; + } + popLock = true; + + pop(); + }; + const onPaperClick = (e: MouseEvent) => { + e.stopPropagation(); + }; + + const zIndexBase = createZIndexBase(); + const zIndexDim = createMemo(() => zIndexBase() + 3); + const zIndexPaper = createMemo(() => zIndexBase() + 4); + const transitionState = createMemo( + () => activity()?.transitionState ?? "enter-done", + ); + const lazyTransitionState = createLazy(transitionState); + + return ( +
+
+
+ {props.children} +
+
+
+ ); +}; + +export default BottomSheet; diff --git a/extensions/plugin-basic-ui/src/solid/components/Modal.solid.tsx b/extensions/plugin-basic-ui/src/solid/components/Modal.solid.tsx new file mode 100644 index 000000000..d78687a08 --- /dev/null +++ b/extensions/plugin-basic-ui/src/solid/components/Modal.solid.tsx @@ -0,0 +1,110 @@ +/* @jsxImportSource solid-js */ + +import { useActions, useActivity } from "@stackflow/solid"; +import { assignInlineVars } from "@vanilla-extract/dynamic"; +import type { Component, JSXElement } from "solid-js"; +import { createMemo, mergeProps } from "solid-js"; + +import { + createLazy, + createStyleEffect, + createZIndexBase, +} from "@stackflow/solid-ui-core"; +import type { GlobalVars } from "../../common/basicUIPlugin.css"; +import { globalVars } from "../../common/basicUIPlugin.css"; +import * as css from "../../common/components/Modal.css"; +import { compactMap } from "../../common/utils"; + +export type ModalProps = Partial< + Pick +> & + Partial & { + onOutsideClick?: (e: MouseEvent) => void; + children: JSXElement; + }; +const Modal: Component = (_props) => { + const props = mergeProps(_props, { + borderRadius: "1rem", + }); + + const activity = useActivity(); + const { pop } = useActions(); + + let containerRef: HTMLDivElement | undefined; + let paperRef: HTMLDivElement | undefined; + + createStyleEffect({ + styleName: "hide", + refs: [() => containerRef], + }); + createStyleEffect({ + styleName: "offset", + refs: [() => paperRef], + }); + createStyleEffect({ + styleName: "swipe-back", + refs: [() => paperRef], + }); + + let popLock = false; + + const onDimClick = (e: MouseEvent) => { + props.onOutsideClick?.(e); + + if (e.defaultPrevented) { + return; + } + + if (popLock) { + return; + } + popLock = true; + + pop(); + }; + const onPaperClick = (e: MouseEvent) => { + e.stopPropagation(); + }; + + const zIndexBase = createZIndexBase(); + const zIndexDim = createMemo(() => zIndexBase() + 3); + const zIndexPaper = createMemo(() => zIndexBase() + 4); + const transitionState = createMemo( + () => activity()?.transitionState ?? "enter-done", + ); + const lazyTransitionState = createLazy(transitionState); + + return ( +
+
+
+ {props.children} +
+
+
+ ); +}; + +export default Modal; diff --git a/extensions/plugin-basic-ui/src/solid/index.ts b/extensions/plugin-basic-ui/src/solid/index.ts new file mode 100644 index 000000000..3fa4111de --- /dev/null +++ b/extensions/plugin-basic-ui/src/solid/index.ts @@ -0,0 +1,17 @@ +export { IconBack, IconClose } from "../common/assets"; +export { globalVars as cssVars } from "../common/basicUIPlugin.css"; +export { vars as appScreenVars } from "../common/components/AppScreen.css"; +export { vars as bottomSheetVars } from "../common/components/BottomSheet.css"; +export { vars as modalVars } from "../common/components/Modal.css"; +export { basicUIPlugin } from "./basicUIPlugin.solid"; +export { + default as AppScreen, + AppScreenContext, + AppScreenProps, + useAppScreen, +} from "./components/AppScreen.solid"; +export { + default as BottomSheet, + BottomSheetProps, +} from "./components/BottomSheet.solid"; +export { default as Modal, ModalProps } from "./components/Modal.solid"; diff --git a/extensions/plugin-basic-ui/src/utils/PropOf.ts b/extensions/plugin-basic-ui/src/utils/PropOf.ts deleted file mode 100644 index 5bff03943..000000000 --- a/extensions/plugin-basic-ui/src/utils/PropOf.ts +++ /dev/null @@ -1 +0,0 @@ -export type PropOf = T extends React.ComponentType ? U : never; diff --git a/extensions/plugin-basic-ui/tsconfig.json b/extensions/plugin-basic-ui/tsconfig.json index b1d123121..29b29fa22 100644 --- a/extensions/plugin-basic-ui/tsconfig.json +++ b/extensions/plugin-basic-ui/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "baseUrl": "./src", "outDir": "./dist" }, "exclude": ["./dist"] diff --git a/extensions/plugin-history-sync/esbuild.config.js b/extensions/plugin-history-sync/esbuild.config.js index b84dfb4db..ed8c30685 100644 --- a/extensions/plugin-history-sync/esbuild.config.js +++ b/extensions/plugin-history-sync/esbuild.config.js @@ -1,5 +1,6 @@ const { context } = require("esbuild"); const config = require("@stackflow/esbuild-config"); +const { solidPlugin } = require("esbuild-plugin-solid"); const pkg = require("./package.json"); const watch = process.argv.includes("--watch"); @@ -8,22 +9,41 @@ const external = Object.keys({ ...pkg.peerDependencies, }); -Promise.all([ - context({ - ...config({}), - format: "cjs", - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), - ), - context({ - ...config({}), - format: "esm", - outExtension: { - ".js": ".mjs", - }, - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), +const solidEntryPoints = ["./src/solid/index.ts"]; +const allEntryPoints = ["./src/react/index.ts", ...solidEntryPoints]; + +Promise.all( + [ + { jsx: true, browser: false, entryPoints: solidEntryPoints }, + { jsx: false, browser: true, entryPoints: solidEntryPoints }, + { jsx: false, browser: false, entryPoints: allEntryPoints }, + ].flatMap(({ jsx, browser, entryPoints }) => + [ + { format: "cjs", extPrefix: "" }, + { format: "esm", extPrefix: "m" }, + ].map(({ format, extPrefix }) => + context({ + ...config({ + entryPoints, + plugins: !jsx + ? [ + solidPlugin({ + filter: /\.solid\.[cm]?[jt]sx$/, + solid: { generate: browser ? "dom" : "ssr" }, + }), + ] + : [], + }), + outbase: "src", + format, + outExtension: jsx + ? { ".js": `${browser ? ".browser" : ""}.${extPrefix}jsx` } + : { ".js": `${browser ? ".browser" : ""}.${extPrefix}js` }, + jsx: jsx ? "preserve" : undefined, + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + ), ), -]).catch(() => process.exit(1)); +).catch(() => process.exit(1)); diff --git a/extensions/plugin-history-sync/package.json b/extensions/plugin-history-sync/package.json index a9f7e36ed..d9a88b41e 100644 --- a/extensions/plugin-history-sync/package.json +++ b/extensions/plugin-history-sync/package.json @@ -9,14 +9,55 @@ "license": "MIT", "exports": { ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.mjs" + "types": "./dist/react/index.d.ts", + "require": "./dist/react/index.js", + "import": "./dist/react/index.mjs" + }, + "./react": { + "types": "./dist/react/index.d.ts", + "require": "./dist/react/index.js", + "import": "./dist/react/index.mjs" + }, + "./solid": { + "types": "./dist/solid/index.d.ts", + "solid": { + "require": "./dist/solid/index.jsx", + "import": "./dist/solid/index.mjsx" + }, + "browser": { + "require": { + "solid": "./dist/solid/index.browser.jsx", + "default": "./dist/solid/index.browser.js" + }, + "import": { + "solid": "./dist/solid/index.browser.mjsx", + "default": "./dist/solid/index.browser.mjs" + } + }, + "default": { + "require": { + "default": "./dist/solid/index.js" + }, + "import": { + "solid": "./dist/solid/index.mjsx", + "default": "./dist/solid/index.mjs" + } + } + } + }, + "main": "./dist/react/index.js", + "module": "./dist/react/index.mjs", + "types": "./dist/react/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/react/index.d.ts" + ], + "solid": [ + "dist/solid/index.d.ts" + ] } }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", "files": [ "dist", "src", @@ -51,6 +92,7 @@ "@stackflow/core": "^1.1.0", "@stackflow/esbuild-config": "^1.0.3", "@stackflow/react": "^1.4.0", + "@stackflow/solid": "^1.4.0", "@swc/core": "^1.6.6", "@swc/jest": "^0.2.36", "@types/jest": "^29.5.12", @@ -59,6 +101,7 @@ "@types/react-relay": "^16.0.6", "@types/relay-runtime": "^17", "esbuild": "^0.23.0", + "esbuild-plugin-solid": "^0.6.0", "graphql": "^16.9.0", "jest": "^29.7.0", "react": "^18.3.1", @@ -66,14 +109,34 @@ "relay-compiler": "^17.0.0", "relay-runtime": "^17.0.0", "rimraf": "^3.0.2", + "solid-js": "^1.8.18", "typescript": "^5.5.3" }, "peerDependencies": { "@stackflow/config": "^1.0.1-canary.0", "@stackflow/core": "^1.1.0-canary.0", "@stackflow/react": "^1.3.2-canary.0", + "@stackflow/solid": "^1.3.2-canary.0", "@types/react": ">=16.8.0", - "react": ">=16.8.0" + "react": ">=16.8.0", + "solid-js": ">=1.4.0" + }, + "peerDependenciesMeta": { + "@stackflow/react": { + "optional": true + }, + "@stackflow/solid": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "solid-js": { + "optional": true + } }, "relay": { "src": "./src", diff --git a/extensions/plugin-history-sync/src/RouteLike.ts b/extensions/plugin-history-sync/src/RouteLike.ts deleted file mode 100644 index aa6083fed..000000000 --- a/extensions/plugin-history-sync/src/RouteLike.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { ActivityComponentType } from "@stackflow/react"; - -export type Route = { - path: string; - decode?: ( - params: Record, - ) => K extends ActivityComponentType ? U : {}; -}; - -export type RouteLike = string | string[] | Route | Route[]; diff --git a/extensions/plugin-history-sync/src/ActivityRoute.ts b/extensions/plugin-history-sync/src/common/ActivityRoute.ts similarity index 100% rename from extensions/plugin-history-sync/src/ActivityRoute.ts rename to extensions/plugin-history-sync/src/common/ActivityRoute.ts diff --git a/extensions/plugin-history-sync/src/ActivityRouteMapInput.ts b/extensions/plugin-history-sync/src/common/ActivityRouteMapInput.ts similarity index 100% rename from extensions/plugin-history-sync/src/ActivityRouteMapInput.ts rename to extensions/plugin-history-sync/src/common/ActivityRouteMapInput.ts diff --git a/extensions/plugin-history-sync/src/common/RouteLike.ts b/extensions/plugin-history-sync/src/common/RouteLike.ts new file mode 100644 index 000000000..5836b937a --- /dev/null +++ b/extensions/plugin-history-sync/src/common/RouteLike.ts @@ -0,0 +1,30 @@ +// @ts-ignore: optional peer dependency +import type { ActivityComponentType as ReactActivityComponentType } from "@stackflow/react"; +// @ts-ignore: optional peer dependency +import type { ActivityComponentType as SolidActivityComponentType } from "@stackflow/solid"; + +// each ActivityComponentType will be `any` if the dep is not installed, so convert it to `never` if it's `any` +type NeverOnAny = unknown extends T + ? [keyof T] extends [never] + ? T + : never + : T; +type MaybeReactActivityComponentType< + T extends Record, +> = NeverOnAny>; +type MaybeSolidActivityComponentType< + T extends Record, +> = NeverOnAny>; + +export type Route = { + path: string; + decode?: ( + params: Record, + ) => K extends MaybeReactActivityComponentType + ? U + : K extends MaybeSolidActivityComponentType + ? U + : {}; +}; + +export type RouteLike = string | string[] | Route | Route[]; diff --git a/extensions/plugin-history-sync/src/historyState.ts b/extensions/plugin-history-sync/src/common/historyState.ts similarity index 100% rename from extensions/plugin-history-sync/src/historyState.ts rename to extensions/plugin-history-sync/src/common/historyState.ts diff --git a/extensions/plugin-history-sync/src/last.spec.ts b/extensions/plugin-history-sync/src/common/last.spec.ts similarity index 100% rename from extensions/plugin-history-sync/src/last.spec.ts rename to extensions/plugin-history-sync/src/common/last.spec.ts diff --git a/extensions/plugin-history-sync/src/last.ts b/extensions/plugin-history-sync/src/common/last.ts similarity index 100% rename from extensions/plugin-history-sync/src/last.ts rename to extensions/plugin-history-sync/src/common/last.ts diff --git a/extensions/plugin-history-sync/src/historySyncPlugin.spec.ts b/extensions/plugin-history-sync/src/common/makeHistorySyncPlugin.spec.ts similarity index 99% rename from extensions/plugin-history-sync/src/historySyncPlugin.spec.ts rename to extensions/plugin-history-sync/src/common/makeHistorySyncPlugin.spec.ts index 5ba28d372..7b1aa318f 100644 --- a/extensions/plugin-history-sync/src/historySyncPlugin.spec.ts +++ b/extensions/plugin-history-sync/src/common/makeHistorySyncPlugin.spec.ts @@ -9,9 +9,9 @@ import { makeCoreStore, makeEvent } from "@stackflow/core"; import type { Location, MemoryHistory } from "history"; import { createMemoryHistory } from "history"; import { loadQuery } from "react-relay"; -import { makeRelayEnvironment } from "./fixtures/graphql"; -import { default as getHelloQueryNode } from "./fixtures/graphql/__generated__/getHelloQuery.graphql"; -import { historySyncPlugin } from "./historySyncPlugin"; +import { makeRelayEnvironment } from "../fixtures/graphql"; +import { default as getHelloQueryNode } from "../fixtures/graphql/__generated__/getHelloQuery.graphql"; +import { makeHistorySyncPlugin } from "./makeHistorySyncPlugin"; const SECOND = 1000; const MINUTE = 60 * SECOND; @@ -112,6 +112,8 @@ const stackflow = ({ const activeActivity = (stack: Stack) => stack.activities.find((a) => a.isActive); +const historySyncPlugin = makeHistorySyncPlugin(() => ({})); + describe("historySyncPlugin", () => { let history: MemoryHistory; let actions: PromiseProxy; diff --git a/extensions/plugin-history-sync/src/common/makeHistorySyncPlugin.tsx b/extensions/plugin-history-sync/src/common/makeHistorySyncPlugin.tsx new file mode 100644 index 000000000..415e6329c --- /dev/null +++ b/extensions/plugin-history-sync/src/common/makeHistorySyncPlugin.tsx @@ -0,0 +1,541 @@ +import type { StackflowPlugin } from "@stackflow/core"; +import { id, makeEvent } from "@stackflow/core"; +import type { History, Listener } from "history"; +import { createBrowserHistory, createMemoryHistory } from "history"; + +import type { ActivityDefinition, Config } from "@stackflow/config"; +import type { ActivityRoute } from "./ActivityRoute"; +import type { RouteLike } from "./RouteLike"; +import { parseState, pushState, replaceState } from "./historyState"; +import { last } from "./last"; +import type { RequestHistoryTick } from "./makeHistoryTaskQueue"; +import { makeHistoryTaskQueue } from "./makeHistoryTaskQueue"; +import type { UrlPatternOptions } from "./makeTemplate"; +import { makeTemplate, pathToUrl, urlSearchParamsToMap } from "./makeTemplate"; +import { normalizeActivityRouteMap } from "./normalizeActivityRouteMap"; +import { sortActivityRoutes } from "./sortActivityRoutes"; + +const SECOND = 1000; +const MINUTE = 60 * SECOND; + +export type ConfigHistorySync = { + makeTemplate: typeof makeTemplate; + urlPatternOptions?: UrlPatternOptions; +}; + +type HistorySyncPluginOptions> = ( + | { + routes: { + [key in keyof T]: RouteLike; + }; + } + | { + config: Config>; + } +) & { + fallbackActivity: (args: { initialContext: any }) => K; + useHash?: boolean; + history?: History; + urlPatternOptions?: UrlPatternOptions; +}; +export const makeHistorySyncPlugin = +

( + getOverrides: (args: { + activityRoutes: ActivityRoute[]; + requestHistoryTick: RequestHistoryTick; + }) => Omit, keyof ReturnType>, + ) => + < + T extends { [activityName: string]: unknown }, + K extends Extract, + >( + options: HistorySyncPluginOptions, + ): P => { + if ("config" in options) { + options.config.decorate("historySync", { + makeTemplate, + urlPatternOptions: options.urlPatternOptions, + }); + } + + const history = + options.history ?? + (typeof window === "undefined" + ? createMemoryHistory({}) + : createBrowserHistory({ + window, + })); + + const { location } = history; + + const routes = + "routes" in options + ? options.routes + : options.config.activities.reduce( + (acc, a) => ({ + ...acc, + [a.name]: a.path, + }), + {}, + ); + + const activityRoutes = sortActivityRoutes( + normalizeActivityRouteMap(routes), + ); + + const plugin: StackflowPlugin = () => { + let pushFlag = 0; + let silentFlag = false; + + const { requestHistoryTick } = makeHistoryTaskQueue(history); + + return { + key: "plugin-history-sync", + overrideInitialEvents({ initialContext }) { + const initialState = parseState(history.location.state); + + if (initialState) { + return [ + { + ...initialState.activity.enteredBy, + name: "Pushed", + }, + ...(initialState.step?.enteredBy.name === "StepPushed" || + initialState.step?.enteredBy.name === "StepReplaced" + ? [ + { + ...initialState.step.enteredBy, + name: "StepPushed" as const, + }, + ] + : []), + ]; + } + + function resolveCurrentPath() { + if ( + initialContext?.req?.path && + typeof initialContext.req.path === "string" + ) { + return initialContext.req.path as string; + } + + if (options.useHash) { + return location.hash.split("#")[1] ?? "/"; + } + + return location.pathname + location.search; + } + + const currentPath = resolveCurrentPath(); + + if (currentPath) { + for (const activityRoute of activityRoutes) { + const template = makeTemplate( + activityRoute, + options.urlPatternOptions, + ); + const activityParams = template.parse(currentPath); + + if (activityParams) { + const activityId = id(); + + return [ + makeEvent("Pushed", { + activityId, + activityName: activityRoute.activityName, + activityParams: { + ...activityParams, + }, + eventDate: new Date().getTime() - MINUTE, + activityContext: { + path: currentPath, + }, + }), + ]; + } + } + } + + const fallbackActivityId = id(); + const fallbackActivityName = options.fallbackActivity({ + initialContext, + }); + const fallbackActivityRoute = activityRoutes.find( + (r) => r.activityName === fallbackActivityName, + ); + const fallbackActivityPath = fallbackActivityRoute?.path; + const fallbackActivityParams = urlSearchParamsToMap( + pathToUrl(currentPath).searchParams, + ); + + return [ + makeEvent("Pushed", { + activityId: fallbackActivityId, + activityName: fallbackActivityName, + activityParams: { + ...fallbackActivityParams, + }, + eventDate: new Date().getTime() - MINUTE, + activityContext: { + path: fallbackActivityPath, + }, + }), + ]; + }, + onInit({ actions: { getStack, dispatchEvent, push, stepPush } }) { + const rootActivity = getStack().activities[0]; + + const match = activityRoutes.find( + (r) => r.activityName === rootActivity.name, + )!; + const template = makeTemplate(match, options.urlPatternOptions); + + const lastStep = last(rootActivity.steps); + + requestHistoryTick(() => + replaceState({ + history, + pathname: template.fill(rootActivity.params), + state: { + activity: rootActivity, + step: lastStep, + }, + useHash: options.useHash, + }), + ); + + const onPopState: Listener = (e) => { + if (silentFlag) { + silentFlag = false; + return; + } + + const state = parseState(e.location.state); + + if (!state) { + return; + } + + const targetActivity = state.activity; + const targetActivityId = state.activity.id; + const targetStep = state.step; + + const { activities } = getStack(); + const currentActivity = activities.find( + (activity) => activity.isActive, + ); + + if (!currentActivity) { + return; + } + + const currentStep = last(currentActivity.steps); + + const nextActivity = activities.find( + (activity) => activity.id === targetActivityId, + ); + const nextStep = currentActivity.steps.find( + (step) => step.id === targetStep?.id, + ); + + const isBackward = () => currentActivity.id > targetActivityId; + const isForward = () => currentActivity.id < targetActivityId; + const isStep = () => currentActivity.id === targetActivityId; + + const isStepBackward = () => { + if (!isStep()) { + return false; + } + + if (!targetStep) { + return true; + } + if (currentStep && currentStep.id > targetStep.id) { + return true; + } + + return false; + }; + const isStepForward = () => { + if (!isStep()) { + return false; + } + + if (!currentStep) { + return true; + } + if (targetStep && currentStep.id < targetStep.id) { + return true; + } + + return false; + }; + + if (isBackward()) { + dispatchEvent("Popped", {}); + + if (!nextActivity) { + pushFlag += 1; + push({ + ...targetActivity.enteredBy, + }); + + if ( + targetStep?.enteredBy.name === "StepPushed" || + targetStep?.enteredBy.name === "StepReplaced" + ) { + const { enteredBy } = targetStep; + pushFlag += 1; + stepPush({ + ...enteredBy, + }); + } + } + } + if (isStepBackward()) { + if ( + !nextStep && + targetStep && + (targetStep?.enteredBy.name === "StepPushed" || + targetStep?.enteredBy.name === "StepReplaced") + ) { + const { enteredBy } = targetStep; + + pushFlag += 1; + stepPush({ + ...enteredBy, + }); + } + + dispatchEvent("StepPopped", {}); + } + + if (isForward()) { + pushFlag += 1; + push({ + activityId: targetActivity.id, + activityName: targetActivity.name, + activityParams: targetActivity.params, + }); + } + if (isStepForward()) { + if (!targetStep) { + return; + } + + pushFlag += 1; + stepPush({ + stepId: targetStep.id, + stepParams: targetStep.params, + }); + } + }; + + history.listen(onPopState); + }, + onPushed({ effect: { activity } }) { + if (pushFlag) { + pushFlag -= 1; + return; + } + + const match = activityRoutes.find( + (r) => r.activityName === activity.name, + )!; + + const template = makeTemplate(match, options.urlPatternOptions); + + requestHistoryTick(() => { + silentFlag = true; + pushState({ + history, + pathname: template.fill(activity.params), + state: { + activity, + }, + useHash: options.useHash, + }); + }); + }, + onStepPushed({ effect: { activity, step } }) { + if (pushFlag) { + pushFlag -= 1; + return; + } + + const match = activityRoutes.find( + (r) => r.activityName === activity.name, + )!; + + const template = makeTemplate(match, options.urlPatternOptions); + + requestHistoryTick(() => { + silentFlag = true; + pushState({ + history, + pathname: template.fill(activity.params), + state: { + activity, + step, + }, + useHash: options.useHash, + }); + }); + }, + onReplaced({ effect: { activity } }) { + if (!activity.isActive) { + return; + } + + const match = activityRoutes.find( + (r) => r.activityName === activity.name, + )!; + + const template = makeTemplate(match, options.urlPatternOptions); + + requestHistoryTick(() => { + silentFlag = true; + replaceState({ + history, + pathname: template.fill(activity.params), + state: { + activity, + }, + useHash: options.useHash, + }); + }); + }, + onStepReplaced({ effect: { activity, step } }) { + if (!activity.isActive) { + return; + } + + const match = activityRoutes.find( + (r) => r.activityName === activity.name, + )!; + + const template = makeTemplate(match, options.urlPatternOptions); + + requestHistoryTick(() => { + silentFlag = true; + replaceState({ + history, + pathname: template.fill(activity.params), + state: { + activity, + step, + }, + useHash: options.useHash, + }); + }); + }, + onBeforePush({ actionParams, actions: { overrideActionParams } }) { + const match = activityRoutes.find( + (r) => r.activityName === actionParams.activityName, + )!; + const template = makeTemplate(match, options.urlPatternOptions); + const path = template.fill(actionParams.activityParams); + + overrideActionParams({ + ...actionParams, + activityContext: { + ...actionParams.activityContext, + path, + }, + }); + }, + onBeforeReplace({ + actionParams, + actions: { overrideActionParams, getStack }, + }) { + const match = activityRoutes.find( + (r) => r.activityName === actionParams.activityName, + )!; + const template = makeTemplate(match, options.urlPatternOptions); + const path = template.fill(actionParams.activityParams); + + overrideActionParams({ + ...actionParams, + activityContext: { + ...actionParams.activityContext, + path, + }, + }); + + const { activities } = getStack(); + const enteredActivities = activities.filter( + (currentActivity) => + currentActivity.transitionState === "enter-active" || + currentActivity.transitionState === "enter-done", + ); + const previousActivity = + enteredActivities.length > 0 + ? enteredActivities[enteredActivities.length - 1] + : null; + + if (previousActivity) { + for (let i = 0; i < previousActivity.steps.length - 1; i += 1) { + requestHistoryTick((resolve) => { + if (!parseState(history.location.state)) { + silentFlag = true; + history.back(); + } else { + resolve(); + } + }); + + requestHistoryTick(() => { + silentFlag = true; + history.back(); + }); + } + } + }, + onBeforeStepPop({ actions: { getStack } }) { + const { activities } = getStack(); + const currentActivity = activities.find( + (activity) => activity.isActive, + ); + + if ((currentActivity?.steps.length ?? 0) > 1) { + requestHistoryTick(() => { + silentFlag = true; + history.back(); + }); + } + }, + onBeforePop({ actions: { getStack } }) { + const { activities } = getStack(); + const currentActivity = activities.find( + (activity) => activity.isActive, + ); + + if (currentActivity) { + const { isRoot, steps } = currentActivity; + + const popCount = isRoot ? 0 : steps.length; + + for (let i = 0; i < popCount; i += 1) { + requestHistoryTick((resolve) => { + if (!parseState(history.location.state)) { + silentFlag = true; + history.back(); + } else { + resolve(); + } + }); + + requestHistoryTick(() => { + silentFlag = true; + history.back(); + }); + } + } + }, + ...getOverrides({ activityRoutes, requestHistoryTick }), + }; + }; + + return plugin as P; + }; diff --git a/extensions/plugin-history-sync/src/makeHistoryTaskQueue.ts b/extensions/plugin-history-sync/src/common/makeHistoryTaskQueue.ts similarity index 78% rename from extensions/plugin-history-sync/src/makeHistoryTaskQueue.ts rename to extensions/plugin-history-sync/src/common/makeHistoryTaskQueue.ts index a3b9a9265..30fbeb708 100644 --- a/extensions/plugin-history-sync/src/makeHistoryTaskQueue.ts +++ b/extensions/plugin-history-sync/src/common/makeHistoryTaskQueue.ts @@ -1,15 +1,14 @@ -import type { HistoryQueueContextValue } from "HistoryQueueContext"; import type { History } from "history"; +export type RequestHistoryTick = (cb: (resolve: () => void) => void) => void; + /** * This function is required to avoid any race conditions caused by asynchronous history updates. */ export const makeHistoryTaskQueue = (history: History) => { let previousTask = Promise.resolve(); - const requestHistoryTick: HistoryQueueContextValue["requestHistoryTick"] = ( - cb, - ) => { + const requestHistoryTick: RequestHistoryTick = (cb) => { previousTask = previousTask.then( () => new Promise((resolve) => { diff --git a/extensions/plugin-history-sync/src/makeTemplate.spec.ts b/extensions/plugin-history-sync/src/common/makeTemplate.spec.ts similarity index 100% rename from extensions/plugin-history-sync/src/makeTemplate.spec.ts rename to extensions/plugin-history-sync/src/common/makeTemplate.spec.ts diff --git a/extensions/plugin-history-sync/src/makeTemplate.ts b/extensions/plugin-history-sync/src/common/makeTemplate.ts similarity index 100% rename from extensions/plugin-history-sync/src/makeTemplate.ts rename to extensions/plugin-history-sync/src/common/makeTemplate.ts diff --git a/extensions/plugin-history-sync/src/normalizeActivityRouteMap.spec.ts b/extensions/plugin-history-sync/src/common/normalizeActivityRouteMap.spec.ts similarity index 100% rename from extensions/plugin-history-sync/src/normalizeActivityRouteMap.spec.ts rename to extensions/plugin-history-sync/src/common/normalizeActivityRouteMap.spec.ts diff --git a/extensions/plugin-history-sync/src/normalizeActivityRouteMap.ts b/extensions/plugin-history-sync/src/common/normalizeActivityRouteMap.ts similarity index 100% rename from extensions/plugin-history-sync/src/normalizeActivityRouteMap.ts rename to extensions/plugin-history-sync/src/common/normalizeActivityRouteMap.ts diff --git a/extensions/plugin-history-sync/src/normalizeRouteInput.spec.ts b/extensions/plugin-history-sync/src/common/normalizeRouteInput.spec.ts similarity index 100% rename from extensions/plugin-history-sync/src/normalizeRouteInput.spec.ts rename to extensions/plugin-history-sync/src/common/normalizeRouteInput.spec.ts diff --git a/extensions/plugin-history-sync/src/normalizeRouteInput.ts b/extensions/plugin-history-sync/src/common/normalizeRouteInput.ts similarity index 100% rename from extensions/plugin-history-sync/src/normalizeRouteInput.ts rename to extensions/plugin-history-sync/src/common/normalizeRouteInput.ts diff --git a/extensions/plugin-history-sync/src/sortActivityRoutes.spec.ts b/extensions/plugin-history-sync/src/common/sortActivityRoutes.spec.ts similarity index 100% rename from extensions/plugin-history-sync/src/sortActivityRoutes.spec.ts rename to extensions/plugin-history-sync/src/common/sortActivityRoutes.spec.ts diff --git a/extensions/plugin-history-sync/src/sortActivityRoutes.ts b/extensions/plugin-history-sync/src/common/sortActivityRoutes.ts similarity index 100% rename from extensions/plugin-history-sync/src/sortActivityRoutes.ts rename to extensions/plugin-history-sync/src/common/sortActivityRoutes.ts diff --git a/extensions/plugin-history-sync/src/historySyncPlugin.tsx b/extensions/plugin-history-sync/src/historySyncPlugin.tsx deleted file mode 100644 index e9a821a5d..000000000 --- a/extensions/plugin-history-sync/src/historySyncPlugin.tsx +++ /dev/null @@ -1,545 +0,0 @@ -import type { ActivityDefinition, Config } from "@stackflow/config"; -import { id, makeEvent } from "@stackflow/core"; -import type { StackflowReactPlugin } from "@stackflow/react"; -import type { History, Listener } from "history"; -import { createBrowserHistory, createMemoryHistory } from "history"; -import { HistoryQueueProvider } from "./HistoryQueueContext"; -import type { RouteLike } from "./RouteLike"; -import { RoutesProvider } from "./RoutesContext"; -import { parseState, pushState, replaceState } from "./historyState"; -import { last } from "./last"; -import { makeHistoryTaskQueue } from "./makeHistoryTaskQueue"; -import type { UrlPatternOptions } from "./makeTemplate"; -import { makeTemplate, pathToUrl, urlSearchParamsToMap } from "./makeTemplate"; -import { normalizeActivityRouteMap } from "./normalizeActivityRouteMap"; -import { sortActivityRoutes } from "./sortActivityRoutes"; - -const SECOND = 1000; -const MINUTE = 60 * SECOND; - -type ConfigHistorySync = { - makeTemplate: typeof makeTemplate; - urlPatternOptions?: UrlPatternOptions; -}; - -declare module "@stackflow/config" { - interface ActivityDefinition { - path: string; - } - - interface Config> { - historySync?: ConfigHistorySync; - } -} - -type HistorySyncPluginOptions> = ( - | { - routes: { - [key in keyof T]: RouteLike; - }; - } - | { - config: Config>; - } -) & { - fallbackActivity: (args: { initialContext: any }) => K; - useHash?: boolean; - history?: History; - urlPatternOptions?: UrlPatternOptions; -}; -export function historySyncPlugin< - T extends { [activityName: string]: unknown }, - K extends Extract, ->(options: HistorySyncPluginOptions): StackflowReactPlugin { - if ("config" in options) { - options.config.decorate("historySync", { - makeTemplate, - urlPatternOptions: options.urlPatternOptions, - }); - } - - const history = - options.history ?? - (typeof window === "undefined" - ? createMemoryHistory({}) - : createBrowserHistory({ - window, - })); - - const { location } = history; - - const routes = - "routes" in options - ? options.routes - : options.config.activities.reduce( - (acc, a) => ({ - ...acc, - [a.name]: a.path, - }), - {}, - ); - - const activityRoutes = sortActivityRoutes(normalizeActivityRouteMap(routes)); - - return () => { - let pushFlag = 0; - let silentFlag = false; - - const { requestHistoryTick } = makeHistoryTaskQueue(history); - - return { - key: "plugin-history-sync", - wrapStack({ stack }) { - return ( - - - {stack.render()} - - - ); - }, - overrideInitialEvents({ initialContext }) { - const initialState = parseState(history.location.state); - - if (initialState) { - return [ - { - ...initialState.activity.enteredBy, - name: "Pushed", - }, - ...(initialState.step?.enteredBy.name === "StepPushed" || - initialState.step?.enteredBy.name === "StepReplaced" - ? [ - { - ...initialState.step.enteredBy, - name: "StepPushed" as const, - }, - ] - : []), - ]; - } - - function resolveCurrentPath() { - if ( - initialContext?.req?.path && - typeof initialContext.req.path === "string" - ) { - return initialContext.req.path as string; - } - - if (options.useHash) { - return location.hash.split("#")[1] ?? "/"; - } - - return location.pathname + location.search; - } - - const currentPath = resolveCurrentPath(); - - if (currentPath) { - for (const activityRoute of activityRoutes) { - const template = makeTemplate( - activityRoute, - options.urlPatternOptions, - ); - const activityParams = template.parse(currentPath); - - if (activityParams) { - const activityId = id(); - - return [ - makeEvent("Pushed", { - activityId, - activityName: activityRoute.activityName, - activityParams: { - ...activityParams, - }, - eventDate: new Date().getTime() - MINUTE, - activityContext: { - path: currentPath, - }, - }), - ]; - } - } - } - - const fallbackActivityId = id(); - const fallbackActivityName = options.fallbackActivity({ - initialContext, - }); - const fallbackActivityRoute = activityRoutes.find( - (r) => r.activityName === fallbackActivityName, - ); - const fallbackActivityPath = fallbackActivityRoute?.path; - const fallbackActivityParams = urlSearchParamsToMap( - pathToUrl(currentPath).searchParams, - ); - - return [ - makeEvent("Pushed", { - activityId: fallbackActivityId, - activityName: fallbackActivityName, - activityParams: { - ...fallbackActivityParams, - }, - eventDate: new Date().getTime() - MINUTE, - activityContext: { - path: fallbackActivityPath, - }, - }), - ]; - }, - onInit({ actions: { getStack, dispatchEvent, push, stepPush } }) { - const rootActivity = getStack().activities[0]; - - const match = activityRoutes.find( - (r) => r.activityName === rootActivity.name, - )!; - const template = makeTemplate(match, options.urlPatternOptions); - - const lastStep = last(rootActivity.steps); - - requestHistoryTick(() => - replaceState({ - history, - pathname: template.fill(rootActivity.params), - state: { - activity: rootActivity, - step: lastStep, - }, - useHash: options.useHash, - }), - ); - - const onPopState: Listener = (e) => { - if (silentFlag) { - silentFlag = false; - return; - } - - const state = parseState(e.location.state); - - if (!state) { - return; - } - - const targetActivity = state.activity; - const targetActivityId = state.activity.id; - const targetStep = state.step; - - const { activities } = getStack(); - const currentActivity = activities.find( - (activity) => activity.isActive, - ); - - if (!currentActivity) { - return; - } - - const currentStep = last(currentActivity.steps); - - const nextActivity = activities.find( - (activity) => activity.id === targetActivityId, - ); - const nextStep = currentActivity.steps.find( - (step) => step.id === targetStep?.id, - ); - - const isBackward = () => currentActivity.id > targetActivityId; - const isForward = () => currentActivity.id < targetActivityId; - const isStep = () => currentActivity.id === targetActivityId; - - const isStepBackward = () => { - if (!isStep()) { - return false; - } - - if (!targetStep) { - return true; - } - if (currentStep && currentStep.id > targetStep.id) { - return true; - } - - return false; - }; - const isStepForward = () => { - if (!isStep()) { - return false; - } - - if (!currentStep) { - return true; - } - if (targetStep && currentStep.id < targetStep.id) { - return true; - } - - return false; - }; - - if (isBackward()) { - dispatchEvent("Popped", {}); - - if (!nextActivity) { - pushFlag += 1; - push({ - ...targetActivity.enteredBy, - }); - - if ( - targetStep?.enteredBy.name === "StepPushed" || - targetStep?.enteredBy.name === "StepReplaced" - ) { - const { enteredBy } = targetStep; - pushFlag += 1; - stepPush({ - ...enteredBy, - }); - } - } - } - if (isStepBackward()) { - if ( - !nextStep && - targetStep && - (targetStep?.enteredBy.name === "StepPushed" || - targetStep?.enteredBy.name === "StepReplaced") - ) { - const { enteredBy } = targetStep; - - pushFlag += 1; - stepPush({ - ...enteredBy, - }); - } - - dispatchEvent("StepPopped", {}); - } - - if (isForward()) { - pushFlag += 1; - push({ - activityId: targetActivity.id, - activityName: targetActivity.name, - activityParams: targetActivity.params, - }); - } - if (isStepForward()) { - if (!targetStep) { - return; - } - - pushFlag += 1; - stepPush({ - stepId: targetStep.id, - stepParams: targetStep.params, - }); - } - }; - - history.listen(onPopState); - }, - onPushed({ effect: { activity } }) { - if (pushFlag) { - pushFlag -= 1; - return; - } - - const match = activityRoutes.find( - (r) => r.activityName === activity.name, - )!; - - const template = makeTemplate(match, options.urlPatternOptions); - - requestHistoryTick(() => { - silentFlag = true; - pushState({ - history, - pathname: template.fill(activity.params), - state: { - activity, - }, - useHash: options.useHash, - }); - }); - }, - onStepPushed({ effect: { activity, step } }) { - if (pushFlag) { - pushFlag -= 1; - return; - } - - const match = activityRoutes.find( - (r) => r.activityName === activity.name, - )!; - - const template = makeTemplate(match, options.urlPatternOptions); - - requestHistoryTick(() => { - silentFlag = true; - pushState({ - history, - pathname: template.fill(activity.params), - state: { - activity, - step, - }, - useHash: options.useHash, - }); - }); - }, - onReplaced({ effect: { activity } }) { - if (!activity.isActive) { - return; - } - - const match = activityRoutes.find( - (r) => r.activityName === activity.name, - )!; - - const template = makeTemplate(match, options.urlPatternOptions); - - requestHistoryTick(() => { - silentFlag = true; - replaceState({ - history, - pathname: template.fill(activity.params), - state: { - activity, - }, - useHash: options.useHash, - }); - }); - }, - onStepReplaced({ effect: { activity, step } }) { - if (!activity.isActive) { - return; - } - - const match = activityRoutes.find( - (r) => r.activityName === activity.name, - )!; - - const template = makeTemplate(match, options.urlPatternOptions); - - requestHistoryTick(() => { - silentFlag = true; - replaceState({ - history, - pathname: template.fill(activity.params), - state: { - activity, - step, - }, - useHash: options.useHash, - }); - }); - }, - onBeforePush({ actionParams, actions: { overrideActionParams } }) { - const match = activityRoutes.find( - (r) => r.activityName === actionParams.activityName, - )!; - const template = makeTemplate(match, options.urlPatternOptions); - const path = template.fill(actionParams.activityParams); - - overrideActionParams({ - ...actionParams, - activityContext: { - ...actionParams.activityContext, - path, - }, - }); - }, - onBeforeReplace({ - actionParams, - actions: { overrideActionParams, getStack }, - }) { - const match = activityRoutes.find( - (r) => r.activityName === actionParams.activityName, - )!; - const template = makeTemplate(match, options.urlPatternOptions); - const path = template.fill(actionParams.activityParams); - - overrideActionParams({ - ...actionParams, - activityContext: { - ...actionParams.activityContext, - path, - }, - }); - - const { activities } = getStack(); - const enteredActivities = activities.filter( - (currentActivity) => - currentActivity.transitionState === "enter-active" || - currentActivity.transitionState === "enter-done", - ); - const previousActivity = - enteredActivities.length > 0 - ? enteredActivities[enteredActivities.length - 1] - : null; - - if (previousActivity) { - for (let i = 0; i < previousActivity.steps.length - 1; i += 1) { - requestHistoryTick((resolve) => { - if (!parseState(history.location.state)) { - silentFlag = true; - history.back(); - } else { - resolve(); - } - }); - - requestHistoryTick(() => { - silentFlag = true; - history.back(); - }); - } - } - }, - onBeforeStepPop({ actions: { getStack } }) { - const { activities } = getStack(); - const currentActivity = activities.find( - (activity) => activity.isActive, - ); - - if ((currentActivity?.steps.length ?? 0) > 1) { - requestHistoryTick(() => { - silentFlag = true; - history.back(); - }); - } - }, - onBeforePop({ actions: { getStack } }) { - const { activities } = getStack(); - const currentActivity = activities.find( - (activity) => activity.isActive, - ); - - if (currentActivity) { - const { isRoot, steps } = currentActivity; - - const popCount = isRoot ? 0 : steps.length; - - for (let i = 0; i < popCount; i += 1) { - requestHistoryTick((resolve) => { - if (!parseState(history.location.state)) { - silentFlag = true; - history.back(); - } else { - resolve(); - } - }); - - requestHistoryTick(() => { - silentFlag = true; - history.back(); - }); - } - } - }, - }; - }; -} diff --git a/extensions/plugin-history-sync/src/index.ts b/extensions/plugin-history-sync/src/index.ts deleted file mode 100644 index cb8bb334a..000000000 --- a/extensions/plugin-history-sync/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { useHistoryTick } from "./HistoryQueueContext"; -export * from "./historySyncPlugin"; -export { makeTemplate, UrlPatternOptions } from "./makeTemplate"; -export { useRoutes } from "./RoutesContext"; diff --git a/extensions/plugin-history-sync/src/HistoryQueueContext.tsx b/extensions/plugin-history-sync/src/react/HistoryQueueContext.tsx similarity index 80% rename from extensions/plugin-history-sync/src/HistoryQueueContext.tsx rename to extensions/plugin-history-sync/src/react/HistoryQueueContext.tsx index a402fc053..ad66b400f 100644 --- a/extensions/plugin-history-sync/src/HistoryQueueContext.tsx +++ b/extensions/plugin-history-sync/src/react/HistoryQueueContext.tsx @@ -1,7 +1,9 @@ import { createContext, useContext, useMemo } from "react"; -export type HistoryQueueContextValue = { - requestHistoryTick: (cb: (resolve: () => void) => void) => void; +import type { RequestHistoryTick } from "../common/makeHistoryTaskQueue"; + +type HistoryQueueContextValue = { + requestHistoryTick: RequestHistoryTick; }; export const HistoryQueueContext = createContext({ diff --git a/extensions/plugin-history-sync/src/RoutesContext.tsx b/extensions/plugin-history-sync/src/react/RoutesContext.tsx similarity index 89% rename from extensions/plugin-history-sync/src/RoutesContext.tsx rename to extensions/plugin-history-sync/src/react/RoutesContext.tsx index 561a5022d..f42c71336 100644 --- a/extensions/plugin-history-sync/src/RoutesContext.tsx +++ b/extensions/plugin-history-sync/src/react/RoutesContext.tsx @@ -1,6 +1,6 @@ import { createContext, useContext } from "react"; -import type { ActivityRoute } from "./ActivityRoute"; +import type { ActivityRoute } from "../common/ActivityRoute"; export const RoutesContext = createContext[]>([]); diff --git a/extensions/plugin-history-sync/src/react/historySyncPlugin.tsx b/extensions/plugin-history-sync/src/react/historySyncPlugin.tsx new file mode 100644 index 000000000..f83531077 --- /dev/null +++ b/extensions/plugin-history-sync/src/react/historySyncPlugin.tsx @@ -0,0 +1,19 @@ +import type { StackflowReactPlugin } from "@stackflow/react"; + +import { makeHistorySyncPlugin } from "../common/makeHistorySyncPlugin"; +import { HistoryQueueProvider } from "./HistoryQueueContext"; +import { RoutesProvider } from "./RoutesContext"; + +export const historySyncPlugin = makeHistorySyncPlugin( + ({ activityRoutes, requestHistoryTick }) => ({ + wrapStack({ stack }) { + return ( + + + {stack.render()} + + + ); + }, + }), +); diff --git a/extensions/plugin-history-sync/src/react/index.ts b/extensions/plugin-history-sync/src/react/index.ts new file mode 100644 index 000000000..4deedd92e --- /dev/null +++ b/extensions/plugin-history-sync/src/react/index.ts @@ -0,0 +1,16 @@ +import type { ConfigHistorySync } from "../common/makeHistorySyncPlugin"; + +declare module "@stackflow/config" { + interface ActivityDefinition { + path: string; + } + + interface Config> { + historySync?: ConfigHistorySync; + } +} + +export { makeTemplate, UrlPatternOptions } from "../common/makeTemplate"; +export { useHistoryTick } from "./HistoryQueueContext"; +export * from "./historySyncPlugin"; +export { useRoutes } from "./RoutesContext"; diff --git a/extensions/plugin-history-sync/src/solid/HistoryQueueContext.solid.tsx b/extensions/plugin-history-sync/src/solid/HistoryQueueContext.solid.tsx new file mode 100644 index 000000000..2117734d7 --- /dev/null +++ b/extensions/plugin-history-sync/src/solid/HistoryQueueContext.solid.tsx @@ -0,0 +1,27 @@ +/* @jsxImportSource solid-js */ + +import type { JSXElement } from "solid-js"; +import { createContext, useContext } from "solid-js"; + +import type { RequestHistoryTick } from "../common/makeHistoryTaskQueue"; + +type HistoryQueueContextValue = { + requestHistoryTick: RequestHistoryTick; +}; + +export const HistoryQueueContext = createContext({ + requestHistoryTick: () => {}, +}); + +export const HistoryQueueProvider = ({ + children, + requestHistoryTick, +}: { + children: JSXElement; +} & HistoryQueueContextValue) => ( + + {children} + +); + +export const useHistoryTick = () => useContext(HistoryQueueContext); diff --git a/extensions/plugin-history-sync/src/solid/RoutesContext.solid.tsx b/extensions/plugin-history-sync/src/solid/RoutesContext.solid.tsx new file mode 100644 index 000000000..bcb9acb3f --- /dev/null +++ b/extensions/plugin-history-sync/src/solid/RoutesContext.solid.tsx @@ -0,0 +1,22 @@ +/* @jsxImportSource solid-js */ + +import type { JSXElement } from "solid-js"; +import { createContext, useContext } from "solid-js"; + +import type { ActivityRoute } from "../common/ActivityRoute"; + +export const RoutesContext = createContext[]>([]); + +interface RoutesProviderProps { + routes: ActivityRoute[]; + children: JSXElement; +} +export const RoutesProvider = (props: RoutesProviderProps) => ( + + {props.children} + +); + +export function useRoutes() { + return useContext(RoutesContext); +} diff --git a/extensions/plugin-history-sync/src/solid/historySyncPlugin.solid.tsx b/extensions/plugin-history-sync/src/solid/historySyncPlugin.solid.tsx new file mode 100644 index 000000000..246fe5f7d --- /dev/null +++ b/extensions/plugin-history-sync/src/solid/historySyncPlugin.solid.tsx @@ -0,0 +1,21 @@ +/* @jsxImportSource solid-js */ + +import type { StackflowSolidPlugin } from "@stackflow/solid"; + +import { makeHistorySyncPlugin } from "../common/makeHistorySyncPlugin"; +import { HistoryQueueProvider } from "./HistoryQueueContext.solid"; +import { RoutesProvider } from "./RoutesContext.solid"; + +export const historySyncPlugin = makeHistorySyncPlugin( + ({ activityRoutes, requestHistoryTick }) => ({ + wrapStack({ stack }) { + return ( + + + {stack.render()} + + + ); + }, + }), +); diff --git a/extensions/plugin-history-sync/src/solid/index.ts b/extensions/plugin-history-sync/src/solid/index.ts new file mode 100644 index 000000000..a63876340 --- /dev/null +++ b/extensions/plugin-history-sync/src/solid/index.ts @@ -0,0 +1,16 @@ +import type { ConfigHistorySync } from "../common/makeHistorySyncPlugin"; + +declare module "@stackflow/config" { + interface ActivityDefinition { + path: string; + } + + interface Config> { + historySync?: ConfigHistorySync; + } +} + +export { makeTemplate, UrlPatternOptions } from "../common/makeTemplate"; +export { useHistoryTick } from "./HistoryQueueContext.solid"; +export * from "./historySyncPlugin.solid"; +export { useRoutes } from "./RoutesContext.solid"; diff --git a/extensions/plugin-history-sync/tsconfig.json b/extensions/plugin-history-sync/tsconfig.json index b1d123121..29b29fa22 100644 --- a/extensions/plugin-history-sync/tsconfig.json +++ b/extensions/plugin-history-sync/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "baseUrl": "./src", "outDir": "./dist" }, "exclude": ["./dist"] diff --git a/extensions/plugin-map-initial-activity/package.json b/extensions/plugin-map-initial-activity/package.json index 6f4e00732..e9a641928 100644 --- a/extensions/plugin-map-initial-activity/package.json +++ b/extensions/plugin-map-initial-activity/package.json @@ -33,14 +33,12 @@ "devDependencies": { "@stackflow/core": "^1.1.0", "@stackflow/esbuild-config": "^1.0.3", - "@stackflow/react": "^1.3.2", "esbuild": "^0.23.0", "rimraf": "^3.0.2", "typescript": "^5.5.3" }, "peerDependencies": { - "@stackflow/core": "^1.1.0-canary.0", - "@stackflow/react": "^1.3.2-canary.0" + "@stackflow/core": "^1.1.0-canary.0" }, "publishConfig": { "access": "public" diff --git a/extensions/plugin-map-initial-activity/src/mapInitialActivityPlugin.tsx b/extensions/plugin-map-initial-activity/src/mapInitialActivityPlugin.tsx index 64b9eed70..848770ff2 100644 --- a/extensions/plugin-map-initial-activity/src/mapInitialActivityPlugin.tsx +++ b/extensions/plugin-map-initial-activity/src/mapInitialActivityPlugin.tsx @@ -1,5 +1,5 @@ +import type { StackflowPlugin } from "@stackflow/core"; import { id, makeEvent } from "@stackflow/core"; -import type { StackflowReactPlugin } from "@stackflow/react"; const SECOND = 1000; const MINUTE = 60 * SECOND; @@ -13,7 +13,7 @@ type MapInitialActivityPluginOptions = { export function mapInitialActivityPlugin( options: MapInitialActivityPluginOptions, -): StackflowReactPlugin { +): StackflowPlugin { return () => ({ key: "@stackflow/plugin-override-initial-activity", overrideInitialEvents({ initialEvents }) { diff --git a/extensions/plugin-preload/esbuild.config.js b/extensions/plugin-preload/esbuild.config.js index b84dfb4db..ed8c30685 100644 --- a/extensions/plugin-preload/esbuild.config.js +++ b/extensions/plugin-preload/esbuild.config.js @@ -1,5 +1,6 @@ const { context } = require("esbuild"); const config = require("@stackflow/esbuild-config"); +const { solidPlugin } = require("esbuild-plugin-solid"); const pkg = require("./package.json"); const watch = process.argv.includes("--watch"); @@ -8,22 +9,41 @@ const external = Object.keys({ ...pkg.peerDependencies, }); -Promise.all([ - context({ - ...config({}), - format: "cjs", - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), - ), - context({ - ...config({}), - format: "esm", - outExtension: { - ".js": ".mjs", - }, - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), +const solidEntryPoints = ["./src/solid/index.ts"]; +const allEntryPoints = ["./src/react/index.ts", ...solidEntryPoints]; + +Promise.all( + [ + { jsx: true, browser: false, entryPoints: solidEntryPoints }, + { jsx: false, browser: true, entryPoints: solidEntryPoints }, + { jsx: false, browser: false, entryPoints: allEntryPoints }, + ].flatMap(({ jsx, browser, entryPoints }) => + [ + { format: "cjs", extPrefix: "" }, + { format: "esm", extPrefix: "m" }, + ].map(({ format, extPrefix }) => + context({ + ...config({ + entryPoints, + plugins: !jsx + ? [ + solidPlugin({ + filter: /\.solid\.[cm]?[jt]sx$/, + solid: { generate: browser ? "dom" : "ssr" }, + }), + ] + : [], + }), + outbase: "src", + format, + outExtension: jsx + ? { ".js": `${browser ? ".browser" : ""}.${extPrefix}jsx` } + : { ".js": `${browser ? ".browser" : ""}.${extPrefix}js` }, + jsx: jsx ? "preserve" : undefined, + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + ), ), -]).catch(() => process.exit(1)); +).catch(() => process.exit(1)); diff --git a/extensions/plugin-preload/package.json b/extensions/plugin-preload/package.json index b0dd566b2..9a6ddef86 100644 --- a/extensions/plugin-preload/package.json +++ b/extensions/plugin-preload/package.json @@ -9,14 +9,55 @@ "license": "MIT", "exports": { ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.mjs" + "types": "./dist/react/index.d.ts", + "require": "./dist/react/index.js", + "import": "./dist/react/index.mjs" + }, + "./react": { + "types": "./dist/react/index.d.ts", + "require": "./dist/react/index.js", + "import": "./dist/react/index.mjs" + }, + "./solid": { + "types": "./dist/solid/index.d.ts", + "solid": { + "require": "./dist/solid/index.jsx", + "import": "./dist/solid/index.mjsx" + }, + "browser": { + "require": { + "solid": "./dist/solid/index.browser.jsx", + "default": "./dist/solid/index.browser.js" + }, + "import": { + "solid": "./dist/solid/index.browser.mjsx", + "default": "./dist/solid/index.browser.mjs" + } + }, + "default": { + "require": { + "default": "./dist/solid/index.js" + }, + "import": { + "solid": "./dist/solid/index.mjsx", + "default": "./dist/solid/index.mjs" + } + } + } + }, + "main": "./dist/react/index.js", + "module": "./dist/react/index.mjs", + "types": "./dist/react/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/react/index.d.ts" + ], + "solid": [ + "dist/solid/index.d.ts" + ] } }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", "files": [ "dist", "src", @@ -35,18 +76,40 @@ "@stackflow/esbuild-config": "^1.0.3", "@stackflow/plugin-history-sync": "^1.7.0", "@stackflow/react": "^1.4.0", + "@stackflow/solid": "^1.4.0", "@types/react": "^18.3.3", "esbuild": "^0.23.0", + "esbuild-plugin-solid": "^0.6.0", "react": "^18.3.1", "rimraf": "^3.0.2", + "solid-js": "^1.8.18", "typescript": "^5.5.3" }, "peerDependencies": { "@stackflow/core": "^1.1.0-canary.0", "@stackflow/plugin-history-sync": "^1.6.4-canary.0", "@stackflow/react": "^1.3.2-canary.0", + "@stackflow/solid": "^1.3.2-canary.0", "@types/react": ">=16.8.0", - "react": ">=16.8.0" + "react": ">=16.8.0", + "solid-js": ">=1.4.0" + }, + "peerDependenciesMeta": { + "@stackflow/react": { + "optional": true + }, + "@stackflow/solid": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "solid-js": { + "optional": true + } }, "publishConfig": { "access": "public" diff --git a/extensions/plugin-preload/src/Loader.ts b/extensions/plugin-preload/src/common/Loader.ts similarity index 76% rename from extensions/plugin-preload/src/Loader.ts rename to extensions/plugin-preload/src/common/Loader.ts index b6d697d47..f58cf40b3 100644 --- a/extensions/plugin-preload/src/Loader.ts +++ b/extensions/plugin-preload/src/common/Loader.ts @@ -5,3 +5,7 @@ export type Loader

= isInitialActivity?: boolean; initialContext?: any; }) => unknown; + +export type LoadersMap = { + [activityName in string]?: Loader; +}; diff --git a/extensions/plugin-preload/src/common/activityComponentType.ts b/extensions/plugin-preload/src/common/activityComponentType.ts new file mode 100644 index 000000000..2203788fc --- /dev/null +++ b/extensions/plugin-preload/src/common/activityComponentType.ts @@ -0,0 +1,25 @@ +// @ts-ignore: optional peer dependency +import type { ActivityComponentType as ReactActivityComponentType } from "@stackflow/react"; +// @ts-ignore: optional peer dependency +import type { ActivityComponentType as SolidActivityComponentType } from "@stackflow/solid"; + +// each ActivityComponentType will be `any` if the dep is not installed, so convert it to `never` if it's `any` +type NeverOnAny = unknown extends T + ? [keyof T] extends [never] + ? T + : never + : T; +export type MaybeReactActivityComponentType< + T extends Record, +> = NeverOnAny>; +export type MaybeSolidActivityComponentType< + T extends Record, +> = NeverOnAny>; + +export type ActivityParams = T extends MaybeReactActivityComponentType< + infer U +> + ? U + : T extends MaybeSolidActivityComponentType + ? U + : Record; diff --git a/extensions/plugin-preload/src/common/makePreloadPlugin.tsx b/extensions/plugin-preload/src/common/makePreloadPlugin.tsx new file mode 100644 index 000000000..b2e6d575c --- /dev/null +++ b/extensions/plugin-preload/src/common/makePreloadPlugin.tsx @@ -0,0 +1,107 @@ +import type { StackflowPlugin } from "@stackflow/core"; + +import type { Loader } from "./Loader"; +import type { ActivityParams } from "./activityComponentType"; + +export type PreloadPluginOptions< + T extends { [activityName: string]: unknown }, +> = { + loaders: { + [K in Extract]?: Loader>; + }; +}; + +export const makePreloadPlugin = +

( + getOverrides: (args: { + options: PreloadPluginOptions>; + }) => Omit, keyof ReturnType>, + ) => + ( + options: PreloadPluginOptions, + ): P => { + const plugin: StackflowPlugin = () => ({ + key: "plugin-preload", + overrideInitialEvents({ initialEvents, initialContext }) { + if (initialEvents.length === 0) { + return []; + } + + return initialEvents.map((event) => { + if (event.name !== "Pushed") { + return event; + } + + const { activityName, activityParams, activityContext } = event; + + const loader = options.loaders[activityName] as Loader | undefined; + + if (!loader) { + return event; + } + + const preloadRef = loader({ + activityParams, + activityContext, + isInitialActivity: true, + initialContext, + }); + + return { + ...event, + activityContext: { + ...event.activityContext, + preloadRef, + }, + }; + }); + }, + onBeforePush({ actionParams, actions: { overrideActionParams } }) { + const { activityName, activityParams, activityContext } = actionParams; + + const loader = options.loaders[activityName] as Loader | undefined; + + if (!loader) { + return; + } + + const preloadRef = loader({ + activityParams, + activityContext, + }); + + overrideActionParams({ + ...actionParams, + activityContext: { + ...activityContext, + preloadRef, + }, + }); + }, + onBeforeReplace({ actionParams, actions: { overrideActionParams } }) { + const { activityName, activityParams, activityContext } = actionParams; + + const loader = options.loaders[activityName] as Loader | undefined; + + if (!loader) { + return; + } + + const preloadRef = loader({ + activityParams, + activityContext, + }); + + overrideActionParams({ + ...actionParams, + activityContext: { + ...activityContext, + preloadRef, + }, + }); + }, + ...getOverrides({ options }), + }); + + return plugin as P; + }; diff --git a/extensions/plugin-preload/src/common/makePreloader.ts b/extensions/plugin-preload/src/common/makePreloader.ts new file mode 100644 index 000000000..feb3e4209 --- /dev/null +++ b/extensions/plugin-preload/src/common/makePreloader.ts @@ -0,0 +1,58 @@ +import type { + UrlPatternOptions, + makeTemplate, +} from "@stackflow/plugin-history-sync"; + +import type { LoadersMap } from "./Loader"; +import type { ActivityParams } from "./activityComponentType"; + +export type PreloadFunc = < + K extends Extract, +>( + activityName: K, + activityParams: ActivityParams, + options?: { + activityContext?: {}; + }, +) => any; +export type Preloader = { + preload: PreloadFunc; +}; + +type MakeTemplate = typeof makeTemplate; + +export const makePreloader = < + T extends { [activityName: string]: unknown }, +>(args: { + loaders: LoadersMap; + routes: { activityName: string }[]; + makeTemplate: MakeTemplate; + urlPatternOptions?: UrlPatternOptions; +}): Preloader => ({ + preload(activityName, activityParams, options) { + const loader = args.loaders[activityName]; + + if (!loader) { + return null; + } + + const match = args.routes.find((r) => r.activityName === activityName); + + const template = match + ? args.makeTemplate( + match as unknown as Parameters[0], + args?.urlPatternOptions, + ) + : undefined; + + const path = template?.fill(activityParams); + + return loader({ + activityParams, + activityContext: { + ...(path ? { path } : null), + ...options?.activityContext, + }, + }); + }, +}); diff --git a/extensions/plugin-preload/src/pluginPreload.tsx b/extensions/plugin-preload/src/pluginPreload.tsx deleted file mode 100644 index 4f34a2880..000000000 --- a/extensions/plugin-preload/src/pluginPreload.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import type { - ActivityComponentType, - StackflowReactPlugin, -} from "@stackflow/react"; - -import type { Loader } from "./Loader"; -import { LoadersProvider } from "./LoadersContext"; - -export type PreloadPluginOptions< - T extends { [activityName: string]: unknown }, -> = { - loaders: { - [key in Extract]?: T[key] extends ActivityComponentType< - infer U - > - ? Loader - : Loader<{}>; - }; -}; - -export function preloadPlugin( - options: PreloadPluginOptions, -): StackflowReactPlugin { - return () => ({ - key: "plugin-preload", - wrapStack({ stack }) { - return ( - - {stack.render()} - - ); - }, - overrideInitialEvents({ initialEvents, initialContext }) { - if (initialEvents.length === 0) { - return []; - } - - return initialEvents.map((event) => { - if (event.name !== "Pushed") { - return event; - } - - const { activityName, activityParams, activityContext } = event; - - const loader = options.loaders[activityName]; - - if (!loader) { - return event; - } - - const preloadRef = loader({ - activityParams, - activityContext, - isInitialActivity: true, - initialContext, - }); - - return { - ...event, - activityContext: { - ...event.activityContext, - preloadRef, - }, - }; - }); - }, - onBeforePush({ actionParams, actions: { overrideActionParams } }) { - const { activityName, activityParams, activityContext } = actionParams; - - const loader = options.loaders[activityName]; - - if (!loader) { - return; - } - - const preloadRef = loader({ - activityParams, - activityContext, - }); - - overrideActionParams({ - ...actionParams, - activityContext: { - ...activityContext, - preloadRef, - }, - }); - }, - onBeforeReplace({ actionParams, actions: { overrideActionParams } }) { - const { activityName, activityParams, activityContext } = actionParams; - - const loader = options.loaders[activityName]; - - if (!loader) { - return; - } - - const preloadRef = loader({ - activityParams, - activityContext, - }); - - overrideActionParams({ - ...actionParams, - activityContext: { - ...activityContext, - preloadRef, - }, - }); - }, - }); -} diff --git a/extensions/plugin-preload/src/LoadersContext.tsx b/extensions/plugin-preload/src/react/LoadersContext.tsx similarity index 82% rename from extensions/plugin-preload/src/LoadersContext.tsx rename to extensions/plugin-preload/src/react/LoadersContext.tsx index f51eb9c0a..5bdf4d89e 100644 --- a/extensions/plugin-preload/src/LoadersContext.tsx +++ b/extensions/plugin-preload/src/react/LoadersContext.tsx @@ -1,10 +1,6 @@ import { createContext, useContext } from "react"; -import type { Loader } from "./Loader"; - -export type LoadersMap = { - [activityName in string]?: Loader; -}; +import type { LoadersMap } from "../common/Loader"; export const LoadersContext = createContext({}); diff --git a/extensions/plugin-preload/src/createPreloader.ts b/extensions/plugin-preload/src/react/createPreloader.ts similarity index 63% rename from extensions/plugin-preload/src/createPreloader.ts rename to extensions/plugin-preload/src/react/createPreloader.ts index 066d64350..da86a52bd 100644 --- a/extensions/plugin-preload/src/createPreloader.ts +++ b/extensions/plugin-preload/src/react/createPreloader.ts @@ -1,10 +1,10 @@ -import type { PreloadFunc } from "./usePreloader"; +import type { Preloader } from "../common/makePreloader"; import { usePreloader } from "./usePreloader"; export function createPreloader< T extends { [activityName: string]: unknown }, >(): { - usePreloader: () => { preload: PreloadFunc }; + usePreloader: () => Preloader; } { return { usePreloader, diff --git a/extensions/plugin-preload/src/index.ts b/extensions/plugin-preload/src/react/index.ts similarity index 77% rename from extensions/plugin-preload/src/index.ts rename to extensions/plugin-preload/src/react/index.ts index fdb9211ec..eff77bd0a 100644 --- a/extensions/plugin-preload/src/index.ts +++ b/extensions/plugin-preload/src/react/index.ts @@ -1,5 +1,6 @@ export * from "./createPreloader"; export { useLoaders } from "./LoadersContext"; +export { PreloadFunc } from "../common/makePreloader"; export * from "./pluginPreload"; export * from "./useActivityPreloadRef"; export * from "./usePreloader"; diff --git a/extensions/plugin-preload/src/react/pluginPreload.tsx b/extensions/plugin-preload/src/react/pluginPreload.tsx new file mode 100644 index 000000000..b0c996644 --- /dev/null +++ b/extensions/plugin-preload/src/react/pluginPreload.tsx @@ -0,0 +1,16 @@ +import type { StackflowReactPlugin } from "@stackflow/react"; + +import { makePreloadPlugin } from "../common/makePreloadPlugin"; +import { LoadersProvider } from "./LoadersContext"; + +export const preloadPlugin = makePreloadPlugin( + ({ options }) => ({ + wrapStack({ stack }) { + return ( + + {stack.render()} + + ); + }, + }), +); diff --git a/extensions/plugin-preload/src/useActivityPreloadRef.ts b/extensions/plugin-preload/src/react/useActivityPreloadRef.ts similarity index 100% rename from extensions/plugin-preload/src/useActivityPreloadRef.ts rename to extensions/plugin-preload/src/react/useActivityPreloadRef.ts diff --git a/extensions/plugin-preload/src/react/usePreloader.ts b/extensions/plugin-preload/src/react/usePreloader.ts new file mode 100644 index 000000000..2da1cf3ad --- /dev/null +++ b/extensions/plugin-preload/src/react/usePreloader.ts @@ -0,0 +1,28 @@ +import type { UrlPatternOptions } from "@stackflow/plugin-history-sync/react"; +import { makeTemplate, useRoutes } from "@stackflow/plugin-history-sync/react"; +import { useMemo } from "react"; + +import { type Preloader, makePreloader } from "../common/makePreloader"; +import { useLoaders } from "./LoadersContext"; + +export type UsePreloaderOptions = { + urlPatternOptions?: UrlPatternOptions; +}; + +export function usePreloader( + usePreloaderOptions?: UsePreloaderOptions, +): Preloader { + const loaders = useLoaders(); + const routes = useRoutes(); + + return useMemo( + () => + makePreloader({ + loaders, + routes, + makeTemplate, + urlPatternOptions: usePreloaderOptions?.urlPatternOptions, + }), + [loaders], + ); +} diff --git a/extensions/plugin-preload/src/solid/LoadersContext.solid.tsx b/extensions/plugin-preload/src/solid/LoadersContext.solid.tsx new file mode 100644 index 000000000..620b44397 --- /dev/null +++ b/extensions/plugin-preload/src/solid/LoadersContext.solid.tsx @@ -0,0 +1,26 @@ +/* @jsxImportSource solid-js */ + +import { + type Component, + type JSXElement, + createContext, + useContext, +} from "solid-js"; + +import type { LoadersMap } from "../common/Loader"; + +export const LoadersContext = createContext<() => LoadersMap>(() => ({})); + +interface LoadersProviderProps { + loaders: LoadersMap; + children: JSXElement; +} +export const LoadersProvider: Component = (props) => ( + props.loaders}> + {props.children} + +); + +export function useLoaders() { + return useContext(LoadersContext); +} diff --git a/extensions/plugin-preload/src/solid/createPreloader.ts b/extensions/plugin-preload/src/solid/createPreloader.ts new file mode 100644 index 000000000..1e833fbe2 --- /dev/null +++ b/extensions/plugin-preload/src/solid/createPreloader.ts @@ -0,0 +1,12 @@ +import type { Preloader } from "../common/makePreloader"; +import { usePreloader } from "./usePreloader"; + +export function createPreloader< + T extends { [activityName: string]: unknown }, +>(): { + usePreloader: () => () => Preloader; +} { + return { + usePreloader, + }; +} diff --git a/extensions/plugin-preload/src/solid/index.ts b/extensions/plugin-preload/src/solid/index.ts new file mode 100644 index 000000000..f9b4b050c --- /dev/null +++ b/extensions/plugin-preload/src/solid/index.ts @@ -0,0 +1,6 @@ +export * from "./createPreloader"; +export { useLoaders } from "./LoadersContext.solid"; +export { PreloadFunc } from "../common/makePreloader"; +export * from "./pluginPreload.solid"; +export * from "./useActivityPreloadRef"; +export * from "./usePreloader"; diff --git a/extensions/plugin-preload/src/solid/pluginPreload.solid.tsx b/extensions/plugin-preload/src/solid/pluginPreload.solid.tsx new file mode 100644 index 000000000..492db9491 --- /dev/null +++ b/extensions/plugin-preload/src/solid/pluginPreload.solid.tsx @@ -0,0 +1,18 @@ +/* @jsxImportSource solid-js */ + +import type { StackflowSolidPlugin } from "@stackflow/solid"; + +import { makePreloadPlugin } from "../common/makePreloadPlugin"; +import { LoadersProvider } from "./LoadersContext.solid"; + +export const preloadPlugin = makePreloadPlugin( + ({ options }) => ({ + wrapStack({ stack }) { + return ( + + {stack.render()} + + ); + }, + }), +); diff --git a/extensions/plugin-preload/src/solid/useActivityPreloadRef.ts b/extensions/plugin-preload/src/solid/useActivityPreloadRef.ts new file mode 100644 index 000000000..bcba8accb --- /dev/null +++ b/extensions/plugin-preload/src/solid/useActivityPreloadRef.ts @@ -0,0 +1,11 @@ +import { useActivity } from "@stackflow/solid"; + +/** + * Get current activity preload reference + */ +export function useActivityPreloadRef(): () => T { + const activity = useActivity(); + const activityContext = () => activity()?.context as any; + + return () => activityContext()?.preloadRef; +} diff --git a/extensions/plugin-preload/src/solid/usePreloader.ts b/extensions/plugin-preload/src/solid/usePreloader.ts new file mode 100644 index 000000000..b8d8f876b --- /dev/null +++ b/extensions/plugin-preload/src/solid/usePreloader.ts @@ -0,0 +1,26 @@ +import type { UrlPatternOptions } from "@stackflow/plugin-history-sync/solid"; +import { makeTemplate, useRoutes } from "@stackflow/plugin-history-sync/solid"; + +import { createMemo } from "solid-js"; +import { type Preloader, makePreloader } from "../common/makePreloader"; +import { useLoaders } from "./LoadersContext.solid"; + +export type UsePreloaderOptions = { + urlPatternOptions?: UrlPatternOptions; +}; + +export function usePreloader( + usePreloaderOptions?: UsePreloaderOptions, +): () => Preloader { + const loaders = useLoaders(); + const routes = useRoutes(); + + return createMemo(() => + makePreloader({ + loaders: loaders(), + routes, + makeTemplate, + urlPatternOptions: usePreloaderOptions?.urlPatternOptions, + }), + ); +} diff --git a/extensions/plugin-preload/src/usePreloader.ts b/extensions/plugin-preload/src/usePreloader.ts deleted file mode 100644 index 134fcf893..000000000 --- a/extensions/plugin-preload/src/usePreloader.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { UrlPatternOptions } from "@stackflow/plugin-history-sync"; -import { makeTemplate, useRoutes } from "@stackflow/plugin-history-sync"; -import type { ActivityComponentType } from "@stackflow/react"; -import { useMemo } from "react"; - -import { useLoaders } from "./LoadersContext"; - -export type PreloadFunc = < - K extends Extract, ->( - activityName: K, - activityParams: T[K] extends ActivityComponentType ? U : {}, - options?: { - activityContext?: {}; - }, -) => any; - -export type UsePreloaderOptions = { - urlPatternOptions?: UrlPatternOptions; -}; - -export function usePreloader( - usePreloaderOptions?: UsePreloaderOptions, -): { - preload: PreloadFunc; -} { - const loaders = useLoaders(); - const routes = useRoutes(); - - return useMemo( - () => ({ - preload(activityName, activityParams, options) { - const loader = loaders[activityName]; - - if (!loader) { - return null; - } - - const match = routes.find((r) => r.activityName === activityName); - - const template = match - ? makeTemplate(match, usePreloaderOptions?.urlPatternOptions) - : undefined; - - const path = template?.fill(activityParams); - - return loader({ - activityParams, - activityContext: { - ...(path ? { path } : null), - ...options?.activityContext, - }, - }); - }, - }), - [loaders], - ); -} diff --git a/extensions/plugin-preload/tsconfig.json b/extensions/plugin-preload/tsconfig.json index b1d123121..29b29fa22 100644 --- a/extensions/plugin-preload/tsconfig.json +++ b/extensions/plugin-preload/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "baseUrl": "./src", "outDir": "./dist" }, "exclude": ["./dist"] diff --git a/extensions/plugin-renderer-basic/esbuild.config.js b/extensions/plugin-renderer-basic/esbuild.config.js index b84dfb4db..9f95e9afc 100644 --- a/extensions/plugin-renderer-basic/esbuild.config.js +++ b/extensions/plugin-renderer-basic/esbuild.config.js @@ -1,5 +1,6 @@ const { context } = require("esbuild"); const config = require("@stackflow/esbuild-config"); +const { solidPlugin } = require("esbuild-plugin-solid"); const pkg = require("./package.json"); const watch = process.argv.includes("--watch"); @@ -8,22 +9,41 @@ const external = Object.keys({ ...pkg.peerDependencies, }); -Promise.all([ - context({ - ...config({}), - format: "cjs", - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), - ), - context({ - ...config({}), - format: "esm", - outExtension: { - ".js": ".mjs", - }, - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), +const solidEntryPoints = ["./src/solid.tsx"]; +const allEntryPoints = ["./src/react.tsx", ...solidEntryPoints]; + +Promise.all( + [ + { jsx: true, browser: false, entryPoints: solidEntryPoints }, + { jsx: false, browser: true, entryPoints: solidEntryPoints }, + { jsx: false, browser: false, entryPoints: allEntryPoints }, + ].flatMap(({ jsx, browser, entryPoints }) => + [ + { format: "cjs", extPrefix: "" }, + { format: "esm", extPrefix: "m" }, + ].map(({ format, extPrefix }) => + context({ + ...config({ + entryPoints, + plugins: !jsx + ? [ + solidPlugin({ + filter: /(?:^|\/)solid\.tsx$/, + solid: { generate: browser ? "dom" : "ssr" }, + }), + ] + : [], + }), + outbase: "src", + format, + outExtension: jsx + ? { ".js": `${browser ? ".browser" : ""}.${extPrefix}jsx` } + : { ".js": `${browser ? ".browser" : ""}.${extPrefix}js` }, + jsx: jsx ? "preserve" : undefined, + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + ), ), -]).catch(() => process.exit(1)); +).catch(() => process.exit(1)); diff --git a/extensions/plugin-renderer-basic/package.json b/extensions/plugin-renderer-basic/package.json index a18ccf1eb..f43153330 100644 --- a/extensions/plugin-renderer-basic/package.json +++ b/extensions/plugin-renderer-basic/package.json @@ -9,14 +9,44 @@ "license": "MIT", "exports": { ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.mjs" + "types": "./dist/react.d.ts", + "require": "./dist/react.js", + "import": "./dist/react.mjs" + }, + "./react": { + "types": "./dist/react.d.ts", + "require": "./dist/react.js", + "import": "./dist/react.mjs" + }, + "./solid": { + "types": "./dist/solid.d.ts", + "solid": { + "require": "./dist/solid.jsx", + "import": "./dist/solid.mjsx" + }, + "browser": { + "require": "./dist/solid.browser.js", + "import": "./dist/solid.browser.mjs" + }, + "default": { + "require": "./dist/solid.js", + "import": "./dist/solid.mjs" + } + } + }, + "main": "./dist/react.js", + "module": "./dist/react.mjs", + "types": "./dist/react.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/react.d.ts" + ], + "solid": [ + "dist/solid.d.ts" + ] } }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", "files": [ "dist", "src", @@ -34,17 +64,39 @@ "@stackflow/core": "^1.1.0", "@stackflow/esbuild-config": "^1.0.3", "@stackflow/react": "^1.3.2", + "@stackflow/solid": "^1.3.0", "@types/react": "^18.3.3", "esbuild": "^0.23.0", + "esbuild-plugin-solid": "^0.6.0", "react": "^18.3.1", "rimraf": "^3.0.2", + "solid-js": "^1.8.18", "typescript": "^5.5.3" }, "peerDependencies": { "@stackflow/core": "^1.1.0-canary.0", "@stackflow/react": "^1.3.2-canary.0", + "@stackflow/solid": "^1.3.2-canary.0", "@types/react": ">=16.8.0", - "react": ">=16.8.0" + "react": ">=16.8.0", + "solid-js": ">=1.4.0" + }, + "peerDependenciesMeta": { + "@stackflow/react": { + "optional": true + }, + "@stackflow/solid": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "solid-js": { + "optional": true + } }, "publishConfig": { "access": "public" diff --git a/extensions/plugin-renderer-basic/src/index.ts b/extensions/plugin-renderer-basic/src/index.ts deleted file mode 100644 index 2a5877797..000000000 --- a/extensions/plugin-renderer-basic/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./basicRendererPlugin"; diff --git a/extensions/plugin-renderer-basic/src/basicRendererPlugin.tsx b/extensions/plugin-renderer-basic/src/react.tsx similarity index 100% rename from extensions/plugin-renderer-basic/src/basicRendererPlugin.tsx rename to extensions/plugin-renderer-basic/src/react.tsx diff --git a/extensions/plugin-renderer-basic/src/solid.tsx b/extensions/plugin-renderer-basic/src/solid.tsx new file mode 100644 index 000000000..883253b20 --- /dev/null +++ b/extensions/plugin-renderer-basic/src/solid.tsx @@ -0,0 +1,21 @@ +/* @jsxImportSource solid-js */ + +import type { StackflowSolidPlugin } from "@stackflow/solid"; +import { For, Show } from "solid-js"; + +export function basicRendererPlugin(): StackflowSolidPlugin { + return () => ({ + key: "plugin-renderer-basic", + render({ stack }) { + return ( + + {(activity) => ( + + {activity.render()} + + )} + + ); + }, + }); +} diff --git a/extensions/plugin-renderer-basic/tsconfig.json b/extensions/plugin-renderer-basic/tsconfig.json index b1d123121..29b29fa22 100644 --- a/extensions/plugin-renderer-basic/tsconfig.json +++ b/extensions/plugin-renderer-basic/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "baseUrl": "./src", "outDir": "./dist" }, "exclude": ["./dist"] diff --git a/extensions/plugin-renderer-web/esbuild.config.js b/extensions/plugin-renderer-web/esbuild.config.js index b84dfb4db..9f95e9afc 100644 --- a/extensions/plugin-renderer-web/esbuild.config.js +++ b/extensions/plugin-renderer-web/esbuild.config.js @@ -1,5 +1,6 @@ const { context } = require("esbuild"); const config = require("@stackflow/esbuild-config"); +const { solidPlugin } = require("esbuild-plugin-solid"); const pkg = require("./package.json"); const watch = process.argv.includes("--watch"); @@ -8,22 +9,41 @@ const external = Object.keys({ ...pkg.peerDependencies, }); -Promise.all([ - context({ - ...config({}), - format: "cjs", - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), - ), - context({ - ...config({}), - format: "esm", - outExtension: { - ".js": ".mjs", - }, - external, - }).then((ctx) => - watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), +const solidEntryPoints = ["./src/solid.tsx"]; +const allEntryPoints = ["./src/react.tsx", ...solidEntryPoints]; + +Promise.all( + [ + { jsx: true, browser: false, entryPoints: solidEntryPoints }, + { jsx: false, browser: true, entryPoints: solidEntryPoints }, + { jsx: false, browser: false, entryPoints: allEntryPoints }, + ].flatMap(({ jsx, browser, entryPoints }) => + [ + { format: "cjs", extPrefix: "" }, + { format: "esm", extPrefix: "m" }, + ].map(({ format, extPrefix }) => + context({ + ...config({ + entryPoints, + plugins: !jsx + ? [ + solidPlugin({ + filter: /(?:^|\/)solid\.tsx$/, + solid: { generate: browser ? "dom" : "ssr" }, + }), + ] + : [], + }), + outbase: "src", + format, + outExtension: jsx + ? { ".js": `${browser ? ".browser" : ""}.${extPrefix}jsx` } + : { ".js": `${browser ? ".browser" : ""}.${extPrefix}js` }, + jsx: jsx ? "preserve" : undefined, + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + ), ), -]).catch(() => process.exit(1)); +).catch(() => process.exit(1)); diff --git a/extensions/plugin-renderer-web/package.json b/extensions/plugin-renderer-web/package.json index 09c8e87fd..9c387aae0 100644 --- a/extensions/plugin-renderer-web/package.json +++ b/extensions/plugin-renderer-web/package.json @@ -9,14 +9,44 @@ "license": "MIT", "exports": { ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.mjs" + "types": "./dist/react.d.ts", + "require": "./dist/react.js", + "import": "./dist/react.mjs" + }, + "./react": { + "types": "./dist/react.d.ts", + "require": "./dist/react.js", + "import": "./dist/react.mjs" + }, + "./solid": { + "types": "./dist/solid.d.ts", + "solid": { + "require": "./dist/solid.jsx", + "import": "./dist/solid.mjsx" + }, + "browser": { + "require": "./dist/solid.browser.js", + "import": "./dist/solid.browser.mjs" + }, + "default": { + "require": "./dist/solid.js", + "import": "./dist/solid.mjs" + } + } + }, + "main": "./dist/react.js", + "module": "./dist/react.mjs", + "types": "./dist/react.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/react.d.ts" + ], + "solid": [ + "dist/solid.d.ts" + ] } }, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", "files": [ "dist", "src", @@ -34,17 +64,39 @@ "@stackflow/core": "^1.1.0", "@stackflow/esbuild-config": "^1.0.3", "@stackflow/react": "^1.3.2", + "@stackflow/solid": "^1.3.0", "@types/react": "^18.3.3", "esbuild": "^0.23.0", + "esbuild-plugin-solid": "^0.6.0", "react": "^18.3.1", "rimraf": "^3.0.2", + "solid-js": "^1.8.18", "typescript": "^5.5.3" }, "peerDependencies": { "@stackflow/core": "^1.1.0-canary.0", "@stackflow/react": "^1.3.2-canary.0", + "@stackflow/solid": "^1.3.2-canary.0", "@types/react": ">=16.8.0", - "react": ">=16.8.0" + "react": ">=16.8.0", + "solid-js": ">=1.4.0" + }, + "peerDependenciesMeta": { + "@stackflow/react": { + "optional": true + }, + "@stackflow/solid": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "solid-js": { + "optional": true + } }, "publishConfig": { "access": "public" diff --git a/extensions/plugin-renderer-web/src/index.ts b/extensions/plugin-renderer-web/src/index.ts deleted file mode 100644 index 510e9d7e0..000000000 --- a/extensions/plugin-renderer-web/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./webRendererPlugin"; diff --git a/extensions/plugin-renderer-web/src/webRendererPlugin.tsx b/extensions/plugin-renderer-web/src/react.tsx similarity index 100% rename from extensions/plugin-renderer-web/src/webRendererPlugin.tsx rename to extensions/plugin-renderer-web/src/react.tsx diff --git a/extensions/plugin-renderer-web/src/solid.tsx b/extensions/plugin-renderer-web/src/solid.tsx new file mode 100644 index 000000000..a5b50e035 --- /dev/null +++ b/extensions/plugin-renderer-web/src/solid.tsx @@ -0,0 +1,19 @@ +/* @jsxImportSource solid-js */ + +import type { StackflowSolidPlugin } from "@stackflow/solid"; +import { For, Show } from "solid-js"; + +export function webRendererPlugin(): StackflowSolidPlugin { + return () => ({ + key: "plugin-renderer-web-solid", + render({ stack }) { + return ( + + {(activity) => ( + {activity.render()} + )} + + ); + }, + }); +} diff --git a/extensions/plugin-renderer-web/tsconfig.json b/extensions/plugin-renderer-web/tsconfig.json index b1d123121..29b29fa22 100644 --- a/extensions/plugin-renderer-web/tsconfig.json +++ b/extensions/plugin-renderer-web/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "baseUrl": "./src", "outDir": "./dist" }, "exclude": ["./dist"] diff --git a/extensions/react-ui-core/src/useMounted.ts b/extensions/react-ui-core/src/useMounted.ts index fca57ad33..e07a18d11 100644 --- a/extensions/react-ui-core/src/useMounted.ts +++ b/extensions/react-ui-core/src/useMounted.ts @@ -1,4 +1,4 @@ -import { useEffect, useReducer, useState } from "react"; +import { useEffect, useReducer } from "react"; export function useMounted() { const [mounted, mount] = useReducer(() => true, false); diff --git a/extensions/solid-ui-core/README.md b/extensions/solid-ui-core/README.md new file mode 100644 index 000000000..328ceb039 --- /dev/null +++ b/extensions/solid-ui-core/README.md @@ -0,0 +1,3 @@ +# @stackflow/solid-ui-core + +TBD diff --git a/extensions/solid-ui-core/esbuild.config.js b/extensions/solid-ui-core/esbuild.config.js new file mode 100644 index 000000000..bfcc8c016 --- /dev/null +++ b/extensions/solid-ui-core/esbuild.config.js @@ -0,0 +1,33 @@ +const { context } = require("esbuild"); +const config = require("@stackflow/esbuild-config"); +const { solidPlugin } = require("esbuild-plugin-solid"); +const pkg = require("./package.json"); + +const watch = process.argv.includes("--watch"); +const external = Object.keys({ + ...pkg.dependencies, + ...pkg.peerDependencies, +}); + +Promise.all( + [true, false].flatMap((jsx) => + [ + { format: "cjs", extPrefix: "" }, + { format: "esm", extPrefix: "m" }, + ].map(({ format, extPrefix }) => + context({ + ...config({ + plugins: !jsx ? [solidPlugin({ solid: { generate: "dom" } })] : [], + }), + format, + outExtension: jsx + ? { ".js": `.${extPrefix}jsx` } + : { ".js": `.${extPrefix}js` }, + jsx: "preserve", + external, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + ), + ), +).catch(() => process.exit(1)); diff --git a/extensions/solid-ui-core/package.json b/extensions/solid-ui-core/package.json new file mode 100644 index 000000000..5821b7b1a --- /dev/null +++ b/extensions/solid-ui-core/package.json @@ -0,0 +1,58 @@ +{ + "name": "@stackflow/solid-ui-core", + "version": "1.1.2", + "repository": { + "type": "git", + "url": "https://github.com/daangn/stackflow.git", + "directory": "extensions/solid-ui-core" + }, + "license": "MIT", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "require": "./dist/index.js", + "import": "./dist/index.mjs" + }, + "./index.css": "./dist/index.css" + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "src", + "README.md" + ], + "scripts": { + "build": "yarn build:js && yarn build:dts", + "build:dts": "tsc --emitDeclarationOnly", + "build:js": "node ./esbuild.config.js", + "clean": "rimraf dist", + "dev": "yarn build:js --watch && yarn build:dts --watch", + "typecheck": "tsc --noEmit" + }, + "devDependencies": { + "@stackflow/core": "^1.1.0", + "@stackflow/esbuild-config": "^1.0.2", + "@stackflow/solid": "^1.3.0", + "esbuild": "^0.23.0", + "esbuild-plugin-solid": "patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch", + "rimraf": "^3.0.2", + "solid-js": "^1.8.18", + "typescript": "^5.5.3" + }, + "peerDependencies": { + "@stackflow/core": "^1.1.0-canary.0", + "@stackflow/solid": "^1.3.0-canary.0", + "solid-js": ">=1.4.0" + }, + "publishConfig": { + "access": "public" + }, + "ultra": { + "concurrent": [ + "dev", + "build" + ] + } +} diff --git a/extensions/solid-ui-core/src/createLazy.tsx b/extensions/solid-ui-core/src/createLazy.tsx new file mode 100644 index 000000000..7adb540af --- /dev/null +++ b/extensions/solid-ui-core/src/createLazy.tsx @@ -0,0 +1,17 @@ +import type { Accessor } from "solid-js"; +import { createEffect, createSignal } from "solid-js"; + +import { requestNextFrame } from "./utils"; + +export function createLazy(value: Accessor) { + const [state, setState] = createSignal(undefined); + + createEffect(() => { + const v = value(); + requestNextFrame(() => { + setState(() => v); + }); + }); + + return state; +} diff --git a/extensions/solid-ui-core/src/createStyleEffect.ts b/extensions/solid-ui-core/src/createStyleEffect.ts new file mode 100644 index 000000000..2dd1e12e9 --- /dev/null +++ b/extensions/solid-ui-core/src/createStyleEffect.ts @@ -0,0 +1,85 @@ +import type { ActivityTransitionState } from "@stackflow/core"; +import { useActivity } from "@stackflow/solid"; +import type { Accessor } from "solid-js"; +import { createEffect, onCleanup, untrack } from "solid-js"; + +const connections: { + [styleName: string]: Map< + number, + { + refs: Array>; + hasEffect: boolean; + } + >; +} = {}; + +export function createStyleEffect({ + styleName, + refs, + effect, + effectDeps, +}: { + styleName: string; + refs: Array>; + effect?: (params: { + activityTransitionState: ActivityTransitionState; + refs: Array>; + deps?: U; + }) => void; + effectDeps?: () => U; +}) { + const getActivity = useActivity(); + + createEffect(() => { + const activity = getActivity(); + if (!activity?.id) { + return; + } + if (!connections[styleName]) { + connections[styleName] = new Map(); + } + + connections[styleName].set(activity.zIndex, { + refs, + hasEffect: !!effect, + }); + + onCleanup(() => { + connections[styleName].delete(activity.zIndex); + }); + }); + + createEffect(() => { + const activity = getActivity(); + if (!activity) { + return; + } + if (!effect) { + return; + } + + const refs = (() => { + let arr: Array> = []; + const zIndex = untrack(() => activity.zIndex); + + for (let i = 1; i <= zIndex; i += 1) { + const connection = connections[styleName].get(zIndex - i); + + if (connection?.refs) { + arr = [...arr, ...connection.refs]; + } + if (connection?.hasEffect) { + break; + } + } + + return arr; + })(); + + effect({ + activityTransitionState: activity.transitionState, + refs, + deps: effectDeps?.(), + }); + }); +} diff --git a/extensions/solid-ui-core/src/createStyleEffectHide.ts b/extensions/solid-ui-core/src/createStyleEffectHide.ts new file mode 100644 index 000000000..6d1aac1cd --- /dev/null +++ b/extensions/solid-ui-core/src/createStyleEffectHide.ts @@ -0,0 +1,49 @@ +import type { Accessor } from "solid-js"; +import { onCleanup } from "solid-js"; + +import { createStyleEffect } from "./createStyleEffect"; +import { requestNextFrame } from "./utils"; + +export function createStyleEffectHide({ + refs, +}: { + refs: Array>; +}) { + createStyleEffect({ + styleName: "hide", + refs, + effect: ({ activityTransitionState, refs }) => { + const cleanup = () => { + refs.forEach((ref) => { + const $el = ref(); + if (!$el) { + return; + } + + $el.style.display = ""; + }); + }; + + switch (activityTransitionState) { + case "enter-done": { + requestNextFrame(() => { + refs.forEach((ref) => { + const $el = ref(); + if (!$el) { + return; + } + + $el.style.display = "none"; + }); + }); + + onCleanup(cleanup); + break; + } + default: { + cleanup(); + } + } + }, + }); +} diff --git a/extensions/solid-ui-core/src/createStyleEffectOffset.ts b/extensions/solid-ui-core/src/createStyleEffectOffset.ts new file mode 100644 index 000000000..021be1ad3 --- /dev/null +++ b/extensions/solid-ui-core/src/createStyleEffectOffset.ts @@ -0,0 +1,80 @@ +import type { Accessor } from "solid-js"; +import { onCleanup } from "solid-js"; + +import { createStyleEffect } from "./createStyleEffect"; +import { listenOnce, requestNextFrame } from "./utils"; + +export function createStyleEffectOffset({ + refs, + transitionDuration, + offsetStyles, + hasEffect = false, +}: { + refs: Array>; + transitionDuration: string; + offsetStyles: { + transform: string; + opacity: string; + }; + hasEffect?: boolean; +}) { + createStyleEffect({ + styleName: "offset", + refs, + effect: hasEffect + ? ({ activityTransitionState, refs }) => { + const cleanup = () => { + requestNextFrame(() => { + refs.forEach((ref) => { + const $el = ref(); + if (!$el) { + return; + } + + $el.style.transform = ""; + $el.style.opacity = ""; + + listenOnce($el, "transitionend", () => { + $el.style.transition = ""; + }); + }); + }); + }; + + switch (activityTransitionState) { + case "enter-active": + case "enter-done": { + requestNextFrame(() => { + refs.forEach((ref) => { + const $el = ref(); + if (!$el) { + return; + } + + $el.style.transition = transitionDuration; + $el.style.transform = offsetStyles.transform; + $el.style.opacity = offsetStyles.opacity; + }); + }); + + switch (activityTransitionState) { + case "enter-done": + onCleanup(cleanup); + return; + default: + return; + } + } + case "exit-active": + case "exit-done": { + requestNextFrame(() => { + cleanup(); + }); + break; + } + default: + } + } + : undefined, + }); +} diff --git a/extensions/solid-ui-core/src/createStyleEffectSwipeBack.ts b/extensions/solid-ui-core/src/createStyleEffectSwipeBack.ts new file mode 100644 index 000000000..95dd69096 --- /dev/null +++ b/extensions/solid-ui-core/src/createStyleEffectSwipeBack.ts @@ -0,0 +1,247 @@ +import type { ActivityTransitionState } from "@stackflow/core"; +import type { Accessor } from "solid-js"; +import { onCleanup } from "solid-js"; + +import { createStyleEffect } from "./createStyleEffect"; +import { listenOnce } from "./utils"; + +export function createStyleEffectSwipeBack({ + dimRef, + edgeRef, + paperRef, + offset, + transitionDuration, + preventSwipeBack, + getActivityTransitionState, + onSwiped, +}: { + dimRef: Accessor; + edgeRef: Accessor; + paperRef: Accessor; + offset: number; + transitionDuration: string; + preventSwipeBack?: Accessor; + getActivityTransitionState: () => ActivityTransitionState | null; + onSwiped?: () => void; +}) { + createStyleEffect({ + styleName: "swipe-back", + refs: [paperRef], + effect: ({ refs }) => { + if (preventSwipeBack?.()) { + return; + } + + if (!dimRef() || !edgeRef() || !paperRef()) { + return; + } + + const $dim = dimRef()!; + const $edge = edgeRef()!; + const $paper = paperRef()!; + + let x0: number | null = null; + let t0: number | null = null; + let x: number | null = null; + + let cachedRefs: Array<{ + style: { + transform: string; + transition: string; + }; + parentElement?: { + style: { + display: string; + }; + }; + }> = []; + + const resetState = () => { + x0 = null; + t0 = null; + x = null; + cachedRefs = []; + }; + + let _rAFLock = false; + + function movePaper(dx: number) { + if (!_rAFLock) { + _rAFLock = true; + + requestAnimationFrame(() => { + const p = dx / $paper.clientWidth; + + $dim.style.opacity = `${1 - p}`; + $dim.style.transition = "0s"; + + $paper.style.overflowY = "hidden"; + $paper.style.transform = `translate3d(${dx}px, 0, 0)`; + $paper.style.transition = "0s"; + + refs.forEach((ref) => { + const $el = ref(); + if (!$el) { + return; + } + + $el.style.transform = `translate3d(${ + -1 * (1 - p) * offset + }px, 0, 0)`; + $el.style.transition = "0s"; + + if ($el.parentElement?.style.display === "none") { + $el.parentElement.style.display = "block"; + } + }); + + _rAFLock = false; + }); + } + } + + function resetPaper({ swiped }: { swiped: boolean }): Promise { + return new Promise((resolve) => { + requestAnimationFrame(() => { + $dim.style.opacity = `${swiped ? 0 : 1}`; + $dim.style.transition = transitionDuration; + + $paper.style.overflowY = "hidden"; + $paper.style.transform = `translateX(${swiped ? "100%" : "0"})`; + $paper.style.transition = transitionDuration; + + refs.forEach((ref) => { + const $el = ref(); + if (!$el) { + return; + } + + $el.style.transition = transitionDuration; + $el.style.transform = `translate3d(${ + swiped ? "0" : `-${offset / 16}rem` + }, 0, 0)`; + }); + + const _cachedRefs = [...cachedRefs]; + + resolve(); + + listenOnce($paper, "transitionend", () => { + const _swiped = + swiped || + getActivityTransitionState() === "exit-active" || + getActivityTransitionState() === "exit-done"; + + $dim.style.opacity = ""; + $paper.style.overflowY = ""; + $paper.style.transform = ""; + + refs.forEach((ref, i) => { + const $el = ref(); + if (!$el) { + return; + } + + const _cachedRef = _cachedRefs[i]; + + if (_swiped) { + $el.style.transition = ""; + $el.style.transform = ""; + + if ($el.parentElement) { + $el.parentElement.style.display = ""; + } + } else if (_cachedRef) { + $el.style.transition = _cachedRef.style.transition; + $el.style.transform = _cachedRef.style.transform; + + if ($el.parentElement && _cachedRef.parentElement) { + $el.parentElement.style.display = + _cachedRef.parentElement.style.display; + } + } + }); + }); + }); + }); + } + + const onTouchStart = (e: TouchEvent) => { + const { activeElement } = document as any; + + activeElement?.blur?.(); + + x0 = x = e.touches[0].clientX; + t0 = Date.now(); + + cachedRefs = refs.map((ref) => { + const $el = ref(); + if (!$el) { + return { + style: { + transform: "", + transition: "", + }, + }; + } + + return { + style: { + transform: $el.style.transform, + transition: $el.style.transition, + }, + parentElement: $el.parentElement + ? { + style: { + display: $el.parentElement.style.display, + }, + } + : undefined, + }; + }); + }; + + const onTouchMove = (e: TouchEvent) => { + if (!x0) { + resetState(); + return; + } + + x = e.touches[0].clientX; + + movePaper(x - x0); + }; + + const onTouchEnd = () => { + if (!x0 || !t0 || !x) { + resetState(); + return; + } + + const t = Date.now(); + const v = (x - x0) / (t - t0); + const swiped = v > 1 || x / $paper.clientWidth > 0.4; + + if (swiped) { + onSwiped?.(); + } + + Promise.resolve() + .then(() => resetPaper({ swiped })) + .then(() => resetState()); + }; + + $edge.addEventListener("touchstart", onTouchStart, { passive: true }); + $edge.addEventListener("touchmove", onTouchMove, { passive: true }); + $edge.addEventListener("touchend", onTouchEnd, { passive: true }); + $edge.addEventListener("touchcancel", onTouchEnd, { passive: true }); + + onCleanup(() => { + $edge.removeEventListener("touchstart", onTouchStart); + $edge.removeEventListener("touchmove", onTouchMove); + $edge.removeEventListener("touchend", onTouchEnd); + $edge.removeEventListener("touchcancel", onTouchEnd); + }); + }, + }); +} diff --git a/extensions/solid-ui-core/src/createZIndexBase.ts b/extensions/solid-ui-core/src/createZIndexBase.ts new file mode 100644 index 000000000..c7cc87499 --- /dev/null +++ b/extensions/solid-ui-core/src/createZIndexBase.ts @@ -0,0 +1,7 @@ +import { useActivity } from "@stackflow/solid"; +import { createMemo } from "solid-js"; + +export function createZIndexBase() { + const activity = useActivity(); + return createMemo(() => (activity()?.zIndex ?? 0) * 5); +} diff --git a/extensions/solid-ui-core/src/index.ts b/extensions/solid-ui-core/src/index.ts new file mode 100644 index 000000000..5fdfff382 --- /dev/null +++ b/extensions/solid-ui-core/src/index.ts @@ -0,0 +1,8 @@ +export * from "./createLazy"; +export * from "./createStyleEffect"; +export * from "./createStyleEffectHide"; +export * from "./createStyleEffectOffset"; +export * from "./createZIndexBase"; +export * from "./useAppBarTitleMaxWidth"; +export * from "./useMounted"; +export * from "./createStyleEffectSwipeBack"; diff --git a/extensions/solid-ui-core/src/useAppBarTitleMaxWidth.ts b/extensions/solid-ui-core/src/useAppBarTitleMaxWidth.ts new file mode 100644 index 000000000..d1a9d20d8 --- /dev/null +++ b/extensions/solid-ui-core/src/useAppBarTitleMaxWidth.ts @@ -0,0 +1,36 @@ +import { createEffect, createSignal, onCleanup } from "solid-js"; + +import { listenResize } from "./utils"; + +export function useAppBarTitleMaxWidth(props: { + outerRef: HTMLElement | undefined; + innerRef: HTMLElement | undefined; + enable: boolean; +}) { + const [maxWidth, setMaxWidth] = createSignal(undefined); + + createEffect(() => { + const $outer = props.outerRef; + const $inner = props.innerRef; + + if (!props.enable || !$outer || !$inner) return; + + const dispose = listenResize(() => { + const screenWidth = $outer.clientWidth; + + const leftWidth = $inner.offsetLeft; + const centerWidth = $inner.clientWidth; + const rightWidth = screenWidth - leftWidth - centerWidth; + + const sideMargin = Math.max(leftWidth, rightWidth); + + setMaxWidth(screenWidth - 2 * sideMargin); + }); + + onCleanup(dispose); + }); + + return { + maxWidth, + }; +} diff --git a/extensions/solid-ui-core/src/useMounted.ts b/extensions/solid-ui-core/src/useMounted.ts new file mode 100644 index 000000000..f844a4c5a --- /dev/null +++ b/extensions/solid-ui-core/src/useMounted.ts @@ -0,0 +1,11 @@ +import { createSignal, onMount } from "solid-js"; + +export function useMounted() { + const [mounted, setMounted] = createSignal(false); + + onMount(() => { + setMounted(true); + }); + + return mounted; +} diff --git a/extensions/solid-ui-core/src/utils/index.ts b/extensions/solid-ui-core/src/utils/index.ts new file mode 100644 index 000000000..8cb482569 --- /dev/null +++ b/extensions/solid-ui-core/src/utils/index.ts @@ -0,0 +1,3 @@ +export * from "./listenOnce"; +export * from "./listenResize"; +export * from "./requestNextFrame"; diff --git a/extensions/solid-ui-core/src/utils/listenOnce.ts b/extensions/solid-ui-core/src/utils/listenOnce.ts new file mode 100644 index 000000000..c5165f4c8 --- /dev/null +++ b/extensions/solid-ui-core/src/utils/listenOnce.ts @@ -0,0 +1,12 @@ +export function listenOnce( + el: T, + type: keyof HTMLElementEventMap, + cb: () => void, +) { + const listener = () => { + el.removeEventListener(type, listener); + cb(); + }; + + el.addEventListener(type, listener); +} diff --git a/extensions/solid-ui-core/src/utils/listenResize.ts b/extensions/solid-ui-core/src/utils/listenResize.ts new file mode 100644 index 000000000..51b6e6ea9 --- /dev/null +++ b/extensions/solid-ui-core/src/utils/listenResize.ts @@ -0,0 +1,8 @@ +export const listenResize = (cb: () => void) => { + cb(); + window.addEventListener("resize", cb); + + return () => { + window.removeEventListener("resize", cb); + }; +}; diff --git a/extensions/solid-ui-core/src/utils/requestNextFrame.tsx b/extensions/solid-ui-core/src/utils/requestNextFrame.tsx new file mode 100644 index 000000000..405e0b526 --- /dev/null +++ b/extensions/solid-ui-core/src/utils/requestNextFrame.tsx @@ -0,0 +1,8 @@ +// https://github.com/MingruiZhang/react-animate-mount/blob/32300c04a4fdfa97724b70aaaf0c0f403d6da247/src/Animate.js#L171-L179 +export function requestNextFrame(cb: () => void) { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + cb(); + }); + }); +} diff --git a/extensions/solid-ui-core/tsconfig.json b/extensions/solid-ui-core/tsconfig.json new file mode 100644 index 000000000..d2a0df064 --- /dev/null +++ b/extensions/solid-ui-core/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./src", + "outDir": "./dist", + "jsx": "preserve", + "jsxImportSource": "solid-js" + }, + "exclude": ["./dist"] +} diff --git a/integrations/solid/esbuild.config.js b/integrations/solid/esbuild.config.js new file mode 100644 index 000000000..b96bf786f --- /dev/null +++ b/integrations/solid/esbuild.config.js @@ -0,0 +1,58 @@ +const { context } = require("esbuild"); +const config = require("@stackflow/esbuild-config"); +const { + esbuildPluginFilePathExtensions, +} = require("esbuild-plugin-file-path-extensions"); +const { solidPlugin } = require("esbuild-plugin-solid"); +const pkg = require("./package.json"); + +const external = Object.keys({ + ...pkg.dependencies, + ...pkg.peerDependencies, +}); +const watch = process.argv.includes("--watch"); + +Promise.all( + [true, false].flatMap((jsx) => + [ + { + format: "cjs", + extPrefix: "", + bundle: false, + external: undefined, + }, + { + format: "esm", + extPrefix: "m", + bundle: true, + external, + plugins: [ + esbuildPluginFilePathExtensions({ + esmExtension: jsx ? "mjsx" : "mjs", + }), + ], + platform: "node", + }, + ].map(({ format, extPrefix, bundle, external, plugins, platform }) => + context({ + ...config({ + entryPoints: ["./src/**/*"], + plugins: [ + ...(!jsx ? [solidPlugin({ solid: { generate: "dom" } })] : []), + ...(plugins ?? []), + ], + }), + bundle, + format, + outExtension: jsx + ? { ".js": `.${extPrefix}jsx` } + : { ".js": `.${extPrefix}js` }, + jsx: "preserve", + external, + platform, + }).then((ctx) => + watch ? ctx.watch() : ctx.rebuild().then(() => ctx.dispose()), + ), + ), + ), +).catch(() => process.exit(1)); diff --git a/integrations/solid/package.json b/integrations/solid/package.json new file mode 100644 index 000000000..e12328bdd --- /dev/null +++ b/integrations/solid/package.json @@ -0,0 +1,86 @@ +{ + "name": "@stackflow/solid", + "version": "1.4.1", + "repository": { + "type": "git", + "url": "https://github.com/daangn/stackflow.git", + "directory": "integrations/solid" + }, + "license": "MIT", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "require": { + "solid": "./dist/index.jsx", + "default": "./dist/index.js" + }, + "import": { + "solid": "./dist/index.mjsx", + "default": "./dist/index.mjs" + } + }, + "./stable": { + "types": "./dist/stable/index.d.ts", + "require": { + "solid": "./dist/stable/index.jsx", + "default": "./dist/stable/index.js" + }, + "import": { + "solid": "./dist/stable/index.mjsx", + "default": "./dist/stable/index.mjs" + } + }, + "./future": { + "types": "./dist/future/index.d.ts", + "require": { + "solid": "./dist/future/index.jsx", + "default": "./dist/future/index.js" + }, + "import": { + "solid": "./dist/future/index.mjsx", + "default": "./dist/future/index.mjs" + } + } + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "src", + "README.md" + ], + "scripts": { + "build": "yarn build:js && yarn build:dts", + "build:dts": "tsc --emitDeclarationOnly", + "build:js": "node ./esbuild.config.js", + "clean": "rimraf dist", + "dev": "yarn build:js --watch && yarn build:dts --watch", + "typecheck": "tsc --noEmit" + }, + "devDependencies": { + "@stackflow/config": "^1.1.0", + "@stackflow/core": "^1.1.0", + "@stackflow/esbuild-config": "^1.0.3", + "esbuild": "^0.23.0", + "esbuild-plugin-file-path-extensions": "^2.1.2", + "esbuild-plugin-solid": "patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch", + "rimraf": "^3.0.2", + "solid-js": "^1.8.18", + "typescript": "^5.5.3" + }, + "peerDependencies": { + "@stackflow/config": "^1.0.1-canary.0", + "@stackflow/core": "^1.1.0-canary.0", + "solid-js": ">=1.4.0" + }, + "publishConfig": { + "access": "public" + }, + "ultra": { + "concurrent": [ + "dev", + "build" + ] + } +} diff --git a/integrations/solid/src/__internal__/ActivityComponentType.tsx b/integrations/solid/src/__internal__/ActivityComponentType.tsx new file mode 100644 index 000000000..2c454dc91 --- /dev/null +++ b/integrations/solid/src/__internal__/ActivityComponentType.tsx @@ -0,0 +1,4 @@ +import type { Component } from "solid-js"; + +export type ActivityComponentType = + Component<{ params: T }>; diff --git a/integrations/solid/src/__internal__/MainRenderer.tsx b/integrations/solid/src/__internal__/MainRenderer.tsx new file mode 100644 index 000000000..6e01cd0e5 --- /dev/null +++ b/integrations/solid/src/__internal__/MainRenderer.tsx @@ -0,0 +1,64 @@ +import type { Component } from "solid-js"; +import { mergeProps } from "solid-js"; + +import type { ActivityComponentType } from "./ActivityComponentType"; +import PluginRenderer, { createPluginRenderProps } from "./PluginRenderer"; +import { useCoreState } from "./core"; +import { usePlugins } from "./plugins"; +import { StackProvider } from "./stack"; +import type { WithRequired } from "./utils"; + +interface MainRendererProps { + activityComponentMap: { + [key: string]: ActivityComponentType; + }; + initialContext: any; +} +const MainRenderer: Component = (props) => { + const { stack } = useCoreState(); + const plugins = usePlugins(); + + const renderingPlugins = plugins.filter( + (plugin): plugin is WithRequired => + !!plugin.render, + ); + + if (renderingPlugins.length === 0) { + console.warn( + "Stackflow -" + + ` There is no rendering plugin, so "" doesn't render anything.` + + ` If you want to render some UI, use "@stackflow/plugin-renderer-basic"` + + " or add another rendering plugin.", + ); + } + + const pluginRenderProps = createPluginRenderProps({ + activityComponentMap: props.activityComponentMap, + initialContext: () => props.initialContext, + }); + + const render = plugins.reduce( + (render, p) => { + if (!p.wrapStack) { + return render; + } + + return () => + p.wrapStack?.({ + stack: mergeProps(stack, { render }), + initialContext: () => props.initialContext, + }); + }, + () => ( + <> + {renderingPlugins.map((plugin) => ( + + ))} + + ), + ); + + return {render()}; +}; + +export default MainRenderer; diff --git a/integrations/solid/src/__internal__/PluginRenderer.tsx b/integrations/solid/src/__internal__/PluginRenderer.tsx new file mode 100644 index 000000000..27bb63bce --- /dev/null +++ b/integrations/solid/src/__internal__/PluginRenderer.tsx @@ -0,0 +1,92 @@ +import type { Activity, Stack } from "@stackflow/core"; +import type { Accessor, Component, JSXElement } from "solid-js"; +import { mapArray, mergeProps } from "solid-js"; + +import type { ActivityComponentType } from "./ActivityComponentType"; +import type { StackflowSolidPlugin } from "./StackflowSolidPlugin"; +import { ActivityProvider } from "./activity"; +import { useCoreState } from "./core"; +import { usePlugins } from "./plugins"; +import { StackProvider } from "./stack"; +import type { WithRequired } from "./utils"; + +type PluginRenderProps = Parameters< + NonNullable["render"]> +>[0]; + +export function createPluginRenderProps({ + activityComponentMap, + initialContext, +}: { + activityComponentMap: { + [key: string]: ActivityComponentType; + }; + initialContext: Accessor; +}): PluginRenderProps { + const { stack } = useCoreState(); + const plugins = usePlugins(); + const activities = new Map< + string, + Activity & { render: (overrideActivity?: Partial) => JSXElement } + >(); + + return { + stack: mergeProps(stack, { + render(overrideStack?: Partial) { + const stackWithOverrides = mergeProps(stack, overrideStack); + + return { + activities: mapArray( + () => stackWithOverrides.activities, + (activity) => { + if (activities.has(activity.id)) + return activities.get(activity.id)!; + + const activityWithRender = mergeProps(activity, { + render(overrideActivity?: Partial) { + const Activity = activityComponentMap[activity.name]; + const render = plugins.reduce( + (render, p) => { + if (!p.wrapActivity) { + return render; + } + + return () => + p.wrapActivity?.({ + activity: mergeProps(activity, { render }), + initialContext, + }); + }, + () => , + ); + + return ( + + + {render()} + + + ); + }, + }); + activities.set(activity.id, activityWithRender); + return activityWithRender; + }, + ), + }; + }, + }), + initialContext, + }; +} + +interface PluginRendererProps { + plugin: WithRequired, "render">; + renderProps: PluginRenderProps; +} +const PluginRenderer: Component = (props) => + props.plugin.render(props.renderProps); + +export default PluginRenderer; diff --git a/integrations/solid/src/__internal__/StackflowSolidPlugin.ts b/integrations/solid/src/__internal__/StackflowSolidPlugin.ts new file mode 100644 index 000000000..a4d22016a --- /dev/null +++ b/integrations/solid/src/__internal__/StackflowSolidPlugin.ts @@ -0,0 +1,42 @@ +import type { Activity, Stack, StackflowPlugin } from "@stackflow/core"; +import type { Accessor, JSXElement } from "solid-js"; + +export type StackflowSolidPlugin = () => { + /** + * Determine how to render by using the stack state + */ + render?: (args: { + stack: Stack & { + render: (overrideStack?: Partial) => { + activities: Accessor< + Array< + Activity & { + render: (overrideActivity?: Partial) => JSXElement; + } + > + >; + }; + }; + initialContext: Accessor; + }) => JSXElement | null; + + /** + * Wrap `` component with your `Provider` or custom elements + */ + wrapStack?: (args: { + stack: Stack & { + render: () => JSXElement; + }; + initialContext: Accessor; + }) => JSXElement | null; + + /** + * Wrap an activity with your `Provider` or custom elements + */ + wrapActivity?: (args: { + activity: Activity & { + render: () => JSXElement; + }; + initialContext: Accessor; + }) => JSXElement | null; +} & ReturnType; diff --git a/integrations/solid/src/__internal__/activity/ActivityProvider.tsx b/integrations/solid/src/__internal__/activity/ActivityProvider.tsx new file mode 100644 index 000000000..155f7970f --- /dev/null +++ b/integrations/solid/src/__internal__/activity/ActivityProvider.tsx @@ -0,0 +1,17 @@ +import type { Activity } from "@stackflow/core"; +import type { Accessor, Component, JSXElement } from "solid-js"; +import { createContext } from "solid-js"; + +export const ActivityContext = createContext>( + () => undefined, +); + +interface ActivityProviderProps { + children: JSXElement; + value: Activity; +} +export const ActivityProvider: Component = (props) => ( + props.value}> + {props.children} + +); diff --git a/integrations/solid/src/__internal__/activity/index.ts b/integrations/solid/src/__internal__/activity/index.ts new file mode 100644 index 000000000..80001dcd6 --- /dev/null +++ b/integrations/solid/src/__internal__/activity/index.ts @@ -0,0 +1,5 @@ +export * from "./ActivityProvider"; +export * from "./makeActivityId"; +export * from "./makeStepId"; +export * from "./useActivity"; +export * from "./useActivityParams"; diff --git a/integrations/solid/src/__internal__/activity/makeActivityId.ts b/integrations/solid/src/__internal__/activity/makeActivityId.ts new file mode 100644 index 000000000..29b919e74 --- /dev/null +++ b/integrations/solid/src/__internal__/activity/makeActivityId.ts @@ -0,0 +1,5 @@ +import { id } from "@stackflow/core"; + +export function makeActivityId() { + return id(); +} diff --git a/integrations/solid/src/__internal__/activity/makeStepId.ts b/integrations/solid/src/__internal__/activity/makeStepId.ts new file mode 100644 index 000000000..e0b66be3e --- /dev/null +++ b/integrations/solid/src/__internal__/activity/makeStepId.ts @@ -0,0 +1,5 @@ +import { id } from "@stackflow/core"; + +export function makeStepId() { + return id(); +} diff --git a/integrations/solid/src/__internal__/activity/useActivity.ts b/integrations/solid/src/__internal__/activity/useActivity.ts new file mode 100644 index 000000000..dda8e4bbe --- /dev/null +++ b/integrations/solid/src/__internal__/activity/useActivity.ts @@ -0,0 +1,8 @@ +import { useContext } from "solid-js"; + +import { ActivityContext } from "./ActivityProvider"; + +/** + * Get current activity state + */ +export const useActivity = () => useContext(ActivityContext); diff --git a/integrations/solid/src/__internal__/activity/useActivityParams.ts b/integrations/solid/src/__internal__/activity/useActivityParams.ts new file mode 100644 index 000000000..80c180527 --- /dev/null +++ b/integrations/solid/src/__internal__/activity/useActivityParams.ts @@ -0,0 +1,14 @@ +import type { Accessor } from "solid-js"; +import { createMemo, useContext } from "solid-js"; + +import { ActivityContext } from "./ActivityProvider"; + +/** + * Get current activity parameters + */ +export function useActivityParams< + T extends { [key in keyof T]: string | undefined }, +>(): Accessor { + const activity = useContext(ActivityContext); + return createMemo(() => activity()?.params as T | undefined); +} diff --git a/integrations/solid/src/__internal__/core/CoreProvider.tsx b/integrations/solid/src/__internal__/core/CoreProvider.tsx new file mode 100644 index 000000000..e58965893 --- /dev/null +++ b/integrations/solid/src/__internal__/core/CoreProvider.tsx @@ -0,0 +1,44 @@ +import type { CoreStore, Stack } from "@stackflow/core"; +import type { Accessor, Component, JSXElement } from "solid-js"; +import { createContext, useTransition } from "solid-js"; +import { createStore, reconcile } from "solid-js/store"; + +export const CoreActionsContext = createContext>( + null as any, +); +export const CoreStateContext = createContext<{ + stack: Stack; + pending: Accessor; +}>(null as any); + +export interface CoreProviderProps { + coreStore: CoreStore; + transition: boolean; + children: JSXElement; +} +export const CoreProvider: Component = (props) => { + const [stack, setStack] = createStore( + JSON.parse(JSON.stringify(props.coreStore.actions.getStack())), + ); + const [pending, startTransition] = useTransition(); + + props.coreStore.subscribe(() => { + const update = () => + setStack( + reconcile( + JSON.parse(JSON.stringify(props.coreStore.actions.getStack())), + { merge: true }, + ), + ); + if (props.transition) startTransition(update); + else update(); + }); + + return ( + + props.coreStore.actions}> + {props.children} + + + ); +}; diff --git a/integrations/solid/src/__internal__/core/index.ts b/integrations/solid/src/__internal__/core/index.ts new file mode 100644 index 000000000..1931d0422 --- /dev/null +++ b/integrations/solid/src/__internal__/core/index.ts @@ -0,0 +1,3 @@ +export * from "./CoreProvider"; +export * from "./useCoreActions"; +export * from "./useCoreState"; diff --git a/integrations/solid/src/__internal__/core/useCoreActions.ts b/integrations/solid/src/__internal__/core/useCoreActions.ts new file mode 100644 index 000000000..ad3b1e249 --- /dev/null +++ b/integrations/solid/src/__internal__/core/useCoreActions.ts @@ -0,0 +1,13 @@ +import { useContext } from "solid-js"; + +import { CoreActionsContext } from "./CoreProvider"; + +export const useCoreActions = () => { + const coreActions = useContext(CoreActionsContext); + + if (!coreActions) { + throw new Error("useCoreActions must be used within a "); + } + + return coreActions; +}; diff --git a/integrations/solid/src/__internal__/core/useCoreState.ts b/integrations/solid/src/__internal__/core/useCoreState.ts new file mode 100644 index 000000000..195538d6d --- /dev/null +++ b/integrations/solid/src/__internal__/core/useCoreState.ts @@ -0,0 +1,13 @@ +import { useContext } from "solid-js"; + +import { CoreStateContext } from "./CoreProvider"; + +export const useCoreState = () => { + const coreState = useContext(CoreStateContext); + + if (!coreState) { + throw new Error("useCoreState must be used within a "); + } + + return coreState; +}; diff --git a/integrations/solid/src/__internal__/plugins/PluginsProvider.tsx b/integrations/solid/src/__internal__/plugins/PluginsProvider.tsx new file mode 100644 index 000000000..961c55482 --- /dev/null +++ b/integrations/solid/src/__internal__/plugins/PluginsProvider.tsx @@ -0,0 +1,17 @@ +import type { Component, JSXElement } from "solid-js"; +import { createContext } from "solid-js"; + +import type { StackflowSolidPlugin } from "../StackflowSolidPlugin"; + +export type PluginsContextValue = Array>; +export const PluginsContext = createContext(null as any); + +interface PluginsProviderProps { + children: JSXElement; + value: PluginsContextValue; +} +export const PluginsProvider: Component = (props) => ( + + {props.children} + +); diff --git a/integrations/solid/src/__internal__/plugins/index.ts b/integrations/solid/src/__internal__/plugins/index.ts new file mode 100644 index 000000000..5d8914870 --- /dev/null +++ b/integrations/solid/src/__internal__/plugins/index.ts @@ -0,0 +1,2 @@ +export * from "./PluginsProvider"; +export * from "./usePlugins"; diff --git a/integrations/solid/src/__internal__/plugins/usePlugins.ts b/integrations/solid/src/__internal__/plugins/usePlugins.ts new file mode 100644 index 000000000..ea1d6fb5f --- /dev/null +++ b/integrations/solid/src/__internal__/plugins/usePlugins.ts @@ -0,0 +1,13 @@ +import { useContext } from "solid-js"; + +import { PluginsContext } from "./PluginsProvider"; + +export function usePlugins() { + const plugins = useContext(PluginsContext); + + if (!plugins) { + throw new Error("usePlugins() must be used within a "); + } + + return plugins; +} diff --git a/integrations/solid/src/__internal__/stack/StackProvider.tsx b/integrations/solid/src/__internal__/stack/StackProvider.tsx new file mode 100644 index 000000000..72f80682e --- /dev/null +++ b/integrations/solid/src/__internal__/stack/StackProvider.tsx @@ -0,0 +1,15 @@ +import type { Stack } from "@stackflow/core"; +import type { Accessor, Component, JSXElement } from "solid-js"; +import { createContext } from "solid-js"; + +export const StackContext = createContext>(null as any); + +interface StackProviderProps { + children: JSXElement; + value: Stack; +} +export const StackProvider: Component = (props) => ( + props.value}> + {props.children} + +); diff --git a/integrations/solid/src/__internal__/stack/index.ts b/integrations/solid/src/__internal__/stack/index.ts new file mode 100644 index 000000000..e8e6d873a --- /dev/null +++ b/integrations/solid/src/__internal__/stack/index.ts @@ -0,0 +1,2 @@ +export * from "./StackProvider"; +export * from "./useStack"; diff --git a/integrations/solid/src/__internal__/stack/useStack.ts b/integrations/solid/src/__internal__/stack/useStack.ts new file mode 100644 index 000000000..ef4c30750 --- /dev/null +++ b/integrations/solid/src/__internal__/stack/useStack.ts @@ -0,0 +1,16 @@ +import { useContext } from "solid-js"; + +import { StackContext } from "./StackProvider"; + +/** + * Get overall stack state + */ +export const useStack = () => { + const stack = useContext(StackContext); + + if (!stack) { + throw new Error("useStack() must be used within a "); + } + + return stack; +}; diff --git a/integrations/solid/src/__internal__/utils/WithRequired.ts b/integrations/solid/src/__internal__/utils/WithRequired.ts new file mode 100644 index 000000000..d1790a5a1 --- /dev/null +++ b/integrations/solid/src/__internal__/utils/WithRequired.ts @@ -0,0 +1 @@ +export type WithRequired = T & { [P in K]-?: T[P] }; diff --git a/integrations/solid/src/__internal__/utils/index.ts b/integrations/solid/src/__internal__/utils/index.ts new file mode 100644 index 000000000..45c9c0c98 --- /dev/null +++ b/integrations/solid/src/__internal__/utils/index.ts @@ -0,0 +1,3 @@ +export * from "./isBrowser"; +export * from "./isServer"; +export * from "./WithRequired"; diff --git a/integrations/solid/src/__internal__/utils/isBrowser.ts b/integrations/solid/src/__internal__/utils/isBrowser.ts new file mode 100644 index 000000000..517ee0327 --- /dev/null +++ b/integrations/solid/src/__internal__/utils/isBrowser.ts @@ -0,0 +1,9 @@ +import { isServer } from "./isServer"; + +/** + * @description + * 현재 JS 런타임이 브라우저 환경인지 확인해요. + */ +export function isBrowser() { + return !isServer(); +} diff --git a/integrations/solid/src/__internal__/utils/isServer.ts b/integrations/solid/src/__internal__/utils/isServer.ts new file mode 100644 index 000000000..0613b9b57 --- /dev/null +++ b/integrations/solid/src/__internal__/utils/isServer.ts @@ -0,0 +1,7 @@ +/** + * @description + * 현재 JS 런타임이 서버 환경인지 확인해요. + */ +export function isServer() { + return typeof window === "undefined"; +} diff --git a/integrations/solid/src/future/Actions.ts b/integrations/solid/src/future/Actions.ts new file mode 100644 index 000000000..fba0d317f --- /dev/null +++ b/integrations/solid/src/future/Actions.ts @@ -0,0 +1,29 @@ +import type { + InferActivityParams, + RegisteredActivityName, +} from "@stackflow/config"; + +export type Actions = { + push( + activityName: K, + activityParams: InferActivityParams, + options?: { + animate?: boolean; + }, + ): { + activityId: string; + }; + replace( + activityName: K, + activityParams: InferActivityParams, + options?: { + animate?: boolean; + activityId?: string; + }, + ): { + activityId: string; + }; + pop(): void; + pop(options: { animate?: boolean }): void; + pop(count: number, options?: { animate?: boolean }): void; +}; diff --git a/integrations/solid/src/future/ActivityComponentType.tsx b/integrations/solid/src/future/ActivityComponentType.tsx new file mode 100644 index 000000000..735c4109a --- /dev/null +++ b/integrations/solid/src/future/ActivityComponentType.tsx @@ -0,0 +1,8 @@ +import type { + InferActivityParams, + RegisteredActivityName, +} from "@stackflow/config"; +import type { Component } from "solid-js"; + +export type ActivityComponentType = + Component<{ params: InferActivityParams }>; diff --git a/integrations/solid/src/future/ConfigProvider.tsx b/integrations/solid/src/future/ConfigProvider.tsx new file mode 100644 index 000000000..6257ef525 --- /dev/null +++ b/integrations/solid/src/future/ConfigProvider.tsx @@ -0,0 +1,16 @@ +import type { ActivityDefinition, Config } from "@stackflow/config"; +import { type Component, type JSX, createContext } from "solid-js"; + +export const ConfigContext = createContext>>( + null as any, +); + +interface ConfigProviderProps { + children: JSX.Element; + value: Config>; +} +export const ConfigProvider: Component = (props) => ( + + {props.children} + +); diff --git a/integrations/solid/src/future/StackComponentType.ts b/integrations/solid/src/future/StackComponentType.ts new file mode 100644 index 000000000..3037e26d8 --- /dev/null +++ b/integrations/solid/src/future/StackComponentType.ts @@ -0,0 +1,7 @@ +import type { Component } from "solid-js"; + +export type StackComponentType = Component<{ + initialContext?: any; + initialLoaderData?: any; + transition?: boolean; +}>; diff --git a/integrations/solid/src/future/StepActions.ts b/integrations/solid/src/future/StepActions.ts new file mode 100644 index 000000000..05963d437 --- /dev/null +++ b/integrations/solid/src/future/StepActions.ts @@ -0,0 +1,15 @@ +export type StepActions = { + pushStep: ( + params: ActivityParams, + options?: { + targetActivityId?: string; + }, + ) => void; + replaceStep: ( + params: ActivityParams, + options?: { + targetActivityId?: string; + }, + ) => void; + popStep: (options?: { targetActivityId?: string }) => void; +}; diff --git a/integrations/solid/src/future/index.ts b/integrations/solid/src/future/index.ts new file mode 100644 index 000000000..7ff6ff220 --- /dev/null +++ b/integrations/solid/src/future/index.ts @@ -0,0 +1,24 @@ +/** + * Main + */ +export * from "./stackflow"; + +/** + * Types + */ +export * from "../__internal__/StackflowSolidPlugin"; +export * from "./ActivityComponentType"; +export * from "./StackComponentType"; +export * from "./Actions"; +export * from "./StepActions"; + +/** + * Hooks + */ +export * from "../__internal__/stack/useStack"; +export * from "../__internal__/activity/useActivity"; +export * from "./useActivityParams"; +export * from "./loader/useLoaderData"; +export * from "./useFlow"; +export * from "./useStepFlow"; +export * from "./useConfig"; diff --git a/integrations/solid/src/future/loader/index.ts b/integrations/solid/src/future/loader/index.ts new file mode 100644 index 000000000..034f3f9e5 --- /dev/null +++ b/integrations/solid/src/future/loader/index.ts @@ -0,0 +1,2 @@ +export * from "./loaderPlugin"; +export * from "./useLoaderData"; diff --git a/integrations/solid/src/future/loader/loaderPlugin.tsx b/integrations/solid/src/future/loader/loaderPlugin.tsx new file mode 100644 index 000000000..5fb335346 --- /dev/null +++ b/integrations/solid/src/future/loader/loaderPlugin.tsx @@ -0,0 +1,103 @@ +import type { ActivityDefinition, Config } from "@stackflow/config"; +import type { StackflowSolidPlugin } from "../../__internal__/StackflowSolidPlugin"; + +export function loaderPlugin( + config: Config>, +): StackflowSolidPlugin { + return () => ({ + key: "plugin-loader", + overrideInitialEvents({ initialEvents, initialContext }) { + if (initialEvents.length === 0) { + return []; + } + + return initialEvents.map((event) => { + if (event.name !== "Pushed") { + return event; + } + + if (initialContext.initialLoaderData) { + return { + ...event, + activityContext: { + ...event.activityContext, + loaderData: initialContext.initialLoaderData, + }, + }; + } + + const { activityName, activityParams } = event; + + const matchActivity = config.activities.find( + (activity) => activity.name === activityName, + ); + const loader = matchActivity?.loader; + + if (!loader) { + return event; + } + + const loaderData = loader({ + params: activityParams, + config, + }); + + return { + ...event, + activityContext: { + ...event.activityContext, + loaderData, + }, + }; + }); + }, + onBeforePush({ actionParams, actions: { overrideActionParams } }) { + const { activityName, activityParams, activityContext } = actionParams; + + const loader = config.activities.find( + (activity) => activity.name === activityName, + )?.loader; + + if (!loader) { + return; + } + + const loaderData = loader({ + params: activityParams, + config, + }); + + overrideActionParams({ + ...actionParams, + activityContext: { + ...activityContext, + loaderData, + }, + }); + }, + onBeforeReplace({ actionParams, actions: { overrideActionParams } }) { + const { activityName, activityParams, activityContext } = actionParams; + + const loader = config.activities.find( + (activity) => activity.name === activityName, + )?.loader; + + if (!loader) { + return; + } + + const loaderData = loader({ + params: activityParams, + config, + }); + + overrideActionParams({ + ...actionParams, + activityContext: { + ...activityContext, + loaderData, + }, + }); + }, + }); +} diff --git a/integrations/solid/src/future/loader/useLoaderData.ts b/integrations/solid/src/future/loader/useLoaderData.ts new file mode 100644 index 000000000..3a0f69a8a --- /dev/null +++ b/integrations/solid/src/future/loader/useLoaderData.ts @@ -0,0 +1,10 @@ +import type { ActivityLoaderArgs } from "@stackflow/config"; +import type { Accessor } from "solid-js"; +import { useActivity } from "../../stable"; + +export function useLoaderData< + T extends (args: ActivityLoaderArgs) => any, +>(): Accessor> { + const activity = useActivity(); + return () => (activity()?.context as any)?.loaderData; +} diff --git a/integrations/solid/src/future/makeActions.ts b/integrations/solid/src/future/makeActions.ts new file mode 100644 index 000000000..4ff8c188b --- /dev/null +++ b/integrations/solid/src/future/makeActions.ts @@ -0,0 +1,80 @@ +import type { CoreStore } from "@stackflow/core"; +import { makeActivityId } from "../__internal__/activity"; +import type { Actions } from "./Actions"; + +function parseActionOptions(options?: { animate?: boolean }) { + if (!options) { + return { skipActiveState: false }; + } + + const isNullableAnimateOption = options.animate == null; + + if (isNullableAnimateOption) { + return { skipActiveState: false }; + } + + return { skipActiveState: !options.animate }; +} + +export function makeActions( + getCoreActions: () => CoreStore["actions"] | undefined, +): Actions { + return { + push(activityName, activityParams, options) { + const activityId = makeActivityId(); + + getCoreActions()?.push({ + activityId, + activityName, + activityParams, + skipEnterActiveState: parseActionOptions(options).skipActiveState, + }); + + return { + activityId, + }; + }, + replace(activityName, activityParams, options) { + const activityId = makeActivityId(); + + getCoreActions()?.replace({ + activityId: options?.activityId ?? makeActivityId(), + activityName, + activityParams, + skipEnterActiveState: parseActionOptions(options).skipActiveState, + }); + + return { + activityId, + }; + }, + pop( + count?: number | { animate?: boolean } | undefined, + options?: { animate?: boolean } | undefined, + ) { + let _count = 1; + let _options: { animate?: boolean } = {}; + + if (typeof count === "object") { + _options = { + ...count, + }; + } + if (typeof count === "number") { + _count = count; + } + if (options) { + _options = { + ...options, + }; + } + + for (let i = 0; i < _count; i += 1) { + getCoreActions()?.pop({ + skipExitActiveState: + i === 0 ? parseActionOptions(_options).skipActiveState : true, + }); + } + }, + }; +} diff --git a/integrations/solid/src/future/makeStepActions.ts b/integrations/solid/src/future/makeStepActions.ts new file mode 100644 index 000000000..6a8aee906 --- /dev/null +++ b/integrations/solid/src/future/makeStepActions.ts @@ -0,0 +1,34 @@ +import type { ActivityBaseParams } from "@stackflow/config"; +import type { CoreStore } from "@stackflow/core"; +import { makeStepId } from "../__internal__/activity"; +import type { StepActions } from "./StepActions"; + +export function makeStepActions( + getCoreActions: () => CoreStore["actions"] | undefined, +): StepActions { + return { + pushStep(stepParams, options) { + const stepId = makeStepId(); + + getCoreActions()?.stepPush({ + stepId, + stepParams, + targetActivityId: options?.targetActivityId, + }); + }, + replaceStep(stepParams, options) { + const stepId = makeStepId(); + + getCoreActions()?.stepReplace({ + stepId, + stepParams, + targetActivityId: options?.targetActivityId, + }); + }, + popStep(options) { + getCoreActions()?.stepPop({ + targetActivityId: options?.targetActivityId, + }); + }, + }; +} diff --git a/integrations/solid/src/future/stackflow.tsx b/integrations/solid/src/future/stackflow.tsx new file mode 100644 index 000000000..0c550244d --- /dev/null +++ b/integrations/solid/src/future/stackflow.tsx @@ -0,0 +1,171 @@ +import type { + ActivityBaseParams, + ActivityDefinition, + Config, +} from "@stackflow/config"; +import { + type CoreStore, + type PushedEvent, + makeCoreStore, + makeEvent, +} from "@stackflow/core"; +import { createMemo } from "solid-js"; +import MainRenderer from "../__internal__/MainRenderer"; +import { makeActivityId } from "../__internal__/activity"; +import { CoreProvider } from "../__internal__/core"; +import { PluginsProvider } from "../__internal__/plugins"; +import { isBrowser } from "../__internal__/utils"; +import type { ActivityComponentType, StackflowSolidPlugin } from "../stable"; +import type { Actions } from "./Actions"; +import { ConfigProvider } from "./ConfigProvider"; +import type { StackComponentType } from "./StackComponentType"; +import type { StepActions } from "./StepActions"; +import { loaderPlugin } from "./loader"; +import { makeActions } from "./makeActions"; +import { makeStepActions } from "./makeStepActions"; + +export type StackflowPluginsEntry = + | StackflowSolidPlugin + | StackflowPluginsEntry[]; + +export type StackflowInput< + T extends ActivityDefinition, + R extends { + [activityName in T["name"]]: ActivityComponentType; + }, +> = { + config: Config; + components: R; + plugins?: Array; +}; + +export type StackflowOutput = { + Stack: StackComponentType; + actions: Actions; + stepActions: StepActions; +}; + +export function stackflow< + T extends ActivityDefinition, + R extends { + [activityName in T["name"]]: ActivityComponentType; + }, +>(input: StackflowInput): StackflowOutput { + const plugins = [ + ...(input.plugins ?? []) + .flat(Number.POSITIVE_INFINITY as 0) + .map((p) => p as StackflowSolidPlugin), + + /** + * `loaderPlugin()` must be placed after `historySyncPlugin()` + */ + loaderPlugin(input.config), + ]; + + const enoughPastTime = () => + new Date().getTime() - input.config.transitionDuration * 2; + + const staticCoreStore = makeCoreStore({ + initialEvents: [ + makeEvent("Initialized", { + transitionDuration: input.config.transitionDuration, + eventDate: enoughPastTime(), + }), + ...input.config.activities.map((activity) => + makeEvent("ActivityRegistered", { + activityName: activity.name, + eventDate: enoughPastTime(), + }), + ), + ], + plugins: [], + }); + + let currentCoreStore: CoreStore | undefined; + + const Stack: StackComponentType = (props) => { + let coreStore: CoreStore; + const initialContext = createMemo(() => ({ + ...props.initialContext, + ...(props.initialLoaderData + ? { + initialLoaderData: props.initialLoaderData, + } + : null), + })); + + /** + * In a browser environment, + * memoize `coreStore` so that only one `coreStore` exists throughout the entire app. + */ + if (isBrowser() && currentCoreStore) { + coreStore = currentCoreStore; + } else { + const initialPushedEventsByOption = input.config.initialActivity + ? [ + makeEvent("Pushed", { + activityId: makeActivityId(), + activityName: input.config.initialActivity(), + activityParams: {}, + eventDate: enoughPastTime(), + skipEnterActiveState: false, + }), + ] + : []; + + coreStore = makeCoreStore({ + initialEvents: [ + ...staticCoreStore.pullEvents(), + ...initialPushedEventsByOption, + ], + initialContext: initialContext(), + plugins, + handlers: { + onInitialActivityIgnored: (initialPushedEvents) => { + console.warn( + `Stackflow - Some plugin overrides an "initialActivity" option. The "initialActivity" option you set to "${ + (initialPushedEvents[0] as PushedEvent).activityName + }" in the "stackflow" is ignored.`, + ); + }, + onInitialActivityNotFound: () => { + console.warn( + "Stackflow -" + + " There is no initial activity." + + " If you want to set the initial activity," + + " add the `initialActivity` option of the `stackflow()` function or" + + " add a plugin that sets the initial activity. (e.g. `@stackflow/plugin-history-sync`)", + ); + }, + }, + }); + + if (isBrowser()) { + coreStore.init(); + currentCoreStore = coreStore; + } + } + + return ( + + + + + + + + ); + }; + + return { + Stack, + actions: makeActions(() => currentCoreStore?.actions), + stepActions: makeStepActions(() => currentCoreStore?.actions), + }; +} diff --git a/integrations/solid/src/future/useActivityParams.ts b/integrations/solid/src/future/useActivityParams.ts new file mode 100644 index 000000000..01bf8a72f --- /dev/null +++ b/integrations/solid/src/future/useActivityParams.ts @@ -0,0 +1,13 @@ +import type { + InferActivityParams, + RegisteredActivityName, +} from "@stackflow/config"; +import { type Accessor, useContext } from "solid-js"; +import { ActivityContext } from "../__internal__/activity/ActivityProvider"; + +export function useActivityParams< + ActivityName extends RegisteredActivityName, +>(): Accessor> { + const activity = useContext(ActivityContext); + return () => activity()?.params as InferActivityParams; +} diff --git a/integrations/solid/src/future/useConfig.ts b/integrations/solid/src/future/useConfig.ts new file mode 100644 index 000000000..9d6bc2bb0 --- /dev/null +++ b/integrations/solid/src/future/useConfig.ts @@ -0,0 +1,6 @@ +import { useContext } from "solid-js"; +import { ConfigContext } from "./ConfigProvider"; + +export function useConfig() { + return useContext(ConfigContext); +} diff --git a/integrations/solid/src/future/useFlow.ts b/integrations/solid/src/future/useFlow.ts new file mode 100644 index 000000000..dc2ec5176 --- /dev/null +++ b/integrations/solid/src/future/useFlow.ts @@ -0,0 +1,12 @@ +import { useCoreActions } from "../__internal__/core"; +import type { Actions } from "./Actions"; +import { makeActions } from "./makeActions"; + +export type FlowOutput = { + useFlow: () => Actions; +}; + +export function useFlow(): Actions { + const coreActions = useCoreActions(); + return makeActions(coreActions); +} diff --git a/integrations/solid/src/future/useStepFlow.ts b/integrations/solid/src/future/useStepFlow.ts new file mode 100644 index 000000000..782917dfa --- /dev/null +++ b/integrations/solid/src/future/useStepFlow.ts @@ -0,0 +1,14 @@ +import type { + InferActivityParams, + RegisteredActivityName, +} from "@stackflow/config"; +import { useCoreActions } from "../__internal__/core"; +import type { StepActions } from "./StepActions"; +import { makeStepActions } from "./makeStepActions"; + +export function useStepFlow( + activityName: ActivityName, +): StepActions> { + const coreActions = useCoreActions(); + return makeStepActions(coreActions); +} diff --git a/extensions/link/src/index.ts b/integrations/solid/src/index.ts similarity index 100% rename from extensions/link/src/index.ts rename to integrations/solid/src/index.ts diff --git a/integrations/solid/src/stable/BaseActivities.ts b/integrations/solid/src/stable/BaseActivities.ts new file mode 100644 index 000000000..bb078148d --- /dev/null +++ b/integrations/solid/src/stable/BaseActivities.ts @@ -0,0 +1,14 @@ +import type { ActivityRegisteredEvent } from "@stackflow/core"; + +import type { ActivityComponentType } from "../__internal__/ActivityComponentType"; + +export type BaseActivities = { + [activityName: string]: + | ActivityComponentType + | { + component: ActivityComponentType; + paramsSchema: NonNullable< + ActivityRegisteredEvent["activityParamsSchema"] + >; + }; +}; diff --git a/integrations/solid/src/stable/createActiveEffect.ts b/integrations/solid/src/stable/createActiveEffect.ts new file mode 100644 index 000000000..b11d7b2f5 --- /dev/null +++ b/integrations/solid/src/stable/createActiveEffect.ts @@ -0,0 +1,13 @@ +import { createEffect } from "solid-js"; + +import { useActivity } from "../__internal__/activity/useActivity"; + +export const createActiveEffect = (effect: () => void) => { + const activity = useActivity(); + + createEffect(() => { + if (activity()?.isActive) { + return effect(); + } + }); +}; diff --git a/integrations/solid/src/stable/createEnterDoneEffect.ts b/integrations/solid/src/stable/createEnterDoneEffect.ts new file mode 100644 index 000000000..4e9cd9216 --- /dev/null +++ b/integrations/solid/src/stable/createEnterDoneEffect.ts @@ -0,0 +1,17 @@ +import { createEffect } from "solid-js"; + +import { useActivity } from "../__internal__/activity/useActivity"; + +export const createEnterDoneEffect = ( + effect: () => void, + deps?: () => void, +) => { + const activity = useActivity(); + + createEffect(() => { + void deps?.(); + if (activity()?.isTop && activity()?.transitionState === "enter-done") { + return effect(); + } + }); +}; diff --git a/integrations/solid/src/stable/index.ts b/integrations/solid/src/stable/index.ts new file mode 100644 index 000000000..f438ef21e --- /dev/null +++ b/integrations/solid/src/stable/index.ts @@ -0,0 +1,11 @@ +export * from "../__internal__/ActivityComponentType"; +export * from "../__internal__/activity/useActivity"; +export * from "../__internal__/activity/useActivityParams"; +export * from "../__internal__/stack/useStack"; +export * from "../__internal__/StackflowSolidPlugin"; +export * from "./stackflow"; +export * from "./createActiveEffect"; +export * from "./createEnterDoneEffect"; +export * from "./useActions"; +export * from "./useStep"; +export * from "./useStepActions"; diff --git a/integrations/solid/src/stable/stackflow.tsx b/integrations/solid/src/stable/stackflow.tsx new file mode 100644 index 000000000..3576168f0 --- /dev/null +++ b/integrations/solid/src/stable/stackflow.tsx @@ -0,0 +1,341 @@ +import type { + ActivityRegisteredEvent, + CoreStore, + PushedEvent, + StackflowActions, +} from "@stackflow/core"; +import { makeCoreStore, makeEvent } from "@stackflow/core"; +import type { Component } from "solid-js"; +import MainRenderer from "../__internal__/MainRenderer"; +import { CoreProvider } from "../__internal__/core"; +import { PluginsProvider } from "../__internal__/plugins"; + +import type { ActivityComponentType } from "../__internal__/ActivityComponentType"; +import type { StackflowSolidPlugin } from "../__internal__/StackflowSolidPlugin"; +import { makeActivityId, makeStepId } from "../__internal__/activity"; +import { isBrowser } from "../__internal__/utils"; +import type { BaseActivities } from "./BaseActivities"; +import type { UseActionsOutputType } from "./useActions"; +import { parseActionOptions, useActions } from "./useActions"; +import type { + UseStepActions, + UseStepActionsOutputType, +} from "./useStepActions"; +import { useStepActions } from "./useStepActions"; + +export type StackComponentType = Component<{ + initialContext?: any; + transition?: boolean; +}>; + +type StackflowPluginsEntry = + | StackflowSolidPlugin + | StackflowPluginsEntry[]; + +type NoInfer = [T][T extends any ? 0 : never]; + +export type StackflowOptions = { + /** + * Register activities used in your app + */ + activities: T; + + /** + * Transition duration for stack animation (millisecond) + */ + transitionDuration: number; + + /** + * Set the first activity to load at the bottom + * (It can be overwritten by plugin) + */ + initialActivity?: () => Extract, string>; + + /** + * Inject stackflow plugins + */ + plugins?: Array>>; +}; + +export type StackflowOutput = { + /** + * Return activities + */ + activities: T; + + /** + * Created `` component + */ + Stack: StackComponentType; + + /** + * Created `useFlow()` hooks + */ + useFlow: () => UseActionsOutputType; + + /** + * Created `useStepFlow()` hooks + */ + useStepFlow: UseStepActions; + + /** + * Add activity imperatively + */ + addActivity: (options: { + name: string; + component: ActivityComponentType; + paramsSchema?: ActivityRegisteredEvent["activityParamsSchema"]; + }) => void; + + /** + * Add plugin imperatively + */ + addPlugin: (plugin: StackflowPluginsEntry) => void; + + /** + * Created action triggers + */ + actions: Pick & + Pick, "push" | "pop" | "replace"> & + Pick, "stepPush" | "stepReplace" | "stepPop">; +}; + +export function stackflow( + options: StackflowOptions, +): StackflowOutput { + const plugins = (options.plugins ?? []) + .flat(Number.POSITIVE_INFINITY as 0) + .map((p) => p as StackflowSolidPlugin); + + const activityComponentMap = Object.entries(options.activities).reduce( + (acc, [key, Activity]) => ({ + ...acc, + [key]: "component" in Activity ? Activity.component : Activity, + }), + {} as { + [key: string]: ActivityComponentType; + }, + ); + + const enoughPastTime = () => + new Date().getTime() - options.transitionDuration * 2; + + const staticCoreStore = makeCoreStore({ + initialEvents: [ + makeEvent("Initialized", { + transitionDuration: options.transitionDuration, + eventDate: enoughPastTime(), + }), + ...Object.entries(options.activities).map(([activityName, Activity]) => + makeEvent("ActivityRegistered", { + activityName, + eventDate: enoughPastTime(), + ...("component" in Activity + ? { + activityParamsSchema: Activity.paramsSchema, + } + : null), + }), + ), + ], + plugins: [], + }); + + let currentCoreStore: CoreStore | undefined; + + const Stack: StackComponentType = (props) => { + let coreStore: CoreStore; + + // In a browser environment, + // memoize `coreStore` so that only one `coreStore` exists throughout the entire app. + if (isBrowser() && currentCoreStore) { + coreStore = currentCoreStore; + } else { + const initialPushedEventsByOption = options.initialActivity + ? [ + makeEvent("Pushed", { + activityId: makeActivityId(), + activityName: options.initialActivity(), + activityParams: {}, + eventDate: enoughPastTime(), + skipEnterActiveState: false, + }), + ] + : []; + + coreStore = makeCoreStore({ + initialEvents: [ + ...staticCoreStore.pullEvents(), + ...initialPushedEventsByOption, + ], + initialContext: props.initialContext, + plugins, + handlers: { + onInitialActivityIgnored: (initialPushedEvents) => { + console.warn( + `Stackflow - Some plugin overrides an "initialActivity" option. The "initialActivity" option you set to "${ + (initialPushedEvents[0] as PushedEvent).activityName + }" in the "stackflow" is ignored.`, + ); + }, + onInitialActivityNotFound: () => { + console.warn( + "Stackflow -" + + " There is no initial activity." + + " If you want to set the initial activity," + + " add the `initialActivity` option of the `stackflow()` function or" + + " add a plugin that sets the initial activity. (e.g. `@stackflow/plugin-history-sync`)", + ); + }, + }, + }); + + if (isBrowser()) { + coreStore.init(); + currentCoreStore = coreStore; + } + } + + return ( + + + + + + ); + }; + + return { + activities: options.activities, + Stack, + useFlow: useActions, + useStepFlow: useStepActions, + addActivity(activity) { + if (currentCoreStore) { + console.warn( + "Stackflow -" + + " `addActivity()` API cannot be called after a `` component has been rendered", + ); + + return; + } + + activityComponentMap[activity.name] = activity.component; + + staticCoreStore.actions.dispatchEvent("ActivityRegistered", { + activityName: activity.name, + activityParamsSchema: activity.paramsSchema, + eventDate: enoughPastTime(), + }); + }, + addPlugin(plugin) { + if (currentCoreStore) { + console.warn( + "Stackflow -" + + " `addPlugin()` API cannot be called after a `` component has been rendered", + ); + + return; + } + + [plugin] + .flat(Number.POSITIVE_INFINITY as 0) + .map((p) => p as StackflowSolidPlugin) + .forEach((p) => { + plugins.push(p); + }); + }, + actions: { + getStack() { + return ( + currentCoreStore?.actions.getStack() ?? + staticCoreStore.actions.getStack() + ); + }, + dispatchEvent(name, parameters) { + return currentCoreStore?.actions.dispatchEvent(name, parameters); + }, + push(activityName, activityParams, options) { + const activityId = makeActivityId(); + + currentCoreStore?.actions.push({ + activityId, + activityName, + activityParams, + skipEnterActiveState: parseActionOptions(options).skipActiveState, + }); + + return { + activityId, + }; + }, + replace(activityName, activityParams, options) { + const activityId = makeActivityId(); + + currentCoreStore?.actions.replace({ + activityId: options?.activityId ?? makeActivityId(), + activityName, + activityParams, + skipEnterActiveState: parseActionOptions(options).skipActiveState, + }); + + return { + activityId, + }; + }, + pop( + count?: number | { animate?: boolean } | undefined, + options?: { animate?: boolean } | undefined, + ) { + let _count = 1; + let _options: { animate?: boolean } = {}; + + if (typeof count === "object") { + _options = { + ...count, + }; + } + if (typeof count === "number") { + _count = count; + } + if (options) { + _options = { + ...options, + }; + } + + for (let i = 0; i < _count; i += 1) { + currentCoreStore?.actions.pop({ + skipExitActiveState: + i === 0 ? parseActionOptions(_options).skipActiveState : true, + }); + } + }, + stepPush(params) { + const stepId = makeStepId(); + + return currentCoreStore?.actions.stepPush({ + stepId, + stepParams: params, + }); + }, + stepReplace(params) { + const stepId = makeStepId(); + + return currentCoreStore?.actions.stepReplace({ + stepId, + stepParams: params, + }); + }, + stepPop() { + return currentCoreStore?.actions.stepPop({}); + }, + }, + }; +} diff --git a/integrations/solid/src/stable/useActions.ts b/integrations/solid/src/stable/useActions.ts new file mode 100644 index 000000000..10116c3bf --- /dev/null +++ b/integrations/solid/src/stable/useActions.ts @@ -0,0 +1,132 @@ +import type { Accessor } from "solid-js"; +import { useCoreActions, useCoreState } from "../__internal__/core"; + +import type { ActivityComponentType } from "../__internal__/ActivityComponentType"; +import { makeActivityId } from "../__internal__/activity"; +import type { BaseActivities } from "./BaseActivities"; + +export function parseActionOptions(options?: { animate?: boolean }) { + if (!options) { + return { skipActiveState: false }; + } + + const isNullableAnimateOption = options.animate == null; + + if (isNullableAnimateOption) { + return { skipActiveState: false }; + } + + return { skipActiveState: !options.animate }; +} + +export type UseActionsOutputType = { + /** + * Is transition pending + */ + pending: Accessor; + + /** + * Push new activity + */ + push>( + activityName: K, + params: T[K] extends + | ActivityComponentType + | { component: ActivityComponentType } + ? U + : {}, + options?: { + animate?: boolean; + }, + ): { + activityId: string; + }; + + /** + * Push new activity in the top and remove current top activity when new activity is activated + */ + replace>( + activityName: K, + params: T[K] extends + | ActivityComponentType + | { component: ActivityComponentType } + ? U + : {}, + options?: { + animate?: boolean; + activityId?: string; + }, + ): { + activityId: string; + }; + + /** + * Remove top activity + */ + pop(): void; + pop(options: { animate?: boolean }): void; + pop(count: number, options?: { animate?: boolean }): void; +}; + +export function useActions< + T extends BaseActivities, +>(): UseActionsOutputType { + const { pending } = useCoreState(); + const coreActions = useCoreActions(); + + return { + pending, + push(activityName, activityParams, options) { + const activityId = makeActivityId(); + + coreActions().push({ + activityId, + activityName, + activityParams, + skipEnterActiveState: parseActionOptions(options).skipActiveState, + }); + + return { activityId }; + }, + replace(activityName, activityParams, options) { + const activityId = makeActivityId(); + + coreActions().replace({ + activityId: options?.activityId ?? makeActivityId(), + activityName, + activityParams, + skipEnterActiveState: parseActionOptions(options).skipActiveState, + }); + + return { activityId }; + }, + pop( + count?: number | { animate?: boolean } | undefined, + options?: { animate?: boolean } | undefined, + ) { + let _count = 1; + let _options: { animate?: boolean } = {}; + + if (typeof count === "object") { + _options = { + ...count, + }; + } + if (typeof count === "number") { + _count = count; + } + if (options) { + _options = { + ...options, + }; + } + + for (let i = 0; i < _count; i += 1) { + coreActions().pop({ + skipExitActiveState: + i === 0 ? parseActionOptions(_options).skipActiveState : true, + }); + } + }, + }; +} diff --git a/integrations/solid/src/stable/useStep.ts b/integrations/solid/src/stable/useStep.ts new file mode 100644 index 000000000..2b0f7db2e --- /dev/null +++ b/integrations/solid/src/stable/useStep.ts @@ -0,0 +1,16 @@ +import type { ActivityStep } from "@stackflow/core"; +import { type Accessor, useContext } from "solid-js"; + +import { ActivityContext } from "../__internal__/activity/ActivityProvider"; + +/** + * Get current step + */ +export function useStep(): Accessor { + const activity = useContext(ActivityContext); + + return () => + activity() + ?.steps.filter((step) => step.id !== activity()?.id) + .at(-1) ?? null; +} diff --git a/integrations/solid/src/stable/useStepActions.ts b/integrations/solid/src/stable/useStepActions.ts new file mode 100644 index 000000000..dfed5007a --- /dev/null +++ b/integrations/solid/src/stable/useStepActions.ts @@ -0,0 +1,67 @@ +import type { Accessor } from "solid-js"; + +import type { ActivityComponentType } from "../__internal__/ActivityComponentType"; +import { makeStepId } from "../__internal__/activity"; +import { useCoreActions, useCoreState } from "../__internal__/core"; +import type { BaseActivities } from "./BaseActivities"; + +export type UseStepActionsOutputType

= { + pending: Accessor; + stepPush: ( + params: P, + options?: { + targetActivityId?: string; + }, + ) => void; + stepReplace: ( + params: P, + options?: { + targetActivityId?: string; + }, + ) => void; + stepPop: (options?: { targetActivityId?: string }) => void; +}; + +export type UseStepActions = < + K extends Extract, +>( + activityName: K, +) => UseStepActionsOutputType< + T[K] extends + | ActivityComponentType + | { component: ActivityComponentType } + ? U + : {} +>; + +export const useStepActions: UseStepActions = () => { + const coreActions = useCoreActions(); + const { pending } = useCoreState(); + + return { + pending, + stepPush(params, options) { + const stepId = makeStepId(); + + coreActions().stepPush({ + stepId, + stepParams: params, + targetActivityId: options?.targetActivityId, + }); + }, + stepReplace(params, options) { + const stepId = makeStepId(); + + coreActions().stepReplace({ + stepId, + stepParams: params, + targetActivityId: options?.targetActivityId, + }); + }, + stepPop(options) { + coreActions().stepPop({ + targetActivityId: options?.targetActivityId, + }); + }, + }; +}; diff --git a/integrations/solid/tsconfig.json b/integrations/solid/tsconfig.json new file mode 100644 index 000000000..d2a0df064 --- /dev/null +++ b/integrations/solid/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./src", + "outDir": "./dist", + "jsx": "preserve", + "jsxImportSource": "solid-js" + }, + "exclude": ["./dist"] +} diff --git a/package.json b/package.json index 453390b24..279767a09 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "config", "core", "demo", + "demo-solid", "integrations/*", "packages/*", "extensions/*" @@ -28,7 +29,9 @@ "resolutions": { "@mdx-js/react": "3.0.1", "@types/react": "18.3.3", - "@changesets/assemble-release-plan@npm:^6.0.3": "patch:@changesets/assemble-release-plan@npm%3A6.0.3#~/.yarn/patches/@changesets-assemble-release-plan-npm-6.0.3-29726de363.patch" + "@changesets/assemble-release-plan@npm:^6.0.3": "patch:@changesets/assemble-release-plan@npm%3A6.0.3#~/.yarn/patches/@changesets-assemble-release-plan-npm-6.0.3-29726de363.patch", + "@vanilla-extract/vite-plugin@npm:^4.0.12": "patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch", + "esbuild-plugin-solid@npm:^0.6.0": "patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch" }, "devDependencies": { "@biomejs/biome": "^1.8.3", diff --git a/packages/esbuild-config/index.js b/packages/esbuild-config/index.js index 050365bf9..3032447b9 100644 --- a/packages/esbuild-config/index.js +++ b/packages/esbuild-config/index.js @@ -3,6 +3,7 @@ const { vanillaExtractPlugin } = require("@vanilla-extract/esbuild-plugin"); const config = ({ entryPoints = ["./src/index.ts"], outdir = "dist", + plugins = [], vanillaExtractExternal = [], vanillaExtractIdentifiers = "short", }) => ({ @@ -20,6 +21,7 @@ const config = ({ external: ["@stackflow", ...vanillaExtractExternal], }, }), + ...plugins, ], }); diff --git a/yarn.lock b/yarn.lock index 9b9d71775..8f65b6deb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,6 +32,17 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.0": + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.25.9" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/db2c2122af79d31ca916755331bb4bac96feb2b334cdaca5097a6b467fdd41963b89b14b6836a14f083de7ff887fc78fa1b3c10b14e743d33e12dbfe5ee3d223 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.24.7": version: 7.24.7 resolution: "@babel/compat-data@npm:7.24.7" @@ -39,6 +50,13 @@ __metadata: languageName: node linkType: hard +"@babel/compat-data@npm:^7.25.9": + version: 7.26.2 + resolution: "@babel/compat-data@npm:7.26.2" + checksum: 10/ed9eed6b62ce803ef4a320b1dac76b0302abbb29c49dddf96f3e3207d9717eb34e299a8651bb1582e9c3346ead74b6d595ffced5b3dae718afa08b18741f8402 + languageName: node + linkType: hard + "@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.5": version: 7.24.7 resolution: "@babel/core@npm:7.24.7" @@ -62,6 +80,42 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.20.12, @babel/core@npm:^7.23.3": + version: 7.26.0 + resolution: "@babel/core@npm:7.26.0" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.26.0" + "@babel/generator": "npm:^7.26.0" + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-module-transforms": "npm:^7.26.0" + "@babel/helpers": "npm:^7.26.0" + "@babel/parser": "npm:^7.26.0" + "@babel/template": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.26.0" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/65767bfdb1f02e80d3af4f138066670ef8fdd12293de85ef151758a901c191c797e86d2e99b11c4cdfca33c72385ecaf38bbd7fa692791ec44c77763496b9b93 + languageName: node + linkType: hard + +"@babel/generator@npm:^7.23.6, @babel/generator@npm:^7.25.9, @babel/generator@npm:^7.26.0": + version: 7.26.2 + resolution: "@babel/generator@npm:7.26.2" + dependencies: + "@babel/parser": "npm:^7.26.2" + "@babel/types": "npm:^7.26.0" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^3.0.2" + checksum: 10/71ace82b5b07a554846a003624bfab93275ccf73cdb9f1a37a4c1094bf9dc94bb677c67e8b8c939dbd6c5f0eda2e8f268aa2b0d9c3b9511072565660e717e045 + languageName: node + linkType: hard + "@babel/generator@npm:^7.24.7, @babel/generator@npm:^7.7.2": version: 7.24.7 resolution: "@babel/generator@npm:7.24.7" @@ -74,6 +128,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-annotate-as-pure@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" + dependencies: + "@babel/types": "npm:^7.25.9" + checksum: 10/41edda10df1ae106a9b4fe617bf7c6df77db992992afd46192534f5cff29f9e49a303231733782dd65c5f9409714a529f215325569f14282046e9d3b7a1ffb6c + languageName: node + linkType: hard + "@babel/helper-compilation-targets@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-compilation-targets@npm:7.24.7" @@ -87,6 +150,36 @@ __metadata: languageName: node linkType: hard +"@babel/helper-compilation-targets@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-compilation-targets@npm:7.25.9" + dependencies: + "@babel/compat-data": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + browserslist: "npm:^4.24.0" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/8053fbfc21e8297ab55c8e7f9f119e4809fa7e505268691e1bedc2cf5e7a5a7de8c60ad13da2515378621b7601c42e101d2d679904da395fa3806a1edef6b92e + languageName: node + linkType: hard + +"@babel/helper-create-class-features-plugin@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-create-class-features-plugin@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-member-expression-to-functions": "npm:^7.25.9" + "@babel/helper-optimise-call-expression": "npm:^7.25.9" + "@babel/helper-replace-supers": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/d1d47a7b5fd317c6cb1446b0e4f4892c19ddaa69ea0229f04ba8bea5f273fc8168441e7114ad36ff919f2d310f97310cec51adc79002e22039a7e1640ccaf248 + languageName: node + linkType: hard + "@babel/helper-environment-visitor@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-environment-visitor@npm:7.24.7" @@ -115,6 +208,35 @@ __metadata: languageName: node linkType: hard +"@babel/helper-member-expression-to-functions@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-member-expression-to-functions@npm:7.25.9" + dependencies: + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/ef8cc1c1e600b012b312315f843226545a1a89f25d2f474ce2503fd939ca3f8585180f291a3a13efc56cf13eddc1d41a3a040eae9a521838fd59a6d04cc82490 + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:7.18.6": + version: 7.18.6 + resolution: "@babel/helper-module-imports@npm:7.18.6" + dependencies: + "@babel/types": "npm:^7.18.6" + checksum: 10/75b0d510271c2d220c426ec1174666febbe8ce520e66f99f87e8944acddaf5d1e88167fe500a1c8e46a770a5cb916e566d3b514ec0af6cbdac93089ed8200716 + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-module-imports@npm:7.25.9" + dependencies: + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/e090be5dee94dda6cd769972231b21ddfae988acd76b703a480ac0c96f3334557d70a965bf41245d6ee43891e7571a8b400ccf2b2be5803351375d0f4e5bcf08 + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-module-imports@npm:7.24.7" @@ -140,6 +262,28 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.25.9, @babel/helper-module-transforms@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/helper-module-transforms@npm:7.26.0" + dependencies: + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/9841d2a62f61ad52b66a72d08264f23052d533afc4ce07aec2a6202adac0bfe43014c312f94feacb3291f4c5aafe681955610041ece2c276271adce3f570f2f5 + languageName: node + linkType: hard + +"@babel/helper-optimise-call-expression@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-optimise-call-expression@npm:7.25.9" + dependencies: + "@babel/types": "npm:^7.25.9" + checksum: 10/f09d0ad60c0715b9a60c31841b3246b47d67650c512ce85bbe24a3124f1a4d66377df793af393273bc6e1015b0a9c799626c48e53747581c1582b99167cc65dc + languageName: node + linkType: hard + "@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.8.0": version: 7.24.7 resolution: "@babel/helper-plugin-utils@npm:7.24.7" @@ -147,6 +291,26 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-plugin-utils@npm:7.25.9" + checksum: 10/e347d87728b1ab10b6976d46403941c8f9008c045ea6d99997a7ffca7b852dc34b6171380f7b17edf94410e0857ff26f3a53d8618f11d73744db86e8ca9b8c64 + languageName: node + linkType: hard + +"@babel/helper-replace-supers@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-replace-supers@npm:7.25.9" + dependencies: + "@babel/helper-member-expression-to-functions": "npm:^7.25.9" + "@babel/helper-optimise-call-expression": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/8ebf787016953e4479b99007bac735c9c860822fafc51bc3db67bc53814539888797238c81fa8b948b6da897eb7b1c1d4f04df11e501a7f0596b356be02de2ab + languageName: node + linkType: hard + "@babel/helper-simple-access@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-simple-access@npm:7.24.7" @@ -157,6 +321,26 @@ __metadata: languageName: node linkType: hard +"@babel/helper-simple-access@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-simple-access@npm:7.25.9" + dependencies: + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/a16a6cfa5e8ac7144e856bcdaaf0022cf5de028fc0c56ce21dd664a6e900999a4285c587a209f2acf9de438c0d60bfb497f5f34aa34cbaf29da3e2f8d8d7feb7 + languageName: node + linkType: hard + +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.25.9" + dependencies: + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/fdbb5248932198bc26daa6abf0d2ac42cab9c2dbb75b7e9f40d425c8f28f09620b886d40e7f9e4e08ffc7aaa2cefe6fc2c44be7c20e81f7526634702fb615bdc + languageName: node + linkType: hard + "@babel/helper-split-export-declaration@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-split-export-declaration@npm:7.24.7" @@ -173,6 +357,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-string-parser@npm:7.25.9" + checksum: 10/c28656c52bd48e8c1d9f3e8e68ecafd09d949c57755b0d353739eb4eae7ba4f7e67e92e4036f1cd43378cc1397a2c943ed7bcaf5949b04ab48607def0258b775 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-validator-identifier@npm:7.24.7" @@ -180,6 +371,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10/3f9b649be0c2fd457fa1957b694b4e69532a668866b8a0d81eabfa34ba16dbf3107b39e0e7144c55c3c652bf773ec816af8df4a61273a2bb4eb3145ca9cf478e + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-validator-option@npm:7.24.7" @@ -187,6 +385,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-option@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-option@npm:7.25.9" + checksum: 10/9491b2755948ebbdd68f87da907283698e663b5af2d2b1b02a2765761974b1120d5d8d49e9175b167f16f72748ffceec8c9cf62acfbee73f4904507b246e2b3d + languageName: node + linkType: hard + "@babel/helpers@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helpers@npm:7.24.7" @@ -197,6 +402,16 @@ __metadata: languageName: node linkType: hard +"@babel/helpers@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/helpers@npm:7.26.0" + dependencies: + "@babel/template": "npm:^7.25.9" + "@babel/types": "npm:^7.26.0" + checksum: 10/fd4757f65d10b64cfdbf4b3adb7ea6ffff9497c53e0786452f495d1f7794da7e0898261b4db65e1c62bbb9a360d7d78a1085635c23dfc3af2ab6dcba06585f86 + languageName: node + linkType: hard + "@babel/highlight@npm:^7.24.7": version: 7.24.7 resolution: "@babel/highlight@npm:7.24.7" @@ -218,6 +433,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2": + version: 7.26.2 + resolution: "@babel/parser@npm:7.26.2" + dependencies: + "@babel/types": "npm:^7.26.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10/8baee43752a3678ad9f9e360ec845065eeee806f1fdc8e0f348a8a0e13eef0959dabed4a197c978896c493ea205c804d0a1187cc52e4a1ba017c7935bab4983d + languageName: node + linkType: hard + "@babel/plugin-syntax-async-generators@npm:^7.8.4": version: 7.8.4 resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" @@ -273,6 +499,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-jsx@npm:^7.18.6, @babel/plugin-syntax-jsx@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-syntax-jsx@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/bb609d1ffb50b58f0c1bac8810d0e46a4f6c922aa171c458f3a19d66ee545d36e782d3bffbbc1fed0dc65a558bdce1caf5279316583c0fff5a2c1658982a8563 + languageName: node + linkType: hard + "@babel/plugin-syntax-jsx@npm:^7.7.2": version: 7.18.6 resolution: "@babel/plugin-syntax-jsx@npm:7.18.6" @@ -372,6 +609,30 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-typescript@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-syntax-typescript@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/0e9821e8ba7d660c36c919654e4144a70546942ae184e85b8102f2322451eae102cbfadbcadd52ce077a2b44b400ee52394c616feab7b5b9f791b910e933fd33 + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-commonjs@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.25.9" + dependencies: + "@babel/helper-module-transforms": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-simple-access": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/a7390ca999373ccdef91075f274d1ace3a5cb79f9b9118ed6f76e94867ed454cf798a6f312ce2c4cdc1e035a25d810d754e4cb2e4d866acb4219490f3585de60 + languageName: node + linkType: hard + "@babel/plugin-transform-react-jsx-self@npm:^7.24.5": version: 7.24.7 resolution: "@babel/plugin-transform-react-jsx-self@npm:7.24.7" @@ -394,6 +655,36 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-typescript@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-typescript@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/plugin-syntax-typescript": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/91e2ec805f89a813e0bf9cf42dffb767f798429e983af3e2f919885a2826b10f29223dd8b40ccc569eb61858d3273620e82e14431603a893e4a7f9b4c1a3a3cf + languageName: node + linkType: hard + +"@babel/preset-typescript@npm:^7.18.6": + version: 7.26.0 + resolution: "@babel/preset-typescript@npm:7.26.0" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + "@babel/plugin-syntax-jsx": "npm:^7.25.9" + "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" + "@babel/plugin-transform-typescript": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/81a60826160163a3daae017709f42147744757b725b50c9024ef3ee5a402ee45fd2e93eaecdaaa22c81be91f7940916249cfb7711366431cfcacc69c95878c03 + languageName: node + linkType: hard + "@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6": version: 7.25.0 resolution: "@babel/runtime@npm:7.25.0" @@ -414,6 +705,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/template@npm:7.25.9" + dependencies: + "@babel/code-frame": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/e861180881507210150c1335ad94aff80fd9e9be6202e1efa752059c93224e2d5310186ddcdd4c0f0b0fc658ce48cb47823f15142b5c00c8456dde54f5de80b2 + languageName: node + linkType: hard + "@babel/traverse@npm:^7.24.7": version: 7.24.7 resolution: "@babel/traverse@npm:7.24.7" @@ -432,6 +734,21 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/traverse@npm:7.25.9" + dependencies: + "@babel/code-frame": "npm:^7.25.9" + "@babel/generator": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/template": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/7431614d76d4a053e429208db82f2846a415833f3d9eb2e11ef72eeb3c64dfd71f4a4d983de1a4a047b36165a1f5a64de8ca2a417534cc472005c740ffcb9c6a + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.7, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": version: 7.24.7 resolution: "@babel/types@npm:7.24.7" @@ -443,6 +760,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.18.6, @babel/types@npm:^7.23.6, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/types@npm:7.26.0" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10/40780741ecec886ed9edae234b5eb4976968cc70d72b4e5a40d55f83ff2cc457de20f9b0f4fe9d858350e43dab0ea496e7ef62e2b2f08df699481a76df02cd6e + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -2015,7 +2342,7 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/config@npm:^1.2.0, @stackflow/config@workspace:config": +"@stackflow/config@npm:^1.1.0, @stackflow/config@npm:^1.2.0, @stackflow/config@workspace:config": version: 0.0.0-use.local resolution: "@stackflow/config@workspace:config" dependencies: @@ -2045,6 +2372,41 @@ __metadata: languageName: unknown linkType: soft +"@stackflow/demo-solid@workspace:demo-solid": + version: 0.0.0-use.local + resolution: "@stackflow/demo-solid@workspace:demo-solid" + dependencies: + "@seed-design/design-token": "npm:^1.0.3" + "@seed-design/stylesheet": "npm:^1.0.4" + "@stackflow/compat-await-push": "npm:^1.1.13" + "@stackflow/config": "npm:^1.1.0" + "@stackflow/core": "npm:^1.1.0" + "@stackflow/esbuild-config": "npm:^1.0.3" + "@stackflow/link": "npm:^1.5.0" + "@stackflow/plugin-basic-ui": "npm:^1.9.2" + "@stackflow/plugin-devtools": "npm:^0.1.11" + "@stackflow/plugin-history-sync": "npm:^1.7.0" + "@stackflow/plugin-map-initial-activity": "npm:^1.0.11" + "@stackflow/plugin-preload": "npm:^1.4.3" + "@stackflow/plugin-renderer-basic": "npm:^1.1.13" + "@stackflow/plugin-stack-depth-change": "npm:^1.1.5" + "@stackflow/solid": "npm:^1.3.1" + "@vanilla-extract/css": "npm:^1.15.3" + "@vanilla-extract/vite-plugin": "npm:^4.0.12" + esbuild: "npm:^0.23.0" + lorem-ipsum: "npm:^2.0.8" + lz-string: "npm:^1.5.0" + normalize.css: "npm:^8.0.1" + random-picture: "npm:^4.0.6" + rimraf: "npm:^3.0.2" + solid-js: "npm:^1.9.2" + typescript: "npm:^5.5.3" + vite: "npm:^5.3.2" + vite-plugin-solid: "npm:^2.10.2" + zod: "npm:^3.23.8" + languageName: unknown + linkType: soft + "@stackflow/demo@npm:^1.4.0, @stackflow/demo@workspace:demo": version: 0.0.0-use.local resolution: "@stackflow/demo@workspace:demo" @@ -2136,19 +2498,35 @@ __metadata: "@stackflow/plugin-history-sync": "npm:^1.7.0" "@stackflow/plugin-preload": "npm:^1.4.3" "@stackflow/react": "npm:^1.4.0" + "@stackflow/solid": "npm:^1.4.0" "@types/react": "npm:^18.3.3" esbuild: "npm:^0.23.0" esbuild-plugin-file-path-extensions: "npm:^2.1.3" + esbuild-plugin-solid: "npm:^0.6.0" react: "npm:^18.3.1" rimraf: "npm:^3.0.2" + solid-js: "npm:^1.8.18" typescript: "npm:^5.5.3" peerDependencies: "@stackflow/core": ^1.1.0-canary.0 "@stackflow/plugin-history-sync": ^1.6.4-canary.0 "@stackflow/plugin-preload": ^1.4.3-canary.0 "@stackflow/react": ^1.3.2-canary.0 + "@stackflow/solid": ^1.3.2-canary.0 "@types/react": ">=16.8.0" react: ">=16.8.0" + solid-js: ">=1.4.0" + peerDependenciesMeta: + "@stackflow/react": + optional: true + "@stackflow/solid": + optional: true + "@types/react": + optional: true + react: + optional: true + solid-js: + optional: true languageName: unknown linkType: soft @@ -2174,20 +2552,37 @@ __metadata: "@stackflow/esbuild-config": "npm:^1.0.3" "@stackflow/react": "npm:^1.3.2" "@stackflow/react-ui-core": "npm:^1.1.2" + "@stackflow/solid": "npm:^1.3.0" + "@stackflow/solid-ui-core": "npm:^1.1.1" "@types/react": "npm:^18.3.3" "@vanilla-extract/css": "npm:^1.15.3" "@vanilla-extract/dynamic": "npm:^2.1.1" "@vanilla-extract/private": "npm:^1.0.5" "@vanilla-extract/recipes": "npm:^0.5.3" esbuild: "npm:^0.23.0" + esbuild-plugin-solid: "patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch" react: "npm:^18.3.1" rimraf: "npm:^3.0.2" + solid-js: "npm:^1.8.18" typescript: "npm:^5.5.3" peerDependencies: "@stackflow/core": ^1.1.0-canary.0 "@stackflow/react": ^1.3.2-canary.0 + "@stackflow/solid": ^1.3.2-canary.0 "@types/react": ">=16.8.0" react: ">=16.8.0" + solid-js: ">=1.4.0" + peerDependenciesMeta: + "@stackflow/react": + optional: true + "@stackflow/solid": + optional: true + "@types/react": + optional: true + react: + optional: true + solid-js: + optional: true languageName: unknown linkType: soft @@ -2236,6 +2631,7 @@ __metadata: "@stackflow/core": "npm:^1.1.0" "@stackflow/esbuild-config": "npm:^1.0.3" "@stackflow/react": "npm:^1.4.0" + "@stackflow/solid": "npm:^1.4.0" "@swc/core": "npm:^1.6.6" "@swc/jest": "npm:^0.2.36" "@types/jest": "npm:^29.5.12" @@ -2244,6 +2640,7 @@ __metadata: "@types/react-relay": "npm:^16.0.6" "@types/relay-runtime": "npm:^17" esbuild: "npm:^0.23.0" + esbuild-plugin-solid: "npm:^0.6.0" flatted: "npm:^3.3.1" graphql: "npm:^16.9.0" history: "npm:^5.3.0" @@ -2253,14 +2650,28 @@ __metadata: relay-compiler: "npm:^17.0.0" relay-runtime: "npm:^17.0.0" rimraf: "npm:^3.0.2" + solid-js: "npm:^1.8.18" typescript: "npm:^5.5.3" url-pattern: "npm:^1.0.3" peerDependencies: "@stackflow/config": ^1.0.1-canary.0 "@stackflow/core": ^1.1.0-canary.0 "@stackflow/react": ^1.3.2-canary.0 + "@stackflow/solid": ^1.3.2-canary.0 "@types/react": ">=16.8.0" react: ">=16.8.0" + solid-js: ">=1.4.0" + peerDependenciesMeta: + "@stackflow/react": + optional: true + "@stackflow/solid": + optional: true + "@types/react": + optional: true + react: + optional: true + solid-js: + optional: true languageName: unknown linkType: soft @@ -2270,13 +2681,11 @@ __metadata: dependencies: "@stackflow/core": "npm:^1.1.0" "@stackflow/esbuild-config": "npm:^1.0.3" - "@stackflow/react": "npm:^1.3.2" esbuild: "npm:^0.23.0" rimraf: "npm:^3.0.2" typescript: "npm:^5.5.3" peerDependencies: "@stackflow/core": ^1.1.0-canary.0 - "@stackflow/react": ^1.3.2-canary.0 languageName: unknown linkType: soft @@ -2288,17 +2697,33 @@ __metadata: "@stackflow/esbuild-config": "npm:^1.0.3" "@stackflow/plugin-history-sync": "npm:^1.7.0" "@stackflow/react": "npm:^1.4.0" + "@stackflow/solid": "npm:^1.4.0" "@types/react": "npm:^18.3.3" esbuild: "npm:^0.23.0" + esbuild-plugin-solid: "npm:^0.6.0" react: "npm:^18.3.1" rimraf: "npm:^3.0.2" + solid-js: "npm:^1.8.18" typescript: "npm:^5.5.3" peerDependencies: "@stackflow/core": ^1.1.0-canary.0 "@stackflow/plugin-history-sync": ^1.6.4-canary.0 "@stackflow/react": ^1.3.2-canary.0 + "@stackflow/solid": ^1.3.2-canary.0 "@types/react": ">=16.8.0" react: ">=16.8.0" + solid-js: ">=1.4.0" + peerDependenciesMeta: + "@stackflow/react": + optional: true + "@stackflow/solid": + optional: true + "@types/react": + optional: true + react: + optional: true + solid-js: + optional: true languageName: unknown linkType: soft @@ -2309,16 +2734,32 @@ __metadata: "@stackflow/core": "npm:^1.1.0" "@stackflow/esbuild-config": "npm:^1.0.3" "@stackflow/react": "npm:^1.3.2" + "@stackflow/solid": "npm:^1.3.0" "@types/react": "npm:^18.3.3" esbuild: "npm:^0.23.0" + esbuild-plugin-solid: "npm:^0.6.0" react: "npm:^18.3.1" rimraf: "npm:^3.0.2" + solid-js: "npm:^1.8.18" typescript: "npm:^5.5.3" peerDependencies: "@stackflow/core": ^1.1.0-canary.0 "@stackflow/react": ^1.3.2-canary.0 + "@stackflow/solid": ^1.3.2-canary.0 "@types/react": ">=16.8.0" react: ">=16.8.0" + solid-js: ">=1.4.0" + peerDependenciesMeta: + "@stackflow/react": + optional: true + "@stackflow/solid": + optional: true + "@types/react": + optional: true + react: + optional: true + solid-js: + optional: true languageName: unknown linkType: soft @@ -2329,16 +2770,32 @@ __metadata: "@stackflow/core": "npm:^1.1.0" "@stackflow/esbuild-config": "npm:^1.0.3" "@stackflow/react": "npm:^1.3.2" + "@stackflow/solid": "npm:^1.3.0" "@types/react": "npm:^18.3.3" esbuild: "npm:^0.23.0" + esbuild-plugin-solid: "npm:^0.6.0" react: "npm:^18.3.1" rimraf: "npm:^3.0.2" + solid-js: "npm:^1.8.18" typescript: "npm:^5.5.3" peerDependencies: "@stackflow/core": ^1.1.0-canary.0 "@stackflow/react": ^1.3.2-canary.0 + "@stackflow/solid": ^1.3.2-canary.0 "@types/react": ">=16.8.0" react: ">=16.8.0" + solid-js: ">=1.4.0" + peerDependenciesMeta: + "@stackflow/react": + optional: true + "@stackflow/solid": + optional: true + "@types/react": + optional: true + react: + optional: true + solid-js: + optional: true languageName: unknown linkType: soft @@ -2401,6 +2858,45 @@ __metadata: languageName: unknown linkType: soft +"@stackflow/solid-ui-core@npm:^1.1.1, @stackflow/solid-ui-core@workspace:extensions/solid-ui-core": + version: 0.0.0-use.local + resolution: "@stackflow/solid-ui-core@workspace:extensions/solid-ui-core" + dependencies: + "@stackflow/core": "npm:^1.1.0" + "@stackflow/esbuild-config": "npm:^1.0.2" + "@stackflow/solid": "npm:^1.3.0" + esbuild: "npm:^0.23.0" + esbuild-plugin-solid: "patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch" + rimraf: "npm:^3.0.2" + solid-js: "npm:^1.8.18" + typescript: "npm:^5.5.3" + peerDependencies: + "@stackflow/core": ^1.1.0-canary.0 + "@stackflow/solid": ^1.3.0-canary.0 + solid-js: ">=1.4.0" + languageName: unknown + linkType: soft + +"@stackflow/solid@npm:^1.3.0, @stackflow/solid@npm:^1.3.1, @stackflow/solid@npm:^1.4.0, @stackflow/solid@workspace:integrations/solid": + version: 0.0.0-use.local + resolution: "@stackflow/solid@workspace:integrations/solid" + dependencies: + "@stackflow/config": "npm:^1.1.0" + "@stackflow/core": "npm:^1.1.0" + "@stackflow/esbuild-config": "npm:^1.0.3" + esbuild: "npm:^0.23.0" + esbuild-plugin-file-path-extensions: "npm:^2.1.2" + esbuild-plugin-solid: "patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch" + rimraf: "npm:^3.0.2" + solid-js: "npm:^1.8.18" + typescript: "npm:^5.5.3" + peerDependencies: + "@stackflow/config": ^1.0.1-canary.0 + "@stackflow/core": ^1.1.0-canary.0 + solid-js: ">=1.4.0" + languageName: unknown + linkType: soft + "@swc/core-darwin-arm64@npm:1.6.6": version: 1.6.6 resolution: "@swc/core-darwin-arm64@npm:1.6.6" @@ -2613,7 +3109,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.20.5": +"@types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.20.4, @types/babel__core@npm:^7.20.5": version: 7.20.5 resolution: "@types/babel__core@npm:7.20.5" dependencies: @@ -3070,7 +3566,7 @@ __metadata: languageName: node linkType: hard -"@vanilla-extract/vite-plugin@npm:^4.0.12": +"@vanilla-extract/vite-plugin@npm:4.0.12": version: 4.0.12 resolution: "@vanilla-extract/vite-plugin@npm:4.0.12" dependencies: @@ -3081,6 +3577,17 @@ __metadata: languageName: node linkType: hard +"@vanilla-extract/vite-plugin@patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch": + version: 4.0.12 + resolution: "@vanilla-extract/vite-plugin@patch:@vanilla-extract/vite-plugin@npm%3A4.0.12#~/.yarn/patches/@vanilla-extract-vite-plugin-npm-4.0.12-ed14a9ba3b.patch::version=4.0.12&hash=d3aa99" + dependencies: + "@vanilla-extract/integration": "npm:^7.1.7" + peerDependencies: + vite: ^4.0.3 || ^5.0.0 + checksum: 10/a1113597858d32ef1fa82a222ebe232c46aacecee77e5558de9c75e8b6483c6d6affe150d50e40ebf02edeecbca2ec649b328ca825c25885655f7d9112e667bc + languageName: node + linkType: hard + "@vitejs/plugin-react@npm:^4.3.1": version: 4.3.1 resolution: "@vitejs/plugin-react@npm:4.3.1" @@ -3409,6 +3916,22 @@ __metadata: languageName: node linkType: hard +"babel-plugin-jsx-dom-expressions@npm:^0.39.3": + version: 0.39.3 + resolution: "babel-plugin-jsx-dom-expressions@npm:0.39.3" + dependencies: + "@babel/helper-module-imports": "npm:7.18.6" + "@babel/plugin-syntax-jsx": "npm:^7.18.6" + "@babel/types": "npm:^7.20.7" + html-entities: "npm:2.3.3" + parse5: "npm:^7.1.2" + validate-html-nesting: "npm:^1.2.1" + peerDependencies: + "@babel/core": ^7.20.12 + checksum: 10/2bcab150bbb11ccce9769bdf7ecbecf7c5f196abae1cd0026e9414d6d37ad20f2851e6786c46a9aa7c8b1a78311201ecd7a69f5b1d986f78b3ecb70e8c4fbb6a + languageName: node + linkType: hard + "babel-preset-current-node-syntax@npm:^1.0.0": version: 1.0.1 resolution: "babel-preset-current-node-syntax@npm:1.0.1" @@ -3443,6 +3966,17 @@ __metadata: languageName: node linkType: hard +"babel-preset-solid@npm:^1.6.9, babel-preset-solid@npm:^1.8.4": + version: 1.9.3 + resolution: "babel-preset-solid@npm:1.9.3" + dependencies: + babel-plugin-jsx-dom-expressions: "npm:^0.39.3" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/144f7b1cd237325a043135d3d295528665ac5ac5799ca4be945e4572a43ab29ef6b5132a46bff159e8bef31a5a8f194004990fdcd7a40c05c9d9b8cd95b026e3 + languageName: node + linkType: hard + "bail@npm:^2.0.0": version: 2.0.2 resolution: "bail@npm:2.0.2" @@ -3538,6 +4072,20 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.24.0": + version: 4.24.2 + resolution: "browserslist@npm:4.24.2" + dependencies: + caniuse-lite: "npm:^1.0.30001669" + electron-to-chromium: "npm:^1.5.41" + node-releases: "npm:^2.0.18" + update-browserslist-db: "npm:^1.1.1" + bin: + browserslist: cli.js + checksum: 10/f8a9d78bbabe466c57ffd5c50a9e5582a5df9aa68f43078ca62a9f6d0d6c70ba72eca72d0a574dbf177cf55cdca85a46f7eb474917a47ae5398c66f8b76f7d1c + languageName: node + linkType: hard + "bser@npm:2.1.1": version: 2.1.1 resolution: "bser@npm:2.1.1" @@ -3638,6 +4186,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001669": + version: 1.0.30001677 + resolution: "caniuse-lite@npm:1.0.30001677" + checksum: 10/e07439bdeade5ffdd974691f44f8549ae0730fcf510acaa32d0b657c10370cd5aad09eeca37248966205fb37fce5f464dbce73ce177b4a1fdc3a34adbcfd7192 + languageName: node + linkType: hard + "ccount@npm:^2.0.0": version: 2.0.1 resolution: "ccount@npm:2.0.1" @@ -4040,6 +4595,13 @@ __metadata: languageName: node linkType: hard +"csstype@npm:^3.1.0": + version: 3.1.3 + resolution: "csstype@npm:3.1.3" + checksum: 10/f593cce41ff5ade23f44e77521e3a1bcc2c64107041e1bf6c3c32adc5187d0d60983292fda326154d20b01079e24931aa5b08e4467cc488b60bb1e7f6d478ade + languageName: node + linkType: hard + "cytoscape-cose-bilkent@npm:^4.1.0": version: 4.1.0 resolution: "cytoscape-cose-bilkent@npm:4.1.0" @@ -4600,6 +5162,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.5.41": + version: 1.5.50 + resolution: "electron-to-chromium@npm:1.5.50" + checksum: 10/635ca4b593e64697fbebc9fe7f557abcb030e5f6edcefb596ae3f8c9313221a754b513b70f2ba12595a9ee5733442b2b58db9eed7a2fa63e9f7539d581dd4ac0 + languageName: node + linkType: hard + "elkjs@npm:^0.9.0": version: 0.9.3 resolution: "elkjs@npm:0.9.3" @@ -4647,7 +5216,7 @@ __metadata: languageName: node linkType: hard -"entities@npm:^4.4.0": +"entities@npm:^4.4.0, entities@npm:^4.5.0": version: 4.5.0 resolution: "entities@npm:4.5.0" checksum: 10/ede2a35c9bce1aeccd055a1b445d41c75a14a2bb1cd22e242f20cf04d236cdcd7f9c859eb83f76885327bfae0c25bf03303665ee1ce3d47c5927b98b0e3e3d48 @@ -4684,6 +5253,34 @@ __metadata: languageName: node linkType: hard +"esbuild-plugin-solid@npm:0.6.0": + version: 0.6.0 + resolution: "esbuild-plugin-solid@npm:0.6.0" + dependencies: + "@babel/core": "npm:^7.20.12" + "@babel/preset-typescript": "npm:^7.18.6" + babel-preset-solid: "npm:^1.6.9" + peerDependencies: + esbuild: ">=0.20" + solid-js: ">= 1.0" + checksum: 10/91d0ae9aa2350dd9a545b52caafd724ad59fc46a01a0968e42c73e521453ed883c074d50458e1af3353f7d96f32a5b06652d7a8389b51a02ffa6c190c53c38bf + languageName: node + linkType: hard + +"esbuild-plugin-solid@patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch": + version: 0.6.0 + resolution: "esbuild-plugin-solid@patch:esbuild-plugin-solid@npm%3A0.6.0#~/.yarn/patches/esbuild-plugin-solid-npm-0.6.0-49835b85dc.patch::version=0.6.0&hash=bf8c52" + dependencies: + "@babel/core": "npm:^7.20.12" + "@babel/preset-typescript": "npm:^7.18.6" + babel-preset-solid: "npm:^1.6.9" + peerDependencies: + esbuild: ">=0.20" + solid-js: ">= 1.0" + checksum: 10/3f3b1731763a8403e0f9d398af51c6af807ec6ac7f3f15cecd3552f44261a0b8ff7062fe27ebcfb6b70714ab8609814fcd524f01ba355146dfaafcb5dbb82a3c + languageName: node + linkType: hard + "esbuild@npm:^0.21.3, esbuild@npm:esbuild@~0.17.6 || ~0.18.0 || ~0.19.0 || ~0.20.0 || ~0.21.0": version: 0.21.5 resolution: "esbuild@npm:0.21.5" @@ -5711,6 +6308,13 @@ __metadata: languageName: node linkType: hard +"html-entities@npm:2.3.3": + version: 2.3.3 + resolution: "html-entities@npm:2.3.3" + checksum: 10/24f6b77ce234e263f3d44530de2356e67c313c8ba7e5f6e02c16dcea3a950711d8820afb320746d57b8dae61fde7aaaa7f60017b706fa4bce8624ba3c29ad316 + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -6080,6 +6684,13 @@ __metadata: languageName: node linkType: hard +"is-what@npm:^4.1.8": + version: 4.1.16 + resolution: "is-what@npm:4.1.16" + checksum: 10/f6400634bae77be6903365dc53817292e1c4d8db1b467515d0c842505b8388ee8e558326d5e6952cb2a9d74116eca2af0c6adb8aa7e9d5c845a130ce9328bf13 + languageName: node + linkType: hard + "is-windows@npm:^1.0.0": version: 1.0.2 resolution: "is-windows@npm:1.0.2" @@ -6666,6 +7277,15 @@ __metadata: languageName: node linkType: hard +"jsesc@npm:^3.0.2": + version: 3.0.2 + resolution: "jsesc@npm:3.0.2" + bin: + jsesc: bin/jsesc + checksum: 10/8e5a7de6b70a8bd71f9cb0b5a7ade6a73ae6ab55e697c74cc997cede97417a3a65ed86c36f7dd6125fe49766e8386c845023d9e213916ca92c9dfdd56e2babf3 + languageName: node + linkType: hard + "json-parse-even-better-errors@npm:^2.3.0": version: 2.3.1 resolution: "json-parse-even-better-errors@npm:2.3.1" @@ -7249,6 +7869,15 @@ __metadata: languageName: node linkType: hard +"merge-anything@npm:^5.1.7": + version: 5.1.7 + resolution: "merge-anything@npm:5.1.7" + dependencies: + is-what: "npm:^4.1.8" + checksum: 10/53d034b2a17f9a38e104a47fe60522858117da85421f1990d4c9c68494a33c3a19fa090a65f0bbf44cc2524d240297033548a018170ab466911be3d36e38bcad + languageName: node + linkType: hard + "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -8491,6 +9120,15 @@ __metadata: languageName: node linkType: hard +"parse5@npm:^7.1.2": + version: 7.2.1 + resolution: "parse5@npm:7.2.1" + dependencies: + entities: "npm:^4.5.0" + checksum: 10/fd1a8ad1540d871e1ad6ca9bf5b67e30280886f1ce4a28052c0cb885723aa984d8cb1ec3da998349a6146960c8a84aa87b1a42600eb3b94495c7303476f2f88e + languageName: node + linkType: hard + "path-exists@npm:^4.0.0": version: 4.0.0 resolution: "path-exists@npm:4.0.0" @@ -9409,6 +10047,22 @@ __metadata: languageName: node linkType: hard +"seroval-plugins@npm:^1.1.0": + version: 1.1.1 + resolution: "seroval-plugins@npm:1.1.1" + peerDependencies: + seroval: ^1.0 + checksum: 10/79188bd16f7492c59fc102e82d14b8b7b390b4c4f066d76379e75d248cffd0f8b09f1dc7c593d5b6956803d05d97d34ec96d9ab5b67f23f7623ad4a8e0df7567 + languageName: node + linkType: hard + +"seroval@npm:^1.1.0": + version: 1.1.1 + resolution: "seroval@npm:1.1.1" + checksum: 10/06053be7591a72fb8cc7ff2df2b3b306f5c29ecda29981ecd888533fad1ffbbc503e7c6dd9c80b40f98d9784aa20583e5760af031c5422e9c4047bc674a30044 + languageName: node + linkType: hard + "set-blocking@npm:^2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -9539,6 +10193,30 @@ __metadata: languageName: node linkType: hard +"solid-js@npm:^1.8.18, solid-js@npm:^1.9.2": + version: 1.9.3 + resolution: "solid-js@npm:1.9.3" + dependencies: + csstype: "npm:^3.1.0" + seroval: "npm:^1.1.0" + seroval-plugins: "npm:^1.1.0" + checksum: 10/01c932a700f1eaef8280a2ae90f991179f0ad391e0e465cc07f0802b34dca7751878d33bb1d65fcd76c6209b24bd08aef016eaf5e1f77734051a5f849bef0d84 + languageName: node + linkType: hard + +"solid-refresh@npm:^0.6.3": + version: 0.6.3 + resolution: "solid-refresh@npm:0.6.3" + dependencies: + "@babel/generator": "npm:^7.23.6" + "@babel/helper-module-imports": "npm:^7.22.15" + "@babel/types": "npm:^7.23.6" + peerDependencies: + solid-js: ^1.3 + checksum: 10/2ca43f894fd3044b4c0c8e1aca6f9a5ddb6e65397d7baad1688601795d64eb849c94a4a31cf5032a371c4f3c15c2e00d9027ea16e907547ea0c0200e1a82c0cd + languageName: node + linkType: hard + "sort-keys@npm:^5.0.0": version: 5.0.0 resolution: "sort-keys@npm:5.0.0" @@ -10383,7 +11061,7 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.1.0": +"update-browserslist-db@npm:^1.1.0, update-browserslist-db@npm:^1.1.1": version: 1.1.1 resolution: "update-browserslist-db@npm:1.1.1" dependencies: @@ -10445,6 +11123,13 @@ __metadata: languageName: node linkType: hard +"validate-html-nesting@npm:^1.2.1": + version: 1.2.2 + resolution: "validate-html-nesting@npm:1.2.2" + checksum: 10/2c13f75b936eb167a0e33a3aa58b7cdce66ccfea762a4e3bdaf7771a64278d83a85eea01dbd8cccda0649b9112b5665ccd9139deb91fc626212c28ee04fbede9 + languageName: node + linkType: hard + "value-or-promise@npm:^1.0.12": version: 1.0.12 resolution: "value-or-promise@npm:1.0.12" @@ -10541,6 +11226,27 @@ __metadata: languageName: node linkType: hard +"vite-plugin-solid@npm:^2.10.2": + version: 2.10.2 + resolution: "vite-plugin-solid@npm:2.10.2" + dependencies: + "@babel/core": "npm:^7.23.3" + "@types/babel__core": "npm:^7.20.4" + babel-preset-solid: "npm:^1.8.4" + merge-anything: "npm:^5.1.7" + solid-refresh: "npm:^0.6.3" + vitefu: "npm:^0.2.5" + peerDependencies: + "@testing-library/jest-dom": ^5.16.6 || ^5.17.0 || ^6.* + solid-js: ^1.7.2 + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + "@testing-library/jest-dom": + optional: true + checksum: 10/f7c3d857c70471e347044712af91651776408933e5cdf79ad1d2770c1853b3ee55d9b8c4f5a44a2a5cebcf32c39bee7de9bed4aa8b72094d623f8a7b565e0d76 + languageName: node + linkType: hard + "vite@npm:^5.0.0, vite@npm:^5.0.11, vite@npm:^5.3.2": version: 5.3.2 resolution: "vite@npm:5.3.2" @@ -10581,6 +11287,18 @@ __metadata: languageName: node linkType: hard +"vitefu@npm:^0.2.5": + version: 0.2.5 + resolution: "vitefu@npm:0.2.5" + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + vite: + optional: true + checksum: 10/65ef98208c1e26f78315b5f3e1b73f87189b34f1e6a8dc11f66a3263624dd27bd1ff1571a3a54ad5ef273336259f26545b6005bab6fc04a049d50aa4b829791d + languageName: node + linkType: hard + "vscode-oniguruma@npm:^1.7.0": version: 1.7.0 resolution: "vscode-oniguruma@npm:1.7.0"