@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.
Files changed (173) hide show
  1. package/.eslintrc.js +1 -0
  2. package/CHANGELOG.md +16 -0
  3. package/README.md +31 -0
  4. package/build.config.js +4 -3
  5. package/dist/Engine.module.scss.d.ts +5 -0
  6. package/dist/component/CSSEditor/index.d.ts +16 -0
  7. package/dist/component/CSSEditor/style.module.scss.d.ts +6 -0
  8. package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +898 -0
  9. package/dist/component/CSSPropertiesEditor/index.d.ts +43 -0
  10. package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  11. package/dist/component/CSSPropertiesEditor/util.d.ts +1 -0
  12. package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +898 -0
  13. package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +37 -0
  14. package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  15. package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +1 -0
  16. package/dist/component/ClassNameEditor/index.d.ts +16 -0
  17. package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +11 -0
  18. package/dist/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  19. package/dist/component/CustomSchemaForm/components/Form/context.d.ts +10 -0
  20. package/dist/component/CustomSchemaForm/components/Form/index.d.ts +17 -0
  21. package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +12 -0
  22. package/dist/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  23. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +11 -0
  24. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +10 -0
  25. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +14 -0
  26. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  27. package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +5 -0
  28. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +6 -0
  29. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  30. package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +8 -0
  31. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +1 -0
  32. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +2 -0
  33. package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +2 -0
  34. package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +3 -0
  35. package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +3 -0
  36. package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +8 -0
  37. package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +3 -0
  38. package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +3 -0
  39. package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +3 -0
  40. package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +19 -0
  41. package/dist/component/CustomSchemaForm/context.d.ts +15 -0
  42. package/dist/component/CustomSchemaForm/index.d.ts +17 -0
  43. package/dist/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  44. package/dist/component/CustomSchemaForm/utils.d.ts +2 -0
  45. package/dist/component/MonacoEditor/index.d.ts +15 -0
  46. package/dist/component/Workbench/style.module.scss.d.ts +26 -0
  47. package/dist/core/pluginManager.d.ts +1 -1
  48. package/dist/index.cjs.js +295 -39
  49. package/dist/index.cjs.js.map +1 -1
  50. package/dist/index.d.ts +4 -2
  51. package/dist/index.es.js +44920 -9933
  52. package/dist/index.es.js.map +1 -1
  53. package/dist/material/innerMaterial.d.ts +2 -0
  54. package/dist/monacoeditorwork/css.worker.bundle.js +45072 -0
  55. package/dist/monacoeditorwork/editor.worker.bundle.js +8294 -0
  56. package/dist/monacoeditorwork/html.worker.bundle.js +24321 -0
  57. package/dist/monacoeditorwork/json.worker.bundle.js +15550 -0
  58. package/dist/monacoeditorwork/ts.worker.bundle.js +169967 -0
  59. package/dist/plugins/AdvancePanel/index.d.ts +10 -0
  60. package/dist/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  61. package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +12 -0
  62. package/dist/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  63. package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +9 -0
  64. package/dist/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  65. package/dist/plugins/ComponentLibrary/index.d.ts +3 -0
  66. package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +1 -0
  67. package/dist/plugins/ComponentLibrary/localize/index.d.ts +2 -0
  68. package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +1 -0
  69. package/dist/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  70. package/dist/plugins/ComponentLibrary/util.d.ts +1 -0
  71. package/dist/plugins/ComponentStatePanel/index.d.ts +10 -0
  72. package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +10 -0
  73. package/dist/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  74. package/dist/plugins/Designer/components/GhostView/index.d.ts +5 -0
  75. package/dist/plugins/Designer/config.d.ts +1 -0
  76. package/dist/plugins/Designer/index.d.ts +15 -0
  77. package/dist/plugins/Designer/localize/en_US/index.d.ts +1 -0
  78. package/dist/plugins/Designer/localize/index.d.ts +2 -0
  79. package/dist/plugins/Designer/localize/zh_CN/index.d.ts +1 -0
  80. package/dist/plugins/Designer/style.module.scss.d.ts +5 -0
  81. package/dist/plugins/Designer/util.d.ts +2 -0
  82. package/dist/plugins/Designer/view.d.ts +30 -0
  83. package/dist/plugins/DisplaySourceSchema/index.d.ts +9 -0
  84. package/dist/plugins/GlobalStatePanel/index.d.ts +3 -0
  85. package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +1 -0
  86. package/dist/plugins/GlobalStatePanel/localize/index.d.ts +2 -0
  87. package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +1 -0
  88. package/dist/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  89. package/dist/plugins/History/index.d.ts +2 -0
  90. package/dist/plugins/OutlineTree/components/TreeView/context.d.ts +30 -0
  91. package/dist/plugins/OutlineTree/components/TreeView/dataStruct.d.ts +21 -0
  92. package/dist/plugins/OutlineTree/components/TreeView/index.d.ts +34 -0
  93. package/dist/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  94. package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +9 -0
  95. package/dist/plugins/OutlineTree/index.d.ts +3 -0
  96. package/dist/plugins/OutlineTree/localize/en_US/index.d.ts +1 -0
  97. package/dist/plugins/OutlineTree/localize/index.d.ts +2 -0
  98. package/dist/plugins/OutlineTree/localize/zh_CN/index.d.ts +1 -0
  99. package/dist/plugins/OutlineTree/util.d.ts +15 -0
  100. package/dist/plugins/PropertyPanel/index.d.ts +9 -0
  101. package/dist/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  102. package/dist/plugins/RightPanel/index.d.ts +2 -0
  103. package/dist/plugins/RightPanel/style.module.scss.d.ts +10 -0
  104. package/dist/plugins/RightPanel/view.d.ts +34 -0
  105. package/dist/plugins/VisualPanelPlus/index.d.ts +9 -0
  106. package/dist/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  107. package/dist/plugins/index.d.ts +9 -0
  108. package/dist/style.css +1 -1
  109. package/dist/utils/css.d.ts +19 -0
  110. package/dist/utils/logger.d.ts +1 -0
  111. package/package.json +16 -8
  112. package/public/Engine.module.scss.d.ts +5 -0
  113. package/public/component/CSSEditor/style.module.scss.d.ts +6 -0
  114. package/public/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  115. package/public/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  116. package/public/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  117. package/public/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  118. package/public/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  119. package/public/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  120. package/public/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  121. package/public/component/Workbench/style.module.scss.d.ts +26 -0
  122. package/public/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  123. package/public/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  124. package/public/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  125. package/public/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  126. package/public/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  127. package/public/plugins/Designer/style.module.scss.d.ts +5 -0
  128. package/public/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  129. package/public/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  130. package/public/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  131. package/public/plugins/RightPanel/style.module.scss.d.ts +10 -0
  132. package/public/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  133. package/public/render.umd.js +14 -14
  134. package/public/render.umd.js.map +1 -1
  135. package/src/Engine.module.scss.d.ts +5 -0
  136. package/src/_dev_/page/Editor/index.tsx +1 -1
  137. package/src/component/CSSEditor/index.tsx +4 -5
  138. package/src/component/CSSEditor/style.module.scss.d.ts +6 -0
  139. package/src/component/CSSPropertiesEditor/index.tsx +1 -5
  140. package/src/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  141. package/src/component/CSSPropertiesVariableBindEditor/index.tsx +1 -1
  142. package/src/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  143. package/src/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  144. package/src/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  145. package/src/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  146. package/src/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  147. package/src/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  148. package/src/component/MonacoEditor/index.tsx +1 -41
  149. package/src/component/Workbench/style.module.scss.d.ts +26 -0
  150. package/src/core/pluginManager.ts +1 -1
  151. package/src/index.tsx +5 -2
  152. package/src/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  153. package/src/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  154. package/src/plugins/ComponentLibrary/components/ListView/index.tsx +0 -1
  155. package/src/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  156. package/src/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  157. package/src/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  158. package/src/plugins/Designer/style.module.scss.d.ts +5 -0
  159. package/src/plugins/DisplaySourceSchema/index.tsx +1 -1
  160. package/src/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  161. package/src/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  162. package/src/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  163. package/src/plugins/RightPanel/style.module.scss.d.ts +10 -0
  164. package/src/plugins/VisualPanelPlus/index.tsx +3 -19
  165. package/src/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  166. package/src/plugins/index.tsx +3 -1
  167. package/src/style.d.ts +2 -0
  168. package/src/typing.d.ts +5 -0
  169. package/dist/typing.d.ts +0 -4
  170. package/dist/vite-env.d.ts +0 -1
  171. package/public/typing.d.ts +0 -4
  172. package/public/vite-env.d.ts +0 -1
  173. package/src/component/MonacoEditor/index copy.tsx +0 -119
package/.eslintrc.js CHANGED
@@ -31,5 +31,6 @@ module.exports = {
31
31
  'linebreak-style': ['error', 'unix'],
32
32
  quotes: ['error', 'single'],
33
33
  semi: ['error', 'always'],
34
+ '@typescript-eslint/ban-types': 'warn',
34
35
  },
35
36
  };
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
+ ![image](https://user-images.githubusercontent.com/13299648/218920616-302a9eb6-a71a-4f4b-8e77-d892972eee2f.png)
24
+
25
+ ![image](https://user-images.githubusercontent.com/13299648/218920783-0d1cc275-a238-4d80-a717-dbbbf54b4713.png)
26
+
27
+ ![image](https://user-images.githubusercontent.com/13299648/218920845-0c4c549d-df56-4b0a-9b72-95dd0c0fcaf5.png)
28
+
29
+ ![image](https://user-images.githubusercontent.com/13299648/218921002-a25cfdd6-f27a-4b19-83fe-a6a264e4e4b5.png)
30
+
31
+ ![image](https://user-images.githubusercontent.com/13299648/218920640-9be3b1ba-1dc2-42c5-922f-f3c5f97a9d96.png)
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,5 @@
1
+ import globalClassNames from './style.d';
2
+ declare const classNames: typeof globalClassNames & {
3
+ readonly engineContainer: 'engineContainer';
4
+ };
5
+ export = classNames;
@@ -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 {};
@@ -0,0 +1,6 @@
1
+ import globalClassNames from '../../style.d';
2
+ declare const classNames: typeof globalClassNames & {
3
+ readonly stateTag: 'stateTag';
4
+ readonly stateTagClose: 'stateTagClose';
5
+ };
6
+ export = classNames;