@epam/ai-dial-skills 1.2.0-dev.2 → 1.2.0-dev.201

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.
Files changed (44) hide show
  1. package/components/ChatSkill/ChatSkill.d.ts +3 -2
  2. package/components/ChatSkill/ChatSkill.d.ts.map +1 -1
  3. package/components/FavoriteSkillsPanel/FavoriteSkillsPanel.d.ts.map +1 -1
  4. package/components/SkillArchiveUploadDialog/SkillArchiveUploadDialog.d.ts +9 -0
  5. package/components/SkillArchiveUploadDialog/SkillArchiveUploadDialog.d.ts.map +1 -0
  6. package/components/SkillContentFileTree/SkillContentFileTree.d.ts +11 -0
  7. package/components/SkillContentFileTree/SkillContentFileTree.d.ts.map +1 -0
  8. package/components/SkillDetailsSidePanel/SkillDetailsSidePanel.d.ts +2 -1
  9. package/components/SkillDetailsSidePanel/SkillDetailsSidePanel.d.ts.map +1 -1
  10. package/components/SkillInfoTooltipContent/SkillInfoTooltipContent.d.ts.map +1 -1
  11. package/components/SkillSelectorField/SkillSelectorField.d.ts +5 -0
  12. package/components/SkillSelectorField/SkillSelectorField.d.ts.map +1 -0
  13. package/constants/public-class-names.d.ts +15 -0
  14. package/constants/public-class-names.d.ts.map +1 -0
  15. package/hooks/useSkillMentions/useSkillMentions.d.ts +50 -0
  16. package/hooks/useSkillMentions/useSkillMentions.d.ts.map +1 -0
  17. package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts +5 -4
  18. package/hooks/useSkillSelectorOverlay/useSkillSelectorOverlay.d.ts.map +1 -1
  19. package/index.css +2 -2
  20. package/index.d.ts +15 -1
  21. package/index.d.ts.map +1 -1
  22. package/index.js +599 -241
  23. package/models/chat-skill-props.d.ts +7 -0
  24. package/models/chat-skill-props.d.ts.map +1 -1
  25. package/models/favorite-skills-panel-props.d.ts +32 -5
  26. package/models/favorite-skills-panel-props.d.ts.map +1 -1
  27. package/models/skill-archive-upload-dialog-props.d.ts +33 -0
  28. package/models/skill-archive-upload-dialog-props.d.ts.map +1 -0
  29. package/models/skill-info-tooltip-content-props.d.ts +6 -0
  30. package/models/skill-info-tooltip-content-props.d.ts.map +1 -1
  31. package/models/skill-mention-anchor.d.ts +12 -0
  32. package/models/skill-mention-anchor.d.ts.map +1 -0
  33. package/models/skill-selector-field-props.d.ts +80 -0
  34. package/models/skill-selector-field-props.d.ts.map +1 -0
  35. package/models/skill-selector-overlay.d.ts +104 -59
  36. package/models/skill-selector-overlay.d.ts.map +1 -1
  37. package/package.json +6 -5
  38. package/test-setup.d.ts +1 -0
  39. package/utils/catalog-content-dial-files.d.ts +10 -0
  40. package/utils/catalog-content-dial-files.d.ts.map +1 -0
  41. package/utils/skill-mention-matching.d.ts +25 -0
  42. package/utils/skill-mention-matching.d.ts.map +1 -0
  43. package/utils/skill-mention-tracking.d.ts +51 -0
  44. package/utils/skill-mention-tracking.d.ts.map +1 -0
@@ -0,0 +1,51 @@
1
+ import { SkillMentionAnchor } from '../models/skill-mention-anchor';
2
+ /** A single-region text edit, expressed as the replaced range in the previous string. */
3
+ export interface TextChange {
4
+ /** Character offset where the previous and next strings first diverge. */
5
+ start: number;
6
+ /** Number of characters removed from the previous string at `start`. */
7
+ deletedLength: number;
8
+ /** Number of characters inserted at `start` in the next string. */
9
+ insertedLength: number;
10
+ }
11
+ /**
12
+ * Diffs two strings produced by a single-cursor edit (typing, deleting,
13
+ * pasting, cutting, undo/redo) via their common prefix and common suffix —
14
+ * cheap (O(n)) and exact for that class of edit, which is everything a
15
+ * textarea actually produces.
16
+ */
17
+ export declare const diffTextChange: (previous: string, next: string) => TextChange;
18
+ /**
19
+ * Applies a text change to a set of tracked mention anchors: an anchor
20
+ * entirely before the edited region is untouched, one entirely after is
21
+ * shifted by the edit's length delta, and one that overlaps the edited region
22
+ * is dropped — the user edited into the middle of a mention, so it reverts to
23
+ * plain text and no longer contributes a `custom_content.skills` entry.
24
+ */
25
+ export declare const reconcileAnchors: (anchors: SkillMentionAnchor[], change: TextChange) => SkillMentionAnchor[];
26
+ /**
27
+ * Inserts a new mention anchor at `atIndex` and shifts every anchor at or
28
+ * after that index by the inserted `/{name}` run's length — plus one more
29
+ * when `hasTrailingSpace` — keeping the result ordered by `start`
30
+ * (left-to-right reading order).
31
+ */
32
+ export declare const insertAnchor: (anchors: SkillMentionAnchor[], atIndex: number, url: string, name: string, hasTrailingSpace: boolean) => SkillMentionAnchor[];
33
+ /**
34
+ * Finds the anchor whose mention run ends exactly at `caretPosition` — the
35
+ * caret sitting immediately after that mention — or `undefined` if none does.
36
+ * Used to detect the whole-mention Backspace gesture.
37
+ */
38
+ export declare const findMentionAtCaret: (anchors: SkillMentionAnchor[], caretPosition: number) => SkillMentionAnchor | undefined;
39
+ /**
40
+ * The contiguous non-whitespace run touching `caretPosition` in `text`, when
41
+ * it is shaped like an as-yet-unselected slash query: starts with `prefix`
42
+ * and contains no second occurrence of it. `undefined` when the run at the
43
+ * caret isn't shaped that way. Mirrors the word shape the slash command menu
44
+ * opens for, so the Add-menu's own selection path can detect and consume the
45
+ * same typed `/query` text.
46
+ */
47
+ export declare const findSlashQueryAtCaret: (text: string, caretPosition: number, prefix: string) => {
48
+ start: number;
49
+ end: number;
50
+ } | undefined;
51
+ //# sourceMappingURL=skill-mention-tracking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-mention-tracking.d.ts","sourceRoot":"","sources":["../../src/utils/skill-mention-tracking.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,yFAAyF;AACzF,MAAM,WAAW,UAAU;IACzB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,aAAa,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,MAAM,MAAM,KAAG,UAyB/D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,kBAAkB,EAAE,EAC7B,QAAQ,UAAU,KACjB,kBAAkB,EAmBpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GACvB,SAAS,kBAAkB,EAAE,EAC7B,SAAS,MAAM,EACf,KAAK,MAAM,EACX,MAAM,MAAM,EACZ,kBAAkB,OAAO,KACxB,kBAAkB,EAkBpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,kBAAkB,EAAE,EAC7B,eAAe,MAAM,KACpB,kBAAkB,GAAG,SACkD,CAAC;AAE3E;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,EACZ,eAAe,MAAM,EACrB,QAAQ,MAAM,KACb;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,SAgBnC,CAAC"}