mesdan 1.1.6 → 1.1.8

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": "mesdan",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Latinî mesdan ile Osmanî metin yazmak için hazırlanmış bir alettir.",
5
5
  "keywords": [
6
6
  "osmanlıca",
@@ -66,8 +66,14 @@ export const OsmaniMesdanEki = () => {
66
66
  const node = anchor.getNode();
67
67
  const marMetin = node.getTextContent().slice(0, offset);
68
68
  const marHarf = marMetin.slice(-1);
69
- const osmanliHarf = harfLatinidenOsmaniye(ca, marHarf, shiftKey, altKey);
70
- selection.insertText(osmanliHarf);
69
+ if (marHarf === 'ا' && ca.toLowerCase() === 'a') {
70
+ selection.deleteCharacter(true);
71
+ selection.insertText('آ'); // Medli Elif
72
+ }
73
+ else {
74
+ const osmanliHarf = harfLatinidenOsmaniye(ca, marHarf, shiftKey, altKey);
75
+ selection.insertText(osmanliHarf);
76
+ }
71
77
  });
72
78
  return true;
73
79
  }
@@ -118,12 +118,12 @@ export const useMesdan = ({ ibtidaiMetin = '', tekSatırMı, latiniMi: ibtidaiLa
118
118
  else if (hadise.inputType === 'insertFromPaste') {
119
119
  tadiliMetinEmri = TadiliMetinEmri.YERLE;
120
120
  }
121
- const mevzuMetin = metinSahası.value;
121
+ const mevzuMetin = metin;
122
122
  const alemMevkisi = hazırlaAlemMevkisiniMenzilli(alemMevkisiEvveli.current.baş, alemMevkisiEvveli.current.son);
123
123
  const netice = await Talimat_MetniTadilEt(mevzuMetin, alemMevkisi, tadiliMetinEmri, mesHadisesi, false);
124
124
  tayinAlemMevkisi(netice.alemMevkisiTadilSonrası);
125
125
  tayinMetin(netice.metinTadilSonrası);
126
- }, [tekSatırMı, tayinMetin]);
126
+ }, [metin, tekSatırMı, tayinMetin]);
127
127
  const handleSelect = useCallback(() => {
128
128
  const metinSahası = metinSahasıİması.current;
129
129
  if (!metinSahası)