@synerise/ds-code-area 1.2.31 → 1.3.0
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/CHANGELOG.md +10 -0
- package/README.md +1 -0
- package/dist/CodeArea.styles.d.ts +5 -1
- package/dist/CodeArea.styles.js +14 -5
- package/dist/CodeArea.types.d.ts +1 -0
- package/dist/components/BottomBar.d.ts +3 -1
- package/dist/components/BottomBar.js +5 -1
- package/dist/components/CodeAreaEditor.d.ts +1 -0
- package/dist/components/CodeAreaEditor.js +4 -2
- package/dist/components/CodeAreaEditorRaw.d.ts +1 -1
- package/dist/components/CodeAreaEditorRaw.js +6 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
# [1.3.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-code-area@1.2.32...@synerise/ds-code-area@1.3.0) (2026-02-23)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **code-area:** new prop noBorder ([9fea1bd](https://github.com/Synerise/synerise-design/commit/9fea1bd84b20599662411f89c5250c0ba37b51a4))
|
|
11
|
+
|
|
12
|
+
## [1.2.32](https://github.com/Synerise/synerise-design/compare/@synerise/ds-code-area@1.2.31...@synerise/ds-code-area@1.2.32) (2026-02-19)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @synerise/ds-code-area
|
|
15
|
+
|
|
6
16
|
## [1.2.31](https://github.com/Synerise/synerise-design/compare/@synerise/ds-code-area@1.2.30...@synerise/ds-code-area@1.2.31) (2026-02-12)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @synerise/ds-code-area
|
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ const syntaxOptions = [
|
|
|
65
65
|
| texts | customise displayed texts | `CodeAreaTexts` | - |
|
|
66
66
|
| getPopupContainer | customise where fullscreen layer is rendered into | getPopupContainer (@synerise/ds-utils) | - |
|
|
67
67
|
| placeholder | placeholder content | `ReactNode` | - |
|
|
68
|
+
| noBorder | remove border from wrapper | `boolean` | - |
|
|
68
69
|
|
|
69
70
|
### CodeAreaTexts
|
|
70
71
|
|
|
@@ -6,6 +6,7 @@ export declare const EditorInnerWrapper: import("styled-components").StyledCompo
|
|
|
6
6
|
export declare const CodeAreaContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
export declare const EditorWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
8
8
|
hasError: boolean;
|
|
9
|
+
noBorder?: boolean;
|
|
9
10
|
}, never>;
|
|
10
11
|
export declare const FullscreenHeaderTitle: import("styled-components").StyledComponent<({ level, withoutMargin, children, className, ellipsis, ...antdProps }: import("@synerise/ds-typography/dist/Title.types").Props) => React.JSX.Element, any, {}, never>;
|
|
11
12
|
export declare const FullscreenHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -28,7 +29,10 @@ export declare const SyntaxTitle: import("styled-components").StyledComponent<({
|
|
|
28
29
|
className?: string;
|
|
29
30
|
style?: import("react").CSSProperties;
|
|
30
31
|
}) => React.JSX.Element, any, {}, never>;
|
|
31
|
-
export declare const BottomBar: import("styled-components").StyledComponent<"div", any, {
|
|
32
|
+
export declare const BottomBar: import("styled-components").StyledComponent<"div", any, {
|
|
33
|
+
noBorder?: boolean;
|
|
34
|
+
hasError?: boolean;
|
|
35
|
+
}, never>;
|
|
32
36
|
export declare const LeftSide: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
33
37
|
export declare const RightSide: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
34
38
|
export declare const SyntaxSelect: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/dist/CodeArea.styles.js
CHANGED
|
@@ -25,10 +25,10 @@ export var CodeAreaContent = styled.div.withConfig({
|
|
|
25
25
|
export var EditorWrapper = styled.div.withConfig({
|
|
26
26
|
displayName: "CodeAreastyles__EditorWrapper",
|
|
27
27
|
componentId: "sc-svoej2-5"
|
|
28
|
-
})(["border:
|
|
29
|
-
return props.hasError ? props.theme.palette['red-600'] : props.theme.palette['grey-200'];
|
|
28
|
+
})(["border:", ";border-radius:3px;display:flex;flex-direction:column;flex:1 1 100%;min-height:0;padding-top:12px;", ";canvas{opacity:0;}"], function (props) {
|
|
29
|
+
return props.noBorder ? 'none' : "solid 1px " + (props.hasError ? props.theme.palette['red-600'] : props.theme.palette['grey-200']);
|
|
30
30
|
}, function (props) {
|
|
31
|
-
return props.hasError && css(["background:", ";box-shadow:
|
|
31
|
+
return props.hasError && css(["background:", ";box-shadow:", ";"], props.theme.palette['red-050'], props.noBorder ? 'none' : "inset 0 0 0 1px " + props.theme.palette['red-600']);
|
|
32
32
|
});
|
|
33
33
|
export var FullscreenHeaderTitle = styled(Title).withConfig({
|
|
34
34
|
displayName: "CodeAreastyles__FullscreenHeaderTitle",
|
|
@@ -70,8 +70,17 @@ export var SyntaxTitle = styled(Text).withConfig({
|
|
|
70
70
|
export var BottomBar = styled(FlexRow).withConfig({
|
|
71
71
|
displayName: "CodeAreastyles__BottomBar",
|
|
72
72
|
componentId: "sc-svoej2-13"
|
|
73
|
-
})(["border-top:solid 1px ", ";
|
|
74
|
-
|
|
73
|
+
})(["padding:8px;flex:0 0 auto;background:", ";border-top:solid 1px ", ";", ""], function (_ref) {
|
|
74
|
+
var theme = _ref.theme;
|
|
75
|
+
return theme.palette['white'];
|
|
76
|
+
}, function (_ref2) {
|
|
77
|
+
var theme = _ref2.theme;
|
|
78
|
+
return theme.palette['grey-200'];
|
|
79
|
+
}, function (_ref3) {
|
|
80
|
+
var hasError = _ref3.hasError,
|
|
81
|
+
noBorder = _ref3.noBorder,
|
|
82
|
+
theme = _ref3.theme;
|
|
83
|
+
return hasError && css(["background:", ";", ""], theme.palette['red-050'], noBorder ? css(["border:none;border-top:solid 1px ", ";"], theme.palette['grey-200']) : css(["border:solid 1px ", ";border-top-color:", ";"], theme.palette['red-600'], theme.palette['grey-200']));
|
|
75
84
|
});
|
|
76
85
|
export var LeftSide = styled.div.withConfig({
|
|
77
86
|
displayName: "CodeAreastyles__LeftSide",
|
package/dist/CodeArea.types.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ type BottomBarProps = {
|
|
|
6
6
|
syntaxSelect?: ReactNode;
|
|
7
7
|
customFooterContent?: ReactNode;
|
|
8
8
|
toggleFullscreen?: () => void;
|
|
9
|
+
noBorder?: boolean;
|
|
10
|
+
hasError?: boolean;
|
|
9
11
|
};
|
|
10
|
-
export declare const BottomBar: ({ texts, syntaxSelect, customFooterContent, allowFullscreen, toggleFullscreen, }: BottomBarProps) => React.JSX.Element;
|
|
12
|
+
export declare const BottomBar: ({ texts, syntaxSelect, customFooterContent, allowFullscreen, toggleFullscreen, noBorder, hasError, }: BottomBarProps) => React.JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -7,7 +7,9 @@ export var BottomBar = function BottomBar(_ref) {
|
|
|
7
7
|
syntaxSelect = _ref.syntaxSelect,
|
|
8
8
|
customFooterContent = _ref.customFooterContent,
|
|
9
9
|
allowFullscreen = _ref.allowFullscreen,
|
|
10
|
-
toggleFullscreen = _ref.toggleFullscreen
|
|
10
|
+
toggleFullscreen = _ref.toggleFullscreen,
|
|
11
|
+
noBorder = _ref.noBorder,
|
|
12
|
+
hasError = _ref.hasError;
|
|
11
13
|
var fullscreenButton = allowFullscreen && /*#__PURE__*/React.createElement(Button, {
|
|
12
14
|
type: "ghost",
|
|
13
15
|
mode: "icon-label",
|
|
@@ -17,6 +19,8 @@ export var BottomBar = function BottomBar(_ref) {
|
|
|
17
19
|
onClick: toggleFullscreen
|
|
18
20
|
}, texts.fullscreen);
|
|
19
21
|
return /*#__PURE__*/React.createElement(S.BottomBar, {
|
|
22
|
+
noBorder: noBorder,
|
|
23
|
+
hasError: hasError,
|
|
20
24
|
"data-testid": "code-area-bottombar"
|
|
21
25
|
}, syntaxSelect && /*#__PURE__*/React.createElement(S.SyntaxSelect, {
|
|
22
26
|
"data-testid": "code-area-syntaxoptions"
|
|
@@ -21,6 +21,7 @@ export declare const CodeAreaEditor: React.ForwardRefExoticComponent<Omit<import
|
|
|
21
21
|
tooltipProps?: import("@synerise/ds-tooltip").TooltipProps;
|
|
22
22
|
style?: React.CSSProperties;
|
|
23
23
|
zIndex?: string | number;
|
|
24
|
+
noBorder?: boolean;
|
|
24
25
|
height?: string | number;
|
|
25
26
|
className?: string;
|
|
26
27
|
renderFooterContent?: (props: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["renderAdditionalDescription", "description", "errorText", "style", "zIndex", "className", "counter", "fullscreenLabel", "tooltip", "label", "tooltipProps", "height"];
|
|
1
|
+
var _excluded = ["renderAdditionalDescription", "description", "errorText", "style", "zIndex", "className", "counter", "fullscreenLabel", "tooltip", "label", "tooltipProps", "height", "noBorder"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -25,6 +25,7 @@ export var CodeAreaEditor = /*#__PURE__*/forwardRef(function (_ref, forwardedRef
|
|
|
25
25
|
label = _ref.label,
|
|
26
26
|
tooltipProps = _ref.tooltipProps,
|
|
27
27
|
height = _ref.height,
|
|
28
|
+
noBorder = _ref.noBorder,
|
|
28
29
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
29
30
|
var allowFullscreen = props.allowFullscreen,
|
|
30
31
|
texts = props.texts,
|
|
@@ -97,7 +98,8 @@ export var CodeAreaEditor = /*#__PURE__*/forwardRef(function (_ref, forwardedRef
|
|
|
97
98
|
counterLimit: counterLimit,
|
|
98
99
|
isBottomBarShowing: isBottomBarShowing,
|
|
99
100
|
isSyntaxSelectVisible: isSyntaxSelectVisible,
|
|
100
|
-
isValid: isValid
|
|
101
|
+
isValid: isValid,
|
|
102
|
+
noBorder: noBorder
|
|
101
103
|
})), /*#__PURE__*/React.createElement(ContentBelow, {
|
|
102
104
|
ref: contentBelowRef,
|
|
103
105
|
errorText: errorText,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CodeAreaEditorRawProps } from '../CodeArea.types';
|
|
3
|
-
export declare const CodeAreaEditorRaw: ({ onMount, beforeMount, options, errorText, texts, allowFullscreen, toggleFullscreen, renderFooterContent, isBottomBarShowing, isFullscreen, count, counterLimit, onChange, isValid, onDidChangeMarkers, isSyntaxSelectVisible, syntaxOptions, currentSyntax, readOnly, onSyntaxChange, loaderConfig, placeholder, value, defaultValue, ...props }: CodeAreaEditorRawProps) => React.JSX.Element;
|
|
3
|
+
export declare const CodeAreaEditorRaw: ({ onMount, beforeMount, options, errorText, texts, allowFullscreen, toggleFullscreen, renderFooterContent, isBottomBarShowing, isFullscreen, count, counterLimit, onChange, isValid, onDidChangeMarkers, isSyntaxSelectVisible, syntaxOptions, currentSyntax, readOnly, onSyntaxChange, loaderConfig, placeholder, value, defaultValue, noBorder, ...props }: CodeAreaEditorRawProps) => React.JSX.Element;
|
|
4
4
|
export default CodeAreaEditorRaw;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["onMount", "beforeMount", "options", "errorText", "texts", "allowFullscreen", "toggleFullscreen", "renderFooterContent", "isBottomBarShowing", "isFullscreen", "count", "counterLimit", "onChange", "isValid", "onDidChangeMarkers", "isSyntaxSelectVisible", "syntaxOptions", "currentSyntax", "readOnly", "onSyntaxChange", "loaderConfig", "placeholder", "value", "defaultValue"];
|
|
1
|
+
var _excluded = ["onMount", "beforeMount", "options", "errorText", "texts", "allowFullscreen", "toggleFullscreen", "renderFooterContent", "isBottomBarShowing", "isFullscreen", "count", "counterLimit", "onChange", "isValid", "onDidChangeMarkers", "isSyntaxSelectVisible", "syntaxOptions", "currentSyntax", "readOnly", "onSyntaxChange", "loaderConfig", "placeholder", "value", "defaultValue", "noBorder"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -36,6 +36,7 @@ export var CodeAreaEditorRaw = function CodeAreaEditorRaw(_ref) {
|
|
|
36
36
|
placeholder = _ref.placeholder,
|
|
37
37
|
value = _ref.value,
|
|
38
38
|
defaultValue = _ref.defaultValue,
|
|
39
|
+
noBorder = _ref.noBorder,
|
|
39
40
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
40
41
|
var monacoRef = useRef(null);
|
|
41
42
|
var loaderConfigSet = useRef(false);
|
|
@@ -147,6 +148,7 @@ export var CodeAreaEditorRaw = function CodeAreaEditorRaw(_ref) {
|
|
|
147
148
|
return isTouched && !value || !value && !defaultValue;
|
|
148
149
|
}, [defaultValue, isTouched, value]);
|
|
149
150
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.EditorWrapper, {
|
|
151
|
+
noBorder: noBorder,
|
|
150
152
|
hasError: Boolean(errorText)
|
|
151
153
|
}, /*#__PURE__*/React.createElement(S.EditorInnerWrapper, {
|
|
152
154
|
ref: wrapperRef
|
|
@@ -169,7 +171,9 @@ export var CodeAreaEditorRaw = function CodeAreaEditorRaw(_ref) {
|
|
|
169
171
|
syntaxSelect: syntaxSelect,
|
|
170
172
|
allowFullscreen: allowFullscreen && !isFullscreen,
|
|
171
173
|
toggleFullscreen: toggleFullscreen,
|
|
172
|
-
customFooterContent: customFooterContent
|
|
174
|
+
customFooterContent: customFooterContent,
|
|
175
|
+
noBorder: noBorder,
|
|
176
|
+
hasError: Boolean(errorText)
|
|
173
177
|
})), /*#__PURE__*/React.createElement(AriaContainer, {
|
|
174
178
|
element: monacoAriaContainerElement
|
|
175
179
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-code-area",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "CodeArea UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@monaco-editor/react": "4.4.6",
|
|
39
|
-
"@synerise/ds-button": "^1.5.
|
|
39
|
+
"@synerise/ds-button": "^1.5.15",
|
|
40
40
|
"@synerise/ds-core": "^1.10.2",
|
|
41
|
-
"@synerise/ds-form-field": "^1.3.
|
|
42
|
-
"@synerise/ds-icon": "^1.14.
|
|
43
|
-
"@synerise/ds-inline-edit": "^1.1.
|
|
41
|
+
"@synerise/ds-form-field": "^1.3.7",
|
|
42
|
+
"@synerise/ds-icon": "^1.14.1",
|
|
43
|
+
"@synerise/ds-inline-edit": "^1.1.21",
|
|
44
44
|
"@synerise/ds-loader": "^1.0.12",
|
|
45
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
46
|
-
"@synerise/ds-typography": "^1.1.
|
|
45
|
+
"@synerise/ds-tooltip": "^1.4.7",
|
|
46
|
+
"@synerise/ds-typography": "^1.1.10",
|
|
47
47
|
"@synerise/ds-utils": "^1.6.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"monaco-editor": "0.34.1"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "2997f77d657c1aed2fc39901d3e0b8f88b05cc53"
|
|
60
60
|
}
|