@uipath/apollo-react 3.56.0 → 3.57.0-pr356.7b67c02

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.
@@ -193,6 +193,7 @@ const StageNodeComponent = (props)=>{
193
193
  setIsStageTitleEditing(false);
194
194
  if (onStageTitleChange) onStageTitleChange(label);
195
195
  }
196
+ if ('Escape' !== e.key) e.stopPropagation();
196
197
  }, [
197
198
  onStageTitleChange,
198
199
  label
@@ -1 +1 @@
1
- {"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA8oBxD,eAAO,MAAM,SAAS,8CApoBa,cAAc,6CAooBA,CAAC"}
1
+ {"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAmpBxD,eAAO,MAAM,SAAS,8CAzoBa,cAAc,6CAyoBA,CAAC"}
@@ -165,6 +165,7 @@ const StageNodeComponent = (props)=>{
165
165
  setIsStageTitleEditing(false);
166
166
  if (onStageTitleChange) onStageTitleChange(label);
167
167
  }
168
+ if ('Escape' !== e.key) e.stopPropagation();
168
169
  }, [
169
170
  onStageTitleChange,
170
171
  label
@@ -37,8 +37,8 @@ __webpack_require__.d(__webpack_exports__, {
37
37
  });
38
38
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
39
39
  const react_namespaceObject = require("@emotion/react");
40
- const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
41
40
  const external_index_cjs_namespaceObject = require("../../index.cjs");
41
+ const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
42
42
  const external_motion_react_namespaceObject = require("motion/react");
43
43
  const external_react_namespaceObject = require("react");
44
44
  const external_react_markdown_namespaceObject = require("react-markdown");
@@ -49,6 +49,7 @@ const external_constants_cjs_namespaceObject = require("../../constants.cjs");
49
49
  const index_cjs_namespaceObject = require("../Toolbar/index.cjs");
50
50
  const external_StickyNoteNode_styles_cjs_namespaceObject = require("./StickyNoteNode.styles.cjs");
51
51
  const external_StickyNoteNode_types_cjs_namespaceObject = require("./StickyNoteNode.types.cjs");
52
+ const external_StickyNoteNode_utils_cjs_namespaceObject = require("./StickyNoteNode.utils.cjs");
52
53
  const minWidth = 8 * external_constants_cjs_namespaceObject.GRID_SPACING;
53
54
  const minHeight = 8 * external_constants_cjs_namespaceObject.GRID_SPACING;
54
55
  const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = 'Add text', renderPlaceholderOnSelect = false })=>{
@@ -222,7 +223,8 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
222
223
  }, [
223
224
  handleEditClick,
224
225
  handleToggleColorPicker,
225
- color
226
+ color,
227
+ handleDelete
226
228
  ]);
227
229
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
228
230
  children: [
@@ -324,7 +326,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
324
326
  external_remark_gfm_default()
325
327
  ],
326
328
  components: markdownComponents,
327
- children: localContent
329
+ children: (0, external_StickyNoteNode_utils_cjs_namespaceObject.preserveNewlines)(localContent)
328
330
  }) : renderPlaceholderOnSelect && selected && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_markdown_default(), {
329
331
  remarkPlugins: [
330
332
  external_remark_gfm_default()
@@ -1 +1 @@
1
- {"version":3,"file":"StickyNoteNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAuB1E,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG9E,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AA8TD,eAAO,MAAM,cAAc,kHAlTxB,mBAAmB,6CAkTqC,CAAC"}
1
+ {"version":3,"file":"StickyNoteNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAsB1E,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI9E,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AA8TD,eAAO,MAAM,cAAc,kHAlTxB,mBAAmB,6CAkTqC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Global } from "@emotion/react";
3
- import { NodeResizeControl, useReactFlow } from "../../xyflow/react.js";
4
3
  import { NodeIcon } from "../../index.js";
4
+ import { NodeResizeControl, useReactFlow } from "../../xyflow/react.js";
5
5
  import { AnimatePresence } from "motion/react";
6
6
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
7
7
  import react_markdown from "react-markdown";
@@ -10,6 +10,7 @@ import { GRID_SPACING } from "../../constants.js";
10
10
  import { NodeToolbar } from "../Toolbar/index.js";
11
11
  import { BottomCornerIndicators, ColorOption, ColorPickerPanel, RESIZE_CONTROL_Z_INDEX, ResizeHandle, StickyNoteContainer, StickyNoteMarkdown, StickyNoteTextArea, StickyNoteWrapper, TopCornerIndicators, stickyNoteGlobalStyles } from "./StickyNoteNode.styles.js";
12
12
  import { STICKY_NOTE_COLORS, withAlpha } from "./StickyNoteNode.types.js";
13
+ import { preserveNewlines } from "./StickyNoteNode.utils.js";
13
14
  const minWidth = 8 * GRID_SPACING;
14
15
  const minHeight = 8 * GRID_SPACING;
15
16
  const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = 'Add text', renderPlaceholderOnSelect = false })=>{
@@ -183,7 +184,8 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
183
184
  }, [
184
185
  handleEditClick,
185
186
  handleToggleColorPicker,
186
- color
187
+ color,
188
+ handleDelete
187
189
  ]);
188
190
  return /*#__PURE__*/ jsxs(Fragment, {
189
191
  children: [
@@ -285,7 +287,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
285
287
  remark_gfm
286
288
  ],
287
289
  components: markdownComponents,
288
- children: localContent
290
+ children: preserveNewlines(localContent)
289
291
  }) : renderPlaceholderOnSelect && selected && /*#__PURE__*/ jsx(react_markdown, {
290
292
  remarkPlugins: [
291
293
  remark_gfm
@@ -51,6 +51,30 @@ const styled_namespaceObject = require("@emotion/styled");
51
51
  var styled_default = /*#__PURE__*/ __webpack_require__.n(styled_namespaceObject);
52
52
  const external_motion_react_namespaceObject = require("motion/react");
53
53
  const STICKY_NOTE_BELOW_EDGE_Z_INDEX = -10;
54
+ const stickyNoteContentStyles = `
55
+ width: 100%;
56
+ height: 100%;
57
+
58
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
59
+ font-size: 14px;
60
+ line-height: 1.5;
61
+ color: var(--uix-canvas-foreground);
62
+
63
+ overflow-y: auto;
64
+
65
+ &::-webkit-scrollbar {
66
+ width: 6px;
67
+ }
68
+
69
+ &::-webkit-scrollbar-track {
70
+ background: transparent;
71
+ }
72
+
73
+ &::-webkit-scrollbar-thumb {
74
+ background: var(--uix-canvas-border);
75
+ border-radius: 4px;
76
+ }
77
+ `;
54
78
  const RESIZE_CONTROL_Z_INDEX = 100;
55
79
  const stickyNoteGlobalStyles = (0, react_namespaceObject.css)`
56
80
  /* Override React Flow's elevateNodesOnSelect behavior for sticky notes */
@@ -87,21 +111,15 @@ const StickyNoteContainer = styled_default().div`
87
111
  }
88
112
  `;
89
113
  const StickyNoteTextArea = styled_default().textarea`
90
- width: 100%;
91
- height: 100%;
114
+ ${stickyNoteContentStyles}
115
+
92
116
  background: transparent;
93
117
  border: none;
94
118
  outline: none;
95
119
  resize: none;
96
- font-family:
97
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
98
- font-size: 14px;
99
- line-height: 1.5;
100
- color: var(--uix-canvas-foreground);
101
120
  cursor: ${(props)=>props.isEditing ? 'text' : 'move'};
102
121
  user-select: ${(props)=>props.isEditing ? 'text' : 'none'};
103
122
  pointer-events: ${(props)=>props.isEditing ? 'auto' : 'none'};
104
- overflow-y: auto;
105
123
 
106
124
  &::placeholder {
107
125
  color: var(--uix-canvas-foreground-de-emp);
@@ -114,14 +132,8 @@ const StickyNoteTextArea = styled_default().textarea`
114
132
  }
115
133
  `;
116
134
  const StickyNoteMarkdown = styled_default().div`
117
- width: 100%;
118
- height: 100%;
119
- overflow-y: auto;
120
- font-family:
121
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
122
- font-size: 14px;
123
- line-height: 1.5;
124
- color: var(--uix-canvas-foreground);
135
+ ${stickyNoteContentStyles}
136
+
125
137
  word-wrap: break-word;
126
138
 
127
139
  /* Markdown styles */
@@ -1 +1 @@
1
- {"version":3,"file":"StickyNoteNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAGlD,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,sBAAsB,2CAUlC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;yGAI7B,CAAC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AAM;gBAAc,OAAO;qHAkB5E,CAAC"}
@@ -2,6 +2,30 @@ import { css } from "@emotion/react";
2
2
  import styled from "@emotion/styled";
3
3
  import { motion } from "motion/react";
4
4
  const STICKY_NOTE_BELOW_EDGE_Z_INDEX = -10;
5
+ const stickyNoteContentStyles = `
6
+ width: 100%;
7
+ height: 100%;
8
+
9
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
10
+ font-size: 14px;
11
+ line-height: 1.5;
12
+ color: var(--uix-canvas-foreground);
13
+
14
+ overflow-y: auto;
15
+
16
+ &::-webkit-scrollbar {
17
+ width: 6px;
18
+ }
19
+
20
+ &::-webkit-scrollbar-track {
21
+ background: transparent;
22
+ }
23
+
24
+ &::-webkit-scrollbar-thumb {
25
+ background: var(--uix-canvas-border);
26
+ border-radius: 4px;
27
+ }
28
+ `;
5
29
  const RESIZE_CONTROL_Z_INDEX = 100;
6
30
  const stickyNoteGlobalStyles = css`
7
31
  /* Override React Flow's elevateNodesOnSelect behavior for sticky notes */
@@ -38,21 +62,15 @@ const StickyNoteContainer = styled.div`
38
62
  }
39
63
  `;
40
64
  const StickyNoteTextArea = styled.textarea`
41
- width: 100%;
42
- height: 100%;
65
+ ${stickyNoteContentStyles}
66
+
43
67
  background: transparent;
44
68
  border: none;
45
69
  outline: none;
46
70
  resize: none;
47
- font-family:
48
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
49
- font-size: 14px;
50
- line-height: 1.5;
51
- color: var(--uix-canvas-foreground);
52
71
  cursor: ${(props)=>props.isEditing ? 'text' : 'move'};
53
72
  user-select: ${(props)=>props.isEditing ? 'text' : 'none'};
54
73
  pointer-events: ${(props)=>props.isEditing ? 'auto' : 'none'};
55
- overflow-y: auto;
56
74
 
57
75
  &::placeholder {
58
76
  color: var(--uix-canvas-foreground-de-emp);
@@ -65,14 +83,8 @@ const StickyNoteTextArea = styled.textarea`
65
83
  }
66
84
  `;
67
85
  const StickyNoteMarkdown = styled.div`
68
- width: 100%;
69
- height: 100%;
70
- overflow-y: auto;
71
- font-family:
72
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
73
- font-size: 14px;
74
- line-height: 1.5;
75
- color: var(--uix-canvas-foreground);
86
+ ${stickyNoteContentStyles}
87
+
76
88
  word-wrap: break-word;
77
89
 
78
90
  /* Markdown styles */
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ preserveNewlines: ()=>preserveNewlines
28
+ });
29
+ const preserveNewlines = (markdown)=>{
30
+ const codeBlocks = [];
31
+ let result = markdown.replace(/```[\s\S]*?```/g, (m)=>{
32
+ codeBlocks.push(m);
33
+ return `\n%%CODE_BLOCK_${codeBlocks.length - 1}%%\n`;
34
+ });
35
+ result = result.replace(/\n{3,}/g, (match)=>{
36
+ const extraBreaks = match.length - 2;
37
+ return `\n\n${' \n\n'.repeat(extraBreaks)}`;
38
+ });
39
+ result = result.replace(/%%CODE_BLOCK_(\d+)%%/g, (_, i)=>codeBlocks[Number(i)] ?? '');
40
+ return result;
41
+ };
42
+ exports.preserveNewlines = __webpack_exports__.preserveNewlines;
43
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
44
+ "preserveNewlines"
45
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
46
+ Object.defineProperty(exports, '__esModule', {
47
+ value: true
48
+ });
@@ -0,0 +1,2 @@
1
+ export declare const preserveNewlines: (markdown: string) => string;
2
+ //# sourceMappingURL=StickyNoteNode.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StickyNoteNode.utils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,MAqBnD,CAAC"}
@@ -0,0 +1,14 @@
1
+ const preserveNewlines = (markdown)=>{
2
+ const codeBlocks = [];
3
+ let result = markdown.replace(/```[\s\S]*?```/g, (m)=>{
4
+ codeBlocks.push(m);
5
+ return `\n%%CODE_BLOCK_${codeBlocks.length - 1}%%\n`;
6
+ });
7
+ result = result.replace(/\n{3,}/g, (match)=>{
8
+ const extraBreaks = match.length - 2;
9
+ return `\n\n${' \n\n'.repeat(extraBreaks)}`;
10
+ });
11
+ result = result.replace(/%%CODE_BLOCK_(\d+)%%/g, (_, i)=>codeBlocks[Number(i)] ?? '');
12
+ return result;
13
+ };
14
+ export { preserveNewlines };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "3.56.0",
3
+ "version": "3.57.0-pr356.7b67c02",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -200,8 +200,8 @@
200
200
  "use-sync-external-store": "^1.2.0",
201
201
  "zod": "^4.3.5",
202
202
  "zustand": "^5.0.9",
203
- "@uipath/apollo-core": "5.7.3",
204
- "@uipath/apollo-wind": "1.0.1"
203
+ "@uipath/apollo-wind": "1.2.0",
204
+ "@uipath/apollo-core": "5.7.3"
205
205
  },
206
206
  "devDependencies": {
207
207
  "@lingui/cli": "^5.6.1",