oc-template-react-compiler 6.5.3 → 6.6.1

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/dist/lib/hmr.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import reactPlugin from '@vitejs/plugin-react';
1
+ import plugin from '@vitejs/plugin-react';
2
2
  export declare const appBlock: ({ name, version, entry }: {
3
3
  name: string;
4
4
  version: string;
5
5
  entry: string;
6
6
  }) => string;
7
- export { reactPlugin as plugin };
7
+ export { plugin };
package/dist/lib/hmr.js CHANGED
@@ -11,7 +11,8 @@ const appBlock = ({ name, version, entry }) => `
11
11
  <script type="module">
12
12
  const data = __INITIAL_DATA__;
13
13
  window.__$$oc_initialData__ = Object.freeze(data);
14
- window.__$$oc_Settings__ = Object.freeze({ baseUrl: '/', id: 'root', name: '${name}', staticPath: '/', version: '${version}' });
14
+ const settings = Object.freeze({ baseUrl: '/', id: 'root', name: '${name}', staticPath: '/', version: '${version}' });
15
+ window.__$$oc_Settings__ = settings;
15
16
 
16
17
  window.oc = window.oc || {};
17
18
  window.oc.cmd = window.oc.cmd || [];
@@ -26,6 +27,7 @@ const appBlock = ({ name, version, entry }) => `
26
27
 
27
28
  window.oc.cmd.push(() => {
28
29
  root.render(app);
30
+ window.oc.events.fire('oc:rendered', { ...settings, element: container, });
29
31
  });
30
32
  </script>
31
33
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-template-react-compiler",
3
- "version": "6.5.3",
3
+ "version": "6.6.1",
4
4
  "description": "Compiler for the React OC template",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,8 +34,8 @@
34
34
  "@testing-library/user-event": "^14.4.3",
35
35
  "@types/react": "^18.0.28",
36
36
  "jsdom": "^21.1.1",
37
- "oc-server": "^1.1.3",
38
- "oc-template-react-compiler": "^6.5.2",
37
+ "oc-server": "^1.1.5",
38
+ "oc-template-react-compiler": "^6.6.1",
39
39
  "react": "18.2.0",
40
40
  "react-dom": "18.2.0",
41
41
  "typescript": "5.1.3",