@inshapardaz/likhari-react 0.1.21 → 0.1.22-dev.218

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 (55) hide show
  1. package/dist/EditorRoot.d.ts +12 -0
  2. package/dist/EditorRoot.d.ts.map +1 -1
  3. package/dist/EditorRoot.js +21 -4
  4. package/dist/autocorrect/AutoCorrectPlugin.d.ts +27 -0
  5. package/dist/autocorrect/AutoCorrectPlugin.d.ts.map +1 -0
  6. package/dist/autocorrect/AutoCorrectPlugin.js +108 -0
  7. package/dist/autocorrect/autoCorrectActions.d.ts +35 -0
  8. package/dist/autocorrect/autoCorrectActions.d.ts.map +1 -0
  9. package/dist/autocorrect/autoCorrectActions.js +182 -0
  10. package/dist/autocorrect/autoCorrectStores.d.ts +52 -0
  11. package/dist/autocorrect/autoCorrectStores.d.ts.map +1 -0
  12. package/dist/autocorrect/autoCorrectStores.js +115 -0
  13. package/dist/autocorrect/punctuationRules.d.ts +26 -0
  14. package/dist/autocorrect/punctuationRules.d.ts.map +1 -0
  15. package/dist/autocorrect/punctuationRules.js +53 -0
  16. package/dist/cleanup/textCleanupActions.d.ts +8 -0
  17. package/dist/cleanup/textCleanupActions.d.ts.map +1 -0
  18. package/dist/cleanup/textCleanupActions.js +28 -0
  19. package/dist/components/AutoCorrectPanel.d.ts +15 -0
  20. package/dist/components/AutoCorrectPanel.d.ts.map +1 -0
  21. package/dist/components/AutoCorrectPanel.js +44 -0
  22. package/dist/components/SpellcheckPanel.d.ts +15 -0
  23. package/dist/components/SpellcheckPanel.d.ts.map +1 -0
  24. package/dist/components/SpellcheckPanel.js +91 -0
  25. package/dist/components/Toolbar.d.ts +10 -1
  26. package/dist/components/Toolbar.d.ts.map +1 -1
  27. package/dist/components/Toolbar.js +125 -109
  28. package/dist/find/findReplaceActions.d.ts +13 -0
  29. package/dist/find/findReplaceActions.d.ts.map +1 -1
  30. package/dist/find/findReplaceActions.js +2 -2
  31. package/dist/i18n/strings.d.ts +34 -0
  32. package/dist/i18n/strings.d.ts.map +1 -1
  33. package/dist/i18n/strings.js +107 -5
  34. package/dist/index.d.ts +7 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +3 -0
  37. package/dist/normalization/urduNormalize.d.ts +24 -0
  38. package/dist/normalization/urduNormalize.d.ts.map +1 -0
  39. package/dist/normalization/urduNormalize.js +116 -0
  40. package/dist/spellcheck/SpellHighlightPlugin.d.ts +8 -0
  41. package/dist/spellcheck/SpellHighlightPlugin.d.ts.map +1 -0
  42. package/dist/spellcheck/SpellHighlightPlugin.js +60 -0
  43. package/dist/spellcheck/spellDictionaries.d.ts.map +1 -1
  44. package/dist/spellcheck/spellDictionaries.js +8 -1
  45. package/dist/spellcheck/spellcheckActions.d.ts +21 -0
  46. package/dist/spellcheck/spellcheckActions.d.ts.map +1 -0
  47. package/dist/spellcheck/spellcheckActions.js +38 -0
  48. package/dist/spellcheck/spellingMenu.d.ts +15 -0
  49. package/dist/spellcheck/spellingMenu.d.ts.map +1 -0
  50. package/dist/spellcheck/spellingMenu.js +27 -0
  51. package/dist/spellcheck/userWords.d.ts +39 -0
  52. package/dist/spellcheck/userWords.d.ts.map +1 -0
  53. package/dist/spellcheck/userWords.js +132 -0
  54. package/dist/theme/editor.css +185 -0
  55. package/package.json +1 -1
@@ -870,3 +870,188 @@
870
870
  opacity: 0.8;
871
871
  white-space: nowrap;
872
872
  }
873
+
874
+ /* Spellcheck panel: same top-right floating spot as the find widget, which
875
+ closes when this opens. */
876
+ .likhari-spell-panel {
877
+ position: absolute;
878
+ z-index: 5;
879
+ top: 8px;
880
+ right: 16px;
881
+ width: max-content;
882
+ max-width: min(360px, calc(100% - 32px));
883
+ max-height: 60%;
884
+ overflow-y: auto;
885
+ overflow-x: hidden;
886
+ padding: 8px;
887
+ border: 1px solid var(--editor-line);
888
+ border-radius: 6px;
889
+ background: var(--editor-paper-dim);
890
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
891
+ font-size: 13px;
892
+ }
893
+
894
+ .likhari-spell-panel[dir='rtl'] {
895
+ right: auto;
896
+ left: 16px;
897
+ }
898
+
899
+ .likhari-spell-header,
900
+ .likhari-spell-controls {
901
+ display: flex;
902
+ flex-wrap: wrap;
903
+ align-items: center;
904
+ justify-content: space-between;
905
+ gap: 6px;
906
+ margin-bottom: 6px;
907
+ }
908
+
909
+ .likhari-spell-controls select {
910
+ min-width: 0;
911
+ max-width: 100%;
912
+ }
913
+
914
+ .likhari-spell-panel button {
915
+ padding: 2px 8px;
916
+ border: 1px solid var(--editor-line);
917
+ border-radius: 4px;
918
+ background: transparent;
919
+ color: inherit;
920
+ cursor: pointer;
921
+ }
922
+
923
+ .likhari-spell-panel button:disabled {
924
+ opacity: 0.5;
925
+ cursor: default;
926
+ }
927
+
928
+ .likhari-spell-icon {
929
+ display: inline-flex;
930
+ align-items: center;
931
+ justify-content: center;
932
+ width: 24px;
933
+ height: 24px;
934
+ padding: 0 !important;
935
+ border: none !important;
936
+ }
937
+
938
+ .likhari-spell-note {
939
+ margin: 4px 0;
940
+ opacity: 0.8;
941
+ }
942
+
943
+ .likhari-spell-list {
944
+ list-style: none;
945
+ margin: 0;
946
+ padding: 0;
947
+ }
948
+
949
+ .likhari-spell-list li {
950
+ display: flex;
951
+ flex-wrap: wrap;
952
+ align-items: center;
953
+ gap: 4px;
954
+ padding: 4px 0;
955
+ border-top: 1px solid var(--editor-line);
956
+ }
957
+
958
+ .likhari-spell-word {
959
+ font-weight: 600;
960
+ color: #b42318 !important;
961
+ }
962
+
963
+ .likhari-spell-suggestion {
964
+ font-size: 12px;
965
+ }
966
+
967
+ /* Misspelled words, underlined like the browser's own spellcheck. Styled
968
+ through the CSS Custom Highlight API by SpellHighlightPlugin. */
969
+ ::highlight(likhari-spelling) {
970
+ text-decoration: red wavy underline;
971
+ text-decoration-skip-ink: none;
972
+ }
973
+
974
+ .likhari-spell-nav {
975
+ display: flex;
976
+ align-items: center;
977
+ justify-content: flex-end;
978
+ gap: 4px;
979
+ margin-bottom: 6px;
980
+ }
981
+
982
+ .likhari-spell-status {
983
+ opacity: 0.8;
984
+ }
985
+
986
+ .likhari-spell-item {
987
+ display: flex;
988
+ flex-direction: column;
989
+ gap: 6px;
990
+ padding-top: 6px;
991
+ border-top: 1px solid var(--editor-line);
992
+ }
993
+
994
+ .likhari-spell-suggestions {
995
+ display: flex;
996
+ flex-wrap: wrap;
997
+ gap: 4px;
998
+ }
999
+
1000
+ /* Auto-correct panel: the same floating spot as the spellcheck panel. */
1001
+ .likhari-autocorrect-panel {
1002
+ position: absolute;
1003
+ z-index: 5;
1004
+ top: 8px;
1005
+ right: 16px;
1006
+ width: 260px;
1007
+ max-width: calc(100% - 32px);
1008
+ padding: 8px;
1009
+ border: 1px solid var(--editor-line);
1010
+ border-radius: 6px;
1011
+ background: var(--editor-paper-dim);
1012
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
1013
+ font-size: 13px;
1014
+ }
1015
+
1016
+ .likhari-autocorrect-panel[dir='rtl'] {
1017
+ right: auto;
1018
+ left: 16px;
1019
+ }
1020
+
1021
+ .likhari-autocorrect-field {
1022
+ display: flex;
1023
+ flex-direction: column;
1024
+ gap: 2px;
1025
+ margin-bottom: 6px;
1026
+ }
1027
+
1028
+ .likhari-autocorrect-field input,
1029
+ .likhari-autocorrect-field select {
1030
+ padding: 3px 6px;
1031
+ border: 1px solid var(--editor-line);
1032
+ border-radius: 4px;
1033
+ background: var(--editor-paper);
1034
+ color: inherit;
1035
+ }
1036
+
1037
+ .likhari-autocorrect-actions {
1038
+ display: flex;
1039
+ flex-direction: column;
1040
+ gap: 6px;
1041
+ }
1042
+
1043
+ .likhari-autocorrect-actions button {
1044
+ align-self: flex-start;
1045
+ padding: 2px 8px;
1046
+ border: 1px solid var(--editor-line);
1047
+ border-radius: 4px;
1048
+ background: transparent;
1049
+ color: inherit;
1050
+ cursor: pointer;
1051
+ }
1052
+
1053
+ .likhari-autocorrect-actions button:disabled {
1054
+ opacity: 0.5;
1055
+ cursor: default;
1056
+ }
1057
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inshapardaz/likhari-react",
3
- "version": "0.1.21",
3
+ "version": "0.1.22-dev.218",
4
4
  "description": "React implementation of the Likhari editor, built on @lexical/react.",
5
5
  "license": "MIT",
6
6
  "repository": {