@portabletext/plugin-emoji-picker 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -63,7 +63,7 @@ The emoji picker activates when users type `:` followed by a keyword (e.g., `:sm
63
63
 
64
64
  **Returns:**
65
65
 
66
- - `keyword`: The matches keyword, including colons.
66
+ - `keyword`: The matched keyword.
67
67
  - `matches`: Emoji matches found for the current keyword.
68
68
  - `selectedIndex`: Index of the selected match
69
69
  - `onNavigateTo(index)`: Navigate to a specific match by index.
package/dist/index.cjs CHANGED
@@ -2683,7 +2683,8 @@ function _temp2(snapshot_0) {
2683
2683
  return snapshot_0.context.matches;
2684
2684
  }
2685
2685
  function _temp(snapshot) {
2686
- return snapshot.context.keyword;
2686
+ const rawKeyword = snapshot.context.keyword.startsWith(":") ? snapshot.context.keyword.slice(1) : snapshot.context.keyword;
2687
+ return rawKeyword.endsWith(":") ? rawKeyword.slice(0, -1) : rawKeyword;
2687
2688
  }
2688
2689
  exports.createMatchEmojis = createMatchEmojis;
2689
2690
  exports.matchEmojis = matchEmojis;