@atlaskit/editor-plugin-autocomplete 4.0.5 → 4.0.6
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/CHANGELOG.md +8 -0
- package/compass.yml +41 -0
- package/dist/cjs/pm-plugins/autocomplete-plugin.js +2 -0
- package/dist/es2019/pm-plugins/autocomplete-plugin.js +2 -0
- package/dist/esm/pm-plugins/autocomplete-plugin.js +2 -0
- package/dist/types/pm-plugins/autocomplete-plugin.d.ts +5 -5
- package/package.json +2 -2
- package/src/pm-plugins/autocomplete-plugin.ts +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-autocomplete
|
|
2
2
|
|
|
3
|
+
## 4.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c2986ab2c7a01`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c2986ab2c7a01) -
|
|
8
|
+
Cleans up prefer static regex violations and enables e18e rule
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 4.0.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/compass.yml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
configVersion: 1
|
|
2
|
+
id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/45ef6a6c-98b8-4615-940d-e9013db36999
|
|
3
|
+
name: '@atlaskit/editor-plugin-autocomplete'
|
|
4
|
+
ownerId: ari:cloud:identity::team/0250ee69-f755-47fd-a468-bf8a9d10a3c5 # Editor AI
|
|
5
|
+
labels:
|
|
6
|
+
- platform-code
|
|
7
|
+
- platform-afm
|
|
8
|
+
typeId: OTHER
|
|
9
|
+
fields:
|
|
10
|
+
tier: 4
|
|
11
|
+
lifecycle: Active
|
|
12
|
+
isMonorepoProject: true
|
|
13
|
+
links:
|
|
14
|
+
- name: Root Repository
|
|
15
|
+
type: REPOSITORY
|
|
16
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
|
|
17
|
+
- name: Slack Channel
|
|
18
|
+
type: CHAT_CHANNEL
|
|
19
|
+
url: https://atlassian.enterprise.slack.com/archives/CFG3PSQ9E # #help-editor
|
|
20
|
+
- name: Editor Plugin Autocomplete
|
|
21
|
+
type: REPOSITORY
|
|
22
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/editor-plugin-autocomplete
|
|
23
|
+
customFields:
|
|
24
|
+
- name: Department
|
|
25
|
+
type: text
|
|
26
|
+
value: Eng - Editor AI
|
|
27
|
+
- name: Trusted Reviewer Teams
|
|
28
|
+
type: text
|
|
29
|
+
value: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb
|
|
30
|
+
- name: Technical Owner
|
|
31
|
+
type: user
|
|
32
|
+
value: ari:cloud:identity::user/612646c53fe26c00694fbe6a # Chris Kimber
|
|
33
|
+
- name: Required Reviewers Opt In
|
|
34
|
+
type: boolean
|
|
35
|
+
value: true
|
|
36
|
+
- name: Reviewer Selection Mechanism
|
|
37
|
+
type: text
|
|
38
|
+
value: random(2)
|
|
39
|
+
- name: Required Reviewer Approvals
|
|
40
|
+
type: number
|
|
41
|
+
value: 1
|
|
@@ -196,6 +196,8 @@ var buildSlowLaneText = function buildSlowLaneText(docText, context) {
|
|
|
196
196
|
var createMidWordCharacterRegex = function createMidWordCharacterRegex() {
|
|
197
197
|
try {
|
|
198
198
|
// string-built regex avoids TS1501 under the package's ES5 build target
|
|
199
|
+
// Ignored via go/ees019
|
|
200
|
+
// eslint-disable-next-line e18e/prefer-static-regex
|
|
199
201
|
return new RegExp('[\\p{L}\\p{N}_]', 'u');
|
|
200
202
|
} catch (_unused) {
|
|
201
203
|
return null;
|
|
@@ -184,6 +184,8 @@ const buildSlowLaneText = (docText, context) => {
|
|
|
184
184
|
const createMidWordCharacterRegex = () => {
|
|
185
185
|
try {
|
|
186
186
|
// string-built regex avoids TS1501 under the package's ES5 build target
|
|
187
|
+
// Ignored via go/ees019
|
|
188
|
+
// eslint-disable-next-line e18e/prefer-static-regex
|
|
187
189
|
return new RegExp('[\\p{L}\\p{N}_]', 'u');
|
|
188
190
|
} catch {
|
|
189
191
|
return null;
|
|
@@ -189,6 +189,8 @@ var buildSlowLaneText = function buildSlowLaneText(docText, context) {
|
|
|
189
189
|
var createMidWordCharacterRegex = function createMidWordCharacterRegex() {
|
|
190
190
|
try {
|
|
191
191
|
// string-built regex avoids TS1501 under the package's ES5 build target
|
|
192
|
+
// Ignored via go/ees019
|
|
193
|
+
// eslint-disable-next-line e18e/prefer-static-regex
|
|
192
194
|
return new RegExp('[\\p{L}\\p{N}_]', 'u');
|
|
193
195
|
} catch (_unused) {
|
|
194
196
|
return null;
|
|
@@ -40,17 +40,17 @@ export interface AutocompletePluginOptions {
|
|
|
40
40
|
* Use this to serve vectors from a CDN or media service in production.
|
|
41
41
|
*/
|
|
42
42
|
getVectorsBinaryUrl?: () => Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* User locale used to determine whether autocomplete should run.
|
|
45
|
+
* Defaults to browser locale when omitted.
|
|
46
|
+
*/
|
|
47
|
+
locale?: string;
|
|
43
48
|
/**
|
|
44
49
|
* Subscription for hosts with live external context (e.g. Rovo chat). The plugin
|
|
45
50
|
* re-fetches via getContext() on each notification and unsubscribes on destroy.
|
|
46
51
|
* Only meaningful alongside `getContext`; without it each notification is a no-op.
|
|
47
52
|
*/
|
|
48
53
|
subscribeToContextUpdates?: (onContextUpdated: () => void) => () => void;
|
|
49
|
-
/**
|
|
50
|
-
* User locale used to determine whether autocomplete should run.
|
|
51
|
-
* Defaults to browser locale when omitted.
|
|
52
|
-
*/
|
|
53
|
-
locale?: string;
|
|
54
54
|
/**
|
|
55
55
|
* When true, uses on-device inference via WebGPU (MLC WebLLM) instead of
|
|
56
56
|
* the network-based slow-lane backend. Defaults to false (network client).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-autocomplete",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
4
4
|
"description": "Client-side text autocomplete plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"wink-nlp": "^2.4.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@atlaskit/editor-common": "^116.
|
|
30
|
+
"@atlaskit/editor-common": "^116.21.0",
|
|
31
31
|
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
32
32
|
"react": "^18.2.0"
|
|
33
33
|
},
|
|
@@ -219,17 +219,17 @@ export interface AutocompletePluginOptions {
|
|
|
219
219
|
* Use this to serve vectors from a CDN or media service in production.
|
|
220
220
|
*/
|
|
221
221
|
getVectorsBinaryUrl?: () => Promise<string>;
|
|
222
|
+
/**
|
|
223
|
+
* User locale used to determine whether autocomplete should run.
|
|
224
|
+
* Defaults to browser locale when omitted.
|
|
225
|
+
*/
|
|
226
|
+
locale?: string;
|
|
222
227
|
/**
|
|
223
228
|
* Subscription for hosts with live external context (e.g. Rovo chat). The plugin
|
|
224
229
|
* re-fetches via getContext() on each notification and unsubscribes on destroy.
|
|
225
230
|
* Only meaningful alongside `getContext`; without it each notification is a no-op.
|
|
226
231
|
*/
|
|
227
232
|
subscribeToContextUpdates?: (onContextUpdated: () => void) => () => void;
|
|
228
|
-
/**
|
|
229
|
-
* User locale used to determine whether autocomplete should run.
|
|
230
|
-
* Defaults to browser locale when omitted.
|
|
231
|
-
*/
|
|
232
|
-
locale?: string;
|
|
233
233
|
/**
|
|
234
234
|
* When true, uses on-device inference via WebGPU (MLC WebLLM) instead of
|
|
235
235
|
* the network-based slow-lane backend. Defaults to false (network client).
|
|
@@ -262,6 +262,8 @@ const buildSlowLaneText = (docText: string, context?: AutocompleteContext): stri
|
|
|
262
262
|
const createMidWordCharacterRegex = (): RegExp | null => {
|
|
263
263
|
try {
|
|
264
264
|
// string-built regex avoids TS1501 under the package's ES5 build target
|
|
265
|
+
// Ignored via go/ees019
|
|
266
|
+
// eslint-disable-next-line e18e/prefer-static-regex
|
|
265
267
|
return new RegExp('[\\p{L}\\p{N}_]', 'u');
|
|
266
268
|
} catch {
|
|
267
269
|
return null;
|