@mittwald/flow-remote-react-components 1.1.0-next.1 → 1.1.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -6
- package/USAGE.md +6 -1
- package/dist/js/version.mjs +1 -1
- package/dist/types/tests/NestedFormSubmit.browser.test.d.ts +2 -0
- package/dist/types/tests/NestedFormSubmit.browser.test.d.ts.map +1 -0
- package/dist/types/tests/RemoteEventListenerRemoval.browser.test.d.ts +2 -0
- package/dist/types/tests/RemoteEventListenerRemoval.browser.test.d.ts.map +1 -0
- package/dist/types/tests/ScreenshotPreamble.browser.test.d.ts +2 -0
- package/dist/types/tests/ScreenshotPreamble.browser.test.d.ts.map +1 -0
- package/dist/types/tests/lib/environments.d.ts +6 -0
- package/dist/types/tests/lib/environments.d.ts.map +1 -1
- package/dist/types/tests/lib/scenarioFocus.d.ts +15 -0
- package/dist/types/tests/lib/scenarioFocus.d.ts.map +1 -0
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -27,11 +27,7 @@ pnpm add @mittwald/flow-remote-react-components
|
|
|
27
27
|
#### Adjust imports in your code
|
|
28
28
|
|
|
29
29
|
```shell
|
|
30
|
-
npx
|
|
31
|
-
-t https://raw.githubusercontent.com/mittwald/flow/refs/heads/main/packages/codemods/src/transforms/flowRemote.ts \
|
|
32
|
-
--parser tsx \
|
|
33
|
-
src
|
|
30
|
+
npx @mittwald/flow-codemods@latest to-remote-package src
|
|
34
31
|
```
|
|
35
32
|
|
|
36
|
-
Replace `src` with your sources folder.
|
|
37
|
-
project, use `--parser jsx`.
|
|
33
|
+
Replace `src` with your sources folder.
|
package/USAGE.md
CHANGED
|
@@ -123,7 +123,12 @@ Two consequences:
|
|
|
123
123
|
|
|
124
124
|
Read the
|
|
125
125
|
[migration notes](https://github.com/mittwald/flow/blob/main/packages/components/MIGRATION.md)
|
|
126
|
-
before upgrading — they cover the remote elements too.
|
|
126
|
+
before upgrading — they cover the remote elements too. The codemods among them
|
|
127
|
+
run from one command, and it treats this package like any other Flow dependency:
|
|
128
|
+
|
|
129
|
+
```shell
|
|
130
|
+
npx @mittwald/flow-codemods@latest upgrade
|
|
131
|
+
```
|
|
127
132
|
|
|
128
133
|
## Mistakes to avoid
|
|
129
134
|
|
package/dist/js/version.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Version } from "@mittwald/flow-remote-core";
|
|
4
4
|
//#region src/version.ts
|
|
5
5
|
var communicationVersion = Version.v5;
|
|
6
|
-
var packageVersion = "1.1.0-next.
|
|
6
|
+
var packageVersion = "1.1.0-next.11";
|
|
7
7
|
var version = communicationVersion;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { communicationVersion, packageVersion, version };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NestedFormSubmit.browser.test.d.ts","sourceRoot":"","sources":["../../../src/tests/NestedFormSubmit.browser.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RemoteEventListenerRemoval.browser.test.d.ts","sourceRoot":"","sources":["../../../src/tests/RemoteEventListenerRemoval.browser.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenshotPreamble.browser.test.d.ts","sourceRoot":"","sources":["../../../src/tests/ScreenshotPreamble.browser.test.tsx"],"names":[],"mappings":""}
|
|
@@ -6,6 +6,12 @@ import * as PasswordToolsComponents from "@mittwald/flow-react-components/mittwa
|
|
|
6
6
|
declare const localComponents: typeof Components & typeof PasswordToolsComponents;
|
|
7
7
|
export declare const renderRemote: typeof render;
|
|
8
8
|
export declare const renderLocal: typeof render;
|
|
9
|
+
/**
|
|
10
|
+
* Everything `testScreenshot` does before it captures. Exported so a scenario's
|
|
11
|
+
* state at capture time can be asserted on the DOM instead of on pixels — see
|
|
12
|
+
* `ScreenshotPreamble.browser.test.tsx`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const prepareForScreenshot: () => Promise<void>;
|
|
9
15
|
interface TestEnvironment {
|
|
10
16
|
toString: () => string;
|
|
11
17
|
components: typeof localComponents | typeof RemoteComponents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../../../src/tests/lib/environments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,gBAAgB,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,uBAAuB,MAAM,4DAA4D,CAAC;AAOtG,QAAA,MAAM,eAAe,EAAE,OAAO,UAAU,GAAG,OAAO,uBAGjD,CAAC;AA4BF,eAAO,MAAM,YAAY,EAAE,OAAO,MAKjC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,OAAO,MAKhC,CAAC;
|
|
1
|
+
{"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../../../src/tests/lib/environments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,gBAAgB,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,uBAAuB,MAAM,4DAA4D,CAAC;AAOtG,QAAA,MAAM,eAAe,EAAE,OAAO,UAAU,GAAG,OAAO,uBAGjD,CAAC;AA4BF,eAAO,MAAM,YAAY,EAAE,OAAO,MAKjC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,OAAO,MAKhC,CAAC;AAmJF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,IAAI,CAIzD,CAAC;AAUF,UAAU,eAAe;IACvB,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,eAAe,GAAG,OAAO,gBAAgB,CAAC;IAC7D,MAAM,EAAE,OAAO,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,CACd,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,wBAAwB,KAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAkBD,eAAO,MAAM,gBAAgB,6CAGnB,CAAC;AAEX,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,gBAAgB,gBAAgB,KAAG,OACzD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the focus sits in the scenario at all, i.e. inside the container the
|
|
3
|
+
* visual suite renders into and captures.
|
|
4
|
+
*
|
|
5
|
+
* A field's focus ring is pure CSS (`:focus-within` on the form control,
|
|
6
|
+
* `:focus` on a segment), so this is exactly what the reference encodes.
|
|
7
|
+
* Popovers render in a portal outside the container, so an open one holding the
|
|
8
|
+
* focus reads as `false`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const focusIsInTheScenario: () => boolean;
|
|
11
|
+
/** Waits until the focus has (re-)entered the scenario. */
|
|
12
|
+
export declare const waitForFocusInTheScenario: () => Promise<void>;
|
|
13
|
+
/** Waits until the focus has left the scenario. */
|
|
14
|
+
export declare const waitForFocusOutsideTheScenario: () => Promise<void>;
|
|
15
|
+
//# sourceMappingURL=scenarioFocus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenarioFocus.d.ts","sourceRoot":"","sources":["../../../../src/tests/lib/scenarioFocus.ts"],"names":[],"mappings":"AAmCA;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,QAAO,OACyB,CAAC;AAWlE,2DAA2D;AAC3D,eAAO,MAAM,yBAAyB,QAAa,OAAO,CAAC,IAAI,CAQ9D,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,8BAA8B,QAAa,OAAO,CAAC,IAAI,CAQnE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-remote-react-components",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React components that can be used in a remote environment",
|
|
6
6
|
"homepage": "https://flow.mittwald.de",
|
|
@@ -44,26 +44,26 @@
|
|
|
44
44
|
"test:e2e": "vitest run --config=e2e/remote-test-server/vitest.config.ts --browser.headless",
|
|
45
45
|
"test:e2e:dev": "vitest dev --config=e2e/remote-test-server/vitest.config.ts",
|
|
46
46
|
"test:e2e:prepare": "pnpm rimraf e2e/remote-test-server/.vitest",
|
|
47
|
-
"test:unit": "vitest run --project=unit --passWithNoTests",
|
|
48
|
-
"test:unit:dev": "vitest dev --project=unit --passWithNoTests",
|
|
47
|
+
"test:unit": "vitest run --project=unit* --passWithNoTests",
|
|
48
|
+
"test:unit:dev": "vitest dev --project=unit* --passWithNoTests",
|
|
49
49
|
"test:visual": "vitest run --project=visual --browser.headless",
|
|
50
50
|
"test:visual:dev": "vitest dev --project=visual",
|
|
51
|
-
"test:visual:update": "vitest run --project=visual --browser.headless --update
|
|
51
|
+
"test:visual:update": "vitest run --project=visual --browser.headless --update"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@mittwald/flow-react-components": "1.1.0-next.
|
|
55
|
-
"@mittwald/flow-remote-core": "1.1.0-next.
|
|
56
|
-
"@mittwald/flow-remote-elements": "1.1.0-next.
|
|
54
|
+
"@mittwald/flow-react-components": "1.1.0-next.11",
|
|
55
|
+
"@mittwald/flow-remote-core": "1.1.0-next.11",
|
|
56
|
+
"@mittwald/flow-remote-elements": "1.1.0-next.11",
|
|
57
57
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
58
58
|
"@types/react": "^19.2",
|
|
59
59
|
"react-error-boundary": "^6.1.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@internationalized/date": "^3.12.3",
|
|
63
|
-
"@mittwald/ext-bridge": "1.1.0-next.
|
|
64
|
-
"@mittwald/flow-core": "1.1.0-next.
|
|
65
|
-
"@mittwald/flow-remote-react-renderer": "1.1.0-next.
|
|
66
|
-
"@mittwald/typescript-config": "1.1.0-next.
|
|
63
|
+
"@mittwald/ext-bridge": "1.1.0-next.11",
|
|
64
|
+
"@mittwald/flow-core": "1.1.0-next.11",
|
|
65
|
+
"@mittwald/flow-remote-react-renderer": "1.1.0-next.11",
|
|
66
|
+
"@mittwald/typescript-config": "1.1.0-next.11",
|
|
67
67
|
"@quilted/threads": "^3.3.1",
|
|
68
68
|
"@tabler/icons-react": "^3.44.0",
|
|
69
69
|
"@types/node": "^25.9.3",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@internationalized/date": "^3.12.2",
|
|
92
|
-
"@mittwald/ext-bridge": "1.1.0-next.
|
|
92
|
+
"@mittwald/ext-bridge": "1.1.0-next.11",
|
|
93
93
|
"react": "^19.2.0",
|
|
94
94
|
"react-hook-form": "^7.65.0"
|
|
95
95
|
},
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"optional": true
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "bc0ae71617e1e8da950269f0c5a0e765fae2c7aa"
|
|
108
108
|
}
|