@modern-js/sandpack-react 2.65.4 → 2.65.5

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,7 @@
1
1
  # @modern-js/sandpack-react
2
2
 
3
+ ## 2.65.5
4
+
3
5
  ## 2.65.4
4
6
 
5
7
  ## 2.65.3
@@ -0,0 +1,40 @@
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 module_exports = {};
20
+ __export(module_exports, {
21
+ ModuleFiles: () => ModuleFiles
22
+ });
23
+ module.exports = __toCommonJS(module_exports);
24
+ var import_common = require("./common");
25
+ const ModuleFiles = {
26
+ ...import_common.commonFiles,
27
+ ...{
28
+ ".npmignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n*.tsbuildinfo\n\ncoverage/\nrelease/\noutput/\noutput_resource/\ntests/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\nsrc/\n\nmodern.config.*\njest.config.js\ntsconfig.json\nCHANGELOG.md\n\n**/*/api/typings/auto-generated\n",
29
+ "README.md": "# Modern.js Package\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nRun and debug the module:\n\n```bash\npnpm dev\n```\n\nBuild the module for production:\n\n```bash\npnpm build\n```\n\nEnable optional features:\n\n```bash\npnpm new\n```\n\nOther commands:\n\n```bash\npnpm lint # Lint and fix source files\npnpm change # Add a new changeset\npnpm bump # Update version and changelog via changeset\npnpm release # Release the package\n```\n\nFor more information, see the [Modern.js Module documentation](https://modernjs.dev/module-tools/en).\n",
30
+ "package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && simple-git-hooks",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "npx rimraf node_modules ./**/node_modules",\n "lint": "biome check",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.60.6",\n "@biomejs/biome": "1.8.3",\n "typescript": "~5.0.4",\n "@types/node": "~18.11.9",\n "rimraf": "^6.0.1",\n "lint-staged": "~13.1.0",\n "simple-git-hooks": "^2.11.1"\n },\n "sideEffects": [],\n "publishConfig": {\n "access": "public",\n "registry": "https://registry.npmjs.org/"\n }\n}\n',
31
+ "src/index.ts": "export default function () {\n return 'hello world';\n}\n",
32
+ "tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
33
+ "modern.config.ts": "import { defineConfig, moduleTools } from '@modern-js/module-tools';\n\nexport default defineConfig({\n plugins: [moduleTools()],\n buildPreset: 'npm-library',\n});\n",
34
+ "src/modern-app-env.d.ts": "/// <reference types='@modern-js/module-tools/types' />\n"
35
+ }
36
+ };
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ ModuleFiles
40
+ });
@@ -27,13 +27,12 @@ const MWAFiles = {
27
27
  ...{
28
28
  ".browserslistrc": "chrome >= 51\nedge >= 15\nfirefox >= 54\nsafari >= 10\nios_saf >= 10\n",
29
29
  "README.md": "# Modern.js App\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nStart the dev server:\n\n```bash\npnpm dev\n```\n\nEnable optional features or add a new entry:\n\n```bash\npnpm new\n```\n\nBuild the app for production:\n\n```bash\npnpm build\n```\n\nPreview the production build locally:\n\n```bash\npnpm serve\n```\n\nFor more information, see the [Modern.js documentation](https://modernjs.dev/en).\n",
30
- "package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "start": "modern start",\n "serve": "modern serve",\n "new": "modern new",\n "lint": "biome check",\n "prepare": "simple-git-hooks",\n "upgrade": "modern upgrade"\n },\n "engines": {\n "node": ">=16.18.1"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {\n "@modern-js/runtime": "2.65.3",\n "react": "^18.3.1",\n "react-dom": "^18.3.1"\n },\n "devDependencies": {\n "@modern-js/app-tools": "2.65.3",\n "@modern-js/tsconfig": "2.65.3",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/jest": "~29.2.4",\n "@types/node": "~18.11.9",\n "@types/react": "^18.3.11",\n "@types/react-dom": "~18.3.1",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
30
+ "package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "start": "modern start",\n "serve": "modern serve",\n "new": "modern new",\n "lint": "biome check",\n "prepare": "simple-git-hooks",\n "upgrade": "modern upgrade"\n },\n "engines": {\n "node": ">=16.18.1"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {\n "@modern-js/runtime": "2.65.4",\n "react": "^18.3.1",\n "react-dom": "^18.3.1"\n },\n "devDependencies": {\n "@modern-js/app-tools": "2.65.4",\n "@modern-js/tsconfig": "2.65.4",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/jest": "~29.2.4",\n "@types/node": "~18.11.9",\n "@types/react": "^18.3.11",\n "@types/react-dom": "~18.3.1",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
31
31
  "modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n runtime: {\n router: true,\n },\n plugins: [\n appTools({\n bundler: \n }),\n ],\n});\n",
32
32
  "tsconfig.json": '{\n "extends": "@modern-js/tsconfig/base",\n "compilerOptions": {\n "declaration": false,\n "jsx": "preserve",\n "baseUrl": "./",\n "paths": {\n "@/*": ["./src/*"],\n "@shared/*": ["./shared/*"]\n }\n },\n "include": ["src", "shared", "config", "modern.config.ts"],\n "exclude": ["**/node_modules"]\n}\n',
33
- "src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
34
33
  "src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({});\n",
34
+ "src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
35
35
  "src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,\n Bitstream Vera Sans Mono, Courier New, monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
36
- "src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/router';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
37
36
  "src/routes/page.tsx": `import { Helmet } from '@modern-js/runtime/head';
38
37
  import './index.css';
39
38
 
@@ -130,7 +129,8 @@ const Index = () => (
130
129
  );
131
130
 
132
131
  export default Index;
133
- `
132
+ `,
133
+ "src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/router';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n"
134
134
  }
135
135
  };
136
136
  // Annotate the CommonJS export names for ESM import in node:
@@ -0,0 +1,14 @@
1
+ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
+ import { commonFiles } from "./common";
3
+ var ModuleFiles = _object_spread({}, commonFiles, {
4
+ ".npmignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n*.tsbuildinfo\n\ncoverage/\nrelease/\noutput/\noutput_resource/\ntests/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\nsrc/\n\nmodern.config.*\njest.config.js\ntsconfig.json\nCHANGELOG.md\n\n**/*/api/typings/auto-generated\n",
5
+ "README.md": "# Modern.js Package\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nRun and debug the module:\n\n```bash\npnpm dev\n```\n\nBuild the module for production:\n\n```bash\npnpm build\n```\n\nEnable optional features:\n\n```bash\npnpm new\n```\n\nOther commands:\n\n```bash\npnpm lint # Lint and fix source files\npnpm change # Add a new changeset\npnpm bump # Update version and changelog via changeset\npnpm release # Release the package\n```\n\nFor more information, see the [Modern.js Module documentation](https://modernjs.dev/module-tools/en).\n",
6
+ "package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && simple-git-hooks",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "npx rimraf node_modules ./**/node_modules",\n "lint": "biome check",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.60.6",\n "@biomejs/biome": "1.8.3",\n "typescript": "~5.0.4",\n "@types/node": "~18.11.9",\n "rimraf": "^6.0.1",\n "lint-staged": "~13.1.0",\n "simple-git-hooks": "^2.11.1"\n },\n "sideEffects": [],\n "publishConfig": {\n "access": "public",\n "registry": "https://registry.npmjs.org/"\n }\n}\n',
7
+ "src/index.ts": "export default function () {\n return 'hello world';\n}\n",
8
+ "tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
9
+ "modern.config.ts": "import { defineConfig, moduleTools } from '@modern-js/module-tools';\n\nexport default defineConfig({\n plugins: [moduleTools()],\n buildPreset: 'npm-library',\n});\n",
10
+ "src/modern-app-env.d.ts": "/// <reference types='@modern-js/module-tools/types' />\n"
11
+ });
12
+ export {
13
+ ModuleFiles
14
+ };
@@ -3,13 +3,12 @@ import { commonFiles } from "./common";
3
3
  var MWAFiles = _object_spread({}, commonFiles, {
4
4
  ".browserslistrc": "chrome >= 51\nedge >= 15\nfirefox >= 54\nsafari >= 10\nios_saf >= 10\n",
5
5
  "README.md": "# Modern.js App\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nStart the dev server:\n\n```bash\npnpm dev\n```\n\nEnable optional features or add a new entry:\n\n```bash\npnpm new\n```\n\nBuild the app for production:\n\n```bash\npnpm build\n```\n\nPreview the production build locally:\n\n```bash\npnpm serve\n```\n\nFor more information, see the [Modern.js documentation](https://modernjs.dev/en).\n",
6
- "package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "start": "modern start",\n "serve": "modern serve",\n "new": "modern new",\n "lint": "biome check",\n "prepare": "simple-git-hooks",\n "upgrade": "modern upgrade"\n },\n "engines": {\n "node": ">=16.18.1"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {\n "@modern-js/runtime": "2.65.3",\n "react": "^18.3.1",\n "react-dom": "^18.3.1"\n },\n "devDependencies": {\n "@modern-js/app-tools": "2.65.3",\n "@modern-js/tsconfig": "2.65.3",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/jest": "~29.2.4",\n "@types/node": "~18.11.9",\n "@types/react": "^18.3.11",\n "@types/react-dom": "~18.3.1",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
6
+ "package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "start": "modern start",\n "serve": "modern serve",\n "new": "modern new",\n "lint": "biome check",\n "prepare": "simple-git-hooks",\n "upgrade": "modern upgrade"\n },\n "engines": {\n "node": ">=16.18.1"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {\n "@modern-js/runtime": "2.65.4",\n "react": "^18.3.1",\n "react-dom": "^18.3.1"\n },\n "devDependencies": {\n "@modern-js/app-tools": "2.65.4",\n "@modern-js/tsconfig": "2.65.4",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/jest": "~29.2.4",\n "@types/node": "~18.11.9",\n "@types/react": "^18.3.11",\n "@types/react-dom": "~18.3.1",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
7
7
  "modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n runtime: {\n router: true,\n },\n plugins: [\n appTools({\n bundler: \n }),\n ],\n});\n",
8
8
  "tsconfig.json": '{\n "extends": "@modern-js/tsconfig/base",\n "compilerOptions": {\n "declaration": false,\n "jsx": "preserve",\n "baseUrl": "./",\n "paths": {\n "@/*": ["./src/*"],\n "@shared/*": ["./shared/*"]\n }\n },\n "include": ["src", "shared", "config", "modern.config.ts"],\n "exclude": ["**/node_modules"]\n}\n',
9
- "src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
10
9
  "src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({});\n",
10
+ "src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
11
11
  "src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,\n Bitstream Vera Sans Mono, Courier New, monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
12
- "src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/router';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
13
12
  "src/routes/page.tsx": `import { Helmet } from '@modern-js/runtime/head';
14
13
  import './index.css';
15
14
 
@@ -106,7 +105,8 @@ const Index = () => (
106
105
  );
107
106
 
108
107
  export default Index;
109
- `
108
+ `,
109
+ "src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/router';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n"
110
110
  });
111
111
  export {
112
112
  MWAFiles
@@ -0,0 +1,16 @@
1
+ import { commonFiles } from "./common";
2
+ const ModuleFiles = {
3
+ ...commonFiles,
4
+ ...{
5
+ ".npmignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n*.tsbuildinfo\n\ncoverage/\nrelease/\noutput/\noutput_resource/\ntests/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\nsrc/\n\nmodern.config.*\njest.config.js\ntsconfig.json\nCHANGELOG.md\n\n**/*/api/typings/auto-generated\n",
6
+ "README.md": "# Modern.js Package\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nRun and debug the module:\n\n```bash\npnpm dev\n```\n\nBuild the module for production:\n\n```bash\npnpm build\n```\n\nEnable optional features:\n\n```bash\npnpm new\n```\n\nOther commands:\n\n```bash\npnpm lint # Lint and fix source files\npnpm change # Add a new changeset\npnpm bump # Update version and changelog via changeset\npnpm release # Release the package\n```\n\nFor more information, see the [Modern.js Module documentation](https://modernjs.dev/module-tools/en).\n",
7
+ "package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && simple-git-hooks",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "npx rimraf node_modules ./**/node_modules",\n "lint": "biome check",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.60.6",\n "@biomejs/biome": "1.8.3",\n "typescript": "~5.0.4",\n "@types/node": "~18.11.9",\n "rimraf": "^6.0.1",\n "lint-staged": "~13.1.0",\n "simple-git-hooks": "^2.11.1"\n },\n "sideEffects": [],\n "publishConfig": {\n "access": "public",\n "registry": "https://registry.npmjs.org/"\n }\n}\n',
8
+ "src/index.ts": "export default function () {\n return 'hello world';\n}\n",
9
+ "tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
10
+ "modern.config.ts": "import { defineConfig, moduleTools } from '@modern-js/module-tools';\n\nexport default defineConfig({\n plugins: [moduleTools()],\n buildPreset: 'npm-library',\n});\n",
11
+ "src/modern-app-env.d.ts": "/// <reference types='@modern-js/module-tools/types' />\n"
12
+ }
13
+ };
14
+ export {
15
+ ModuleFiles
16
+ };
@@ -4,13 +4,12 @@ const MWAFiles = {
4
4
  ...{
5
5
  ".browserslistrc": "chrome >= 51\nedge >= 15\nfirefox >= 54\nsafari >= 10\nios_saf >= 10\n",
6
6
  "README.md": "# Modern.js App\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nStart the dev server:\n\n```bash\npnpm dev\n```\n\nEnable optional features or add a new entry:\n\n```bash\npnpm new\n```\n\nBuild the app for production:\n\n```bash\npnpm build\n```\n\nPreview the production build locally:\n\n```bash\npnpm serve\n```\n\nFor more information, see the [Modern.js documentation](https://modernjs.dev/en).\n",
7
- "package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "start": "modern start",\n "serve": "modern serve",\n "new": "modern new",\n "lint": "biome check",\n "prepare": "simple-git-hooks",\n "upgrade": "modern upgrade"\n },\n "engines": {\n "node": ">=16.18.1"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {\n "@modern-js/runtime": "2.65.3",\n "react": "^18.3.1",\n "react-dom": "^18.3.1"\n },\n "devDependencies": {\n "@modern-js/app-tools": "2.65.3",\n "@modern-js/tsconfig": "2.65.3",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/jest": "~29.2.4",\n "@types/node": "~18.11.9",\n "@types/react": "^18.3.11",\n "@types/react-dom": "~18.3.1",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
7
+ "package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "start": "modern start",\n "serve": "modern serve",\n "new": "modern new",\n "lint": "biome check",\n "prepare": "simple-git-hooks",\n "upgrade": "modern upgrade"\n },\n "engines": {\n "node": ">=16.18.1"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {\n "@modern-js/runtime": "2.65.4",\n "react": "^18.3.1",\n "react-dom": "^18.3.1"\n },\n "devDependencies": {\n "@modern-js/app-tools": "2.65.4",\n "@modern-js/tsconfig": "2.65.4",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/jest": "~29.2.4",\n "@types/node": "~18.11.9",\n "@types/react": "^18.3.11",\n "@types/react-dom": "~18.3.1",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
8
8
  "modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n runtime: {\n router: true,\n },\n plugins: [\n appTools({\n bundler: \n }),\n ],\n});\n",
9
9
  "tsconfig.json": '{\n "extends": "@modern-js/tsconfig/base",\n "compilerOptions": {\n "declaration": false,\n "jsx": "preserve",\n "baseUrl": "./",\n "paths": {\n "@/*": ["./src/*"],\n "@shared/*": ["./shared/*"]\n }\n },\n "include": ["src", "shared", "config", "modern.config.ts"],\n "exclude": ["**/node_modules"]\n}\n',
10
- "src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
11
10
  "src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({});\n",
11
+ "src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
12
12
  "src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,\n Bitstream Vera Sans Mono, Courier New, monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
13
- "src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/router';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
14
13
  "src/routes/page.tsx": `import { Helmet } from '@modern-js/runtime/head';
15
14
  import './index.css';
16
15
 
@@ -107,7 +106,8 @@ const Index = () => (
107
106
  );
108
107
 
109
108
  export default Index;
110
- `
109
+ `,
110
+ "src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/router';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n"
111
111
  }
112
112
  };
113
113
  export {
@@ -0,0 +1,14 @@
1
+ export declare const ModuleFiles: {
2
+ ".npmignore": string;
3
+ "README.md": string;
4
+ "package.json": string;
5
+ "src/index.ts": string;
6
+ "tsconfig.json": string;
7
+ "modern.config.ts": string;
8
+ "src/modern-app-env.d.ts": string;
9
+ ".codesandbox/environment.json": string;
10
+ ".codesandbox/tasks.json": string;
11
+ ".gitignore": string;
12
+ "biome.json": string;
13
+ ".npmrc": string;
14
+ };
@@ -4,11 +4,11 @@ export declare const MWAFiles: {
4
4
  "package.json": string;
5
5
  "modern.config.ts": string;
6
6
  "tsconfig.json": string;
7
- "src/modern-app-env.d.ts": string;
8
7
  "src/modern.runtime.ts": string;
8
+ "src/modern-app-env.d.ts": string;
9
9
  "src/routes/index.css": string;
10
- "src/routes/layout.tsx": string;
11
10
  "src/routes/page.tsx": string;
11
+ "src/routes/layout.tsx": string;
12
12
  ".codesandbox/environment.json": string;
13
13
  ".codesandbox/tasks.json": string;
14
14
  ".gitignore": string;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.65.4",
18
+ "version": "2.65.5",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -37,8 +37,8 @@
37
37
  "react-dom": "^18.3.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@modern-js/codesmith-api-handlebars": "2.6.6",
41
- "@modern-js/codesmith-utils": "2.6.6",
40
+ "@modern-js/codesmith-api-handlebars": "2.6.7",
41
+ "@modern-js/codesmith-utils": "2.6.7",
42
42
  "@types/jest": "^29",
43
43
  "@types/node": "^14",
44
44
  "@types/react": "^18.3.11",
@@ -48,19 +48,18 @@
48
48
  "recursive-readdir": "^2.2.3",
49
49
  "ts-node": "^10.9.1",
50
50
  "typescript": "^5",
51
- "@modern-js/base-generator": "3.7.22",
52
- "@modern-js/entry-generator": "3.7.22",
53
- "@modern-js/generator-common": "3.7.22",
54
- "@modern-js/generator-utils": "3.7.22",
55
- "@modern-js/mwa-generator": "3.7.22",
56
- "@scripts/build": "2.65.4",
57
- "@scripts/jest-config": "2.65.4"
51
+ "@modern-js/base-generator": "3.7.23",
52
+ "@modern-js/mwa-generator": "3.7.23",
53
+ "@modern-js/entry-generator": "3.7.23",
54
+ "@modern-js/generator-common": "3.7.23",
55
+ "@modern-js/generator-utils": "3.7.23",
56
+ "@scripts/jest-config": "2.65.5",
57
+ "@scripts/build": "2.65.5"
58
58
  },
59
59
  "sideEffects": false,
60
60
  "publishConfig": {
61
61
  "registry": "https://registry.npmjs.org/",
62
- "access": "public",
63
- "provenance": true
62
+ "access": "public"
64
63
  },
65
64
  "scripts": {
66
65
  "new": "modern-lib new",