@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 +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/emoji-picker.feature +2 -2
- package/src/use-emoji-picker.ts +8 -6
package/dist/index.d.cts
CHANGED
|
@@ -81,14 +81,14 @@ export declare type EmojiPicker<
|
|
|
81
81
|
TEmojiMatch extends BaseEmojiMatch = BaseEmojiMatch,
|
|
82
82
|
> = {
|
|
83
83
|
/**
|
|
84
|
-
* The matched keyword
|
|
84
|
+
* The matched keyword.
|
|
85
85
|
*
|
|
86
86
|
* Can be used to display the keyword in the UI or conditionally render the
|
|
87
87
|
* list of matches.
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
90
|
* ```tsx
|
|
91
|
-
* if (keyword.length <
|
|
91
|
+
* if (keyword.length < 1) {
|
|
92
92
|
* return null
|
|
93
93
|
* }
|
|
94
94
|
* ```
|
package/dist/index.d.ts
CHANGED
|
@@ -81,14 +81,14 @@ export declare type EmojiPicker<
|
|
|
81
81
|
TEmojiMatch extends BaseEmojiMatch = BaseEmojiMatch,
|
|
82
82
|
> = {
|
|
83
83
|
/**
|
|
84
|
-
* The matched keyword
|
|
84
|
+
* The matched keyword.
|
|
85
85
|
*
|
|
86
86
|
* Can be used to display the keyword in the UI or conditionally render the
|
|
87
87
|
* list of matches.
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
90
|
* ```tsx
|
|
91
|
-
* if (keyword.length <
|
|
91
|
+
* if (keyword.length < 1) {
|
|
92
92
|
* return null
|
|
93
93
|
* }
|
|
94
94
|
* ```
|
package/dist/index.js
CHANGED
|
@@ -2673,7 +2673,8 @@ function _temp2(snapshot_0) {
|
|
|
2673
2673
|
return snapshot_0.context.matches;
|
|
2674
2674
|
}
|
|
2675
2675
|
function _temp(snapshot) {
|
|
2676
|
-
|
|
2676
|
+
const rawKeyword = snapshot.context.keyword.startsWith(":") ? snapshot.context.keyword.slice(1) : snapshot.context.keyword;
|
|
2677
|
+
return rawKeyword.endsWith(":") ? rawKeyword.slice(0, -1) : rawKeyword;
|
|
2677
2678
|
}
|
|
2678
2679
|
export {
|
|
2679
2680
|
createMatchEmojis,
|