@uipath/apollo-react 3.45.2 → 3.45.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.
@@ -166,7 +166,9 @@ const ResourceChipNodeView = /*#__PURE__*/ external_react_default().memo(({ node
166
166
  display: 'inline-flex',
167
167
  alignItems: 'center',
168
168
  height: lineHeight,
169
- verticalAlign: 'top'
169
+ lineHeight,
170
+ verticalAlign: 'top',
171
+ marginTop: apollo_core_default().Padding.PadXs
170
172
  },
171
173
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ResourceChipBase, {
172
174
  label: label,
@@ -1 +1 @@
1
- {"version":3,"file":"resource-chip-node-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,eAAe,CAAC;AAEpE,OAAO,KAAK,MAAM,OAAO,CAAC;AA4D1B,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAmED,eAAO,MAAM,gBAAgB,mDAAoC,CAAC;AAGlE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmBvD,CAAC"}
1
+ {"version":3,"file":"resource-chip-node-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,eAAe,CAAC;AAEpE,OAAO,KAAK,MAAM,OAAO,CAAC;AA4D1B,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAmED,eAAO,MAAM,gBAAgB,mDAAoC,CAAC;AAGlE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqBvD,CAAC"}
@@ -126,7 +126,9 @@ const ResourceChipNodeView = /*#__PURE__*/ react.memo(({ node, deleteNode })=>{
126
126
  display: 'inline-flex',
127
127
  alignItems: 'center',
128
128
  height: lineHeight,
129
- verticalAlign: 'top'
129
+ lineHeight,
130
+ verticalAlign: 'top',
131
+ marginTop: apollo_core.Padding.PadXs
130
132
  },
131
133
  children: /*#__PURE__*/ jsx(ResourceChipBase, {
132
134
  label: label,
@@ -39,20 +39,23 @@ const styles_namespaceObject = require("@mui/material/styles");
39
39
  const apollo_core_namespaceObject = require("@uipath/apollo-core");
40
40
  var apollo_core_default = /*#__PURE__*/ __webpack_require__.n(apollo_core_namespaceObject);
41
41
  const EDITOR_PADDING = apollo_core_default().Spacing.SpacingXs;
42
- const EditorContainer = (0, styles_namespaceObject.styled)('div')(({ minRows, maxRows, lineHeight })=>({
42
+ const LINE_GAP = apollo_core_default().Spacing.SpacingMicro;
43
+ const EditorContainer = (0, styles_namespaceObject.styled)('div')(({ minRows, maxRows, lineHeight })=>{
44
+ const rowHeight = `calc(${lineHeight} + ${LINE_GAP})`;
45
+ return {
43
46
  width: '100%',
44
- minHeight: `calc(${minRows} * ${lineHeight} + ${EDITOR_PADDING})`,
45
- maxHeight: `calc(${maxRows} * ${lineHeight} + ${EDITOR_PADDING})`,
47
+ minHeight: `calc(${minRows} * ${rowHeight} + ${EDITOR_PADDING})`,
48
+ maxHeight: `calc(${maxRows} * ${rowHeight} + ${EDITOR_PADDING})`,
46
49
  overflowY: 'auto',
47
50
  cursor: 'text',
48
51
  '& .tiptap': {
49
52
  outline: 'none',
50
- minHeight: `calc(${minRows} * ${lineHeight} + ${EDITOR_PADDING})`,
53
+ minHeight: `calc(${minRows} * ${rowHeight} + ${EDITOR_PADDING})`,
51
54
  paddingBottom: EDITOR_PADDING,
52
55
  '& p': {
53
56
  margin: 0,
54
- minHeight: lineHeight,
55
- lineHeight: lineHeight
57
+ minHeight: rowHeight,
58
+ lineHeight: rowHeight
56
59
  },
57
60
  '& p.is-editor-empty:first-of-type::before': {
58
61
  content: 'attr(data-placeholder)',
@@ -62,7 +65,8 @@ const EditorContainer = (0, styles_namespaceObject.styled)('div')(({ minRows, ma
62
65
  height: 0
63
66
  }
64
67
  }
65
- }));
68
+ };
69
+ });
66
70
  exports.EditorContainer = __webpack_exports__.EditorContainer;
67
71
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
68
72
  "EditorContainer"
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-editor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;aACjB,MAAM;aACN,MAAM;gBACH,MAAM;yGA2BjB,CAAC"}
1
+ {"version":3,"file":"tiptap-editor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;aACjB,MAAM;aACN,MAAM;gBACH,MAAM;yGA+BlB,CAAC"}
@@ -1,20 +1,23 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import apollo_core from "@uipath/apollo-core";
3
3
  const EDITOR_PADDING = apollo_core.Spacing.SpacingXs;
4
- const EditorContainer = styled('div')(({ minRows, maxRows, lineHeight })=>({
4
+ const LINE_GAP = apollo_core.Spacing.SpacingMicro;
5
+ const EditorContainer = styled('div')(({ minRows, maxRows, lineHeight })=>{
6
+ const rowHeight = `calc(${lineHeight} + ${LINE_GAP})`;
7
+ return {
5
8
  width: '100%',
6
- minHeight: `calc(${minRows} * ${lineHeight} + ${EDITOR_PADDING})`,
7
- maxHeight: `calc(${maxRows} * ${lineHeight} + ${EDITOR_PADDING})`,
9
+ minHeight: `calc(${minRows} * ${rowHeight} + ${EDITOR_PADDING})`,
10
+ maxHeight: `calc(${maxRows} * ${rowHeight} + ${EDITOR_PADDING})`,
8
11
  overflowY: 'auto',
9
12
  cursor: 'text',
10
13
  '& .tiptap': {
11
14
  outline: 'none',
12
- minHeight: `calc(${minRows} * ${lineHeight} + ${EDITOR_PADDING})`,
15
+ minHeight: `calc(${minRows} * ${rowHeight} + ${EDITOR_PADDING})`,
13
16
  paddingBottom: EDITOR_PADDING,
14
17
  '& p': {
15
18
  margin: 0,
16
- minHeight: lineHeight,
17
- lineHeight: lineHeight
19
+ minHeight: rowHeight,
20
+ lineHeight: rowHeight
18
21
  },
19
22
  '& p.is-editor-empty:first-of-type::before': {
20
23
  content: 'attr(data-placeholder)',
@@ -24,5 +27,6 @@ const EditorContainer = styled('div')(({ minRows, maxRows, lineHeight })=>({
24
27
  height: 0
25
28
  }
26
29
  }
27
- }));
30
+ };
31
+ });
28
32
  export { EditorContainer };
@@ -29,7 +29,6 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  });
30
30
  const state_namespaceObject = require("@tiptap/pm/state");
31
31
  const index_cjs_namespaceObject = require("../../../service/index.cjs");
32
- const external_tiptap_utils_cjs_namespaceObject = require("./tiptap.utils.cjs");
33
32
  const ResourceMentionPluginKey = new state_namespaceObject.PluginKey('resourceMention');
34
33
  const RESOURCE_QUERY_START_PATTERN = /^[a-zA-Z0-9_./\\&]/;
35
34
  function getCursorCoordinates(editor, pos) {
@@ -60,13 +59,11 @@ function createResourceSuggestion(callbacks, suppressRef) {
60
59
  render: ()=>({
61
60
  onStart: (props)=>{
62
61
  const coords = getCursorCoordinates(props.editor, props.range.from);
63
- const { query, fullRange } = (0, external_tiptap_utils_cjs_namespaceObject.getFullMentionQuery)(props.editor, props.range);
64
- callbacks.onStart?.(fullRange, coords);
65
- callbacks.onQueryChange?.(query, fullRange);
62
+ callbacks.onStart?.(props.range, coords);
63
+ callbacks.onQueryChange?.(props.query, props.range);
66
64
  },
67
65
  onUpdate: (props)=>{
68
- const { query, fullRange } = (0, external_tiptap_utils_cjs_namespaceObject.getFullMentionQuery)(props.editor, props.range);
69
- callbacks.onQueryChange?.(query, fullRange);
66
+ callbacks.onQueryChange?.(props.query, props.range);
70
67
  },
71
68
  onExit: ()=>{
72
69
  callbacks.onExit?.();
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-resource-suggestion.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C,eAAO,MAAM,wBAAwB,gBAAmC,CAAC;AAKzE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,2BAA2B;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACvD;AAUD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,2BAA2B,EACtC,WAAW,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAChC,cAAc,CAAC,YAAY,CAAC,CAmD9B"}
1
+ {"version":3,"file":"tiptap-resource-suggestion.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,eAAO,MAAM,wBAAwB,gBAAmC,CAAC;AAKzE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,2BAA2B;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACvD;AAUD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,2BAA2B,EACtC,WAAW,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAChC,cAAc,CAAC,YAAY,CAAC,CAiD9B"}
@@ -1,6 +1,5 @@
1
1
  import { PluginKey } from "@tiptap/pm/state";
2
2
  import { CHAT_RESOURCE_MENTION_TERMINATOR } from "../../../service/index.js";
3
- import { getFullMentionQuery } from "./tiptap.utils.js";
4
3
  const ResourceMentionPluginKey = new PluginKey('resourceMention');
5
4
  const RESOURCE_QUERY_START_PATTERN = /^[a-zA-Z0-9_./\\&]/;
6
5
  function getCursorCoordinates(editor, pos) {
@@ -31,13 +30,11 @@ function createResourceSuggestion(callbacks, suppressRef) {
31
30
  render: ()=>({
32
31
  onStart: (props)=>{
33
32
  const coords = getCursorCoordinates(props.editor, props.range.from);
34
- const { query, fullRange } = getFullMentionQuery(props.editor, props.range);
35
- callbacks.onStart?.(fullRange, coords);
36
- callbacks.onQueryChange?.(query, fullRange);
33
+ callbacks.onStart?.(props.range, coords);
34
+ callbacks.onQueryChange?.(props.query, props.range);
37
35
  },
38
36
  onUpdate: (props)=>{
39
- const { query, fullRange } = getFullMentionQuery(props.editor, props.range);
40
- callbacks.onQueryChange?.(query, fullRange);
37
+ callbacks.onQueryChange?.(props.query, props.range);
41
38
  },
42
39
  onExit: ()=>{
43
40
  callbacks.onExit?.();
@@ -24,31 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- getFullMentionQuery: ()=>getFullMentionQuery,
28
27
  textToDocument: ()=>textToDocument
29
28
  });
30
- const index_cjs_namespaceObject = require("../../../service/index.cjs");
31
- function getFullMentionQuery(editor, range) {
32
- const textFrom = range.from + 1;
33
- const parentEnd = editor.state.doc.resolve(textFrom).end();
34
- if (textFrom >= parentEnd) return {
35
- query: '',
36
- fullRange: range
37
- };
38
- const fullText = editor.state.doc.textBetween(textFrom, parentEnd, '', '');
39
- if (fullText.length > 0 && ' ' === fullText.charAt(0)) return {
40
- query: '',
41
- fullRange: range
42
- };
43
- const query = fullText.split(index_cjs_namespaceObject.CHAT_RESOURCE_MENTION_TERMINATOR)[0] ?? '';
44
- return {
45
- query,
46
- fullRange: {
47
- from: range.from,
48
- to: textFrom + query.length
49
- }
50
- };
51
- }
52
29
  function textToDocument(text) {
53
30
  if (!text) return {
54
31
  type: 'doc',
@@ -71,10 +48,8 @@ function textToDocument(text) {
71
48
  content: paragraphs
72
49
  };
73
50
  }
74
- exports.getFullMentionQuery = __webpack_exports__.getFullMentionQuery;
75
51
  exports.textToDocument = __webpack_exports__.textToDocument;
76
52
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
77
- "getFullMentionQuery",
78
53
  "textToDocument"
79
54
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
80
55
  Object.defineProperty(exports, '__esModule', {
@@ -1,8 +1,3 @@
1
- import type { Editor, Range } from '@tiptap/core';
2
- export declare function getFullMentionQuery(editor: Editor, range: Range): {
3
- query: string;
4
- fullRange: Range;
5
- };
6
1
  export declare function textToDocument(text: string): {
7
2
  type: 'doc';
8
3
  content: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap.utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AASlD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GACX;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,KAAK,CAAA;CAAE,CAiBrC;AAOD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACxF,CAaA"}
1
+ {"version":3,"file":"tiptap.utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap.utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACxF,CAaA"}
@@ -1,25 +1,3 @@
1
- import { CHAT_RESOURCE_MENTION_TERMINATOR } from "../../../service/index.js";
2
- function getFullMentionQuery(editor, range) {
3
- const textFrom = range.from + 1;
4
- const parentEnd = editor.state.doc.resolve(textFrom).end();
5
- if (textFrom >= parentEnd) return {
6
- query: '',
7
- fullRange: range
8
- };
9
- const fullText = editor.state.doc.textBetween(textFrom, parentEnd, '', '');
10
- if (fullText.length > 0 && ' ' === fullText.charAt(0)) return {
11
- query: '',
12
- fullRange: range
13
- };
14
- const query = fullText.split(CHAT_RESOURCE_MENTION_TERMINATOR)[0] ?? '';
15
- return {
16
- query,
17
- fullRange: {
18
- from: range.from,
19
- to: textFrom + query.length
20
- }
21
- };
22
- }
23
1
  function textToDocument(text) {
24
2
  if (!text) return {
25
3
  type: 'doc',
@@ -42,4 +20,4 @@ function textToDocument(text) {
42
20
  content: paragraphs
43
21
  };
44
22
  }
45
- export { getFullMentionQuery, textToDocument };
23
+ export { textToDocument };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "tool-call.running": "Rulând {toolName}...",
3
3
  "tool-call.ran": "A rulat {toolName} ({duration}s)",
4
- "tool-call.input": "Intrare",
4
+ "tool-call.input": "Input",
5
5
  "tool-call.execution": "Execuție",
6
6
  "tool-call.escalation": "Escaladare",
7
7
  "tool-call.errors": "Erori",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "3.45.2",
3
+ "version": "3.45.3",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",