@auto-engineer/generate-react-client 1.54.3 → 1.55.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @auto-engineer/generate-react-client
2
2
 
3
+ ## 1.55.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`a795f0d`](https://github.com/BeOnAuto/auto-engineer/commit/a795f0dc123179ff088e3837ccdccc98fb28253e) Thanks [@SamHatoum](https://github.com/SamHatoum)! - - Added iframe theme synchronization plugin for generated React clients, enabling automatic theme coordination between parent and embedded applications
8
+
9
+ ### Patch Changes
10
+
11
+ - [`6ca68f9`](https://github.com/BeOnAuto/auto-engineer/commit/6ca68f92615897ea995c6cf4f9ad315c597ce68c) Thanks [@github-actions[bot]](https://github.com/github-actions%5Bbot%5D)! - - **generate-react-client**: adjust HMR stability threshold and poll interval
12
+ - **global**: version packages
13
+ - Updated dependencies [[`6ca68f9`](https://github.com/BeOnAuto/auto-engineer/commit/6ca68f92615897ea995c6cf4f9ad315c597ce68c), [`a795f0d`](https://github.com/BeOnAuto/auto-engineer/commit/a795f0dc123179ff088e3837ccdccc98fb28253e)]:
14
+ - @auto-engineer/file-upload@1.55.0
15
+ - @auto-engineer/message-bus@1.55.0
16
+
3
17
  ## 1.54.3
4
18
 
5
19
  ### Patch Changes
@@ -37,8 +37,37 @@ function iframeNavigationTracking(): Plugin {
37
37
  };
38
38
  }
39
39
 
40
+ function iframeThemeSync(): Plugin {
41
+ return {
42
+ name: 'iframe-theme-sync',
43
+ transformIndexHtml(html) {
44
+ return html.replace(
45
+ '</head>',
46
+ `<script>
47
+ (function() {
48
+ function applyTheme(theme) {
49
+ var root = document.documentElement;
50
+ root.classList.remove('light', 'dark');
51
+ if (theme === 'dark' || theme === 'light') root.classList.add(theme);
52
+ }
53
+ var params = new URLSearchParams(window.location.search);
54
+ var initial = params.get('theme');
55
+ if (initial) applyTheme(initial);
56
+ window.addEventListener('message', function(event) {
57
+ if (event.data && event.data.type === 'app-theme-change' && event.data.theme) {
58
+ applyTheme(event.data.theme);
59
+ }
60
+ });
61
+ })();
62
+ </script>
63
+ </head>`,
64
+ );
65
+ },
66
+ };
67
+ }
68
+
40
69
  export default defineConfig({
41
- plugins: [react(), tailwindcss(), iframeNavigationTracking()],
70
+ plugins: [react(), tailwindcss(), iframeNavigationTracking(), iframeThemeSync()],
42
71
  resolve: {
43
72
  alias: {
44
73
  '@': resolve(__dirname, './src'),
package/package.json CHANGED
@@ -19,13 +19,13 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "debug": "^4.4.1",
22
- "@auto-engineer/file-upload": "1.54.3",
23
- "@auto-engineer/message-bus": "1.54.3"
22
+ "@auto-engineer/file-upload": "1.55.0",
23
+ "@auto-engineer/message-bus": "1.55.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/debug": "^4.1.12"
27
27
  },
28
- "version": "1.54.3",
28
+ "version": "1.55.0",
29
29
  "scripts": {
30
30
  "build": "tsc && tsx ../../scripts/fix-esm-imports.ts && cp -r starter dist/",
31
31
  "test-cli": "tsx test-cli.ts",