diff --git a/.moon/tasks/tag-react-router.yml b/.moon/tasks/tag-react-router.yml index f647bf3..58d1b3e 100644 --- a/.moon/tasks/tag-react-router.yml +++ b/.moon/tasks/tag-react-router.yml @@ -4,8 +4,8 @@ fileGroups: react-router-config: - react-router.config.ts - vite.config.ts - react-router-app: - - app/**/* + react-router-src: + - src/**/* react-router-public: - public/**/* react-router-target: @@ -19,7 +19,7 @@ tasks: command: yarn dev inputs: - "@group(react-router-config)" - - "@group(react-router-app)" + - "@group(react-router-src)" - "@group(react-router-public)" react-router-build: env: @@ -37,7 +37,7 @@ tasks: command: yarn build inputs: - "@group(react-router-config)" - - "@group(react-router-app)" + - "@group(react-router-src)" - "@group(react-router-public)" outputs: - "@group(react-router-build)" @@ -47,10 +47,10 @@ tasks: - ~:react-router-build options: runDepsInParallel: false - command: yarn serve ./build/client + command: yarn serve -s ./build/client react-router-typecheck: command: yarn typecheck inputs: - "@group(react-router-config)" - - "@group(react-router-app)" + - "@group(react-router-src)" - tsconfig.json diff --git a/apps/ext-e2e-test-app/app/app.css b/apps/ext-e2e-test-app/app/app.css deleted file mode 100644 index ea1e941..0000000 --- a/apps/ext-e2e-test-app/app/app.css +++ /dev/null @@ -1,4 +0,0 @@ -body { - margin: 0; - padding: 0; -} diff --git a/apps/ext-e2e-test-app/app/routes.ts b/apps/ext-e2e-test-app/app/routes.ts deleted file mode 100644 index 4b88aee..0000000 --- a/apps/ext-e2e-test-app/app/routes.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { index, type RouteConfig } from "@react-router/dev/routes"; - -export default [ - index("routes/home.tsx"), -] satisfies RouteConfig; diff --git a/apps/ext-e2e-test-app/app/routes/home.tsx b/apps/ext-e2e-test-app/app/routes/home.tsx deleted file mode 100644 index fefd66c..0000000 --- a/apps/ext-e2e-test-app/app/routes/home.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { Route } from "./+types/home"; - -export function meta(_args: Route.MetaArgs) { - return [ - { - title: "Home", - }, - ]; -} - -export default function Home() { - return
+ Click Count: {clickCount} +
++ Last Clicked: {lastClicked ?? "None"} +
+{JSON.stringify(submittedData, null, 2)}
+ + Search submitted: {searchSubmitted} +
+ )} +{JSON.stringify(formData, null, 2)}
+ Select a test screen to navigate to:
+ + ++ Render Count: {renderCount} +
++ URL: {typeof window !== "undefined" ? window.location.href : ""} +
++ Page Loaded: Yes +
++ These functions are available on the window object for testing: +
+
+ window.incrementCounter()
+ {" "}
+ - Increments counter and returns new value
+
+ window.addMessage(msg)
+ {" "}
+ - Adds a message and returns all messages
+
+ window.getTestData()
+ {" "}
+ - Returns current test data object
+
+ window.computeSum(a, b)
+ {" "}
+ - Computes sum of two numbers
+
+ window.asyncOperation(delay)
+ {" "}
+ - Async operation that resolves after delay
+ + This paragraph can be accessed via document.getElementById +
++ This element can have its styles modified via JavaScript for + testing +
++ Element with data attributes that can be read/modified: +
+Test different return types from invokeJsFn:
+
+ return document.title;
+ {" "}
+ - Returns string
+
+ return window.testData;
+ {" "}
+ - Returns object
+
+ return [1, 2, 3];
+ {" "}
+ - Returns array
+ return 42; -
+ Returns number
+ return true; -
+ Returns boolean
+ return null; -
+ Returns null
+ + This is the first paragraph with some sample text. It contains + multiple sentences to test text extraction capabilities. The text + should be readable and accessible. +
++ Second paragraph here. This one has{" "} + bold text and{" "} + italic text and{" "} + underlined text. +
+
+ Third paragraph with{" "}
+
+ inline code
+ {" "}
+ and a{" "}
+
+ link inside text
+
+ .
+
+ This text is specifically designed for selection testing. Select + any portion of this text to test the getSelection tool. You can + select words, sentences, or entire paragraphs. +
++ Here is another paragraph with different content. The quick brown + fox jumps over the lazy dog. This sentence contains all letters of + the alphabet and is useful for testing. +
+| Name | +Role | +|
|---|---|---|
| John Doe | ++ john@example.com + | +Admin | +
| Jane Smith | ++ jane@example.com + | +User | +
| Bob Wilson | ++ bob@example.com + | +Editor | +
+)} diff --git a/apps/ext-e2e-test-app/src/routes.ts b/apps/ext-e2e-test-app/src/routes.ts new file mode 100644 index 0000000..ec07465 --- /dev/null +++ b/apps/ext-e2e-test-app/src/routes.ts @@ -0,0 +1,11 @@ +import { index, type RouteConfig, route } from "@react-router/dev/routes"; + +const routes = [ + index("pages/home.tsx"), + route("click-test", "pages/click-test.tsx"), + route("form-test", "pages/form-test.tsx"), + route("text-test", "pages/text-test.tsx"), + route("javascript-test", "pages/javascript-test.tsx"), +] satisfies RouteConfig; + +export default routes; diff --git a/apps/ext-e2e/.swcrc b/apps/ext-e2e/.swcrc index 9c32a08..8c8a322 100644 --- a/apps/ext-e2e/.swcrc +++ b/apps/ext-e2e/.swcrc @@ -17,3 +17,4 @@ "type": "es6" } } + diff --git a/biome.jsonc b/biome.jsonc index 534de3e..f4479e5 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -11,7 +11,11 @@ "**", "!**/target", "!**/cache", - "!**/etc/submodules" + "!**/etc/submodules", + "!**/.tmp", + "!**/.react-router", + "!**/build", + "!**/dist" ] }, "formatter": { @@ -44,7 +48,8 @@ "useNumberNamespace": "error", "noInferrableTypes": "error", "noUselessElse": "error", - "useNamingConvention": "error" + "useNamingConvention": "error", + "noDefaultExport": "off" } } }, @@ -70,7 +75,6 @@ } } ], - "json": { "formatter": { // force newline diff --git a/etc/scripts/moon.yml b/etc/scripts/moon.yml index 39c8faa..e6d8fc3 100644 --- a/etc/scripts/moon.yml +++ b/etc/scripts/moon.yml @@ -1,7 +1,6 @@ # yaml-language-server: $schema: 'https://moonrepo.dev/schemas/project.json' language: typescript platform: node -type: tool project: name: "@mcp-browser-kit/scripts"{stack}