@docx-editor.dev/i18n 2.32.0 → 2.34.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.
package/dist/index.d.mts CHANGED
@@ -34,7 +34,16 @@ declare const enJson: {
34
34
  dismiss: string;
35
35
  };
36
36
  disabledReason: {
37
+ noReviewChanges: string;
38
+ reviewHiddenChanges: string;
39
+ reviewOtherChanges: string;
40
+ reviewUnresolvable: string;
41
+ reviewSomeUnresolvable: string;
42
+ reviewLockedChanges: string;
43
+ reviewBoundChanges: string;
37
44
  contentLocked: string;
45
+ lockedParagraphFormat: string;
46
+ boundParagraphFormat: string;
38
47
  editorNotReady: string;
39
48
  notWired: string;
40
49
  viewing: string;
@@ -48,6 +57,7 @@ declare const enJson: {
48
57
  drawingLocked: string;
49
58
  commentSelection: string;
50
59
  noCommentDraftView: string;
60
+ noLinkView: string;
51
61
  mergeUnsupported: string;
52
62
  splitUnsupported: string;
53
63
  mergeNeedsRectangle: string;
@@ -58,13 +68,20 @@ declare const enJson: {
58
68
  splitNeedsGrid: string;
59
69
  cellHasRevision: string;
60
70
  cellStructureSuggesting: string;
71
+ tableDeleteSuggesting: string;
72
+ tableMoveSuggesting: string;
73
+ selectTableRowUnsupported: string;
74
+ selectTableColumnUnsupported: string;
61
75
  legacyMerge: string;
62
76
  tableGridUnplaceable: string;
63
77
  imageSuggesting: string;
64
78
  equationSourceFormatting: string;
79
+ equationNoLinearForm: string;
65
80
  equationSuggesting: string;
66
81
  equationSuggestingDisplay: string;
67
82
  pictureSelected: string;
83
+ chartDrawing: string;
84
+ chartClipboard: string;
68
85
  invalidValue: string;
69
86
  unavailable: string;
70
87
  bodyOnlySectionBreak: string;
@@ -77,6 +94,12 @@ declare const enJson: {
77
94
  lockedContentBreak: string;
78
95
  nothingToCopyFormatting: string;
79
96
  nothingToPaint: string;
97
+ nothingToUndo: string;
98
+ nothingToRedo: string;
99
+ outermostLevel: string;
100
+ cannotIndentFurther: string;
101
+ noGoToView: string;
102
+ noBookmarkDialog: string;
80
103
  };
81
104
  toolbar: {
82
105
  ariaLabel: string;
@@ -136,6 +159,7 @@ declare const enJson: {
136
159
  toc: {
137
160
  refresh: string;
138
161
  refreshPageNumbers: string;
162
+ remove: string;
139
163
  };
140
164
  formattingBar: {
141
165
  label: string;
@@ -227,6 +251,12 @@ declare const enJson: {
227
251
  heading1: string;
228
252
  heading2: string;
229
253
  heading3: string;
254
+ normal: string;
255
+ headingLevel: string;
256
+ noSpacing: string;
257
+ quote: string;
258
+ intenseQuote: string;
259
+ listParagraph: string;
230
260
  };
231
261
  font: {
232
262
  selectAriaLabel: string;
@@ -562,6 +592,7 @@ declare const enJson: {
562
592
  deleteShortcut: string;
563
593
  selectAll: string;
564
594
  selectAllShortcut: string;
595
+ insertLinkShortcut: string;
565
596
  editCustomNode: string;
566
597
  removeCustomNode: string;
567
598
  };
@@ -875,6 +906,10 @@ declare const enJson: {
875
906
  chromeAriaLabel: string;
876
907
  header: string;
877
908
  footer: string;
909
+ addHeaderHint: string;
910
+ addFooterHint: string;
911
+ editHeaderHint: string;
912
+ editFooterHint: string;
878
913
  firstPageHeader: string;
879
914
  firstPageFooter: string;
880
915
  evenPageHeader: string;
@@ -907,7 +942,15 @@ declare const enJson: {
907
942
  };
908
943
  image: {
909
944
  unsupportedFormat: string;
910
- nonPictureGraphic: string;
945
+ placeholder: {
946
+ chart: string;
947
+ diagram: string;
948
+ shape: string;
949
+ group: string;
950
+ textbox: string;
951
+ canvas: string;
952
+ graphic: string;
953
+ };
911
954
  missingResource: string;
912
955
  externalResource: string;
913
956
  invalidResource: string;
@@ -918,6 +961,8 @@ declare const enJson: {
918
961
  };
919
962
  imageOverlay: {
920
963
  selection: string;
964
+ locked: string;
965
+ textLocked: string;
921
966
  handle: {
922
967
  n: string;
923
968
  ne: string;
@@ -1029,6 +1074,12 @@ declare const enJson: {
1029
1074
  refusedProtected: string;
1030
1075
  refusedCollaboration: string;
1031
1076
  refusedSessionEnded: string;
1077
+ refusedRetainedStructure: string;
1078
+ refusedIncompleteGroup: string;
1079
+ refusedUnsupported: string;
1080
+ refusedStale: string;
1081
+ refusedLockedContent: string;
1082
+ refusedBoundContent: string;
1032
1083
  actionRefused: string;
1033
1084
  showPane: string;
1034
1085
  resolved: string;
@@ -1156,6 +1207,52 @@ declare const enJson: {
1156
1207
  */
1157
1208
  declare function localizeDisabledReason(reason: string | null, t: TFunction): string | null;
1158
1209
 
1210
+ /**
1211
+ * The writing direction of a BCP-47 language tag: `'rtl'` for Arabic, Hebrew, Persian,
1212
+ * Urdu, and other right-to-left languages, `'ltr'` otherwise. A script subtag decides
1213
+ * when present, so `az-Arab` is right to left and `ku-Latn` is left to right. An absent
1214
+ * or malformed tag is left to right.
1215
+ *
1216
+ * The editor adapters read the active catalog's `_lang` with this function and mirror
1217
+ * their controls for a right-to-left catalog. Composed hosts that render their own
1218
+ * wrapper can call it to set `dir` on that wrapper:
1219
+ *
1220
+ * ```tsx
1221
+ * <div dir={localeDirection(ar._lang)}>...</div>
1222
+ * ```
1223
+ *
1224
+ * @public
1225
+ */
1226
+ declare function localeDirection(tag: string | null | undefined): 'ltr' | 'rtl';
1227
+ /**
1228
+ * The writing direction of a locale catalog: its `_dir` when that is `'ltr'` or `'rtl'`,
1229
+ * otherwise the direction of its `_lang` tag. A catalog that declares neither returns
1230
+ * `undefined`, so a provider can keep the direction it inherits.
1231
+ *
1232
+ * The shipped Arabic and Hebrew catalogs declare `_dir: 'rtl'`. Declare it in your own
1233
+ * catalog to mirror the editor chrome for another right-to-left language.
1234
+ *
1235
+ * @public
1236
+ */
1237
+ declare function catalogDirection(catalog: {
1238
+ readonly _lang?: unknown;
1239
+ readonly _dir?: unknown;
1240
+ } | null | undefined): 'ltr' | 'rtl' | undefined;
1241
+ /**
1242
+ * The direction a locale provider decides for the editor chrome: its `dir` prop, then the
1243
+ * catalog's `_dir`, then a right-to-left `_lang`, then the direction an outer provider
1244
+ * decided. A left-to-right `_lang` alone decides nothing, so the shipped left-to-right
1245
+ * catalogs keep the host page direction. `undefined` means the chrome inherits the host page.
1246
+ *
1247
+ * Both editor adapters use this rule, so a custom provider of your own can match them.
1248
+ *
1249
+ * @public
1250
+ */
1251
+ declare function chromeDirection(dir: 'ltr' | 'rtl' | undefined, catalog: {
1252
+ readonly _lang?: unknown;
1253
+ readonly _dir?: unknown;
1254
+ } | null | undefined, inherited: 'ltr' | 'rtl' | undefined): 'ltr' | 'rtl' | undefined;
1255
+
1159
1256
  /**
1160
1257
  * Whether this browser is running on an Apple platform.
1161
1258
  *
@@ -1222,9 +1319,11 @@ type LocaleStrings = typeof enJson;
1222
1319
  *
1223
1320
  * @public
1224
1321
  */
1225
- type LocaleCode = 'en' | 'de' | 'es' | 'fr' | 'he' | 'hi' | 'id' | 'ja' | 'pl' | 'pt-BR' | 'ru' | 'tr' | 'zh-CN';
1322
+ type LocaleCode = 'en' | 'ar' | 'de' | 'es' | 'fr' | 'he' | 'hi' | 'id' | 'ja' | 'pl' | 'pt-BR' | 'ru' | 'tr' | 'zh-CN';
1226
1323
  /** English (`en`) — the source of truth, 100% covered. @public */
1227
1324
  declare const en: LocaleStrings;
1325
+ /** Arabic (`ar`). Community-maintained; null leaves fall back to English. @public */
1326
+ declare const ar: PartialLocaleStrings;
1228
1327
  /** German (`de`). Community-maintained; null leaves fall back to English. @public */
1229
1328
  declare const de: PartialLocaleStrings;
1230
1329
  /** Spanish (`es`). Community-maintained; null leaves fall back to English. @public */
@@ -1285,6 +1384,12 @@ type DeepPartial<T> = {
1285
1384
  */
1286
1385
  type PartialLocaleStrings = DeepPartial<LocaleStrings> & {
1287
1386
  _lang?: LocaleCode | (string & {});
1387
+ /**
1388
+ * The writing direction of the interface strings. `'rtl'` mirrors the editor chrome, as
1389
+ * the shipped Arabic (`ar`) and Hebrew (`he`) catalogs do. Without it, the direction
1390
+ * follows `_lang` (see {@link localeDirection}).
1391
+ */
1392
+ _dir?: 'ltr' | 'rtl' | (string & {});
1288
1393
  };
1289
1394
  /**
1290
1395
  * Alias for `PartialLocaleStrings`. Prefer this name when typing the
@@ -1349,5 +1454,5 @@ type TFunction = (key: TranslationKey, vars?: Record<string, string | number>) =
1349
1454
  */
1350
1455
  declare function createT(strings: LocaleStrings, lang?: string): TFunction;
1351
1456
 
1352
- export { createT, de, deepMerge, en, es, fr, he, hi, id, isApplePlatform, ja, locales, localizeDisabledReason, pl, platformShortcut, ptBR, ru, tr, zhCN };
1457
+ export { ar, catalogDirection, chromeDirection, createT, de, deepMerge, en, es, fr, he, hi, id, isApplePlatform, ja, localeDirection, locales, localizeDisabledReason, pl, platformShortcut, ptBR, ru, tr, zhCN };
1353
1458
  export type { DeepPartial, LocaleCode, LocaleStrings, PartialLocaleStrings, TFunction, TranslationKey, Translations };
package/dist/index.d.ts CHANGED
@@ -34,7 +34,16 @@ declare const enJson: {
34
34
  dismiss: string;
35
35
  };
36
36
  disabledReason: {
37
+ noReviewChanges: string;
38
+ reviewHiddenChanges: string;
39
+ reviewOtherChanges: string;
40
+ reviewUnresolvable: string;
41
+ reviewSomeUnresolvable: string;
42
+ reviewLockedChanges: string;
43
+ reviewBoundChanges: string;
37
44
  contentLocked: string;
45
+ lockedParagraphFormat: string;
46
+ boundParagraphFormat: string;
38
47
  editorNotReady: string;
39
48
  notWired: string;
40
49
  viewing: string;
@@ -48,6 +57,7 @@ declare const enJson: {
48
57
  drawingLocked: string;
49
58
  commentSelection: string;
50
59
  noCommentDraftView: string;
60
+ noLinkView: string;
51
61
  mergeUnsupported: string;
52
62
  splitUnsupported: string;
53
63
  mergeNeedsRectangle: string;
@@ -58,13 +68,20 @@ declare const enJson: {
58
68
  splitNeedsGrid: string;
59
69
  cellHasRevision: string;
60
70
  cellStructureSuggesting: string;
71
+ tableDeleteSuggesting: string;
72
+ tableMoveSuggesting: string;
73
+ selectTableRowUnsupported: string;
74
+ selectTableColumnUnsupported: string;
61
75
  legacyMerge: string;
62
76
  tableGridUnplaceable: string;
63
77
  imageSuggesting: string;
64
78
  equationSourceFormatting: string;
79
+ equationNoLinearForm: string;
65
80
  equationSuggesting: string;
66
81
  equationSuggestingDisplay: string;
67
82
  pictureSelected: string;
83
+ chartDrawing: string;
84
+ chartClipboard: string;
68
85
  invalidValue: string;
69
86
  unavailable: string;
70
87
  bodyOnlySectionBreak: string;
@@ -77,6 +94,12 @@ declare const enJson: {
77
94
  lockedContentBreak: string;
78
95
  nothingToCopyFormatting: string;
79
96
  nothingToPaint: string;
97
+ nothingToUndo: string;
98
+ nothingToRedo: string;
99
+ outermostLevel: string;
100
+ cannotIndentFurther: string;
101
+ noGoToView: string;
102
+ noBookmarkDialog: string;
80
103
  };
81
104
  toolbar: {
82
105
  ariaLabel: string;
@@ -136,6 +159,7 @@ declare const enJson: {
136
159
  toc: {
137
160
  refresh: string;
138
161
  refreshPageNumbers: string;
162
+ remove: string;
139
163
  };
140
164
  formattingBar: {
141
165
  label: string;
@@ -227,6 +251,12 @@ declare const enJson: {
227
251
  heading1: string;
228
252
  heading2: string;
229
253
  heading3: string;
254
+ normal: string;
255
+ headingLevel: string;
256
+ noSpacing: string;
257
+ quote: string;
258
+ intenseQuote: string;
259
+ listParagraph: string;
230
260
  };
231
261
  font: {
232
262
  selectAriaLabel: string;
@@ -562,6 +592,7 @@ declare const enJson: {
562
592
  deleteShortcut: string;
563
593
  selectAll: string;
564
594
  selectAllShortcut: string;
595
+ insertLinkShortcut: string;
565
596
  editCustomNode: string;
566
597
  removeCustomNode: string;
567
598
  };
@@ -875,6 +906,10 @@ declare const enJson: {
875
906
  chromeAriaLabel: string;
876
907
  header: string;
877
908
  footer: string;
909
+ addHeaderHint: string;
910
+ addFooterHint: string;
911
+ editHeaderHint: string;
912
+ editFooterHint: string;
878
913
  firstPageHeader: string;
879
914
  firstPageFooter: string;
880
915
  evenPageHeader: string;
@@ -907,7 +942,15 @@ declare const enJson: {
907
942
  };
908
943
  image: {
909
944
  unsupportedFormat: string;
910
- nonPictureGraphic: string;
945
+ placeholder: {
946
+ chart: string;
947
+ diagram: string;
948
+ shape: string;
949
+ group: string;
950
+ textbox: string;
951
+ canvas: string;
952
+ graphic: string;
953
+ };
911
954
  missingResource: string;
912
955
  externalResource: string;
913
956
  invalidResource: string;
@@ -918,6 +961,8 @@ declare const enJson: {
918
961
  };
919
962
  imageOverlay: {
920
963
  selection: string;
964
+ locked: string;
965
+ textLocked: string;
921
966
  handle: {
922
967
  n: string;
923
968
  ne: string;
@@ -1029,6 +1074,12 @@ declare const enJson: {
1029
1074
  refusedProtected: string;
1030
1075
  refusedCollaboration: string;
1031
1076
  refusedSessionEnded: string;
1077
+ refusedRetainedStructure: string;
1078
+ refusedIncompleteGroup: string;
1079
+ refusedUnsupported: string;
1080
+ refusedStale: string;
1081
+ refusedLockedContent: string;
1082
+ refusedBoundContent: string;
1032
1083
  actionRefused: string;
1033
1084
  showPane: string;
1034
1085
  resolved: string;
@@ -1156,6 +1207,52 @@ declare const enJson: {
1156
1207
  */
1157
1208
  declare function localizeDisabledReason(reason: string | null, t: TFunction): string | null;
1158
1209
 
1210
+ /**
1211
+ * The writing direction of a BCP-47 language tag: `'rtl'` for Arabic, Hebrew, Persian,
1212
+ * Urdu, and other right-to-left languages, `'ltr'` otherwise. A script subtag decides
1213
+ * when present, so `az-Arab` is right to left and `ku-Latn` is left to right. An absent
1214
+ * or malformed tag is left to right.
1215
+ *
1216
+ * The editor adapters read the active catalog's `_lang` with this function and mirror
1217
+ * their controls for a right-to-left catalog. Composed hosts that render their own
1218
+ * wrapper can call it to set `dir` on that wrapper:
1219
+ *
1220
+ * ```tsx
1221
+ * <div dir={localeDirection(ar._lang)}>...</div>
1222
+ * ```
1223
+ *
1224
+ * @public
1225
+ */
1226
+ declare function localeDirection(tag: string | null | undefined): 'ltr' | 'rtl';
1227
+ /**
1228
+ * The writing direction of a locale catalog: its `_dir` when that is `'ltr'` or `'rtl'`,
1229
+ * otherwise the direction of its `_lang` tag. A catalog that declares neither returns
1230
+ * `undefined`, so a provider can keep the direction it inherits.
1231
+ *
1232
+ * The shipped Arabic and Hebrew catalogs declare `_dir: 'rtl'`. Declare it in your own
1233
+ * catalog to mirror the editor chrome for another right-to-left language.
1234
+ *
1235
+ * @public
1236
+ */
1237
+ declare function catalogDirection(catalog: {
1238
+ readonly _lang?: unknown;
1239
+ readonly _dir?: unknown;
1240
+ } | null | undefined): 'ltr' | 'rtl' | undefined;
1241
+ /**
1242
+ * The direction a locale provider decides for the editor chrome: its `dir` prop, then the
1243
+ * catalog's `_dir`, then a right-to-left `_lang`, then the direction an outer provider
1244
+ * decided. A left-to-right `_lang` alone decides nothing, so the shipped left-to-right
1245
+ * catalogs keep the host page direction. `undefined` means the chrome inherits the host page.
1246
+ *
1247
+ * Both editor adapters use this rule, so a custom provider of your own can match them.
1248
+ *
1249
+ * @public
1250
+ */
1251
+ declare function chromeDirection(dir: 'ltr' | 'rtl' | undefined, catalog: {
1252
+ readonly _lang?: unknown;
1253
+ readonly _dir?: unknown;
1254
+ } | null | undefined, inherited: 'ltr' | 'rtl' | undefined): 'ltr' | 'rtl' | undefined;
1255
+
1159
1256
  /**
1160
1257
  * Whether this browser is running on an Apple platform.
1161
1258
  *
@@ -1222,9 +1319,11 @@ type LocaleStrings = typeof enJson;
1222
1319
  *
1223
1320
  * @public
1224
1321
  */
1225
- type LocaleCode = 'en' | 'de' | 'es' | 'fr' | 'he' | 'hi' | 'id' | 'ja' | 'pl' | 'pt-BR' | 'ru' | 'tr' | 'zh-CN';
1322
+ type LocaleCode = 'en' | 'ar' | 'de' | 'es' | 'fr' | 'he' | 'hi' | 'id' | 'ja' | 'pl' | 'pt-BR' | 'ru' | 'tr' | 'zh-CN';
1226
1323
  /** English (`en`) — the source of truth, 100% covered. @public */
1227
1324
  declare const en: LocaleStrings;
1325
+ /** Arabic (`ar`). Community-maintained; null leaves fall back to English. @public */
1326
+ declare const ar: PartialLocaleStrings;
1228
1327
  /** German (`de`). Community-maintained; null leaves fall back to English. @public */
1229
1328
  declare const de: PartialLocaleStrings;
1230
1329
  /** Spanish (`es`). Community-maintained; null leaves fall back to English. @public */
@@ -1285,6 +1384,12 @@ type DeepPartial<T> = {
1285
1384
  */
1286
1385
  type PartialLocaleStrings = DeepPartial<LocaleStrings> & {
1287
1386
  _lang?: LocaleCode | (string & {});
1387
+ /**
1388
+ * The writing direction of the interface strings. `'rtl'` mirrors the editor chrome, as
1389
+ * the shipped Arabic (`ar`) and Hebrew (`he`) catalogs do. Without it, the direction
1390
+ * follows `_lang` (see {@link localeDirection}).
1391
+ */
1392
+ _dir?: 'ltr' | 'rtl' | (string & {});
1288
1393
  };
1289
1394
  /**
1290
1395
  * Alias for `PartialLocaleStrings`. Prefer this name when typing the
@@ -1349,5 +1454,5 @@ type TFunction = (key: TranslationKey, vars?: Record<string, string | number>) =
1349
1454
  */
1350
1455
  declare function createT(strings: LocaleStrings, lang?: string): TFunction;
1351
1456
 
1352
- export { createT, de, deepMerge, en, es, fr, he, hi, id, isApplePlatform, ja, locales, localizeDisabledReason, pl, platformShortcut, ptBR, ru, tr, zhCN };
1457
+ export { ar, catalogDirection, chromeDirection, createT, de, deepMerge, en, es, fr, he, hi, id, isApplePlatform, ja, localeDirection, locales, localizeDisabledReason, pl, platformShortcut, ptBR, ru, tr, zhCN };
1353
1458
  export type { DeepPartial, LocaleCode, LocaleStrings, PartialLocaleStrings, TFunction, TranslationKey, Translations };