@_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.
Files changed (41) hide show
  1. package/build/web.js +13 -13
  2. package/lib/Class/Graph/buildMoveMap.js +15 -4
  3. package/lib/Class/Graph/buildMoveMap.js.map +1 -1
  4. package/lib/Class/Graph/index.js +3 -3
  5. package/lib/Class/Graph/index.js.map +1 -1
  6. package/lib/Class/Graph/interface.d.ts +2 -0
  7. package/lib/client/component.d.ts +1 -1
  8. package/lib/client/component.js +1 -1
  9. package/lib/client/component.js.map +1 -1
  10. package/lib/spec/actions/G.d.ts +2 -2
  11. package/lib/spec/actions/G.js +4 -2
  12. package/lib/spec/actions/G.js.map +1 -1
  13. package/lib/spec/reducers/component.d.ts +4 -2
  14. package/lib/spec/reducers/component.js +16 -9
  15. package/lib/spec/reducers/component.js.map +1 -1
  16. package/lib/spec/reducers/spec.js +3 -1
  17. package/lib/spec/reducers/spec.js.map +1 -1
  18. package/lib/spec/reverseAction.js +2 -2
  19. package/lib/spec/reverseAction.js.map +1 -1
  20. package/lib/system/platform/component/app/Editor/Component.d.ts +25 -21
  21. package/lib/system/platform/component/app/Editor/Component.js +649 -382
  22. package/lib/system/platform/component/app/Editor/Component.js.map +1 -1
  23. package/lib/system/platform/component/app/Search/Component.d.ts +0 -1
  24. package/lib/system/platform/component/app/Search/Component.js +1 -33
  25. package/lib/system/platform/component/app/Search/Component.js.map +1 -1
  26. package/package.json +1 -1
  27. package/public/_worker.js +13 -13
  28. package/public/build.json +1 -1
  29. package/public/index.js +13 -13
  30. package/src/Class/Graph/buildMoveMap.ts +16 -3
  31. package/src/Class/Graph/index.ts +3 -3
  32. package/src/Class/Graph/interface.ts +2 -0
  33. package/src/client/component.ts +1 -4
  34. package/src/spec/actions/G.ts +4 -0
  35. package/src/spec/reducers/component.ts +29 -8
  36. package/src/spec/reducers/spec.ts +4 -1
  37. package/src/spec/reverseAction.ts +2 -0
  38. package/src/system/platform/component/app/Editor/Component.ts +1039 -644
  39. package/src/system/platform/component/app/Search/Component.ts +1 -52
  40. package/public/_worker.js.map +0 -7
  41. 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 => {