mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 10:49:51 +08:00 
			
		
		
		
	chore: 删除ui/ui-react
This commit is contained in:
		
							parent
							
								
									9f63dff49b
								
							
						
					
					
						commit
						0643699fac
					
				@ -1 +0,0 @@
 | 
				
			|||||||
VITE_RUNTIME_PATH=/tmagic-editor/playground/runtime/vue VITE_ENTRY_PATH=./entry/vue
 | 
					 | 
				
			||||||
							
								
								
									
										2
									
								
								playground/.env.vue3
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								playground/.env.vue3
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					VITE_RUNTIME_PATH=/tmagic-editor/playground/runtime/vue
 | 
				
			||||||
 | 
					VITE_ENTRY_PATH=./entry/vue
 | 
				
			||||||
@ -5,9 +5,9 @@
 | 
				
			|||||||
  "private": true,
 | 
					  "private": true,
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "clean:top": "rimraf dist",
 | 
					    "clean:top": "rimraf dist",
 | 
				
			||||||
    "dev": "vite --mode vue",
 | 
					    "dev": "vite --mode vue3",
 | 
				
			||||||
    "dev:react": "vite --mode react",
 | 
					    "dev:react": "vite --mode react",
 | 
				
			||||||
    "build": "npm run clean:top && node --max_old_space_size=8192 node_modules/vite/bin/vite.js build --mode vue",
 | 
					    "build": "npm run clean:top && node --max_old_space_size=8192 node_modules/vite/bin/vite.js build --mode vue3",
 | 
				
			||||||
    "serve": "vite preview"
 | 
					    "serve": "vite preview"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										118
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										118
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							@ -910,8 +910,11 @@ importers:
 | 
				
			|||||||
        specifier: 1.6.0-beta.6
 | 
					        specifier: 1.6.0-beta.6
 | 
				
			||||||
        version: 1.6.0-beta.6(@tmagic/core@1.6.0-beta.6(typescript@5.9.2))(typescript@5.9.2)
 | 
					        version: 1.6.0-beta.6(@tmagic/core@1.6.0-beta.6(typescript@5.9.2))(typescript@5.9.2)
 | 
				
			||||||
      axios:
 | 
					      axios:
 | 
				
			||||||
        specifier: ^1.10.0
 | 
					        specifier: ^1.11.0
 | 
				
			||||||
        version: 1.10.0
 | 
					        version: 1.11.0
 | 
				
			||||||
 | 
					      qrcode:
 | 
				
			||||||
 | 
					        specifier: ^1.5.0
 | 
				
			||||||
 | 
					        version: 1.5.4
 | 
				
			||||||
      react:
 | 
					      react:
 | 
				
			||||||
        specifier: ^18.3.1
 | 
					        specifier: ^18.3.1
 | 
				
			||||||
        version: 18.3.1
 | 
					        version: 18.3.1
 | 
				
			||||||
@ -922,6 +925,9 @@ importers:
 | 
				
			|||||||
      '@tmagic/cli':
 | 
					      '@tmagic/cli':
 | 
				
			||||||
        specifier: 1.6.0-beta.6
 | 
					        specifier: 1.6.0-beta.6
 | 
				
			||||||
        version: 1.6.0-beta.6(typescript@5.9.2)
 | 
					        version: 1.6.0-beta.6(typescript@5.9.2)
 | 
				
			||||||
 | 
					      '@types/fs-extra':
 | 
				
			||||||
 | 
					        specifier: ^11.0.4
 | 
				
			||||||
 | 
					        version: 11.0.4
 | 
				
			||||||
      '@types/react':
 | 
					      '@types/react':
 | 
				
			||||||
        specifier: ^18.3.3
 | 
					        specifier: ^18.3.3
 | 
				
			||||||
        version: 18.3.18
 | 
					        version: 18.3.18
 | 
				
			||||||
@ -934,6 +940,9 @@ importers:
 | 
				
			|||||||
      '@vitejs/plugin-react-refresh':
 | 
					      '@vitejs/plugin-react-refresh':
 | 
				
			||||||
        specifier: ^1.3.6
 | 
					        specifier: ^1.3.6
 | 
				
			||||||
        version: 1.3.6
 | 
					        version: 1.3.6
 | 
				
			||||||
 | 
					      fs-extra:
 | 
				
			||||||
 | 
					        specifier: ^11.3.1
 | 
				
			||||||
 | 
					        version: 11.3.1
 | 
				
			||||||
      terser:
 | 
					      terser:
 | 
				
			||||||
        specifier: ^5.43.1
 | 
					        specifier: ^5.43.1
 | 
				
			||||||
        version: 5.43.1
 | 
					        version: 5.43.1
 | 
				
			||||||
@ -943,6 +952,9 @@ importers:
 | 
				
			|||||||
      vite:
 | 
					      vite:
 | 
				
			||||||
        specifier: 'catalog:'
 | 
					        specifier: 'catalog:'
 | 
				
			||||||
        version: 7.1.3(@types/node@24.0.10)(jiti@2.4.2)(sass@1.91.0)(terser@5.43.1)(yaml@2.8.0)
 | 
					        version: 7.1.3(@types/node@24.0.10)(jiti@2.4.2)(sass@1.91.0)(terser@5.43.1)(yaml@2.8.0)
 | 
				
			||||||
 | 
					      vite-plugin-commonjs:
 | 
				
			||||||
 | 
					        specifier: ^0.10.4
 | 
				
			||||||
 | 
					        version: 0.10.4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  runtime/react-runtime-help:
 | 
					  runtime/react-runtime-help:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
@ -987,78 +999,6 @@ importers:
 | 
				
			|||||||
        specifier: 'catalog:'
 | 
					        specifier: 'catalog:'
 | 
				
			||||||
        version: 3.5.20(typescript@5.9.2)
 | 
					        version: 3.5.20(typescript@5.9.2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  runtime/ui:
 | 
					 | 
				
			||||||
    dependencies:
 | 
					 | 
				
			||||||
      '@tmagic/vue-button':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/button
 | 
					 | 
				
			||||||
      '@tmagic/vue-container':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/container
 | 
					 | 
				
			||||||
      '@tmagic/vue-img':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/img
 | 
					 | 
				
			||||||
      '@tmagic/vue-iterator-container':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/iterator-container
 | 
					 | 
				
			||||||
      '@tmagic/vue-overlay':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/overlay
 | 
					 | 
				
			||||||
      '@tmagic/vue-page':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/page
 | 
					 | 
				
			||||||
      '@tmagic/vue-page-fragment':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/page-fragment
 | 
					 | 
				
			||||||
      '@tmagic/vue-page-fragment-container':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/page-fragment-container
 | 
					 | 
				
			||||||
      '@tmagic/vue-qrcode':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/qrcode
 | 
					 | 
				
			||||||
      '@tmagic/vue-text':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../vue-components/text
 | 
					 | 
				
			||||||
      typescript:
 | 
					 | 
				
			||||||
        specifier: 'catalog:'
 | 
					 | 
				
			||||||
        version: 5.9.2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  runtime/ui-react:
 | 
					 | 
				
			||||||
    dependencies:
 | 
					 | 
				
			||||||
      '@tmagic/react-button':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/button
 | 
					 | 
				
			||||||
      '@tmagic/react-container':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/container
 | 
					 | 
				
			||||||
      '@tmagic/react-img':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/img
 | 
					 | 
				
			||||||
      '@tmagic/react-iterator-container':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/iterator-container
 | 
					 | 
				
			||||||
      '@tmagic/react-overlay':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/overlay
 | 
					 | 
				
			||||||
      '@tmagic/react-page':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/page
 | 
					 | 
				
			||||||
      '@tmagic/react-page-fragment':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/page-fragment
 | 
					 | 
				
			||||||
      '@tmagic/react-page-fragment-container':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/page-fragment-container
 | 
					 | 
				
			||||||
      '@tmagic/react-qrcode':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/qrcode
 | 
					 | 
				
			||||||
      '@tmagic/react-text':
 | 
					 | 
				
			||||||
        specifier: workspace:*
 | 
					 | 
				
			||||||
        version: link:../../react-components/text
 | 
					 | 
				
			||||||
      typescript:
 | 
					 | 
				
			||||||
        specifier: 'catalog:'
 | 
					 | 
				
			||||||
        version: 5.9.2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  runtime/vue:
 | 
					  runtime/vue:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@tmagic/core':
 | 
					      '@tmagic/core':
 | 
				
			||||||
@ -3890,9 +3830,6 @@ packages:
 | 
				
			|||||||
    resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
 | 
					    resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
 | 
				
			||||||
    engines: {node: '>= 0.4'}
 | 
					    engines: {node: '>= 0.4'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  axios@1.10.0:
 | 
					 | 
				
			||||||
    resolution: {integrity: sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  axios@1.11.0:
 | 
					  axios@1.11.0:
 | 
				
			||||||
    resolution: {integrity: sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==}
 | 
					    resolution: {integrity: sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -6703,6 +6640,12 @@ packages:
 | 
				
			|||||||
    engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
 | 
					    engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
 | 
				
			||||||
    hasBin: true
 | 
					    hasBin: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  vite-plugin-commonjs@0.10.4:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-eWQuvQKCcx0QYB5e5xfxBNjQKyrjEWZIR9UOkOV6JAgxVhtbZvCOF+FNC2ZijBJ3U3Px04ZMMyyMyFBVWIJ5+g==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  vite-plugin-dynamic-import@1.6.0:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-TM0sz70wfzTIo9YCxVFwS8OA9lNREsh+0vMHGSkWDTZ7bgd1Yjs5RV8EgB634l/91IsXJReg0xtmuQqP0mf+rg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vite@5.4.16:
 | 
					  vite@5.4.16:
 | 
				
			||||||
    resolution: {integrity: sha512-Y5gnfp4NemVfgOTDQAunSD4346fal44L9mszGGY/e+qxsRT5y1sMlS/8tiQ8AFAp+MFgYNSINdfEchJiPm41vQ==}
 | 
					    resolution: {integrity: sha512-Y5gnfp4NemVfgOTDQAunSD4346fal44L9mszGGY/e+qxsRT5y1sMlS/8tiQ8AFAp+MFgYNSINdfEchJiPm41vQ==}
 | 
				
			||||||
    engines: {node: ^18.0.0 || >=20.0.0}
 | 
					    engines: {node: ^18.0.0 || >=20.0.0}
 | 
				
			||||||
@ -9845,14 +9788,6 @@ snapshots:
 | 
				
			|||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      possible-typed-array-names: 1.1.0
 | 
					      possible-typed-array-names: 1.1.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  axios@1.10.0:
 | 
					 | 
				
			||||||
    dependencies:
 | 
					 | 
				
			||||||
      follow-redirects: 1.15.9
 | 
					 | 
				
			||||||
      form-data: 4.0.2
 | 
					 | 
				
			||||||
      proxy-from-env: 1.1.0
 | 
					 | 
				
			||||||
    transitivePeerDependencies:
 | 
					 | 
				
			||||||
      - debug
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  axios@1.11.0:
 | 
					  axios@1.11.0:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      follow-redirects: 1.15.9
 | 
					      follow-redirects: 1.15.9
 | 
				
			||||||
@ -13160,6 +13095,19 @@ snapshots:
 | 
				
			|||||||
      - tsx
 | 
					      - tsx
 | 
				
			||||||
      - yaml
 | 
					      - yaml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  vite-plugin-commonjs@0.10.4:
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      acorn: 8.15.0
 | 
				
			||||||
 | 
					      magic-string: 0.30.17
 | 
				
			||||||
 | 
					      vite-plugin-dynamic-import: 1.6.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  vite-plugin-dynamic-import@1.6.0:
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      acorn: 8.15.0
 | 
				
			||||||
 | 
					      es-module-lexer: 1.7.0
 | 
				
			||||||
 | 
					      fast-glob: 3.3.3
 | 
				
			||||||
 | 
					      magic-string: 0.30.17
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vite@5.4.16(@types/node@24.0.10)(sass@1.91.0)(terser@5.43.1):
 | 
					  vite@5.4.16(@types/node@24.0.10)(sass@1.91.0)(terser@5.43.1):
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      esbuild: 0.21.5
 | 
					      esbuild: 0.21.5
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,7 @@
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
     "@types/qrcode": "^1.4.2",
 | 
					    "@types/qrcode": "^1.4.2",
 | 
				
			||||||
    "@types/react": "^18.3.3",
 | 
					    "@types/react": "^18.3.3",
 | 
				
			||||||
    "@types/react-dom": "^18.3.0"
 | 
					    "@types/react-dom": "^18.3.0"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -1,77 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * Tencent is pleased to support the open source community by making TMagicEditor available.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Copyright (C) 2025 Tencent.  All rights reserved.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
 * you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
 * You may obtain a copy of the License at
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   http://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
 * See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
 * limitations under the License.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import path from 'path';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import { defineConfig } from 'vite';
 | 
					 | 
				
			||||||
import legacy from '@vitejs/plugin-legacy';
 | 
					 | 
				
			||||||
import reactRefresh from '@vitejs/plugin-react-refresh';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default defineConfig(({ mode }) => {
 | 
					 | 
				
			||||||
  if (['value', 'config', 'event', 'ds:value', 'ds:config', 'ds:event'].includes(mode)) {
 | 
					 | 
				
			||||||
    const capitalToken = mode
 | 
					 | 
				
			||||||
      .split(':')
 | 
					 | 
				
			||||||
      .map((word) => word[0].toUpperCase() + word.slice(1))
 | 
					 | 
				
			||||||
      .join('');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const fileName = mode.replace(':', '-');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      publicDir: './.tmagic/public',
 | 
					 | 
				
			||||||
      build: {
 | 
					 | 
				
			||||||
        cssCodeSplit: false,
 | 
					 | 
				
			||||||
        sourcemap: true,
 | 
					 | 
				
			||||||
        minify: false,
 | 
					 | 
				
			||||||
        target: 'esnext',
 | 
					 | 
				
			||||||
        outDir: `../../playground/public/entry/react/${fileName}`,
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        lib: {
 | 
					 | 
				
			||||||
          entry: `.tmagic/${fileName}-entry.ts`,
 | 
					 | 
				
			||||||
          name: `magicPreset${capitalToken}s`,
 | 
					 | 
				
			||||||
          fileName: 'index',
 | 
					 | 
				
			||||||
          formats: ['umd'],
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (['page', 'playground'].includes(mode)) {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      plugins: [
 | 
					 | 
				
			||||||
        reactRefresh(),
 | 
					 | 
				
			||||||
        legacy({
 | 
					 | 
				
			||||||
          targets: ['defaults', 'not IE 11'],
 | 
					 | 
				
			||||||
        }),
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      root: `./${mode}/`,
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      publicDir: '../public',
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      base: `/tmagic-editor/playground/runtime/react/${mode}`,
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      build: {
 | 
					 | 
				
			||||||
        emptyOutDir: true,
 | 
					 | 
				
			||||||
        sourcemap: true,
 | 
					 | 
				
			||||||
        outDir: path.resolve(process.cwd(), `../../playground/public/runtime/react/${mode}`),
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  return {};
 | 
					 | 
				
			||||||
});
 | 
					 | 
				
			||||||
@ -7,36 +7,33 @@
 | 
				
			|||||||
    "node": "^20.19.0 || >=22.12.0"
 | 
					    "node": "^20.19.0 || >=22.12.0"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "dev:react": "vite --config dev.vite.config.ts",
 | 
					    "tmagic": "tmagic entry",
 | 
				
			||||||
    "dev:playground": "vite --config dev.vite.config.ts",
 | 
					    "dev:react": "vite --force",
 | 
				
			||||||
    "build": "npm run build:libs && npm run build:page && npm run build:playground",
 | 
					    "serve": "vite preview",
 | 
				
			||||||
    "build:page": "vite build --config build.vite.config.ts --mode page",
 | 
					    "build": "rimraf ./dist && node scripts/build.mjs --type=all && npm run build:client",
 | 
				
			||||||
    "build:playground": "vite build --config build.vite.config.ts --mode playground",
 | 
					    "build:libs": "tmagic entry && node scripts/build.mjs --type=res",
 | 
				
			||||||
    "build:libs": "tmagic entry && npm run build:config && npm run build:value && npm run build:event && npm run build:ds:libs",
 | 
					    "build:client": "vite build --config ./page/vite.config.ts && vite build --config ./playground/vite.config.ts"
 | 
				
			||||||
    "build:ds:libs": "npm run build:ds:config && npm run build:ds:value && npm run build:ds:event",
 | 
					 | 
				
			||||||
    "build:config": "vite build --config build.vite.config.ts --mode config",
 | 
					 | 
				
			||||||
    "build:value": "vite build --config build.vite.config.ts --mode value",
 | 
					 | 
				
			||||||
    "build:event": "vite build --config build.vite.config.ts --mode event",
 | 
					 | 
				
			||||||
    "build:ds:config": "vite build --config build.vite.config.ts --mode ds:config",
 | 
					 | 
				
			||||||
    "build:ds:value": "vite build --config build.vite.config.ts --mode ds:value",
 | 
					 | 
				
			||||||
    "build:ds:event": "vite build --config build.vite.config.ts --mode ds:event"
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@tmagic/core": "1.6.0-beta.6",
 | 
					    "@tmagic/core": "1.6.0-beta.6",
 | 
				
			||||||
    "@tmagic/react-runtime-help": "0.2.0",
 | 
					    "@tmagic/react-runtime-help": "0.2.0",
 | 
				
			||||||
    "@tmagic/stage": "1.6.0-beta.6",
 | 
					    "@tmagic/stage": "1.6.0-beta.6",
 | 
				
			||||||
    "axios": "^1.10.0",
 | 
					    "axios": "^1.11.0",
 | 
				
			||||||
 | 
					    "qrcode": "^1.5.0",
 | 
				
			||||||
    "react": "^18.3.1",
 | 
					    "react": "^18.3.1",
 | 
				
			||||||
    "react-dom": "^18.3.1"
 | 
					    "react-dom": "^18.3.1"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@tmagic/cli": "1.6.0-beta.6",
 | 
					    "@tmagic/cli": "1.6.0-beta.6",
 | 
				
			||||||
 | 
					    "@types/fs-extra": "^11.0.4",
 | 
				
			||||||
    "@types/react": "^18.3.3",
 | 
					    "@types/react": "^18.3.3",
 | 
				
			||||||
    "@types/react-dom": "^18.3.0",
 | 
					    "@types/react-dom": "^18.3.0",
 | 
				
			||||||
    "@vitejs/plugin-legacy": "^7.2.1",
 | 
					    "@vitejs/plugin-legacy": "^7.2.1",
 | 
				
			||||||
    "@vitejs/plugin-react-refresh": "^1.3.6",
 | 
					    "@vitejs/plugin-react-refresh": "^1.3.6",
 | 
				
			||||||
 | 
					    "fs-extra": "^11.3.1",
 | 
				
			||||||
    "typescript": "catalog:",
 | 
					    "typescript": "catalog:",
 | 
				
			||||||
    "terser": "^5.43.1",
 | 
					    "terser": "^5.43.1",
 | 
				
			||||||
    "vite": "catalog:"
 | 
					    "vite": "catalog:",
 | 
				
			||||||
 | 
					    "vite-plugin-commonjs": "^0.10.4"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										36
									
								
								runtime/react/page/vite.config.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								runtime/react/page/vite.config.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					import path from 'node:path';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { defineConfig } from 'vite';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import fse from 'fs-extra';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import baseConfig from '../vite.config';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default defineConfig({
 | 
				
			||||||
 | 
					  ...baseConfig,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  plugins: [
 | 
				
			||||||
 | 
					    ...(baseConfig.plugins || []),
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      name: 'vite-plugin-copy-runtime',
 | 
				
			||||||
 | 
					      apply: 'build',
 | 
				
			||||||
 | 
					      enforce: 'post',
 | 
				
			||||||
 | 
					      closeBundle() {
 | 
				
			||||||
 | 
					        const clientFile = path.resolve(__dirname, '../dist/page')
 | 
				
			||||||
 | 
					        fse.copySync(clientFile, path.resolve(__dirname, '../../../playground/public/runtime/react/page'))
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  root: './page',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  publicDir: '../public',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  base: `${baseConfig.base}/page`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  build: {
 | 
				
			||||||
 | 
					    emptyOutDir: false,
 | 
				
			||||||
 | 
					    sourcemap: true,
 | 
				
			||||||
 | 
					    outDir: '../dist/page',
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
							
								
								
									
										35
									
								
								runtime/react/playground/vite.config.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								runtime/react/playground/vite.config.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					import path from 'node:path';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { defineConfig } from 'vite';
 | 
				
			||||||
 | 
					import fse from 'fs-extra';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import baseConfig from '../vite.config';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default defineConfig({
 | 
				
			||||||
 | 
					  ...baseConfig,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  plugins: [
 | 
				
			||||||
 | 
					    ...(baseConfig.plugins || []),
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      name: 'vite-plugin-copy-runtime',
 | 
				
			||||||
 | 
					      apply: 'build',
 | 
				
			||||||
 | 
					      enforce: 'post',
 | 
				
			||||||
 | 
					      closeBundle() {
 | 
				
			||||||
 | 
					        const clientFile = path.resolve(__dirname, '../dist/playground')
 | 
				
			||||||
 | 
					        fse.copySync(clientFile, path.resolve(__dirname, '../../../playground/public/runtime/react/playground'))
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  root: './playground',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  publicDir: '../public',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  base: `${baseConfig.base}/playground`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  build: {
 | 
				
			||||||
 | 
					    emptyOutDir: false,
 | 
				
			||||||
 | 
					    sourcemap: true,
 | 
				
			||||||
 | 
					    outDir: '../dist/playground',
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
							
								
								
									
										30
									
								
								runtime/react/scripts/build.mjs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								runtime/react/scripts/build.mjs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					import path from 'node:path';
 | 
				
			||||||
 | 
					import { fileURLToPath } from 'node:url';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { build as buildVite } from 'vite';
 | 
				
			||||||
 | 
					import minimist from 'minimist';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import resViteConfig from './vite.res.config.mjs';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const args = minimist(process.argv.slice(2));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const dirname = path.dirname(fileURLToPath(import.meta.url));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const buildList = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const buildRes = args.type === 'res' || args.type === 'all';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (buildRes) {
 | 
				
			||||||
 | 
					  for (const mode of ['value', 'config', 'event', 'ds:value', 'ds:config', 'ds:event']) {
 | 
				
			||||||
 | 
					    buildList.push(
 | 
				
			||||||
 | 
					      buildVite({
 | 
				
			||||||
 | 
					        root: path.resolve(dirname, '../'),
 | 
				
			||||||
 | 
					        clearScreen: false,
 | 
				
			||||||
 | 
					        configFile: false,
 | 
				
			||||||
 | 
					        ...resViteConfig(mode),
 | 
				
			||||||
 | 
					      }),
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Promise.all(buildList);
 | 
				
			||||||
							
								
								
									
										47
									
								
								runtime/react/scripts/vite.res.config.mjs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								runtime/react/scripts/vite.res.config.mjs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,47 @@
 | 
				
			|||||||
 | 
					import path from 'node:path';
 | 
				
			||||||
 | 
					import { fileURLToPath } from 'node:url';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { defineConfig } from 'vite';
 | 
				
			||||||
 | 
					import fse from 'fs-extra';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const dirname = path.dirname(fileURLToPath(import.meta.url));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default defineConfig((mode) => {
 | 
				
			||||||
 | 
					  const capitalToken = mode
 | 
				
			||||||
 | 
					    .split(':')
 | 
				
			||||||
 | 
					    .map((word) => word[0].toUpperCase() + word.slice(1))
 | 
				
			||||||
 | 
					    .join('');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const fileName = mode.replace(':', '-');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const publicPath = path.resolve(dirname, '../dist/entry', fileName);
 | 
				
			||||||
 | 
					  fse.removeSync(publicPath);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return {
 | 
				
			||||||
 | 
					    plugins: [
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: 'vite-plugin-copy-runtime',
 | 
				
			||||||
 | 
					        apply: 'build',
 | 
				
			||||||
 | 
					        enforce: 'post',
 | 
				
			||||||
 | 
					        closeBundle() {
 | 
				
			||||||
 | 
					          fse.copySync(publicPath, path.resolve(dirname, `../../../playground/public/entry/react/${fileName}`));
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    publicDir: './.tmagic/public',
 | 
				
			||||||
 | 
					    build: {
 | 
				
			||||||
 | 
					      cssCodeSplit: false,
 | 
				
			||||||
 | 
					      sourcemap: true,
 | 
				
			||||||
 | 
					      minify: false,
 | 
				
			||||||
 | 
					      target: 'esnext',
 | 
				
			||||||
 | 
					      outDir: `./dist/entry/${fileName}`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      lib: {
 | 
				
			||||||
 | 
					        entry: `.tmagic/${fileName}-entry.ts`,
 | 
				
			||||||
 | 
					        name: `magicPreset${capitalToken}s`,
 | 
				
			||||||
 | 
					        fileName: 'index',
 | 
				
			||||||
 | 
					        formats: ['umd'],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
@ -1,8 +1,23 @@
 | 
				
			|||||||
import path from 'path';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import { defineConfig } from '@tmagic/cli';
 | 
					import { defineConfig } from '@tmagic/cli';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default defineConfig({
 | 
					export default defineConfig({
 | 
				
			||||||
  packages: [path.join(__dirname, '../ui-react')],
 | 
					 | 
				
			||||||
  componentFileAffix: '.tsx',
 | 
					  componentFileAffix: '.tsx',
 | 
				
			||||||
 | 
					  npmConfig: {
 | 
				
			||||||
 | 
					    client: 'pnpm',
 | 
				
			||||||
 | 
					    keepPackageJsonClean: true,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  packages: [
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      button: '@tmagic/react-button' ,
 | 
				
			||||||
 | 
					      container: '@tmagic/react-container' ,
 | 
				
			||||||
 | 
					      img: '@tmagic/react-img' ,
 | 
				
			||||||
 | 
					      'iterator-container': '@tmagic/react-iterator-container' ,
 | 
				
			||||||
 | 
					      overlay: '@tmagic/react-overlay' ,
 | 
				
			||||||
 | 
					      page: '@tmagic/react-page' ,
 | 
				
			||||||
 | 
					      'page-fragment': '@tmagic/react-page-fragment' ,
 | 
				
			||||||
 | 
					      'page-fragment-container': '@tmagic/react-page-fragment-container' ,
 | 
				
			||||||
 | 
					      'qrcode': '@tmagic/react-qrcode' ,
 | 
				
			||||||
 | 
					      'text': '@tmagic/react-text' ,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
				
			|||||||
@ -16,13 +16,28 @@
 | 
				
			|||||||
 * limitations under the License.
 | 
					 * limitations under the License.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import path from 'path';
 | 
					import path from 'node:path';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { defineConfig } from 'vite';
 | 
					import { defineConfig } from 'vite';
 | 
				
			||||||
 | 
					import legacy from '@vitejs/plugin-legacy';
 | 
				
			||||||
import reactRefresh from '@vitejs/plugin-react-refresh';
 | 
					import reactRefresh from '@vitejs/plugin-react-refresh';
 | 
				
			||||||
 | 
					import commonjs from 'vite-plugin-commonjs';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default defineConfig({
 | 
					export default defineConfig({
 | 
				
			||||||
  plugins: [reactRefresh()],
 | 
					  plugins: [
 | 
				
			||||||
 | 
					    commonjs({
 | 
				
			||||||
 | 
					      filter: (id) => {
 | 
				
			||||||
 | 
					        if (id.includes('qrcode')) {
 | 
				
			||||||
 | 
					          return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    }),
 | 
				
			||||||
 | 
					    reactRefresh(),
 | 
				
			||||||
 | 
					    legacy({
 | 
				
			||||||
 | 
					      targets: ['defaults', 'not IE 11'],
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  resolve: {
 | 
					  resolve: {
 | 
				
			||||||
    alias: [
 | 
					    alias: [
 | 
				
			||||||
@ -34,17 +49,18 @@ export default defineConfig({
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      { find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
 | 
					      { find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
 | 
				
			||||||
      { find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
 | 
					      { find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
 | 
				
			||||||
      { find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
 | 
					 | 
				
			||||||
      { find: /^@data-source/, replacement: path.join(__dirname, '../../packages/data-source/src') },
 | 
					 | 
				
			||||||
      { find: /^@tmagic\/data-source/, replacement: path.join(__dirname, '../../packages/data-source/src/index.ts') },
 | 
					      { find: /^@tmagic\/data-source/, replacement: path.join(__dirname, '../../packages/data-source/src/index.ts') },
 | 
				
			||||||
      { find: /^@tmagic\/dep/, replacement: path.join(__dirname, '../../packages/dep/src/index.ts') },
 | 
					      { find: /^@tmagic\/dep/, replacement: path.join(__dirname, '../../packages/dep/src/index.ts') },
 | 
				
			||||||
      { find: /^@tmagic\/react-runtime-help/, replacement: path.join(__dirname, '../react-runtime-help/src/index.ts') },
 | 
					      { find: /^@data-source/, replacement: path.join(__dirname, '../../packages/data-source/src') },
 | 
				
			||||||
 | 
					      { find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
 | 
				
			||||||
 | 
					      { find: /^@tmagic\/vue-runtime-help/, replacement: path.join(__dirname, '../vue-runtime-help/src/index.ts') },
 | 
				
			||||||
 | 
					      { find: /^qrcode/, replacement: path.join(__dirname, './node_modules/qrcode') },
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  root: './',
 | 
					  root: './',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  base: '/tmagic-editor/playground/runtime/react/',
 | 
					  base: '/tmagic-editor/playground/runtime/react',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  publicDir: 'public',
 | 
					  publicDir: 'public',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -55,17 +71,10 @@ export default defineConfig({
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  build: {
 | 
					  build: {
 | 
				
			||||||
    sourcemap: true,
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    cssCodeSplit: false,
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    rollupOptions: {
 | 
					    rollupOptions: {
 | 
				
			||||||
      input: {
 | 
					      input: {
 | 
				
			||||||
        page: './page/index.html',
 | 
					        page: path.resolve(__dirname, './page/index.html'),
 | 
				
			||||||
        playground: './playground/index.html',
 | 
					        playground: path.resolve(__dirname, './playground/index.html'),
 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      output: {
 | 
					 | 
				
			||||||
        entryFileNames: 'assets/[name].js',
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@ -1 +0,0 @@
 | 
				
			|||||||
# [文档](https://tencent.github.io/tmagic-editor/docs/)
 | 
					 | 
				
			||||||
@ -1,38 +0,0 @@
 | 
				
			|||||||
{
 | 
					 | 
				
			||||||
  "name": "@tmagic/ui-react",
 | 
					 | 
				
			||||||
  "version": "1.5.18",
 | 
					 | 
				
			||||||
  "type": "module",
 | 
					 | 
				
			||||||
  "main": "dist/tmagic-ui-react.js",
 | 
					 | 
				
			||||||
  "types": "types/index.d.ts",
 | 
					 | 
				
			||||||
  "files": [
 | 
					 | 
				
			||||||
    "src"
 | 
					 | 
				
			||||||
  ],
 | 
					 | 
				
			||||||
  "engines": {
 | 
					 | 
				
			||||||
    "node": ">=18"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  "repository": {
 | 
					 | 
				
			||||||
    "directory": "runtime/ui-react",
 | 
					 | 
				
			||||||
    "type": "git",
 | 
					 | 
				
			||||||
    "url": "https://github.com/Tencent/tmagic-editor.git"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  "dependencies": {
 | 
					 | 
				
			||||||
    "@tmagic/react-button": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-container": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-img": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-iterator-container": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-overlay": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-page": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-page-fragment": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-page-fragment-container": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-qrcode": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/react-text": "workspace:*"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  "peerDependencies": {
 | 
					 | 
				
			||||||
    "typescript": "catalog:"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  "peerDependenciesMeta": {
 | 
					 | 
				
			||||||
    "typescript": {
 | 
					 | 
				
			||||||
      "optional": true
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,54 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * Tencent is pleased to support the open source community by making TMagicEditor available.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Copyright (C) 2025 Tencent.  All rights reserved.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
 * you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
 * You may obtain a copy of the License at
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   http://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
 * See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
 * limitations under the License.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import Button from '@tmagic/react-button';
 | 
					 | 
				
			||||||
import Container from '@tmagic/react-container';
 | 
					 | 
				
			||||||
import Img from '@tmagic/react-img';
 | 
					 | 
				
			||||||
import IteratorContainer from '@tmagic/react-iterator-container';
 | 
					 | 
				
			||||||
import Overlay from '@tmagic/react-overlay';
 | 
					 | 
				
			||||||
import Page from '@tmagic/react-page';
 | 
					 | 
				
			||||||
import PageFragment from '@tmagic/react-page-fragment';
 | 
					 | 
				
			||||||
import PageFragmentContainer from '@tmagic/react-page-fragment-container';
 | 
					 | 
				
			||||||
import QRcode from '@tmagic/react-qrcode';
 | 
					 | 
				
			||||||
import Text from '@tmagic/react-text';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export { default as TMagicUiButton } from '@tmagic/react-button';
 | 
					 | 
				
			||||||
export { default as TMagicUiContainer } from '@tmagic/react-container';
 | 
					 | 
				
			||||||
export { default as TMagicUiImg } from '@tmagic/react-img';
 | 
					 | 
				
			||||||
export { default as TMagicUiIteratorContainer } from '@tmagic/react-iterator-container';
 | 
					 | 
				
			||||||
export { default as TMagicUiOverlay } from '@tmagic/react-overlay';
 | 
					 | 
				
			||||||
export { default as TMagicUiPage } from '@tmagic/react-page';
 | 
					 | 
				
			||||||
export { default as TMagicUiPageFragment } from '@tmagic/react-page-fragment';
 | 
					 | 
				
			||||||
export { default as TMagicUiPageFragmentContainer } from '@tmagic/react-page-fragment-container';
 | 
					 | 
				
			||||||
export { default as TMagicUiQRcode } from '@tmagic/react-qrcode';
 | 
					 | 
				
			||||||
export { default as TMagicUiText } from '@tmagic/react-text';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const ui: Record<string, any> = {
 | 
					 | 
				
			||||||
  page: Page,
 | 
					 | 
				
			||||||
  container: Container,
 | 
					 | 
				
			||||||
  button: Button,
 | 
					 | 
				
			||||||
  text: Text,
 | 
					 | 
				
			||||||
  img: Img,
 | 
					 | 
				
			||||||
  qrcode: QRcode,
 | 
					 | 
				
			||||||
  overlay: Overlay,
 | 
					 | 
				
			||||||
  'page-fragment-container': PageFragmentContainer,
 | 
					 | 
				
			||||||
  'page-fragment': PageFragment,
 | 
					 | 
				
			||||||
  'iterator-container': IteratorContainer,
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default ui;
 | 
					 | 
				
			||||||
@ -1 +0,0 @@
 | 
				
			|||||||
# [文档](https://tencent.github.io/tmagic-editor/docs/)
 | 
					 | 
				
			||||||
@ -1,41 +0,0 @@
 | 
				
			|||||||
{
 | 
					 | 
				
			||||||
  "version": "1.6.0-beta.0",
 | 
					 | 
				
			||||||
  "name": "@tmagic/ui",
 | 
					 | 
				
			||||||
  "type": "module",
 | 
					 | 
				
			||||||
  "main": "dist/tmagic-ui.js",
 | 
					 | 
				
			||||||
  "types": "types/index.d.ts",
 | 
					 | 
				
			||||||
  "files": [
 | 
					 | 
				
			||||||
    "src",
 | 
					 | 
				
			||||||
    "dist",
 | 
					 | 
				
			||||||
    "types"
 | 
					 | 
				
			||||||
  ],
 | 
					 | 
				
			||||||
  "engines": {
 | 
					 | 
				
			||||||
    "node": ">=18"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  "license": "Apache-2.0",
 | 
					 | 
				
			||||||
  "repository": {
 | 
					 | 
				
			||||||
    "directory": "runtime/ui",
 | 
					 | 
				
			||||||
    "type": "git",
 | 
					 | 
				
			||||||
    "url": "https://github.com/Tencent/tmagic-editor.git"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  "dependencies": {
 | 
					 | 
				
			||||||
    "@tmagic/vue-button": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-container": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-img": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-iterator-container": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-overlay": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-page": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-page-fragment": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-page-fragment-container": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-qrcode": "workspace:*",
 | 
					 | 
				
			||||||
    "@tmagic/vue-text": "workspace:*"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  "peerDependencies": {
 | 
					 | 
				
			||||||
    "typescript": "catalog:"
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  "peerDependenciesMeta": {
 | 
					 | 
				
			||||||
    "typescript": {
 | 
					 | 
				
			||||||
      "optional": true
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,54 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * Tencent is pleased to support the open source community by making TMagicEditor available.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Copyright (C) 2025 Tencent.  All rights reserved.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
 * you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
 * You may obtain a copy of the License at
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   http://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
 * See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
 * limitations under the License.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import Button from '@tmagic/vue-button';
 | 
					 | 
				
			||||||
import Container from '@tmagic/vue-container';
 | 
					 | 
				
			||||||
import Img from '@tmagic/vue-img';
 | 
					 | 
				
			||||||
import IteratorContainer from '@tmagic/vue-iterator-container';
 | 
					 | 
				
			||||||
import Overlay from '@tmagic/vue-overlay';
 | 
					 | 
				
			||||||
import Page from '@tmagic/vue-page';
 | 
					 | 
				
			||||||
import PageFragment from '@tmagic/vue-page-fragment';
 | 
					 | 
				
			||||||
import PageFragmentContainer from '@tmagic/vue-page-fragment-container';
 | 
					 | 
				
			||||||
import QRcode from '@tmagic/vue-qrcode';
 | 
					 | 
				
			||||||
import Text from '@tmagic/vue-text';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export { default as TMagicUiButton } from '@tmagic/vue-button';
 | 
					 | 
				
			||||||
export { default as TMagicUiContainer } from '@tmagic/vue-container';
 | 
					 | 
				
			||||||
export { default as TMagicUiImg } from '@tmagic/vue-img';
 | 
					 | 
				
			||||||
export { default as TMagicUiIteratorContainer } from '@tmagic/vue-iterator-container';
 | 
					 | 
				
			||||||
export { default as TMagicUiOverlay } from '@tmagic/vue-overlay';
 | 
					 | 
				
			||||||
export { default as TMagicUiPage } from '@tmagic/vue-page';
 | 
					 | 
				
			||||||
export { default as TMagicUiPageFragment } from '@tmagic/vue-page-fragment';
 | 
					 | 
				
			||||||
export { default as TMagicUiPageFragmentContainer } from '@tmagic/vue-page-fragment-container';
 | 
					 | 
				
			||||||
export { default as TMagicUiQRcode } from '@tmagic/vue-qrcode';
 | 
					 | 
				
			||||||
export { default as TMagicUiText } from '@tmagic/vue-text';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const ui: Record<string, any> = {
 | 
					 | 
				
			||||||
  page: Page,
 | 
					 | 
				
			||||||
  container: Container,
 | 
					 | 
				
			||||||
  button: Button,
 | 
					 | 
				
			||||||
  text: Text,
 | 
					 | 
				
			||||||
  img: Img,
 | 
					 | 
				
			||||||
  qrcode: QRcode,
 | 
					 | 
				
			||||||
  overlay: Overlay,
 | 
					 | 
				
			||||||
  'page-fragment-container': PageFragmentContainer,
 | 
					 | 
				
			||||||
  'page-fragment': PageFragment,
 | 
					 | 
				
			||||||
  'iterator-container': IteratorContainer,
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default ui;
 | 
					 | 
				
			||||||
@ -17,7 +17,7 @@ export default defineConfig({
 | 
				
			|||||||
      enforce: 'post',
 | 
					      enforce: 'post',
 | 
				
			||||||
      closeBundle() {
 | 
					      closeBundle() {
 | 
				
			||||||
        const clientFile = path.resolve(__dirname, '../dist/page')
 | 
					        const clientFile = path.resolve(__dirname, '../dist/page')
 | 
				
			||||||
        fse.copySync(clientFile, path.resolve(__dirname, '../../../playground/public/runtime/vue/runtime/page'))
 | 
					        fse.copySync(clientFile, path.resolve(__dirname, '../../../playground/public/runtime/vue/page'))
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,24 @@
 | 
				
			|||||||
import path from 'path';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import { defineConfig } from '@tmagic/cli';
 | 
					import { defineConfig } from '@tmagic/cli';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default defineConfig({
 | 
					export default defineConfig({
 | 
				
			||||||
  packages: [path.join(__dirname, '../ui')],
 | 
					 | 
				
			||||||
  componentFileAffix: '.vue',
 | 
					  componentFileAffix: '.vue',
 | 
				
			||||||
  dynamicImport: true,
 | 
					  dynamicImport: true,
 | 
				
			||||||
 | 
					  npmConfig: {
 | 
				
			||||||
 | 
					    client: 'pnpm',
 | 
				
			||||||
 | 
					    keepPackageJsonClean: true,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  packages: [
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      button: '@tmagic/vue-button' ,
 | 
				
			||||||
 | 
					      container: '@tmagic/vue-container' ,
 | 
				
			||||||
 | 
					      img: '@tmagic/vue-img' ,
 | 
				
			||||||
 | 
					      'iterator-container': '@tmagic/vue-iterator-container' ,
 | 
				
			||||||
 | 
					      overlay: '@tmagic/vue-overlay' ,
 | 
				
			||||||
 | 
					      page: '@tmagic/vue-page' ,
 | 
				
			||||||
 | 
					      'page-fragment': '@tmagic/vue-page-fragment' ,
 | 
				
			||||||
 | 
					      'page-fragment-container': '@tmagic/vue-page-fragment-container' ,
 | 
				
			||||||
 | 
					      'qrcode': '@tmagic/vue-qrcode' ,
 | 
				
			||||||
 | 
					      'text': '@tmagic/vue-text' ,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user