@sequenceholdings/atlas-ui 3.2.0 → 3.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/dist/index.d.ts CHANGED
@@ -1734,6 +1734,8 @@ export declare function insertTrackedMention(input: {
1734
1734
  value: string;
1735
1735
  mentions: TrackedMention[];
1736
1736
  replaceFrom: number;
1737
+ /** Defaults to the end of `value`. Pass the caret to keep text after the query. */
1738
+ replaceTo?: number;
1737
1739
  recipientId: string;
1738
1740
  displayName: string;
1739
1741
  }): {
package/dist/index.mjs CHANGED
@@ -27,10 +27,10 @@ function L(e, t, n) {
27
27
  });
28
28
  }
29
29
  function ee(e) {
30
- let t = `@${e.displayName}`, n = `${e.value.slice(0, e.replaceFrom)}${t} `;
30
+ let t = `@${e.displayName}`, n = e.replaceTo ?? e.value.length, r = `${e.value.slice(0, e.replaceFrom)}${t} ${e.value.slice(n)}`;
31
31
  return {
32
- value: n,
33
- mentions: [...L(e.value, n, e.mentions), {
32
+ value: r,
33
+ mentions: [...L(e.value, r, e.mentions), {
34
34
  recipientId: e.recipientId,
35
35
  displayName: e.displayName,
36
36
  start: e.replaceFrom,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "3.2.0",
12
+ "version": "3.3.0",
13
13
  "description": "Atlas shared UI component library for Artifact Studio apps",
14
14
  "type": "module",
15
15
  "sideEffects": [