@modern-js/sandpack-react 3.0.0-alpha.0 → 3.0.0-alpha.2
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 +4 -0
- package/dist/cjs/templates/mwa.js +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/templates/index.mjs +2 -2
- package/dist/esm/templates/mwa.mjs +2 -2
- package/dist/esm-node/index.mjs +2 -0
- package/dist/esm-node/templates/common.mjs +2 -0
- package/dist/esm-node/templates/index.mjs +2 -0
- package/dist/esm-node/templates/mwa.mjs +3 -1
- package/package.json +6 -13
package/CHANGELOG.md
CHANGED
|
@@ -34,7 +34,7 @@ const MWAFiles = {
|
|
|
34
34
|
".npmrc": "strict-peer-dependencies=false\n",
|
|
35
35
|
"biome.json": '{\n "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",\n "vcs": {\n "enabled": true,\n "defaultBranch": "main",\n "clientKind": "git",\n "useIgnoreFile": true\n },\n "formatter": {\n "enabled": true,\n "indentStyle": "space"\n },\n "javascript": {\n "formatter": {\n "quoteStyle": "single",\n "arrowParentheses": "asNeeded",\n "jsxQuoteStyle": "double",\n "lineWidth": 80\n }\n },\n "linter": {\n "enabled": true,\n "rules": {\n "recommended": true,\n "suspicious": {\n "noDuplicateFontNames": "off"\n }\n }\n },\n "organizeImports": {\n "enabled": true\n },\n "files": {\n "ignoreUnknown": true,\n "ignore": [".vscode/**/*", "node_modules/**/*", "dist/**/*"]\n }\n}\n',
|
|
36
36
|
"modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n plugins: [appTools()],\n});\n",
|
|
37
|
-
"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 "serve": "modern serve",\n "lint": "biome check",\n "prepare": "simple-git-hooks"\n },\n "engines": {\n "node": ">=20"\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": "3.0.0-alpha.
|
|
37
|
+
"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 "serve": "modern serve",\n "lint": "biome check",\n "prepare": "simple-git-hooks"\n },\n "engines": {\n "node": ">=20"\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": "3.0.0-alpha.2",\n "react": "^19.2.3",\n "react-dom": "^19.2.0"\n },\n "devDependencies": {\n "@modern-js/app-tools": "3.0.0-alpha.2",\n "@modern-js/tsconfig": "3.0.0-alpha.2",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
|
|
38
38
|
"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",
|
|
39
39
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n",
|
|
40
40
|
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({});\n",
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { OpenInCodeSandboxButton, SandpackCodeEditor, SandpackFileExplorer, SandpackLayout, SandpackProvider } from "@codesandbox/sandpack-react";
|
|
3
|
-
import { ModernTemplates } from "./templates";
|
|
3
|
+
import { ModernTemplates } from "./templates/index.mjs";
|
|
4
4
|
function fileterFiles(files, removeFiles) {
|
|
5
5
|
if (0 === removeFiles.length) return files;
|
|
6
6
|
const result = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as __rspack_external__mwa_mjs_5d9bbc8d from "./mwa.mjs";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
3
|
"./mwa" (module) {
|
|
4
|
-
module.exports =
|
|
4
|
+
module.exports = __rspack_external__mwa_mjs_5d9bbc8d;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
7
|
var __webpack_module_cache__ = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { commonFiles } from "./common";
|
|
1
|
+
import { commonFiles } from "./common.mjs";
|
|
2
2
|
const MWAFiles = {
|
|
3
3
|
...commonFiles,
|
|
4
4
|
".browserslistrc": "chrome >= 51\nedge >= 15\nfirefox >= 54\nsafari >= 10\nios_saf >= 10\n",
|
|
@@ -6,7 +6,7 @@ const MWAFiles = {
|
|
|
6
6
|
".npmrc": "strict-peer-dependencies=false\n",
|
|
7
7
|
"biome.json": '{\n "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",\n "vcs": {\n "enabled": true,\n "defaultBranch": "main",\n "clientKind": "git",\n "useIgnoreFile": true\n },\n "formatter": {\n "enabled": true,\n "indentStyle": "space"\n },\n "javascript": {\n "formatter": {\n "quoteStyle": "single",\n "arrowParentheses": "asNeeded",\n "jsxQuoteStyle": "double",\n "lineWidth": 80\n }\n },\n "linter": {\n "enabled": true,\n "rules": {\n "recommended": true,\n "suspicious": {\n "noDuplicateFontNames": "off"\n }\n }\n },\n "organizeImports": {\n "enabled": true\n },\n "files": {\n "ignoreUnknown": true,\n "ignore": [".vscode/**/*", "node_modules/**/*", "dist/**/*"]\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 plugins: [appTools()],\n});\n",
|
|
9
|
-
"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 "serve": "modern serve",\n "lint": "biome check",\n "prepare": "simple-git-hooks"\n },\n "engines": {\n "node": ">=20"\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": "3.0.0-alpha.
|
|
9
|
+
"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 "serve": "modern serve",\n "lint": "biome check",\n "prepare": "simple-git-hooks"\n },\n "engines": {\n "node": ">=20"\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": "3.0.0-alpha.2",\n "react": "^19.2.3",\n "react-dom": "^19.2.0"\n },\n "devDependencies": {\n "@modern-js/app-tools": "3.0.0-alpha.2",\n "@modern-js/tsconfig": "3.0.0-alpha.2",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
|
|
10
10
|
"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",
|
|
11
11
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n",
|
|
12
12
|
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({});\n",
|
package/dist/esm-node/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
/*#__PURE__*/ import.meta.url;
|
|
1
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
4
|
import { OpenInCodeSandboxButton, SandpackCodeEditor, SandpackFileExplorer, SandpackLayout, SandpackProvider } from "@codesandbox/sandpack-react";
|
|
3
5
|
import { ModernTemplates } from "./templates/index.mjs";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
/*#__PURE__*/ import.meta.url;
|
|
1
3
|
const commonFiles = {
|
|
2
4
|
".codesandbox/environment.json": "{\n \"nodeVersion\": 18\n}\n",
|
|
3
5
|
".codesandbox/tasks.json": "{\n \"$schema\": \"https://codesandbox.io/schemas/tasks.json\",\n \"setupTasks\": [\n {\n \"name\": \"Installing Dependencies\",\n \"command\": \"pnpm install\"\n }\n ],\n \"tasks\": {\n \"start\": {\n \"name\": \"Application\",\n \"command\": \"pnpm run start\",\n \"runAtStart\": true,\n \"restartOn\": {\n \"files\": [\"pnpm-lock.yaml\"]\n }\n }\n }\n}\n"
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
/*#__PURE__*/ import.meta.url;
|
|
1
3
|
import { commonFiles } from "./common.mjs";
|
|
2
4
|
const MWAFiles = {
|
|
3
5
|
...commonFiles,
|
|
@@ -6,7 +8,7 @@ const MWAFiles = {
|
|
|
6
8
|
".npmrc": "strict-peer-dependencies=false\n",
|
|
7
9
|
"biome.json": '{\n "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",\n "vcs": {\n "enabled": true,\n "defaultBranch": "main",\n "clientKind": "git",\n "useIgnoreFile": true\n },\n "formatter": {\n "enabled": true,\n "indentStyle": "space"\n },\n "javascript": {\n "formatter": {\n "quoteStyle": "single",\n "arrowParentheses": "asNeeded",\n "jsxQuoteStyle": "double",\n "lineWidth": 80\n }\n },\n "linter": {\n "enabled": true,\n "rules": {\n "recommended": true,\n "suspicious": {\n "noDuplicateFontNames": "off"\n }\n }\n },\n "organizeImports": {\n "enabled": true\n },\n "files": {\n "ignoreUnknown": true,\n "ignore": [".vscode/**/*", "node_modules/**/*", "dist/**/*"]\n }\n}\n',
|
|
8
10
|
"modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n plugins: [appTools()],\n});\n",
|
|
9
|
-
"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 "serve": "modern serve",\n "lint": "biome check",\n "prepare": "simple-git-hooks"\n },\n "engines": {\n "node": ">=20"\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": "3.0.0-alpha.
|
|
11
|
+
"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 "serve": "modern serve",\n "lint": "biome check",\n "prepare": "simple-git-hooks"\n },\n "engines": {\n "node": ">=20"\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": "3.0.0-alpha.2",\n "react": "^19.2.3",\n "react-dom": "^19.2.0"\n },\n "devDependencies": {\n "@modern-js/app-tools": "3.0.0-alpha.2",\n "@modern-js/tsconfig": "3.0.0-alpha.2",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
|
|
10
12
|
"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",
|
|
11
13
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n",
|
|
12
14
|
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({});\n",
|
package/package.json
CHANGED
|
@@ -15,19 +15,13 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.0.0-alpha.
|
|
19
|
-
"jsnext:source": "./src/index.ts",
|
|
18
|
+
"version": "3.0.0-alpha.2",
|
|
20
19
|
"types": "./dist/types/index.d.ts",
|
|
21
20
|
"main": "./dist/cjs/index.js",
|
|
22
21
|
"module": "./dist/esm/index.mjs",
|
|
23
22
|
"exports": {
|
|
24
23
|
".": {
|
|
25
24
|
"types": "./dist/types/index.d.ts",
|
|
26
|
-
"jsnext:source": "./src/index.ts",
|
|
27
|
-
"node": {
|
|
28
|
-
"import": "./dist/esm-node/index.mjs",
|
|
29
|
-
"require": "./dist/cjs/index.js"
|
|
30
|
-
},
|
|
31
25
|
"default": "./dist/esm/index.mjs"
|
|
32
26
|
}
|
|
33
27
|
},
|
|
@@ -45,18 +39,17 @@
|
|
|
45
39
|
"react-dom": "^19.2.3"
|
|
46
40
|
},
|
|
47
41
|
"devDependencies": {
|
|
48
|
-
"@modern-js/codesmith-api-handlebars": "2.6.
|
|
49
|
-
"@modern-js/codesmith-utils": "2.6.
|
|
50
|
-
"@rslib/core": "0.
|
|
42
|
+
"@modern-js/codesmith-api-handlebars": "2.6.9",
|
|
43
|
+
"@modern-js/codesmith-utils": "2.6.9",
|
|
44
|
+
"@rslib/core": "0.19.3",
|
|
51
45
|
"@types/node": "^20",
|
|
52
|
-
"@types/react": "^19.2.
|
|
46
|
+
"@types/react": "^19.2.9",
|
|
53
47
|
"@types/react-dom": "^19.2.3",
|
|
54
48
|
"@types/recursive-readdir": "^2.2.4",
|
|
55
49
|
"recursive-readdir": "^2.2.3",
|
|
56
50
|
"ts-node": "^10.9.2",
|
|
57
51
|
"typescript": "^5",
|
|
58
|
-
"@
|
|
59
|
-
"@modern-js/create": "3.0.0-alpha.0",
|
|
52
|
+
"@modern-js/create": "3.0.0-alpha.2",
|
|
60
53
|
"@modern-js/rslib": "2.68.10"
|
|
61
54
|
},
|
|
62
55
|
"sideEffects": false,
|