@synerise/ds-code-area 1.3.2 → 1.3.3

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 CHANGED
@@ -3,6 +3,10 @@
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.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-code-area@1.3.2...@synerise/ds-code-area@1.3.3) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-code-area
9
+
6
10
  ## [1.3.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-code-area@1.3.1...@synerise/ds-code-area@1.3.2) (2026-03-20)
7
11
 
8
12
  **Note:** Version bump only for package @synerise/ds-code-area
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type CodeAreaProps } from './CodeArea.types';
1
+ import { default as React } from 'react';
2
+ import { CodeAreaProps } from './CodeArea.types';
3
3
  declare const CodeArea: ({ getPopupContainer, onFullscreenChange, ...codeAreaProps }: CodeAreaProps) => React.JSX.Element;
4
4
  export default CodeArea;
@@ -1,119 +1,68 @@
1
- import figma from '@figma/code-connect';
2
- import CodeArea from './CodeArea';
3
- var FIGMA_URL = 'https://www.figma.com/design/fsSZONXpVvtrDsCgtu01Jb/Synerise-Design-System?node-id=3143:21126&m=dev';
1
+ import { jsx } from "react/jsx-runtime";
2
+ import figma from "@figma/code-connect";
3
+ import CodeArea from "./CodeArea.js";
4
+ const FIGMA_URL = "https://www.figma.com/design/fsSZONXpVvtrDsCgtu01Jb/Synerise-Design-System?node-id=3143:21126&m=dev";
4
5
  figma.connect(CodeArea, FIGMA_URL, {
5
6
  variant: {
6
- State: 'Default',
7
- Label: 'True',
8
- Border: 'True'
7
+ State: "Default",
8
+ Label: "True",
9
+ Border: "True"
9
10
  },
10
- example: function example() {
11
- return /*#__PURE__*/React.createElement(CodeArea, {
12
- label: "Label",
13
- description: "Description",
14
- currentSyntax: "json",
15
- value: ""
16
- });
17
- }
11
+ example: () => /* @__PURE__ */ jsx(CodeArea, { label: "Label", description: "Description", currentSyntax: "json", value: "" })
18
12
  });
19
13
  figma.connect(CodeArea, FIGMA_URL, {
20
14
  variant: {
21
- State: 'Default',
22
- Label: 'False',
23
- Border: 'True'
15
+ State: "Default",
16
+ Label: "False",
17
+ Border: "True"
24
18
  },
25
- example: function example() {
26
- return /*#__PURE__*/React.createElement(CodeArea, {
27
- currentSyntax: "json",
28
- value: ""
29
- });
30
- }
19
+ example: () => /* @__PURE__ */ jsx(CodeArea, { currentSyntax: "json", value: "" })
31
20
  });
32
21
  figma.connect(CodeArea, FIGMA_URL, {
33
22
  variant: {
34
- State: 'Default',
35
- Label: 'False',
36
- Border: 'False'
23
+ State: "Default",
24
+ Label: "False",
25
+ Border: "False"
37
26
  },
38
- example: function example() {
39
- return /*#__PURE__*/React.createElement(CodeArea, {
40
- currentSyntax: "json",
41
- value: "",
42
- noBorder: true
43
- });
44
- }
27
+ example: () => /* @__PURE__ */ jsx(CodeArea, { currentSyntax: "json", value: "", noBorder: true })
45
28
  });
46
29
  figma.connect(CodeArea, FIGMA_URL, {
47
30
  variant: {
48
- State: 'Validated',
49
- Label: 'True',
50
- Border: 'True'
31
+ State: "Validated",
32
+ Label: "True",
33
+ Border: "True"
51
34
  },
52
- example: function example() {
53
- return /*#__PURE__*/React.createElement(CodeArea, {
54
- label: "Label",
55
- description: "Description",
56
- currentSyntax: "json",
57
- value: "",
58
- errorText: "Fill Code area"
59
- });
60
- }
35
+ example: () => /* @__PURE__ */ jsx(CodeArea, { label: "Label", description: "Description", currentSyntax: "json", value: "", errorText: "Fill Code area" })
61
36
  });
62
37
  figma.connect(CodeArea, FIGMA_URL, {
63
38
  variant: {
64
- State: 'Validated',
65
- Label: 'False',
66
- Border: 'True'
39
+ State: "Validated",
40
+ Label: "False",
41
+ Border: "True"
67
42
  },
68
- example: function example() {
69
- return /*#__PURE__*/React.createElement(CodeArea, {
70
- currentSyntax: "json",
71
- value: "",
72
- errorText: "Fill Code area"
73
- });
74
- }
43
+ example: () => /* @__PURE__ */ jsx(CodeArea, { currentSyntax: "json", value: "", errorText: "Fill Code area" })
75
44
  });
76
45
  figma.connect(CodeArea, FIGMA_URL, {
77
46
  variant: {
78
- State: 'Validated',
79
- Label: 'False',
80
- Border: 'False'
47
+ State: "Validated",
48
+ Label: "False",
49
+ Border: "False"
81
50
  },
82
- example: function example() {
83
- return /*#__PURE__*/React.createElement(CodeArea, {
84
- currentSyntax: "json",
85
- value: "",
86
- errorText: "Fill Code area",
87
- noBorder: true
88
- });
89
- }
51
+ example: () => /* @__PURE__ */ jsx(CodeArea, { currentSyntax: "json", value: "", errorText: "Fill Code area", noBorder: true })
90
52
  });
91
53
  figma.connect(CodeArea, FIGMA_URL, {
92
54
  variant: {
93
- State: 'Read only',
94
- Label: 'False',
95
- Border: 'True'
55
+ State: "Read only",
56
+ Label: "False",
57
+ Border: "True"
96
58
  },
97
- example: function example() {
98
- return /*#__PURE__*/React.createElement(CodeArea, {
99
- currentSyntax: "json",
100
- value: "",
101
- readOnly: true
102
- });
103
- }
59
+ example: () => /* @__PURE__ */ jsx(CodeArea, { currentSyntax: "json", value: "", readOnly: true })
104
60
  });
105
61
  figma.connect(CodeArea, FIGMA_URL, {
106
62
  variant: {
107
- State: 'Read only',
108
- Label: 'False',
109
- Border: 'False'
63
+ State: "Read only",
64
+ Label: "False",
65
+ Border: "False"
110
66
  },
111
- example: function example() {
112
- return /*#__PURE__*/React.createElement(CodeArea, {
113
- currentSyntax: "json",
114
- value: "",
115
- readOnly: true,
116
- noBorder: true
117
- });
118
- }
119
- });
67
+ example: () => /* @__PURE__ */ jsx(CodeArea, { currentSyntax: "json", value: "", readOnly: true, noBorder: true })
68
+ });
package/dist/CodeArea.js CHANGED
@@ -1,32 +1,34 @@
1
- var _excluded = ["getPopupContainer", "onFullscreenChange"];
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
- 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
- import React, { useRef, useState } from 'react';
5
- import { createPortal } from 'react-dom';
6
- import { getPopupContainer as defaultGetPopupContainer } from '@synerise/ds-utils';
7
- import { CodeAreaEditor } from './components';
8
- var CodeArea = function CodeArea(_ref) {
9
- var _ref$getPopupContaine = _ref.getPopupContainer,
10
- getPopupContainer = _ref$getPopupContaine === void 0 ? defaultGetPopupContainer : _ref$getPopupContaine,
11
- onFullscreenChange = _ref.onFullscreenChange,
12
- codeAreaProps = _objectWithoutPropertiesLoose(_ref, _excluded);
13
- var _useState = useState(false),
14
- isFullscreen = _useState[0],
15
- setIsFullscreen = _useState[1];
16
- var wrapperRef = useRef(null);
17
- var toggleFullscreen = function toggleFullscreen() {
18
- setIsFullscreen(function (prevState) {
19
- return !prevState;
20
- });
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useState, useRef } from "react";
3
+ import { createPortal } from "react-dom";
4
+ import { getPopupContainer } from "@synerise/ds-utils";
5
+ import "styled-components";
6
+ import "@synerise/ds-typography";
7
+ import "./components/ContentBelow.js";
8
+ import "@synerise/ds-button";
9
+ import "@synerise/ds-icon";
10
+ import "@monaco-editor/react";
11
+ import "@synerise/ds-inline-edit";
12
+ import "@synerise/ds-loader";
13
+ import "./constants.js";
14
+ import "react-intl";
15
+ import { CodeAreaEditor } from "./components/CodeAreaEditor.js";
16
+ const CodeArea = ({
17
+ getPopupContainer: getPopupContainer$1 = getPopupContainer,
18
+ onFullscreenChange,
19
+ ...codeAreaProps
20
+ }) => {
21
+ const [isFullscreen, setIsFullscreen] = useState(false);
22
+ const wrapperRef = useRef(null);
23
+ const toggleFullscreen = () => {
24
+ setIsFullscreen((prevState) => !prevState);
21
25
  onFullscreenChange && onFullscreenChange(isFullscreen);
22
26
  };
23
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CodeAreaEditor, _extends({}, codeAreaProps, {
24
- toggleFullscreen: toggleFullscreen,
25
- isFullscreen: false,
26
- ref: wrapperRef
27
- })), wrapperRef.current && isFullscreen && /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(CodeAreaEditor, _extends({}, codeAreaProps, {
28
- toggleFullscreen: toggleFullscreen,
29
- isFullscreen: isFullscreen
30
- })), getPopupContainer(wrapperRef.current)));
27
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
28
+ /* @__PURE__ */ jsx(CodeAreaEditor, { ...codeAreaProps, toggleFullscreen, isFullscreen: false, ref: wrapperRef }),
29
+ wrapperRef.current && isFullscreen && createPortal(/* @__PURE__ */ jsx(CodeAreaEditor, { ...codeAreaProps, toggleFullscreen, isFullscreen }), getPopupContainer$1(wrapperRef.current))
30
+ ] });
31
+ };
32
+ export {
33
+ CodeArea as default
31
34
  };
32
- export default CodeArea;
@@ -1,42 +1,42 @@
1
- export declare const AriaContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const EditorPlaceholder: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const AriaContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const EditorPlaceholder: import('styled-components').StyledComponent<"div", any, {
3
3
  shouldShowPlaceholder?: boolean;
4
4
  }, never>;
5
- export declare const EditorInnerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const CodeAreaContent: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- export declare const EditorWrapper: import("styled-components").StyledComponent<"div", any, {
5
+ export declare const EditorInnerWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
6
+ export declare const CodeAreaContent: import('styled-components').StyledComponent<"div", any, {}, never>;
7
+ export declare const EditorWrapper: import('styled-components').StyledComponent<"div", any, {
8
8
  hasError: boolean;
9
9
  noBorder?: boolean;
10
10
  }, never>;
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>;
12
- export declare const FullscreenHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
13
- export declare const CodeAreaWrapper: import("styled-components").StyledComponent<"div", any, {
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>;
12
+ export declare const FullscreenHeader: import('styled-components').StyledComponent<"div", any, {}, never>;
13
+ export declare const CodeAreaWrapper: import('styled-components').StyledComponent<"div", any, {
14
14
  readOnly: boolean;
15
15
  isFullscreen: boolean;
16
16
  requiredSpace: number;
17
17
  customHeight?: number | string;
18
18
  zIndex?: number | string;
19
19
  }, never>;
20
- export declare const AdditionalDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
21
- export declare const ContentBelow: import("styled-components").StyledComponent<"div", any, {
20
+ export declare const AdditionalDescription: import('styled-components').StyledComponent<"div", any, {}, never>;
21
+ export declare const ContentBelow: import('styled-components').StyledComponent<"div", any, {
22
22
  isEmpty?: boolean;
23
23
  }, never>;
24
- export declare const ContentAbove: import("styled-components").StyledComponent<"div", any, {}, never>;
25
- export declare const SyntaxTitle: import("styled-components").StyledComponent<({ size, className, children, ellipsis, style, }: {
26
- size?: import("@synerise/ds-typography").TextSize;
27
- ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps;
28
- children?: import("react").ReactNode;
24
+ export declare const ContentAbove: import('styled-components').StyledComponent<"div", any, {}, never>;
25
+ export declare const SyntaxTitle: import('styled-components').StyledComponent<({ size, className, children, ellipsis, style, }: {
26
+ size?: import('@synerise/ds-typography').TextSize;
27
+ ellipsis?: import('@synerise/ds-typography/dist/Ellipsis').EllipsisProps;
28
+ children?: import('react').ReactNode;
29
29
  className?: string;
30
- style?: import("react").CSSProperties;
30
+ style?: import('react').CSSProperties;
31
31
  }) => React.JSX.Element, any, {}, never>;
32
- export declare const BottomBar: import("styled-components").StyledComponent<"div", any, {
32
+ export declare const BottomBar: import('styled-components').StyledComponent<"div", any, {
33
33
  noBorder?: boolean;
34
34
  hasError?: boolean;
35
35
  }, never>;
36
- export declare const LeftSide: import("styled-components").StyledComponent<"div", any, {}, never>;
37
- export declare const RightSide: import("styled-components").StyledComponent<"div", any, {}, never>;
38
- export declare const SyntaxSelect: import("styled-components").StyledComponent<"div", any, {}, never>;
39
- export declare const BottomBarElement: import("styled-components").StyledComponent<"div", any, {}, never>;
40
- export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
41
- export declare const Counter: import("styled-components").StyledComponent<"div", any, {}, never>;
42
- export declare const ErrorText: import("styled-components").StyledComponent<"div", any, {}, never>;
36
+ export declare const LeftSide: import('styled-components').StyledComponent<"div", any, {}, never>;
37
+ export declare const RightSide: import('styled-components').StyledComponent<"div", any, {}, never>;
38
+ export declare const SyntaxSelect: import('styled-components').StyledComponent<"div", any, {}, never>;
39
+ export declare const BottomBarElement: import('styled-components').StyledComponent<"div", any, {}, never>;
40
+ export declare const Description: import('styled-components').StyledComponent<"div", any, {}, never>;
41
+ export declare const Counter: import('styled-components').StyledComponent<"div", any, {}, never>;
42
+ export declare const ErrorText: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,114 +1,121 @@
1
- import styled, { css } from 'styled-components';
2
- import { Text, Title } from '@synerise/ds-typography';
3
- var FlexRow = styled.div.withConfig({
1
+ import styled, { css } from "styled-components";
2
+ import { Title, Text } from "@synerise/ds-typography";
3
+ const FlexRow = /* @__PURE__ */ styled.div.withConfig({
4
4
  displayName: "CodeAreastyles__FlexRow",
5
5
  componentId: "sc-svoej2-0"
6
6
  })(["display:flex;justify-content:space-between;align-items:center;"]);
7
- export var AriaContainer = styled.div.withConfig({
7
+ const AriaContainer = /* @__PURE__ */ styled.div.withConfig({
8
8
  displayName: "CodeAreastyles__AriaContainer",
9
9
  componentId: "sc-svoej2-1"
10
10
  })(["flex:0 0 0;"]);
11
- export var EditorPlaceholder = styled.div.withConfig({
11
+ const EditorPlaceholder = /* @__PURE__ */ styled.div.withConfig({
12
12
  displayName: "CodeAreastyles__EditorPlaceholder",
13
13
  componentId: "sc-svoej2-2"
14
- })(["pointer-events:none;position:absolute;left:62px;right:0;top:0;bottom:0;display:", ";"], function (props) {
15
- return props.shouldShowPlaceholder ? 'block' : 'none';
16
- });
17
- export var EditorInnerWrapper = styled.div.withConfig({
14
+ })(["pointer-events:none;position:absolute;left:62px;right:0;top:0;bottom:0;display:", ";"], (props) => props.shouldShowPlaceholder ? "block" : "none");
15
+ const EditorInnerWrapper = /* @__PURE__ */ styled.div.withConfig({
18
16
  displayName: "CodeAreastyles__EditorInnerWrapper",
19
17
  componentId: "sc-svoej2-3"
20
18
  })(["position:relative;"]);
21
- export var CodeAreaContent = styled.div.withConfig({
19
+ const CodeAreaContent = /* @__PURE__ */ styled.div.withConfig({
22
20
  displayName: "CodeAreastyles__CodeAreaContent",
23
21
  componentId: "sc-svoej2-4"
24
22
  })(["flex:1 1 100%;display:flex;min-height:0;flex-direction:column;"]);
25
- export var EditorWrapper = styled.div.withConfig({
23
+ const EditorWrapper = /* @__PURE__ */ styled.div.withConfig({
26
24
  displayName: "CodeAreastyles__EditorWrapper",
27
25
  componentId: "sc-svoej2-5"
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
- }, function (props) {
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
- });
33
- export var FullscreenHeaderTitle = styled(Title).withConfig({
26
+ })(["border:", ";border-radius:3px;display:flex;flex-direction:column;flex:1 1 100%;min-height:0;padding-top:12px;", ";canvas{opacity:0;}"], (props) => props.noBorder ? "none" : `solid 1px ${props.hasError ? props.theme.palette["red-600"] : props.theme.palette["grey-200"]}`, (props) => props.hasError && css(["background:", ";box-shadow:", ";"], props.theme.palette["red-050"], props.noBorder ? "none" : `inset 0 0 0 1px ${props.theme.palette["red-600"]}`));
27
+ const FullscreenHeaderTitle = /* @__PURE__ */ styled(Title).withConfig({
34
28
  displayName: "CodeAreastyles__FullscreenHeaderTitle",
35
29
  componentId: "sc-svoej2-6"
36
30
  })(["display:flex;gap:16px;align-items:center;margin-bottom:0;"]);
37
- export var FullscreenHeader = styled(FlexRow).withConfig({
31
+ const FullscreenHeader = /* @__PURE__ */ styled(FlexRow).withConfig({
38
32
  displayName: "CodeAreastyles__FullscreenHeader",
39
33
  componentId: "sc-svoej2-7"
40
34
  })(["padding:16px 24px;"]);
41
- export var CodeAreaWrapper = styled.div.withConfig({
35
+ const CodeAreaWrapper = /* @__PURE__ */ styled.div.withConfig({
42
36
  displayName: "CodeAreastyles__CodeAreaWrapper",
43
37
  componentId: "sc-svoej2-8"
44
- })(["", " ", "{", ";}"], function (props) {
38
+ })(["", " ", "{", ";}"], (props) => {
45
39
  if (props.isFullscreen) {
46
- return css(["position:fixed;width:100vw;height:100vh;z-index:", ";left:0;top:0;background:", ";", "{height:calc(100vh - ", "px);}", "{margin:0 24px;}"], props.zIndex !== undefined ? props.zIndex : props.theme.variables['zindex-modal'], props.theme.palette.white, EditorInnerWrapper, props.requiredSpace, CodeAreaContent);
40
+ return css(["position:fixed;width:100vw;height:100vh;z-index:", ";left:0;top:0;background:", ";", "{height:calc(100vh - ", "px);}", "{margin:0 24px;}"], props.zIndex !== void 0 ? props.zIndex : props.theme.variables["zindex-modal"], props.theme.palette.white, EditorInnerWrapper, props.requiredSpace, CodeAreaContent);
47
41
  }
48
- return css(["", " display:flex;flex-direction:column;margin-bottom:12px;"], props.customHeight ? css(["", "{flex:1 1 100%;min-height:0;}height:", ";"], EditorInnerWrapper, typeof props.customHeight === 'number' ? props.customHeight + "px" : props.customHeight) : css(["", "{height:295px;}"], EditorInnerWrapper));
49
- }, EditorWrapper, function (props) {
50
- return props.readOnly && css(["background:", ";.monaco-editor .cursors-layer > .cursor{display:none !important;}"], props.theme.palette['grey-050']);
51
- });
52
- export var AdditionalDescription = styled.div.withConfig({
42
+ return css(["", " display:flex;flex-direction:column;margin-bottom:12px;"], props.customHeight ? css(["", "{flex:1 1 100%;min-height:0;}height:", ";"], EditorInnerWrapper, typeof props.customHeight === "number" ? `${props.customHeight}px` : props.customHeight) : css(["", "{height:295px;}"], EditorInnerWrapper));
43
+ }, EditorWrapper, (props) => props.readOnly && css(["background:", ";.monaco-editor .cursors-layer > .cursor{display:none !important;}"], props.theme.palette["grey-050"]));
44
+ const AdditionalDescription = /* @__PURE__ */ styled.div.withConfig({
53
45
  displayName: "CodeAreastyles__AdditionalDescription",
54
46
  componentId: "sc-svoej2-9"
55
47
  })(["margin-bottom:8px;"]);
56
- export var ContentBelow = styled(FlexRow).withConfig({
48
+ const ContentBelow = /* @__PURE__ */ styled(FlexRow).withConfig({
57
49
  displayName: "CodeAreastyles__ContentBelow",
58
50
  componentId: "sc-svoej2-10"
59
- })(["", " align-items:flex-start;"], function (props) {
60
- return !props.isEmpty && "margin-top: 8px;";
61
- });
62
- export var ContentAbove = styled(FlexRow).withConfig({
51
+ })(["", " align-items:flex-start;"], (props) => !props.isEmpty && `margin-top: 8px;`);
52
+ const ContentAbove = /* @__PURE__ */ styled(FlexRow).withConfig({
63
53
  displayName: "CodeAreastyles__ContentAbove",
64
54
  componentId: "sc-svoej2-11"
65
55
  })(["margin-bottom:8px;flex:0 0 auto;"]);
66
- export var SyntaxTitle = styled(Text).withConfig({
56
+ const SyntaxTitle = /* @__PURE__ */ styled(Text).withConfig({
67
57
  displayName: "CodeAreastyles__SyntaxTitle",
68
58
  componentId: "sc-svoej2-12"
69
59
  })([""]);
70
- export var BottomBar = styled(FlexRow).withConfig({
60
+ const BottomBar = /* @__PURE__ */ styled(FlexRow).withConfig({
71
61
  displayName: "CodeAreastyles__BottomBar",
72
62
  componentId: "sc-svoej2-13"
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']));
84
- });
85
- export var LeftSide = styled.div.withConfig({
63
+ })(["padding:8px;flex:0 0 auto;background:", ";border-top:solid 1px ", ";", ""], ({
64
+ theme
65
+ }) => theme.palette["white"], ({
66
+ theme
67
+ }) => theme.palette["grey-200"], ({
68
+ hasError,
69
+ noBorder,
70
+ theme
71
+ }) => 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"])));
72
+ const LeftSide = /* @__PURE__ */ styled.div.withConfig({
86
73
  displayName: "CodeAreastyles__LeftSide",
87
74
  componentId: "sc-svoej2-14"
88
75
  })([""]);
89
- export var RightSide = styled.div.withConfig({
76
+ const RightSide = /* @__PURE__ */ styled.div.withConfig({
90
77
  displayName: "CodeAreastyles__RightSide",
91
78
  componentId: "sc-svoej2-15"
92
79
  })(["margin-left:auto;display:flex;gap:8px;"]);
93
- export var SyntaxSelect = styled(LeftSide).withConfig({
80
+ const SyntaxSelect = /* @__PURE__ */ styled(LeftSide).withConfig({
94
81
  displayName: "CodeAreastyles__SyntaxSelect",
95
82
  componentId: "sc-svoej2-16"
96
83
  })(["padding-left:8px;"]);
97
- export var BottomBarElement = styled.div.withConfig({
84
+ const BottomBarElement = /* @__PURE__ */ styled.div.withConfig({
98
85
  displayName: "CodeAreastyles__BottomBarElement",
99
86
  componentId: "sc-svoej2-17"
100
87
  })([""]);
101
- export var Description = styled.div.withConfig({
88
+ const Description = /* @__PURE__ */ styled.div.withConfig({
102
89
  displayName: "CodeAreastyles__Description",
103
90
  componentId: "sc-svoej2-18"
104
91
  })([""]);
105
- export var Counter = styled.div.withConfig({
92
+ const Counter = /* @__PURE__ */ styled.div.withConfig({
106
93
  displayName: "CodeAreastyles__Counter",
107
94
  componentId: "sc-svoej2-19"
108
95
  })(["font-weight:500;"]);
109
- export var ErrorText = styled.div.withConfig({
96
+ const ErrorText = /* @__PURE__ */ styled.div.withConfig({
110
97
  displayName: "CodeAreastyles__ErrorText",
111
98
  componentId: "sc-svoej2-20"
112
- })(["color:", ";margin-bottom:4px;"], function (props) {
113
- return props.theme.palette['red-600'];
114
- });
99
+ })(["color:", ";margin-bottom:4px;"], (props) => props.theme.palette["red-600"]);
100
+ export {
101
+ AdditionalDescription,
102
+ AriaContainer,
103
+ BottomBar,
104
+ BottomBarElement,
105
+ CodeAreaContent,
106
+ CodeAreaWrapper,
107
+ ContentAbove,
108
+ ContentBelow,
109
+ Counter,
110
+ Description,
111
+ EditorInnerWrapper,
112
+ EditorPlaceholder,
113
+ EditorWrapper,
114
+ ErrorText,
115
+ FullscreenHeader,
116
+ FullscreenHeaderTitle,
117
+ LeftSide,
118
+ RightSide,
119
+ SyntaxSelect,
120
+ SyntaxTitle
121
+ };
@@ -1,7 +1,7 @@
1
- import type { editor } from 'monaco-editor/esm/vs/editor/editor.api';
2
- import type { CSSProperties, ReactNode } from 'react';
3
- import type { EditorProps, loader } from '@monaco-editor/react';
4
- import type { TooltipProps } from '@synerise/ds-tooltip';
1
+ import { editor } from 'monaco-editor/esm/vs/editor/editor.api';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ import { EditorProps, loader } from '@monaco-editor/react';
4
+ import { TooltipProps } from '@synerise/ds-tooltip';
5
5
  export type CodeAreaSyntax = 'json' | 'html' | 'css' | 'typescript' | 'javascript' | string;
6
6
  export type CodeAreaSyntaxOption<SyntaxName extends CodeAreaSyntax = CodeAreaSyntax> = {
7
7
  language: SyntaxName;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare const AriaContainer: ({ element }: {
3
3
  element: HTMLElement;
4
4
  }) => React.JSX.Element;
@@ -1,17 +1,18 @@
1
- import React, { useEffect, useRef } from 'react';
2
- import * as S from '../CodeArea.styles';
3
- export var AriaContainer = function AriaContainer(_ref) {
4
- var element = _ref.element;
5
- var ariaContainerRef = useRef(null);
6
- useEffect(function () {
7
- var container = ariaContainerRef.current;
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useRef, useEffect } from "react";
3
+ import { AriaContainer as AriaContainer$1 } from "../CodeArea.styles.js";
4
+ const AriaContainer = ({
5
+ element
6
+ }) => {
7
+ const ariaContainerRef = useRef(null);
8
+ useEffect(() => {
9
+ const container = ariaContainerRef.current;
8
10
  if (container && element.childNodes.length > 0) {
9
11
  container.appendChild(element);
10
12
  }
11
13
  }, [element]);
12
- return /*#__PURE__*/React.createElement(S.AriaContainer, {
13
- className: "monaco-aria-custom-container",
14
- "data-testid": "monaco-aria-container",
15
- ref: ariaContainerRef
16
- });
17
- };
14
+ return /* @__PURE__ */ jsx(AriaContainer$1, { className: "monaco-aria-custom-container", "data-testid": "monaco-aria-container", ref: ariaContainerRef });
15
+ };
16
+ export {
17
+ AriaContainer
18
+ };
@@ -1,5 +1,5 @@
1
- import React, { type ReactNode } from 'react';
2
- import { type CodeAreaTexts } from '../CodeArea.types';
1
+ import { default as React, ReactNode } from 'react';
2
+ import { CodeAreaTexts } from '../CodeArea.types';
3
3
  type BottomBarProps = {
4
4
  texts: CodeAreaTexts;
5
5
  allowFullscreen?: boolean;
@@ -1,28 +1,25 @@
1
- import React from 'react';
2
- import Button from '@synerise/ds-button';
3
- import Icon, { FullScreenM } from '@synerise/ds-icon';
4
- import * as S from '../CodeArea.styles';
5
- export var BottomBar = function BottomBar(_ref) {
6
- var texts = _ref.texts,
7
- syntaxSelect = _ref.syntaxSelect,
8
- customFooterContent = _ref.customFooterContent,
9
- allowFullscreen = _ref.allowFullscreen,
10
- toggleFullscreen = _ref.toggleFullscreen,
11
- noBorder = _ref.noBorder,
12
- hasError = _ref.hasError;
13
- var fullscreenButton = allowFullscreen && /*#__PURE__*/React.createElement(Button, {
14
- type: "ghost",
15
- mode: "icon-label",
16
- icon: /*#__PURE__*/React.createElement(Icon, {
17
- component: /*#__PURE__*/React.createElement(FullScreenM, null)
18
- }),
19
- onClick: toggleFullscreen
20
- }, texts.fullscreen);
21
- return /*#__PURE__*/React.createElement(S.BottomBar, {
22
- noBorder: noBorder,
23
- hasError: hasError,
24
- "data-testid": "code-area-bottombar"
25
- }, syntaxSelect && /*#__PURE__*/React.createElement(S.SyntaxSelect, {
26
- "data-testid": "code-area-syntaxoptions"
27
- }, syntaxSelect), (customFooterContent || fullscreenButton) && /*#__PURE__*/React.createElement(S.RightSide, null, customFooterContent, fullscreenButton));
28
- };
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import Button from "@synerise/ds-button";
3
+ import Icon, { FullScreenM } from "@synerise/ds-icon";
4
+ import { BottomBar as BottomBar$1, SyntaxSelect, RightSide } from "../CodeArea.styles.js";
5
+ const BottomBar = ({
6
+ texts,
7
+ syntaxSelect,
8
+ customFooterContent,
9
+ allowFullscreen,
10
+ toggleFullscreen,
11
+ noBorder,
12
+ hasError
13
+ }) => {
14
+ const fullscreenButton = allowFullscreen && /* @__PURE__ */ jsx(Button, { type: "ghost", mode: "icon-label", icon: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(FullScreenM, {}) }), onClick: toggleFullscreen, children: texts.fullscreen });
15
+ return /* @__PURE__ */ jsxs(BottomBar$1, { noBorder, hasError, "data-testid": "code-area-bottombar", children: [
16
+ syntaxSelect && /* @__PURE__ */ jsx(SyntaxSelect, { "data-testid": "code-area-syntaxoptions", children: syntaxSelect }),
17
+ (customFooterContent || fullscreenButton) && /* @__PURE__ */ jsxs(RightSide, { children: [
18
+ customFooterContent,
19
+ fullscreenButton
20
+ ] })
21
+ ] });
22
+ };
23
+ export {
24
+ BottomBar
25
+ };