@cozeloop/components 0.0.8 → 0.0.10-beta-1751.535332992673

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cozeloop/components",
3
- "version": "0.0.8",
3
+ "version": "0.0.10-beta-1751.535332992673",
4
4
  "description": "common components for cozeloop",
5
5
  "author": "houtao.zzj@bytedance.com",
6
6
  "exports": {
@@ -28,6 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@arco-iconbox/react-cozeloop-icons": "0.0.3",
31
+ "@codemirror/autocomplete": "~6.18.4",
31
32
  "@codemirror/commands": "^6.3.3",
32
33
  "@codemirror/lang-go": "^6.0.1",
33
34
  "@codemirror/state": "^6.4.1",
@@ -38,7 +39,6 @@
38
39
  "@cozeloop/hooks": "latest",
39
40
  "@cozeloop/i18n": "latest",
40
41
  "@cozeloop/toolkit": "latest",
41
- "@monaco-editor/react": "^4.5.2",
42
42
  "@rjsf/core": "~5.24.9",
43
43
  "@rjsf/utils": "~5.24.9",
44
44
  "@rjsf/validator-ajv8": "~5.24.9",
@@ -48,7 +48,6 @@
48
48
  "dayjs": "^1.11.7",
49
49
  "immer": "^10.0.3",
50
50
  "lodash-es": "^4.17.21",
51
- "monaco-editor": "^0.45.0",
52
51
  "nanoid": "^4.0.2",
53
52
  "react": "~18.2.0",
54
53
  "react-sortable-hoc": "2.0.0",
@@ -1,3 +0,0 @@
1
- export { default as CodeEditor, DiffEditor } from '@monaco-editor/react';
2
- export { type Monaco, type MonacoDiffEditor } from '@monaco-editor/react';
3
- export { type editor } from 'monaco-editor';
@@ -1,9 +0,0 @@
1
- /// <reference path="../types.d.ts" />
2
- export { default as CodeEditor, DiffEditor } from '@monaco-editor/react';
3
- import { loader } from '@monaco-editor/react';
4
- loader.config({
5
- paths: {
6
- vs: MONACO_UNPKG,
7
- },
8
- });
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/code-editor/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGzE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,CAAC;IACZ,KAAK,EAAE;QACL,EAAE,EAAE,YAAY;KACjB;CACF,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type editor } from '../code-editor';
2
- export declare const codeOptionsConfig: editor.IStandaloneEditorConstructionOptions;
3
- interface CodeEditorWithLoadingProps {
4
- value: string;
5
- onChange?: (value: string) => void;
6
- disabled: boolean;
7
- className?: string;
8
- }
9
- export declare const CodeEditorWithLoading: ({ value, onChange, disabled, className, }: CodeEditorWithLoadingProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import cls from 'classnames';
4
- import { Loading } from '@coze-arch/coze-design';
5
- import { CodeEditor } from '../code-editor';
6
- import styles from './index.module.less';
7
- export const codeOptionsConfig = {
8
- lineNumbersMinChars: 3,
9
- automaticLayout: true,
10
- scrollBeyondLastLine: false,
11
- renderLineHighlight: 'none',
12
- tabSize: 2, // 设置 tab 大小为2
13
- insertSpaces: true,
14
- minimap: {
15
- enabled: false,
16
- },
17
- };
18
- export const CodeEditorWithLoading = ({ value, onChange, disabled, className, }) => {
19
- const [loading, setLoading] = useState(true);
20
- const LoadingNode = loading && (_jsx("div", { className: "absolute bg-[white] z-20 top-0 bottom-0 left-0 right-0 flex items-center justify-center", children: _jsx(Loading, { loading: true }) }));
21
- const onEditorMount = () => {
22
- setLoading(false);
23
- };
24
- return (_jsxs("div", { className: cls(styles['code-container'], className), children: [LoadingNode, _jsx(CodeEditor, { language: 'json', value: value, options: {
25
- readOnly: disabled,
26
- ...codeOptionsConfig,
27
- }, onMount: onEditorMount, theme: "vs-dark", onChange: newValue => {
28
- onChange?.(newValue || '');
29
- } })] }));
30
- };
31
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/code-editor-with-loading/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAe,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAgD;IAC5E,mBAAmB,EAAE,CAAC;IACtB,eAAe,EAAE,IAAI;IACrB,oBAAoB,EAAE,KAAK;IAC3B,mBAAmB,EAAE,MAAM;IAC3B,OAAO,EAAE,CAAC,EAAE,cAAc;IAC1B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE;QACP,OAAO,EAAE,KAAK;KACf;CACF,CAAC;AAQF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,GACkB,EAAE,EAAE;IAC/B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,WAAW,GAAG,OAAO,IAAI,CAC7B,cAAK,SAAS,EAAC,0FAA0F,YACvG,KAAC,OAAO,IAAC,OAAO,EAAE,IAAI,GAAI,GACtB,CACP,CAAC;IACF,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,UAAU,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,OAAO,CACL,eAAK,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,aACrD,WAAW,EACZ,KAAC,UAAU,IACT,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE;oBACP,QAAQ,EAAE,QAAQ;oBAClB,GAAG,iBAAiB;iBACrB,EACD,OAAO,EAAE,aAAa,EACtB,KAAK,EAAC,SAAS,EACf,QAAQ,EAAE,QAAQ,CAAC,EAAE;oBACnB,QAAQ,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;gBAC7B,CAAC,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC"}
File without changes