@dataloop-ai/components 0.19.173 → 0.19.174

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.19.173",
3
+ "version": "0.19.174",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -717,7 +717,7 @@ export default defineComponent({
717
717
  const onChange = (e: KeyboardEvent | Event) => {
718
718
  isInternalChange.value = true
719
719
  isMenuOpen.value = true
720
- updateSyntax()
720
+
721
721
  const target = e.target as HTMLElement
722
722
  let toEmit: string | number = target.innerText.replace(
723
723
  new RegExp(' ', 'g'),
@@ -735,28 +735,26 @@ export default defineComponent({
735
735
  input.value.innerHTML = trimmed
736
736
  .toString()
737
737
  .replace(/ /g, ' ')
738
- updateSyntax()
739
738
  setCaretAtTheEnd(input.value)
740
- return
741
- }
742
- /**
743
- * if the number ends with a dot followed by multiple zeros
744
- * then we should not replace the inputs value with the parsed number
745
- */
746
- if (
739
+ } else if (
740
+ /**
741
+ * if the number ends with a dot followed by multiple zeros
742
+ * then we should not replace the inputs value with the parsed number
743
+ */
747
744
  !toEmit.endsWith('.') &&
748
745
  !new RegExp(/\.\d*0+$/, 'g').test(toEmit)
749
746
  ) {
750
747
  input.value.innerHTML = String(Number(toEmit))
751
748
  .toString()
752
749
  .replace(/ /g, ' ')
753
- updateSyntax()
754
750
  setCaretAtTheEnd(input.value)
755
751
  }
756
752
 
757
753
  toEmit = Number(toEmit)
758
754
  }
759
755
 
756
+ updateSyntax()
757
+
760
758
  emit('input', toEmit, e)
761
759
  emit('update:model-value', toEmit)
762
760
  if (autoTrim.value) {
@@ -803,6 +801,9 @@ export default defineComponent({
803
801
  if (isSpecialWord(word)) {
804
802
  return `<span class="clickable" style="color: ${syntaxHighlightColor.value}">${word}</span>`
805
803
  }
804
+ if (word.startsWith('<')) {
805
+ return `<span>${word.replace('<', '&lt;')}</span>`
806
+ }
806
807
  return word
807
808
  })
808
809
  input.value.innerHTML = words.join(' ')