@atlaskit/editor-plugin-autocomplete 4.0.5 → 4.0.7
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 +16 -0
- package/compass.yml +41 -0
- package/dist/cjs/pm-plugins/autocomplete-plugin.js +2 -0
- package/dist/cjs/pm-plugins/data/combined_l2_l3_pos_tags.json +73571 -0
- package/dist/cjs/pm-plugins/data/first_token_to_words.json +1 -0
- package/dist/cjs/pm-plugins/data/ghost_pos_tags.json +43 -0
- package/dist/cjs/pm-plugins/data/grammar_transitions_10k.json +46 -0
- package/dist/cjs/pm-plugins/data/l3_vocabulary.json +20002 -0
- package/dist/cjs/pm-plugins/data/vocabulary_10k.json +38794 -0
- package/dist/cjs/pm-plugins/data/word_index_10k.json +7762 -0
- package/dist/es2019/pm-plugins/autocomplete-plugin.js +2 -0
- package/dist/es2019/pm-plugins/data/combined_l2_l3_pos_tags.json +73571 -0
- package/dist/es2019/pm-plugins/data/first_token_to_words.json +1 -0
- package/dist/es2019/pm-plugins/data/ghost_pos_tags.json +43 -0
- package/dist/es2019/pm-plugins/data/grammar_transitions_10k.json +46 -0
- package/dist/es2019/pm-plugins/data/l3_vocabulary.json +20002 -0
- package/dist/es2019/pm-plugins/data/vocabulary_10k.json +38794 -0
- package/dist/es2019/pm-plugins/data/word_index_10k.json +7762 -0
- package/dist/esm/pm-plugins/autocomplete-plugin.js +2 -0
- package/dist/esm/pm-plugins/data/combined_l2_l3_pos_tags.json +73571 -0
- package/dist/esm/pm-plugins/data/first_token_to_words.json +1 -0
- package/dist/esm/pm-plugins/data/ghost_pos_tags.json +43 -0
- package/dist/esm/pm-plugins/data/grammar_transitions_10k.json +46 -0
- package/dist/esm/pm-plugins/data/l3_vocabulary.json +20002 -0
- package/dist/esm/pm-plugins/data/vocabulary_10k.json +38794 -0
- package/dist/esm/pm-plugins/data/word_index_10k.json +7762 -0
- package/dist/types/pm-plugins/autocomplete-plugin.d.ts +5 -5
- package/package.json +8 -11
- package/src/pm-plugins/autocomplete-plugin.ts +7 -5
|
@@ -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,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-autocomplete",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"description": "Client-side text autocomplete plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"ak-postbuild": "ls -d dist/* | grep -v dist/types | xargs -n 1 copyfiles -u 1 -V 'src/pm-plugins/data/*.json'"
|
|
12
|
+
},
|
|
10
13
|
"atlassian": {
|
|
11
14
|
"team": "Editor: AI",
|
|
12
15
|
"singleton": true
|
|
@@ -27,21 +30,15 @@
|
|
|
27
30
|
"wink-nlp": "^2.4.0"
|
|
28
31
|
},
|
|
29
32
|
"peerDependencies": {
|
|
30
|
-
"@atlaskit/editor-common": "^116.
|
|
33
|
+
"@atlaskit/editor-common": "^116.23.0",
|
|
31
34
|
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
32
35
|
"react": "^18.2.0"
|
|
33
36
|
},
|
|
34
37
|
"techstack": {
|
|
35
38
|
"@atlassian/frontend": {
|
|
36
|
-
"code-structure": [
|
|
37
|
-
|
|
38
|
-
]
|
|
39
|
-
"import-structure": [
|
|
40
|
-
"atlassian-conventions"
|
|
41
|
-
],
|
|
42
|
-
"circular-dependencies": [
|
|
43
|
-
"file-and-folder-level"
|
|
44
|
-
]
|
|
39
|
+
"code-structure": ["editor-plugin"],
|
|
40
|
+
"import-structure": ["atlassian-conventions"],
|
|
41
|
+
"circular-dependencies": ["file-and-folder-level"]
|
|
45
42
|
}
|
|
46
43
|
},
|
|
47
44
|
"devDependencies": {
|
|
@@ -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;
|