speechflow 2.1.2 → 2.2.0

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.
@@ -39,20 +39,20 @@
39
39
 
40
40
  "@vue/eslint-config-typescript": "14.7.0",
41
41
  "vue-eslint-parser": "10.4.0",
42
- "eslint": "9.39.2",
43
- "@eslint/js": "9.39.2",
42
+ "eslint": "10.0.1",
43
+ "@eslint/js": "10.0.1",
44
44
  "neostandard": "0.12.2",
45
45
  "eslint-plugin-import": "2.32.0",
46
46
  "eslint-plugin-vue": "10.8.0",
47
47
 
48
- "oxlint": "1.48.0",
49
- "eslint-plugin-oxlint": "1.48.0",
48
+ "oxlint": "1.50.0",
49
+ "eslint-plugin-oxlint": "1.50.0",
50
50
 
51
51
  "htmllint": "0.8.0",
52
52
  "htmllint-cli": "0.0.7",
53
53
 
54
54
  "check-dependencies": "2.0.0",
55
- "nodemon": "3.1.11",
55
+ "nodemon": "3.1.14",
56
56
  "shx": "0.4.0",
57
57
  "stylelint": "17.3.0",
58
58
  "stylelint-config-html": "1.1.0",
@@ -63,7 +63,7 @@
63
63
  "postcss-html": "1.8.1",
64
64
  "stylus": "0.64.0",
65
65
  "typescript": "5.9.3",
66
- "vue-tsc": "3.2.4",
66
+ "vue-tsc": "3.2.5",
67
67
  "delay-cli": "3.0.0",
68
68
  "cross-env": "10.1.0",
69
69
  "serve": "14.2.5",
@@ -10,12 +10,23 @@
10
10
  <div class="app">
11
11
  <div class="area">
12
12
  <div class="block" ref="block">
13
- <span v-bind:key="chunk.id"
13
+ <span class="chunk"
14
14
  v-for="(chunk, idx) of text"
15
- class="chunk"
16
- v-bind:class="{ intermediate: chunk.kind === 'intermediate', removed: chunk.removed }"
15
+ v-bind:key="`chunk-${chunk.id}`"
17
16
  v-bind:ref="`chunk-${chunk.id}`">
18
- {{ chunk.text }}
17
+ <span class="chunk-frag"
18
+ v-for="(frag, idx) of chunk.text">
19
+ <span v-bind:key="`bg-${chunk.id}-${idx}`"
20
+ class="chunk-bg"
21
+ v-bind:class="{ intermediate: chunk.kind === 'intermediate', removed: chunk.removed }">
22
+ {{ frag }}
23
+ </span>
24
+ <span v-bind:key="`fg-${chunk.id}-${idx}`"
25
+ class="chunk-fg"
26
+ v-bind:class="{ intermediate: chunk.kind === 'intermediate', removed: chunk.removed }">
27
+ {{ frag }}
28
+ </span>
29
+ </span>
19
30
  <span class="cursor" v-if="idx === (text.length - 1) && chunk.kind === 'intermediate'">
20
31
  <spinner-grid class="spinner-grid" size="30"/>
21
32
  </span>
@@ -63,23 +74,43 @@
63
74
 
64
75
  /* content chunk */
65
76
  .chunk
66
- color: #ffffff
67
- background-color: #000000e0
68
- font-size: 2.0vw
69
- font-weight: 600
70
- line-height: 1.5
71
- padding-left: 0.20vw
72
- padding-right: 0.20vw
77
+ .chunk-frag
78
+ display: inline-block
79
+ position: relative
80
+ .chunk-fg
81
+ z-index: 20
82
+ color: #ffffff
83
+ -webkit-text-stroke: 4px #00000000
84
+ font-size: 2.0vw
85
+ font-weight: 600
86
+ line-height: 1.3
87
+ padding-left: 0.20vw
88
+ padding-right: 0.20vw
89
+ &.intermediate:last-child
90
+ color: #ffe0c0
91
+ &.removed
92
+ opacity: 0
93
+ .chunk-bg
94
+ z-index: -10
95
+ position: absolute
96
+ color: #000000
97
+ -webkit-text-stroke: 5px #000000e0
98
+ font-size: 2.0vw
99
+ font-weight: 600
100
+ line-height: 1.3
101
+ padding-left: 0.20vw
102
+ padding-right: 0.20vw
103
+ &.intermediate:last-child
104
+ color: #ffe0c0
105
+ &.removed
106
+ opacity: 0
73
107
  .cursor
74
108
  position: relative
75
109
  display: inline-block
76
110
  margin-left: 10px
77
111
  margin-right: 10px
78
- top: -5px
79
- &.intermediate:last-child
112
+ top: -7px
80
113
  color: #ffe0c0
81
- &.removed
82
- opacity: 0
83
114
  </style>
84
115
 
85
116
  <script setup lang="ts">
@@ -185,7 +216,7 @@ export default defineComponent({
185
216
  /* override previous intermediate text chunk
186
217
  with either another intermediate one or a final one */
187
218
  const lastChunk = this.text[this.text.length - 1]
188
- lastChunk.text = chunk.payload
219
+ lastChunk.text = chunk.payload.split(/\s+/),
189
220
  lastChunk.kind = chunk.kind
190
221
  lastChunk.timestamp = DateTime.now()
191
222
  }
@@ -199,7 +230,7 @@ export default defineComponent({
199
230
  /* add new text chunk */
200
231
  this.text.push({
201
232
  id: `chunk-${this.chunkIdCounter++}`,
202
- text: chunk.payload,
233
+ text: chunk.payload.split(/\s+/),
203
234
  kind: chunk.kind,
204
235
  timestamp: DateTime.now(),
205
236
  removing: false,