@_unit/unit 1.0.71 → 1.0.73
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/build/web.js +13 -13
- package/lib/Class/Graph/buildMoveMap.js +15 -4
- package/lib/Class/Graph/buildMoveMap.js.map +1 -1
- package/lib/Class/Graph/index.js +3 -3
- package/lib/Class/Graph/index.js.map +1 -1
- package/lib/Class/Graph/interface.d.ts +2 -0
- package/lib/client/component.d.ts +1 -1
- package/lib/client/component.js +1 -1
- package/lib/client/component.js.map +1 -1
- package/lib/spec/actions/G.d.ts +2 -2
- package/lib/spec/actions/G.js +4 -2
- package/lib/spec/actions/G.js.map +1 -1
- package/lib/spec/reducers/component.d.ts +4 -2
- package/lib/spec/reducers/component.js +16 -9
- package/lib/spec/reducers/component.js.map +1 -1
- package/lib/spec/reducers/spec.js +3 -1
- package/lib/spec/reducers/spec.js.map +1 -1
- package/lib/spec/reverseAction.js +2 -2
- package/lib/spec/reverseAction.js.map +1 -1
- package/lib/system/platform/component/app/Editor/Component.d.ts +25 -21
- package/lib/system/platform/component/app/Editor/Component.js +649 -382
- package/lib/system/platform/component/app/Editor/Component.js.map +1 -1
- package/lib/system/platform/component/app/Search/Component.d.ts +0 -1
- package/lib/system/platform/component/app/Search/Component.js +1 -33
- package/lib/system/platform/component/app/Search/Component.js.map +1 -1
- package/package.json +1 -1
- package/public/_worker.js +13 -13
- package/public/build.json +1 -1
- package/public/index.js +13 -13
- package/src/Class/Graph/buildMoveMap.ts +16 -3
- package/src/Class/Graph/index.ts +3 -3
- package/src/Class/Graph/interface.ts +2 -0
- package/src/client/component.ts +1 -4
- package/src/spec/actions/G.ts +4 -0
- package/src/spec/reducers/component.ts +29 -8
- package/src/spec/reducers/spec.ts +4 -1
- package/src/spec/reverseAction.ts +2 -0
- package/src/system/platform/component/app/Editor/Component.ts +1039 -644
- package/src/system/platform/component/app/Search/Component.ts +1 -52
- package/public/_worker.js.map +0 -7
- package/public/index.js.map +0 -7
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as fuzzy from 'fuzzy'
|
|
2
2
|
import { Registry } from '../../../../../Registry'
|
|
3
|
-
import { getActiveElement } from '../../../../../client/activeElement'
|
|
4
3
|
import { classnames } from '../../../../../client/classnames'
|
|
5
4
|
import { debounce } from '../../../../../client/debounce'
|
|
6
5
|
import { Element } from '../../../../../client/element'
|
|
@@ -14,10 +13,6 @@ import {
|
|
|
14
13
|
makeKeyupListener,
|
|
15
14
|
makeShortcutListener,
|
|
16
15
|
} from '../../../../../client/event/keyboard'
|
|
17
|
-
import {
|
|
18
|
-
writeToContentEditable,
|
|
19
|
-
writeToTextField,
|
|
20
|
-
} from '../../../../../client/event/keyboard/write'
|
|
21
16
|
import { UnitPointerEvent } from '../../../../../client/event/pointer'
|
|
22
17
|
import { makeClickListener } from '../../../../../client/event/pointer/click'
|
|
23
18
|
import { makePointerEnterListener } from '../../../../../client/event/pointer/pointerenter'
|
|
@@ -25,12 +20,9 @@ import {
|
|
|
25
20
|
IOScrollEvent,
|
|
26
21
|
makeScrollListener,
|
|
27
22
|
} from '../../../../../client/event/scroll'
|
|
28
|
-
import { isContentEditable } from '../../../../../client/isContentEditable'
|
|
29
|
-
import { isTextField } from '../../../../../client/isTextField'
|
|
30
23
|
import { parentElement } from '../../../../../client/platform/web/parentElement'
|
|
31
24
|
import { compareByComplexity } from '../../../../../client/search'
|
|
32
25
|
import { COLOR_NONE } from '../../../../../client/theme'
|
|
33
|
-
import { throttle } from '../../../../../client/throttle'
|
|
34
26
|
import { Shape } from '../../../../../client/util/geometry'
|
|
35
27
|
import { userSelect } from '../../../../../client/util/style/userSelect'
|
|
36
28
|
import { UNTITLED } from '../../../../../constant/STRING'
|
|
@@ -257,9 +249,6 @@ export default class Search extends Element<HTMLDivElement, Props> {
|
|
|
257
249
|
},
|
|
258
250
|
this.$system
|
|
259
251
|
)
|
|
260
|
-
// microphone.addEventListener(
|
|
261
|
-
// makeCustomListener('text', this._on_microphone_transcript)
|
|
262
|
-
// )
|
|
263
252
|
microphone.preventDefault('mousedown')
|
|
264
253
|
microphone.preventDefault('touchdown')
|
|
265
254
|
this._microphone = microphone
|
|
@@ -752,46 +741,6 @@ export default class Search extends Element<HTMLDivElement, Props> {
|
|
|
752
741
|
this._input._input.blur()
|
|
753
742
|
}
|
|
754
743
|
|
|
755
|
-
private _on_microphone_transcript = throttle(
|
|
756
|
-
this.$system,
|
|
757
|
-
(transcript: string) => {
|
|
758
|
-
const value = transcript.toLowerCase().substr(0, 30)
|
|
759
|
-
|
|
760
|
-
const activeElement = getActiveElement(this.$system)
|
|
761
|
-
|
|
762
|
-
const writeToSearch = () => {
|
|
763
|
-
this._input.setProp('value', value)
|
|
764
|
-
|
|
765
|
-
this._input_value = value
|
|
766
|
-
|
|
767
|
-
this._filter_list()
|
|
768
|
-
|
|
769
|
-
this._input.focus()
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
if (activeElement) {
|
|
773
|
-
if (isTextField(activeElement as HTMLInputElement)) {
|
|
774
|
-
writeToTextField(
|
|
775
|
-
this.$system,
|
|
776
|
-
activeElement as HTMLInputElement,
|
|
777
|
-
value
|
|
778
|
-
)
|
|
779
|
-
} else if (isContentEditable(activeElement as HTMLDivElement)) {
|
|
780
|
-
writeToContentEditable(
|
|
781
|
-
this.$system,
|
|
782
|
-
activeElement as HTMLInputElement,
|
|
783
|
-
value
|
|
784
|
-
)
|
|
785
|
-
} else {
|
|
786
|
-
writeToSearch()
|
|
787
|
-
}
|
|
788
|
-
} else {
|
|
789
|
-
writeToSearch()
|
|
790
|
-
}
|
|
791
|
-
},
|
|
792
|
-
100
|
|
793
|
-
)
|
|
794
|
-
|
|
795
744
|
public start_microphone = () => {
|
|
796
745
|
this._start_microphone()
|
|
797
746
|
}
|
|
@@ -1200,7 +1149,7 @@ export default class Search extends Element<HTMLDivElement, Props> {
|
|
|
1200
1149
|
}
|
|
1201
1150
|
|
|
1202
1151
|
this._input_value = value
|
|
1203
|
-
this._filter_list()
|
|
1152
|
+
this._filter_list(false)
|
|
1204
1153
|
}
|
|
1205
1154
|
|
|
1206
1155
|
private _on_arrow_down_keydown = (): void => {
|