@modern-js/runtime 2.60.2-alpha.6 → 2.60.3

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.
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  var server_exports = {};
20
20
  __export(server_exports, {
21
21
  NoSSR: () => import_react.NoSSR,
22
+ NoSSRCache: () => import_react.NoSSRCache,
22
23
  PreRender: () => import_react.PreRender,
23
24
  default: () => server_default,
24
25
  ssr: () => ssr
@@ -33,6 +34,7 @@ var server_default = ssr;
33
34
  // Annotate the CommonJS export names for ESM import in node:
34
35
  0 && (module.exports = {
35
36
  NoSSR,
37
+ NoSSRCache,
36
38
  PreRender,
37
39
  ssr
38
40
  });
@@ -19,13 +19,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  var react_exports = {};
20
20
  __export(react_exports, {
21
21
  NoSSR: () => import_nossr.NoSSR,
22
+ NoSSRCache: () => import_no_ssr_cache.NoSSRCache,
22
23
  PreRender: () => import_prerender.PreRender
23
24
  });
24
25
  module.exports = __toCommonJS(react_exports);
25
26
  var import_prerender = require("./prerender");
26
27
  var import_nossr = require("./nossr");
28
+ var import_no_ssr_cache = require("./no-ssr-cache");
27
29
  // Annotate the CommonJS export names for ESM import in node:
28
30
  0 && (module.exports = {
29
31
  NoSSR,
32
+ NoSSRCache,
30
33
  PreRender
31
34
  });
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var no_ssr_cache_exports = {};
20
+ __export(no_ssr_cache_exports, {
21
+ NoSSRCache: () => NoSSRCache
22
+ });
23
+ module.exports = __toCommonJS(no_ssr_cache_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_head = require("../../../../exports/head");
26
+ const NoSSRCache = () => {
27
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_head.Helmet, {
28
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("meta", {
29
+ name: "no-ssr-cache"
30
+ })
31
+ });
32
+ };
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ NoSSRCache
36
+ });
@@ -1,4 +1,4 @@
1
- import { PreRender, NoSSR } from "./react";
1
+ import { PreRender, NoSSR, NoSSRCache } from "./react";
2
2
  var ssr = function(_config) {
3
3
  return {
4
4
  name: "@modern-js/plugin-ssr",
@@ -10,6 +10,7 @@ var ssr = function(_config) {
10
10
  var server_default = ssr;
11
11
  export {
12
12
  NoSSR,
13
+ NoSSRCache,
13
14
  PreRender,
14
15
  server_default as default,
15
16
  ssr
@@ -1,6 +1,8 @@
1
1
  import { PreRender } from "./prerender";
2
2
  import { NoSSR } from "./nossr";
3
+ import { NoSSRCache } from "./no-ssr-cache";
3
4
  export {
4
5
  NoSSR,
6
+ NoSSRCache,
5
7
  PreRender
6
8
  };
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Helmet } from "../../../../exports/head";
3
+ var NoSSRCache = function() {
4
+ return /* @__PURE__ */ _jsx(Helmet, {
5
+ children: /* @__PURE__ */ _jsx("meta", {
6
+ name: "no-ssr-cache"
7
+ })
8
+ });
9
+ };
10
+ export {
11
+ NoSSRCache
12
+ };
@@ -1,4 +1,4 @@
1
- import { PreRender, NoSSR } from "./react";
1
+ import { PreRender, NoSSR, NoSSRCache } from "./react";
2
2
  const ssr = (_config) => ({
3
3
  name: "@modern-js/plugin-ssr",
4
4
  setup: () => ({})
@@ -6,6 +6,7 @@ const ssr = (_config) => ({
6
6
  var server_default = ssr;
7
7
  export {
8
8
  NoSSR,
9
+ NoSSRCache,
9
10
  PreRender,
10
11
  server_default as default,
11
12
  ssr
@@ -1,6 +1,8 @@
1
1
  import { PreRender } from "./prerender";
2
2
  import { NoSSR } from "./nossr";
3
+ import { NoSSRCache } from "./no-ssr-cache";
3
4
  export {
4
5
  NoSSR,
6
+ NoSSRCache,
5
7
  PreRender
6
8
  };
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Helmet } from "../../../../exports/head";
3
+ const NoSSRCache = () => {
4
+ return /* @__PURE__ */ _jsx(Helmet, {
5
+ children: /* @__PURE__ */ _jsx("meta", {
6
+ name: "no-ssr-cache"
7
+ })
8
+ });
9
+ };
10
+ export {
11
+ NoSSRCache
12
+ };
@@ -11,7 +11,7 @@ export type CreateAppOptions = {
11
11
  runtime?: typeof runtime;
12
12
  props?: any;
13
13
  };
14
- export declare const createApp: ({ plugins, runtime, props: globalProps, }: CreateAppOptions) => (App?: React.ComponentType<any>) => (props: any) => JSX.Element;
14
+ export declare const createApp: ({ plugins, runtime, props: globalProps, }: CreateAppOptions) => (App?: React.ComponentType<any>) => (props: any) => React.JSX.Element;
15
15
  type BootStrap<T = unknown> = (App: React.ComponentType, id: string | HTMLElement | RuntimeContext, root?: any, ReactDOM?: {
16
16
  render?: Renderer;
17
17
  hydrate?: Renderer;
@@ -1,4 +1,4 @@
1
1
  import type { Plugin } from '../plugin';
2
- export { PreRender, NoSSR } from './react';
2
+ export { PreRender, NoSSR, NoSSRCache } from './react';
3
3
  export declare const ssr: (_config: any) => Plugin;
4
4
  export default ssr;
@@ -1,2 +1,3 @@
1
1
  export { PreRender } from './prerender';
2
2
  export { NoSSR } from './nossr';
3
+ export { NoSSRCache } from './no-ssr-cache';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const NoSSRCache: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare function Body(props: React.DOMAttributes<HTMLBodyElement>): JSX.Element;
2
+ export declare function Body(props: React.DOMAttributes<HTMLBodyElement>): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare function Comment(props: {
3
3
  comment?: string;
4
4
  children?: string;
5
- }): JSX.Element;
5
+ }): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare function Head(props: {
3
3
  children?: any;
4
- }): JSX.Element;
5
- export declare function DefaultHead(): JSX.Element;
4
+ }): React.JSX.Element;
5
+ export declare function DefaultHead(): React.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  export declare function Html(props: {
3
3
  children: any[];
4
- } & React.HtmlHTMLAttributes<HTMLHtmlElement>): JSX.Element;
4
+ } & React.HtmlHTMLAttributes<HTMLHtmlElement>): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare function Links(): JSX.Element;
1
+ import React from 'react';
2
+ export declare function Links(): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  export declare function Root(props: {
3
3
  rootId?: string;
4
- } & React.DOMAttributes<HTMLDivElement>): JSX.Element;
4
+ } & React.DOMAttributes<HTMLDivElement>): React.JSX.Element;
5
5
  export declare function DefaultRoot(props: {
6
6
  children?: any;
7
- }): JSX.Element;
7
+ }): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare function Script(props: {
3
3
  content: () => void;
4
- }): JSX.Element;
4
+ }): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare function Scripts(): JSX.Element;
1
+ import React from 'react';
2
+ export declare function Scripts(): React.JSX.Element;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  export declare function Style(props: {
3
3
  children?: string;
4
4
  content?: string;
5
- } & React.DOMAttributes<HTMLStyleElement>): JSX.Element;
5
+ } & React.DOMAttributes<HTMLStyleElement>): React.JSX.Element;
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare function Title(): JSX.Element;
2
+ export declare function Title(): import("react").JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const DefaultNotFound: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const DefaultNotFound: () => React.JSX.Element;
@@ -7,5 +7,5 @@ import type { StaticHandlerContext } from '@modern-js/runtime-utils/remix-router
7
7
  declare const DeferredDataScripts: (props?: {
8
8
  nonce?: string;
9
9
  context: StaticHandlerContext;
10
- }) => JSX.Element | null;
10
+ }) => import("react").JSX.Element | null;
11
11
  export default DeferredDataScripts;
@@ -7,4 +7,4 @@ export interface WithRouterProps<Params extends {
7
7
  params: Params;
8
8
  navigate: ReturnType<typeof useNavigate>;
9
9
  }
10
- export declare const withRouter: <Props extends WithRouterProps<{}>>(Component: React.ComponentType<Props>) => (props: Omit<Props, keyof WithRouterProps<{}>>) => JSX.Element;
10
+ export declare const withRouter: <Props extends WithRouterProps<{}>>(Component: React.ComponentType<Props>) => (props: Omit<Props, keyof WithRouterProps<{}>>) => React.JSX.Element;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.60.2-alpha.6",
18
+ "version": "2.60.3",
19
19
  "engines": {
20
20
  "node": ">=14.17.6"
21
21
  },
@@ -199,11 +199,11 @@
199
199
  "react-is": "^18",
200
200
  "react-side-effect": "^2.1.1",
201
201
  "styled-components": "^5.3.1",
202
- "@modern-js/plugin": "2.60.1",
203
- "@modern-js/plugin-data-loader": "2.60.1",
204
- "@modern-js/types": "2.60.1",
205
- "@modern-js/runtime-utils": "2.60.1",
206
- "@modern-js/utils": "2.60.1"
202
+ "@modern-js/plugin": "2.60.3",
203
+ "@modern-js/plugin-data-loader": "2.60.3",
204
+ "@modern-js/runtime-utils": "2.60.3",
205
+ "@modern-js/utils": "2.60.3",
206
+ "@modern-js/types": "2.60.3"
207
207
  },
208
208
  "peerDependencies": {
209
209
  "react": ">=17",
@@ -211,9 +211,9 @@
211
211
  },
212
212
  "devDependencies": {
213
213
  "@remix-run/web-fetch": "^4.1.3",
214
- "@rsbuild/core": "1.0.2",
214
+ "@rsbuild/core": "~1.0.11",
215
215
  "@testing-library/react": "^13.4.0",
216
- "@types/cookie": "0.5.1",
216
+ "@types/cookie": "0.6.0",
217
217
  "@types/invariant": "^2.2.30",
218
218
  "@types/jest": "^29",
219
219
  "@types/loadable__server": "5.12.11",
@@ -225,11 +225,11 @@
225
225
  "react-dom": "^18",
226
226
  "ts-jest": "^29.1.0",
227
227
  "typescript": "^5",
228
- "webpack": "^5.94.0",
229
- "@modern-js/core": "2.60.1",
230
- "@scripts/build": "2.60.1",
231
- "@modern-js/app-tools": "2.60.1",
232
- "@scripts/jest-config": "2.60.1"
228
+ "webpack": "^5.95.0",
229
+ "@modern-js/app-tools": "2.60.3",
230
+ "@scripts/build": "2.60.3",
231
+ "@modern-js/core": "2.60.3",
232
+ "@scripts/jest-config": "2.60.3"
233
233
  },
234
234
  "sideEffects": false,
235
235
  "publishConfig": {