Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
601528d752 | ||
|
|
c2cd1c40cf | ||
|
|
3e024d21ed | ||
|
|
bdd544e87e | ||
|
|
c307386190 | ||
|
|
458f493150 | ||
|
|
08faee9cab |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,3 +1,18 @@
|
||||
## [1.1.2](https://github.com/Tencent/tmagic-editor/compare/v1.1.1...v1.1.2) (2022-09-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **editor:** 画布缩放后,拖入组件位置错位 ([bdd544e](https://github.com/Tencent/tmagic-editor/commit/bdd544e87e7c4f4b227d65f3afd4de14af826e17))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **editor:** 支持控制pagebar中新增按钮显隐 ([3e024d2](https://github.com/Tencent/tmagic-editor/commit/3e024d21edca7dc3bcc00b8aae23b231ee8e1a54))
|
||||
* **editor:** 添加compoent-list-item slot ([c307386](https://github.com/Tencent/tmagic-editor/commit/c3073861907abb01b57b9632bb9c2c9108203379))
|
||||
|
||||
|
||||
|
||||
## [1.1.1](https://github.com/Tencent/tmagic-editor/compare/v1.1.0...v1.1.1) (2022-08-31)
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "docs",
|
||||
"private": true,
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"scripts": {
|
||||
"clean:top": "rimraf dist",
|
||||
"dev": "vuepress dev src",
|
||||
@@ -9,9 +9,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.0.9",
|
||||
"@tmagic/form": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/form": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"element-plus": "^2.2.6",
|
||||
"highlight.js": "^11.2.0",
|
||||
"lodash": "^4.17.21",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "tmagic",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@7.1.9",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/cli",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/core",
|
||||
"sideEffects": [
|
||||
"dist/*"
|
||||
@@ -35,7 +35,7 @@
|
||||
"vue"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"events": "^3.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/editor",
|
||||
"sideEffects": [
|
||||
"dist/*",
|
||||
@@ -45,11 +45,11 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.18.0",
|
||||
"@element-plus/icons-vue": "^2.0.9",
|
||||
"@tmagic/core": "1.1.1",
|
||||
"@tmagic/form": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/stage": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/core": "1.1.2",
|
||||
"@tmagic/form": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/stage": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"buffer": "^6.0.3",
|
||||
"color": "^3.1.3",
|
||||
"element-plus": "^2.2.6",
|
||||
@@ -62,7 +62,7 @@
|
||||
"vue": "^3.2.37"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@tmagic/form": "1.1.1",
|
||||
"@tmagic/form": "1.1.2",
|
||||
"element-plus": "^2.2.6",
|
||||
"monaco-editor": "^0.34.0",
|
||||
"vue": "^3.2.37"
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
<template #component-list-panel-header>
|
||||
<slot name="component-list-panel-header"></slot>
|
||||
</template>
|
||||
|
||||
<template #component-list-item="{ component }">
|
||||
<slot name="component-list-item" :component="component"></slot>
|
||||
</template>
|
||||
</sidebar>
|
||||
</slot>
|
||||
</template>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<el-icon v-if="!icon"><Edit></Edit></el-icon>
|
||||
<el-icon v-else-if="typeof icon === 'string' && icon.startsWith('http')"><img :src="icon" /></el-icon>
|
||||
<i v-else-if="typeof icon === 'string'" :class="icon"></i>
|
||||
<el-icon v-else><component :is="toRaw(icon)"></component></el-icon>
|
||||
<el-icon v-if="!icon" class="magic-editor-icon"><Edit></Edit></el-icon>
|
||||
<el-icon v-else-if="typeof icon === 'string' && icon.startsWith('http')" class="magic-editor-icon"
|
||||
><img :src="icon"
|
||||
/></el-icon>
|
||||
<i v-else-if="typeof icon === 'string'" class="magic-editor-icon" :class="icon"></i>
|
||||
<el-icon v-else class="magic-editor-icon"><component :is="toRaw(icon)"></component></el-icon>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './utils/polyfills';
|
||||
|
||||
import { App } from 'vue';
|
||||
|
||||
import Code from './fields/Code.vue';
|
||||
|
||||
@@ -24,11 +24,13 @@
|
||||
@dragend="dragendHandler"
|
||||
@drag="dragHandler"
|
||||
>
|
||||
<m-icon :icon="item.icon"></m-icon>
|
||||
<slot name="component-list-item" :component="item">
|
||||
<MIcon :icon="item.icon"></MIcon>
|
||||
|
||||
<el-tooltip effect="dark" placement="bottom" :content="item.text">
|
||||
<span>{{ item.text }}</span>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" placement="bottom" :content="item.text">
|
||||
<span>{{ item.text }}</span>
|
||||
</el-tooltip>
|
||||
</slot>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</template>
|
||||
@@ -36,8 +38,8 @@
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, inject, ref } from 'vue';
|
||||
<script lang="ts" setup>
|
||||
import { computed, inject, ref } from 'vue';
|
||||
import serialize from 'serialize-javascript';
|
||||
|
||||
import type StageCore from '@tmagic/stage';
|
||||
@@ -46,89 +48,75 @@ import { removeClassNameByClassName } from '@tmagic/utils';
|
||||
import MIcon from '../../components/Icon.vue';
|
||||
import type { ComponentGroup, ComponentItem, Services, StageOptions } from '../../type';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ui-component-panel',
|
||||
const searchText = ref('');
|
||||
const services = inject<Services>('services');
|
||||
const stageOptions = inject<StageOptions>('stageOptions');
|
||||
|
||||
components: { MIcon },
|
||||
const stage = computed(() => services?.editorService.get<StageCore>('stage'));
|
||||
const list = computed(() =>
|
||||
services?.componentListService.getList().map((group: ComponentGroup) => ({
|
||||
...group,
|
||||
items: group.items.filter((item: ComponentItem) => item.text.includes(searchText.value)),
|
||||
})),
|
||||
);
|
||||
const collapseValue = computed(() =>
|
||||
Array(list.value?.length)
|
||||
.fill(1)
|
||||
.map((x, i) => i),
|
||||
);
|
||||
|
||||
setup() {
|
||||
const searchText = ref('');
|
||||
const services = inject<Services>('services');
|
||||
const stageOptions = inject<StageOptions>('stageOptions');
|
||||
let timeout: NodeJS.Timeout | undefined;
|
||||
let clientX: number;
|
||||
let clientY: number;
|
||||
|
||||
const stage = computed(() => services?.editorService.get<StageCore>('stage'));
|
||||
const list = computed(() =>
|
||||
services?.componentListService.getList().map((group: ComponentGroup) => ({
|
||||
...group,
|
||||
items: group.items.filter((item: ComponentItem) => item.text.includes(searchText.value)),
|
||||
})),
|
||||
);
|
||||
const collapseValue = computed(() =>
|
||||
Array(list.value?.length)
|
||||
.fill(1)
|
||||
.map((x, i) => i),
|
||||
const appendComponent = ({ text, type, data = {} }: ComponentItem): void => {
|
||||
services?.editorService.add({
|
||||
name: text,
|
||||
type,
|
||||
...data,
|
||||
});
|
||||
};
|
||||
|
||||
const dragstartHandler = ({ text, type, data = {} }: ComponentItem, e: DragEvent) => {
|
||||
if (e.dataTransfer) {
|
||||
e.dataTransfer.effectAllowed = 'move';
|
||||
e.dataTransfer.setData(
|
||||
'data',
|
||||
serialize({
|
||||
name: text,
|
||||
type,
|
||||
...data,
|
||||
}).replace(/"(\w+)":\s/g, '$1: '),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
let timeout: NodeJS.Timeout | undefined;
|
||||
let clientX: number;
|
||||
let clientY: number;
|
||||
const dragendHandler = () => {
|
||||
if (timeout) {
|
||||
globalThis.clearTimeout(timeout);
|
||||
timeout = undefined;
|
||||
}
|
||||
const doc = stage.value?.renderer.contentWindow?.document;
|
||||
if (doc && stageOptions) {
|
||||
removeClassNameByClassName(doc, stageOptions.containerHighlightClassName);
|
||||
}
|
||||
clientX = 0;
|
||||
clientY = 0;
|
||||
};
|
||||
|
||||
return {
|
||||
searchText,
|
||||
collapseValue,
|
||||
list,
|
||||
const dragHandler = (e: DragEvent) => {
|
||||
if (e.clientX !== clientX || e.clientY !== clientY) {
|
||||
clientX = e.clientX;
|
||||
clientY = e.clientY;
|
||||
if (timeout) {
|
||||
globalThis.clearTimeout(timeout);
|
||||
timeout = undefined;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
appendComponent({ text, type, data = {} }: ComponentItem): void {
|
||||
services?.editorService.add({
|
||||
name: text,
|
||||
type,
|
||||
...data,
|
||||
});
|
||||
},
|
||||
if (timeout || !stage.value) return;
|
||||
|
||||
dragstartHandler({ text, type, data = {} }: ComponentItem, e: DragEvent) {
|
||||
if (e.dataTransfer) {
|
||||
e.dataTransfer.effectAllowed = 'move';
|
||||
e.dataTransfer.setData(
|
||||
'data',
|
||||
serialize({
|
||||
name: text,
|
||||
type,
|
||||
...data,
|
||||
}).replace(/"(\w+)":\s/g, '$1: '),
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
dragendHandler() {
|
||||
if (timeout) {
|
||||
globalThis.clearTimeout(timeout);
|
||||
timeout = undefined;
|
||||
}
|
||||
const doc = stage.value?.renderer.contentWindow?.document;
|
||||
if (doc && stageOptions) {
|
||||
removeClassNameByClassName(doc, stageOptions.containerHighlightClassName);
|
||||
}
|
||||
clientX = 0;
|
||||
clientY = 0;
|
||||
},
|
||||
|
||||
dragHandler(e: DragEvent) {
|
||||
if (e.clientX !== clientX || e.clientY !== clientY) {
|
||||
clientX = e.clientX;
|
||||
clientY = e.clientY;
|
||||
if (timeout) {
|
||||
globalThis.clearTimeout(timeout);
|
||||
timeout = undefined;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (timeout || !stage.value) return;
|
||||
|
||||
timeout = stage.value.getAddContainerHighlightClassNameTimeout(e);
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
timeout = stage.value.getAddContainerHighlightClassNameTimeout(e);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
<template #component-list-panel-header v-if="item === 'component-list'">
|
||||
<slot name="component-list-panel-header"></slot>
|
||||
</template>
|
||||
|
||||
<template #component-list-item="{ component }" v-if="item === 'component-list'">
|
||||
<slot name="component-list-item" :component="component"></slot>
|
||||
</template>
|
||||
</tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
@@ -13,6 +13,18 @@
|
||||
<component v-else-if="config.slots?.componentListPanelHeader" :is="config.slots.componentListPanelHeader" />
|
||||
</template>
|
||||
|
||||
<template
|
||||
#component-list-item="{ component }"
|
||||
v-if="data === 'component-list' || config.slots?.componentListItem"
|
||||
>
|
||||
<slot v-if="data === 'component-list'" name="component-list-item" :component="component"></slot>
|
||||
<component
|
||||
v-else-if="config.slots?.componentListItem"
|
||||
:is="config.slots.componentListItem"
|
||||
:component="component"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #layer-panel-header v-if="data === 'layer' || config.slots?.layerPanelHeader">
|
||||
<slot v-if="data === 'layer'" name="layer-panel-header"></slot>
|
||||
<component v-else-if="config.slots?.layerPanelHeader" :is="config.slots.layerPanelHeader" />
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
<template #reference>
|
||||
<el-icon class="m-editor-page-bar-menu-icon">
|
||||
<caret-bottom></caret-bottom>
|
||||
<CaretBottom></CaretBottom>
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-popover>
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
<template>
|
||||
<div class="m-editor-page-bar" ref="pageBar">
|
||||
<div id="m-editor-page-bar-add-icon" class="m-editor-page-bar-item m-editor-page-bar-item-icon" @click="addPage">
|
||||
<div
|
||||
v-if="showAddPageButton"
|
||||
id="m-editor-page-bar-add-icon"
|
||||
class="m-editor-page-bar-item m-editor-page-bar-item-icon"
|
||||
@click="addPage"
|
||||
>
|
||||
<el-icon><plus></plus></el-icon>
|
||||
</div>
|
||||
<div v-else style="width: 21px"></div>
|
||||
<div v-if="canScroll" class="m-editor-page-bar-item m-editor-page-bar-item-icon" @click="scroll('left')">
|
||||
<el-icon><arrow-left-bold></arrow-left-bold></el-icon>
|
||||
</div>
|
||||
@@ -26,13 +32,17 @@ import { generatePageNameByApp } from '../../utils/editor';
|
||||
|
||||
const services = inject<Services>('services');
|
||||
const editorService = services?.editorService;
|
||||
const uiService = services?.uiService;
|
||||
|
||||
const pageBar = ref<HTMLDivElement>();
|
||||
const itemsContainer = ref<HTMLDivElement>();
|
||||
const pageBarWidth = ref(0);
|
||||
const canScroll = ref(false);
|
||||
|
||||
const itemsContainerWidth = computed(() => pageBarWidth.value - 105);
|
||||
const showAddPageButton = computed(() => uiService?.get('showAddPageButton'));
|
||||
|
||||
// 减去新增、左移、右移三个按钮的宽度
|
||||
const itemsContainerWidth = computed(() => pageBarWidth.value - 35 * 2 - (showAddPageButton.value ? 35 : 21));
|
||||
|
||||
let translateLeft = 0;
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
@@ -46,7 +56,7 @@ const resizeObserver = new ResizeObserver((entries) => {
|
||||
|
||||
const setCanScroll = () => {
|
||||
if (itemsContainer.value) {
|
||||
canScroll.value = itemsContainer.value.scrollWidth > pageBarWidth.value - 105;
|
||||
canScroll.value = itemsContainer.value.scrollWidth > itemsContainerWidth.value;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -158,8 +158,8 @@ const dropHandler = async (e: DragEvent) => {
|
||||
config.style = {
|
||||
...style,
|
||||
position,
|
||||
top,
|
||||
left,
|
||||
top: top / zoom.value,
|
||||
left: left / zoom.value,
|
||||
};
|
||||
|
||||
config.inputEvent = e;
|
||||
|
||||
@@ -54,6 +54,7 @@ const state = reactive<UiState>({
|
||||
showGuides: true,
|
||||
showRule: true,
|
||||
propsPanelSize: 'small',
|
||||
showAddPageButton: true,
|
||||
});
|
||||
|
||||
class Ui extends BaseService {
|
||||
|
||||
@@ -86,11 +86,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
color: $--font-color;
|
||||
}
|
||||
|
||||
.magic-editor-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
&.divider {
|
||||
padding: 0 14px;
|
||||
|
||||
|
||||
6
packages/editor/src/theme/icon.scss
Normal file
6
packages/editor/src/theme/icon.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
.magic-editor-icon {
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
@@ -11,3 +11,4 @@
|
||||
@import "./content-menu.scss";
|
||||
@import "./stage.scss";
|
||||
@import "./code-editor.scss";
|
||||
@import "./icon.scss";
|
||||
|
||||
@@ -124,6 +124,8 @@ export interface UiState {
|
||||
showRule: boolean;
|
||||
/** 用于控制该属性配置表单内组件的尺寸 */
|
||||
propsPanelSize: 'large' | 'default' | 'small';
|
||||
/** 是否显示新增页面按钮 */
|
||||
showAddPageButton: boolean;
|
||||
}
|
||||
|
||||
export interface EditorNodeInfo {
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// serialize-javascript 依赖的 randombytes 依赖全局的 global 对象,因此此处需添加 global polyfill
|
||||
if (typeof global === 'undefined') {
|
||||
(window as any).global = window;
|
||||
}
|
||||
|
||||
if (typeof globalThis === 'undefined') {
|
||||
(window as any).globalThis = window;
|
||||
}
|
||||
@@ -39,6 +39,14 @@ export default defineConfig({
|
||||
],
|
||||
},
|
||||
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
define: {
|
||||
global: 'globalThis',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
build: {
|
||||
cssCodeSplit: false,
|
||||
sourcemap: true,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/form",
|
||||
"sideEffects": [
|
||||
"dist/*",
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.0.9",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"element-plus": "^2.2.6",
|
||||
"lodash-es": "^4.17.21",
|
||||
"sortablejs": "^1.14.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/schema",
|
||||
"sideEffects": false,
|
||||
"main": "dist/tmagic-schema.umd.js",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/stage",
|
||||
"sideEffects": [
|
||||
"dist/*"
|
||||
@@ -29,9 +29,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@scena/guides": "^0.17.0",
|
||||
"@tmagic/core": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/core": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"events": "^3.3.0",
|
||||
"keycon": "^1.1.2",
|
||||
"lodash-es": "^4.17.21",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/table",
|
||||
"sideEffects": [
|
||||
"dist/*"
|
||||
@@ -32,14 +32,14 @@
|
||||
"url": "https://github.com/Tencent/tmagic-editor.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/form": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/form": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"element-plus": "^2.2.6",
|
||||
"lodash-es": "^4.17.21",
|
||||
"vue": "^3.2.37"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@tmagic/form": "1.1.1",
|
||||
"@tmagic/form": "1.1.2",
|
||||
"element-plus": "^2.2.6",
|
||||
"vue": "^3.2.37"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tmagic/ui-react",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"main": "src/index.ts",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
@@ -13,8 +13,8 @@
|
||||
"react:build": "tsc && vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/core": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/core": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"qrcode": "^1.5.0",
|
||||
"react": "^17.0.0",
|
||||
"react-dom": "^17.0.0"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/ui-vue2",
|
||||
"main": "src/index.ts",
|
||||
"engines": {
|
||||
@@ -10,9 +10,9 @@
|
||||
"url": "https://github.com/Tencent/tmagic-editor.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/core": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/core": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"qrcode": "^1.5.0",
|
||||
"vue": "^2.7.4"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/ui",
|
||||
"main": "src/index.ts",
|
||||
"engines": {
|
||||
@@ -11,9 +11,9 @@
|
||||
"url": "https://github.com/Tencent/tmagic-editor.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/core": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/core": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"delegate": "^3.2.0",
|
||||
"qrcode": "^1.5.0",
|
||||
"tiny-emitter": "^2.1.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "@tmagic/utils",
|
||||
"main": "dist/tmagic-utils.umd.js",
|
||||
"module": "dist/tmagic-utils.mjs",
|
||||
@@ -24,7 +24,7 @@
|
||||
"url": "https://github.com/Tencent/tmagic-editor.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"dayjs": "^1.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tmagic-playground",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"clean:top": "rimraf dist",
|
||||
@@ -12,11 +12,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.0.9",
|
||||
"@tmagic/editor": "1.1.1",
|
||||
"@tmagic/form": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/stage": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/editor": "1.1.2",
|
||||
"@tmagic/form": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/stage": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"element-plus": "^2.2.6",
|
||||
"monaco-editor": "^0.34.0",
|
||||
"serialize-javascript": "^6.0.0",
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import './polyfills';
|
||||
|
||||
import { createApp } from 'vue';
|
||||
import ElementPlus from 'element-plus';
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
||||
*
|
||||
* Copyright (C) 2021 THL A29 Limited, a Tencent company. 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.
|
||||
*/
|
||||
|
||||
if (typeof (window as any).global === 'undefined') {
|
||||
(window as any).global = window;
|
||||
}
|
||||
@@ -33,7 +33,7 @@ export default defineConfig({
|
||||
}),
|
||||
],
|
||||
|
||||
base: '/tmagic-editor/playground',
|
||||
base: '/tmagic-editor/playground/',
|
||||
|
||||
resolve: {
|
||||
alias: [
|
||||
@@ -53,6 +53,14 @@ export default defineConfig({
|
||||
],
|
||||
},
|
||||
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
define: {
|
||||
global: 'globalThis',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
server: {
|
||||
fs: {
|
||||
strict: false,
|
||||
|
||||
94
pnpm-lock.yaml
generated
94
pnpm-lock.yaml
generated
@@ -75,9 +75,9 @@ importers:
|
||||
docs:
|
||||
specifiers:
|
||||
'@element-plus/icons-vue': ^2.0.9
|
||||
'@tmagic/form': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/form': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@vuepress/bundler-vite': ^2.0.0-beta.49
|
||||
'@vuepress/cli': ^2.0.0-beta.49
|
||||
'@vuepress/client': ^2.0.0-beta.49
|
||||
@@ -134,7 +134,7 @@ importers:
|
||||
|
||||
packages/core:
|
||||
specifiers:
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@types/events': ^3.0.0
|
||||
'@types/node': ^15.12.4
|
||||
events: ^3.3.0
|
||||
@@ -155,11 +155,11 @@ importers:
|
||||
specifiers:
|
||||
'@babel/core': ^7.18.0
|
||||
'@element-plus/icons-vue': ^2.0.9
|
||||
'@tmagic/core': 1.1.1
|
||||
'@tmagic/form': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/stage': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/core': 1.1.2
|
||||
'@tmagic/form': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/stage': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/events': ^3.0.0
|
||||
'@types/lodash-es': ^4.17.4
|
||||
'@types/node': ^15.12.4
|
||||
@@ -218,7 +218,7 @@ importers:
|
||||
specifiers:
|
||||
'@babel/core': ^7.18.0
|
||||
'@element-plus/icons-vue': ^2.0.9
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/lodash-es': ^4.17.4
|
||||
'@types/node': ^15.12.4
|
||||
'@types/sortablejs': ^1.10.7
|
||||
@@ -270,9 +270,9 @@ importers:
|
||||
packages/stage:
|
||||
specifiers:
|
||||
'@scena/guides': ^0.17.0
|
||||
'@tmagic/core': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/core': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/events': ^3.0.0
|
||||
'@types/lodash-es': ^4.17.4
|
||||
'@types/node': ^15.12.4
|
||||
@@ -306,8 +306,8 @@ importers:
|
||||
|
||||
packages/table:
|
||||
specifiers:
|
||||
'@tmagic/form': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/form': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/color': ^3.0.1
|
||||
'@types/lodash-es': ^4.17.4
|
||||
'@types/node': ^15.12.4
|
||||
@@ -344,9 +344,9 @@ importers:
|
||||
packages/ui:
|
||||
specifiers:
|
||||
'@testing-library/vue': ^6.4.2
|
||||
'@tmagic/core': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/core': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/qrcode': ^1.4.2
|
||||
'@vue/compiler-sfc': ^3.2.37
|
||||
'@vue/test-utils': ^2.0.0
|
||||
@@ -370,8 +370,8 @@ importers:
|
||||
|
||||
packages/ui-react:
|
||||
specifiers:
|
||||
'@tmagic/core': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/core': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@types/react': ^17.0.37
|
||||
'@types/react-dom': ^17.0.11
|
||||
qrcode: ^1.5.0
|
||||
@@ -391,9 +391,9 @@ importers:
|
||||
|
||||
packages/ui-vue2:
|
||||
specifiers:
|
||||
'@tmagic/core': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/core': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
qrcode: ^1.5.0
|
||||
vite: ^3.0.4
|
||||
vue: ^2.7.4
|
||||
@@ -410,7 +410,7 @@ importers:
|
||||
|
||||
packages/utils:
|
||||
specifiers:
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@types/node': ^15.12.4
|
||||
dayjs: ^1.11.4
|
||||
rimraf: ^3.0.2
|
||||
@@ -428,11 +428,11 @@ importers:
|
||||
playground:
|
||||
specifiers:
|
||||
'@element-plus/icons-vue': ^2.0.9
|
||||
'@tmagic/editor': 1.1.1
|
||||
'@tmagic/form': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/stage': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/editor': 1.1.2
|
||||
'@tmagic/form': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/stage': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/node': ^15.12.4
|
||||
'@types/serialize-javascript': ^5.0.1
|
||||
'@vitejs/plugin-legacy': ^2.0.0
|
||||
@@ -476,12 +476,12 @@ importers:
|
||||
|
||||
runtime/react:
|
||||
specifiers:
|
||||
'@tmagic/cli': 1.1.1
|
||||
'@tmagic/core': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/stage': 1.1.1
|
||||
'@tmagic/ui-react': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/cli': 1.1.2
|
||||
'@tmagic/core': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/stage': 1.1.2
|
||||
'@tmagic/ui-react': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/react': ^17.0.37
|
||||
'@types/react-dom': ^17.0.11
|
||||
'@vitejs/plugin-legacy': ^2.0.0
|
||||
@@ -515,12 +515,12 @@ importers:
|
||||
|
||||
runtime/vue2:
|
||||
specifiers:
|
||||
'@tmagic/cli': 1.1.1
|
||||
'@tmagic/core': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/stage': 1.1.1
|
||||
'@tmagic/ui-vue2': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/cli': 1.1.2
|
||||
'@tmagic/core': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/stage': 1.1.2
|
||||
'@tmagic/ui-vue2': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/events': ^3.0.0
|
||||
'@vitejs/plugin-legacy': ^2.0.0
|
||||
'@vitejs/plugin-vue2': ^1.1.2
|
||||
@@ -556,12 +556,12 @@ importers:
|
||||
|
||||
runtime/vue3:
|
||||
specifiers:
|
||||
'@tmagic/cli': 1.1.1
|
||||
'@tmagic/core': 1.1.1
|
||||
'@tmagic/schema': 1.1.1
|
||||
'@tmagic/stage': 1.1.1
|
||||
'@tmagic/ui': 1.1.1
|
||||
'@tmagic/utils': 1.1.1
|
||||
'@tmagic/cli': 1.1.2
|
||||
'@tmagic/core': 1.1.2
|
||||
'@tmagic/schema': 1.1.2
|
||||
'@tmagic/stage': 1.1.2
|
||||
'@tmagic/ui': 1.1.2
|
||||
'@tmagic/utils': 1.1.2
|
||||
'@types/node': ^15.12.4
|
||||
'@vitejs/plugin-legacy': ^2.0.0
|
||||
'@vitejs/plugin-vue': ^3.0.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "runtime-react",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev:react": "npm run build:libs && vite --config dev.vite.config.ts",
|
||||
@@ -20,12 +20,12 @@
|
||||
"build:event:admin": "vite build --config build.vite.config.ts --mode event:admin"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/cli": "1.1.1",
|
||||
"@tmagic/core": "1.1.1",
|
||||
"@tmagic/ui-react": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/stage": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/cli": "1.1.2",
|
||||
"@tmagic/core": "1.1.2",
|
||||
"@tmagic/ui-react": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/stage": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"axios": "^0.25.0",
|
||||
"terser": "^5.14.2",
|
||||
"react": "^17.0.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "runtime-vue2",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev:vue2": "npm run build:libs && vite --config dev.vite.config.ts",
|
||||
@@ -20,12 +20,12 @@
|
||||
"build:event:admin": "vite build --config build.vite.config.ts --mode event:admin"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/cli": "1.1.1",
|
||||
"@tmagic/core": "1.1.1",
|
||||
"@tmagic/ui-vue2": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/stage": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/cli": "1.1.2",
|
||||
"@tmagic/core": "1.1.2",
|
||||
"@tmagic/ui-vue2": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/stage": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"axios": "^0.25.0",
|
||||
"terser": "^5.14.2",
|
||||
"vue": "^2.7.4"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "runtime-vue3",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run build:libs && vite --config dev.vite.config.ts",
|
||||
@@ -20,12 +20,12 @@
|
||||
"build:event:admin": "vite build --config build.vite.config.ts --mode event:admin"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/cli": "1.1.1",
|
||||
"@tmagic/core": "1.1.1",
|
||||
"@tmagic/ui": "1.1.1",
|
||||
"@tmagic/schema": "1.1.1",
|
||||
"@tmagic/stage": "1.1.1",
|
||||
"@tmagic/utils": "1.1.1",
|
||||
"@tmagic/cli": "1.1.2",
|
||||
"@tmagic/core": "1.1.2",
|
||||
"@tmagic/ui": "1.1.2",
|
||||
"@tmagic/schema": "1.1.2",
|
||||
"@tmagic/stage": "1.1.2",
|
||||
"@tmagic/utils": "1.1.2",
|
||||
"@vitejs/plugin-legacy": "^2.0.0",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
||||
"axios": "^0.25.0",
|
||||
|
||||
Reference in New Issue
Block a user