@chamn/engine 0.0.4 → 0.0.7
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/.eslintrc.js +1 -0
- package/CHANGELOG.md +16 -0
- package/README.md +31 -0
- package/build.config.js +4 -3
- package/dist/Engine.module.scss.d.ts +5 -0
- package/dist/component/CSSEditor/index.d.ts +16 -0
- package/dist/component/CSSEditor/style.module.scss.d.ts +6 -0
- package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +898 -0
- package/dist/component/CSSPropertiesEditor/index.d.ts +43 -0
- package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
- package/dist/component/CSSPropertiesEditor/util.d.ts +1 -0
- package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +898 -0
- package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +37 -0
- package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
- package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +1 -0
- package/dist/component/ClassNameEditor/index.d.ts +16 -0
- package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +11 -0
- package/dist/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
- package/dist/component/CustomSchemaForm/components/Form/context.d.ts +10 -0
- package/dist/component/CustomSchemaForm/components/Form/index.d.ts +17 -0
- package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +12 -0
- package/dist/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +11 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +10 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +14 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
- package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +5 -0
- package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +6 -0
- package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
- package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +8 -0
- package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +1 -0
- package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +8 -0
- package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +19 -0
- package/dist/component/CustomSchemaForm/context.d.ts +15 -0
- package/dist/component/CustomSchemaForm/index.d.ts +17 -0
- package/dist/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
- package/dist/component/CustomSchemaForm/utils.d.ts +2 -0
- package/dist/component/MonacoEditor/index.d.ts +15 -0
- package/dist/component/Workbench/style.module.scss.d.ts +26 -0
- package/dist/core/pluginManager.d.ts +1 -1
- package/dist/index.cjs.js +295 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.es.js +44920 -9933
- package/dist/index.es.js.map +1 -1
- package/dist/material/innerMaterial.d.ts +2 -0
- package/dist/monacoeditorwork/css.worker.bundle.js +45072 -0
- package/dist/monacoeditorwork/editor.worker.bundle.js +8294 -0
- package/dist/monacoeditorwork/html.worker.bundle.js +24321 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +15550 -0
- package/dist/monacoeditorwork/ts.worker.bundle.js +169967 -0
- package/dist/plugins/AdvancePanel/index.d.ts +10 -0
- package/dist/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
- package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +12 -0
- package/dist/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
- package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +9 -0
- package/dist/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
- package/dist/plugins/ComponentLibrary/index.d.ts +3 -0
- package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/ComponentLibrary/localize/index.d.ts +2 -0
- package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
- package/dist/plugins/ComponentLibrary/util.d.ts +1 -0
- package/dist/plugins/ComponentStatePanel/index.d.ts +10 -0
- package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +10 -0
- package/dist/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
- package/dist/plugins/Designer/components/GhostView/index.d.ts +5 -0
- package/dist/plugins/Designer/config.d.ts +1 -0
- package/dist/plugins/Designer/index.d.ts +15 -0
- package/dist/plugins/Designer/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/Designer/localize/index.d.ts +2 -0
- package/dist/plugins/Designer/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/Designer/style.module.scss.d.ts +5 -0
- package/dist/plugins/Designer/util.d.ts +2 -0
- package/dist/plugins/Designer/view.d.ts +30 -0
- package/dist/plugins/DisplaySourceSchema/index.d.ts +9 -0
- package/dist/plugins/GlobalStatePanel/index.d.ts +3 -0
- package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/GlobalStatePanel/localize/index.d.ts +2 -0
- package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
- package/dist/plugins/History/index.d.ts +2 -0
- package/dist/plugins/OutlineTree/components/TreeView/context.d.ts +30 -0
- package/dist/plugins/OutlineTree/components/TreeView/dataStruct.d.ts +21 -0
- package/dist/plugins/OutlineTree/components/TreeView/index.d.ts +34 -0
- package/dist/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
- package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +9 -0
- package/dist/plugins/OutlineTree/index.d.ts +3 -0
- package/dist/plugins/OutlineTree/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/OutlineTree/localize/index.d.ts +2 -0
- package/dist/plugins/OutlineTree/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/OutlineTree/util.d.ts +15 -0
- package/dist/plugins/PropertyPanel/index.d.ts +9 -0
- package/dist/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
- package/dist/plugins/RightPanel/index.d.ts +2 -0
- package/dist/plugins/RightPanel/style.module.scss.d.ts +10 -0
- package/dist/plugins/RightPanel/view.d.ts +34 -0
- package/dist/plugins/VisualPanelPlus/index.d.ts +9 -0
- package/dist/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
- package/dist/plugins/index.d.ts +9 -0
- package/dist/style.css +1 -1
- package/dist/utils/css.d.ts +19 -0
- package/dist/utils/logger.d.ts +1 -0
- package/package.json +16 -8
- package/public/Engine.module.scss.d.ts +5 -0
- package/public/component/CSSEditor/style.module.scss.d.ts +6 -0
- package/public/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
- package/public/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
- package/public/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
- package/public/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
- package/public/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
- package/public/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
- package/public/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
- package/public/component/Workbench/style.module.scss.d.ts +26 -0
- package/public/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
- package/public/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
- package/public/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
- package/public/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
- package/public/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
- package/public/plugins/Designer/style.module.scss.d.ts +5 -0
- package/public/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
- package/public/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
- package/public/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
- package/public/plugins/RightPanel/style.module.scss.d.ts +10 -0
- package/public/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
- package/public/render.umd.js +14 -14
- package/public/render.umd.js.map +1 -1
- package/src/Engine.module.scss.d.ts +5 -0
- package/src/_dev_/page/Editor/index.tsx +1 -1
- package/src/component/CSSEditor/index.tsx +4 -5
- package/src/component/CSSEditor/style.module.scss.d.ts +6 -0
- package/src/component/CSSPropertiesEditor/index.tsx +1 -5
- package/src/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
- package/src/component/CSSPropertiesVariableBindEditor/index.tsx +1 -1
- package/src/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
- package/src/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
- package/src/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
- package/src/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
- package/src/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
- package/src/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
- package/src/component/MonacoEditor/index.tsx +1 -41
- package/src/component/Workbench/style.module.scss.d.ts +26 -0
- package/src/core/pluginManager.ts +1 -1
- package/src/index.tsx +5 -2
- package/src/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
- package/src/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
- package/src/plugins/ComponentLibrary/components/ListView/index.tsx +0 -1
- package/src/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
- package/src/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
- package/src/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
- package/src/plugins/Designer/style.module.scss.d.ts +5 -0
- package/src/plugins/DisplaySourceSchema/index.tsx +1 -1
- package/src/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
- package/src/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
- package/src/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
- package/src/plugins/RightPanel/style.module.scss.d.ts +10 -0
- package/src/plugins/VisualPanelPlus/index.tsx +3 -19
- package/src/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
- package/src/plugins/index.tsx +3 -1
- package/src/style.d.ts +2 -0
- package/src/typing.d.ts +5 -0
- package/dist/typing.d.ts +0 -4
- package/dist/vite-env.d.ts +0 -1
- package/public/typing.d.ts +0 -4
- package/public/vite-env.d.ts +0 -1
- package/src/component/MonacoEditor/index copy.tsx +0 -119
package/.eslintrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.0.7](https://github.com/ByteCrazy/chameleon/compare/v0.0.6...v0.0.7) (2023-03-29)
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* **build-script, build-script-example, demo-page, engine, layout, material, model, render:** 🎸 external monaco eitor and remove style panel ([494d898](https://github.com/ByteCrazy/chameleon/commit/494d898fd75dabe84d867ff45e84ae63f9b59c5e))
|
|
11
|
+
|
|
12
|
+
## [0.0.6](https://github.com/ByteCrazy/chameleon/compare/v0.0.5...v0.0.6) (2023-03-28)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @chamn/engine
|
|
15
|
+
|
|
16
|
+
## [0.0.5](https://github.com/ByteCrazy/chameleon/compare/v0.0.4...v0.0.5) (2023-03-28)
|
|
17
|
+
|
|
18
|
+
### ✨ Features | 新功能
|
|
19
|
+
|
|
20
|
+
* **build-script, engine, layout, material, model, render:** 🎸 complete package info ([86b095d](https://github.com/ByteCrazy/chameleon/commit/86b095da6c955946300591b1775f59c1a141c065))
|
|
21
|
+
|
|
6
22
|
## [0.0.4](https://github.com/ByteCrazy/chameleon/compare/v0.0.3...v0.0.4) (2023-03-27)
|
|
7
23
|
|
|
8
24
|
### 🐛 Bug Fixes | Bug 修复
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# chameleon
|
|
2
|
+
|
|
3
|
+
> "Chameleon", suitable for all environments
|
|
4
|
+
|
|
5
|
+
A streamlined low-code engine, all modules support custom extensions, which can be used for web page generation and rendering. Applicable to a variety of business scenarios, PC Page, H5 Page etc
|
|
6
|
+
|
|
7
|
+
## Online Demo
|
|
8
|
+
|
|
9
|
+
[https://hlerenow.github.io/chameleon/](https://hlerenow.github.io/chameleon/)
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
npm i @chamn/engine @chamn/model @chamn/render
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
[Example Project](https://github.com/ByteCrazy/chameleon-demo)
|
|
20
|
+
|
|
21
|
+
### ScreenSnapshoot
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+

|
package/build.config.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { visualizer } = require('rollup-plugin-visualizer');
|
|
6
|
+
const monacoEditorPlugin = require('vite-plugin-monaco-editor').default;
|
|
6
7
|
|
|
7
8
|
// 开发模式默认读取 index.html 作为开发模式入口
|
|
8
9
|
// entry 作为打包库入口
|
|
9
|
-
const plugins = [];
|
|
10
|
+
const plugins = [monacoEditorPlugin({})];
|
|
10
11
|
|
|
11
12
|
if (process.env.ANALYZE) {
|
|
12
13
|
plugins.push(
|
|
@@ -22,9 +23,9 @@ if (process.env.ANALYZE) {
|
|
|
22
23
|
const mainConfig = {
|
|
23
24
|
libMode: process.env.BUILD_TYPE !== 'APP',
|
|
24
25
|
entry: './src/index.tsx',
|
|
25
|
-
libName: 'CEngine',
|
|
26
|
+
// libName: 'CEngine',
|
|
26
27
|
fileName: 'index',
|
|
27
|
-
external: ['react', 'react-dom'],
|
|
28
|
+
external: process.env.BUILD_TYPE === 'APP' ? ['react', 'react-dom'] : ['react', 'react-dom', 'monaco-editor'],
|
|
28
29
|
global: {
|
|
29
30
|
react: 'React',
|
|
30
31
|
'react-dom': 'ReactDOM',
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
declare const DOM_CSS_STATUS: ("normal" | "hover" | "focus" | "focus-within" | "focus-visible" | "checked" | "disable" | "active")[];
|
|
3
|
+
type DomCSSStatusType = typeof DOM_CSS_STATUS[number];
|
|
4
|
+
export type CSSVal = Partial<Record<DomCSSStatusType, Record<
|
|
5
|
+
/** media query key */
|
|
6
|
+
string, Record<string, string>>>>;
|
|
7
|
+
export type CSSEditorRef = {
|
|
8
|
+
setValue: (val: CSSVal) => void;
|
|
9
|
+
};
|
|
10
|
+
export type CSSEditorProps = {
|
|
11
|
+
onValueChange?: (val: CSSVal) => void;
|
|
12
|
+
initialValue?: CSSVal;
|
|
13
|
+
handler?: MutableRefObject<CSSEditorRef | null>;
|
|
14
|
+
};
|
|
15
|
+
export declare const CSSEditor: (props: CSSEditorProps) => JSX.Element;
|
|
16
|
+
export {};
|