@dangl/angular-material-shared 2.6.2-beta0002 → 2.6.2-beta0011

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 (139) hide show
  1. package/esm2022/lib/components/footer/footer.component.mjs +15 -16
  2. package/esm2022/lib/components/header/header.component.mjs +14 -9
  3. package/esm2022/public_api.mjs +1 -4
  4. package/esm2022/tiny-mce/dangl-angular-material-shared-tiny-mce.mjs +5 -0
  5. package/esm2022/tiny-mce/public_api.mjs +3 -0
  6. package/esm2022/tiny-mce/tiny-mce.component.mjs +114 -0
  7. package/esm2022/tiny-mce/utils/guid-generator.mjs +36 -0
  8. package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs +156 -0
  9. package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs.map +1 -0
  10. package/fesm2022/dangl-angular-material-shared.mjs +30 -179
  11. package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
  12. package/package.json +8 -3
  13. package/public_api.d.ts +0 -3
  14. package/tiny-mce/index.d.ts +5 -0
  15. package/tiny-mce/public_api.d.ts +2 -0
  16. package/{lib/components/tiny-mce → tiny-mce}/tiny-mce.component.d.ts +1 -1
  17. package/tinymce-assets/icons/default/icons.js +0 -4
  18. package/tinymce-assets/icons/default/icons.min.js +1 -1
  19. package/tinymce-assets/models/dom/model.js +64 -86
  20. package/tinymce-assets/models/dom/model.min.js +2 -2
  21. package/tinymce-assets/plugins/accordion/plugin.js +1 -1
  22. package/tinymce-assets/plugins/accordion/plugin.min.js +1 -1
  23. package/tinymce-assets/plugins/advlist/plugin.js +2 -2
  24. package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
  25. package/tinymce-assets/plugins/anchor/plugin.js +1 -1
  26. package/tinymce-assets/plugins/anchor/plugin.min.js +1 -1
  27. package/tinymce-assets/plugins/autolink/plugin.js +1 -1
  28. package/tinymce-assets/plugins/autolink/plugin.min.js +1 -1
  29. package/tinymce-assets/plugins/autoresize/plugin.js +1 -1
  30. package/tinymce-assets/plugins/autoresize/plugin.min.js +1 -1
  31. package/tinymce-assets/plugins/autosave/plugin.js +1 -1
  32. package/tinymce-assets/plugins/autosave/plugin.min.js +1 -1
  33. package/tinymce-assets/plugins/charmap/plugin.js +1 -1
  34. package/tinymce-assets/plugins/charmap/plugin.min.js +1 -1
  35. package/tinymce-assets/plugins/code/plugin.js +1 -1
  36. package/tinymce-assets/plugins/code/plugin.min.js +1 -1
  37. package/tinymce-assets/plugins/codesample/plugin.js +1 -1
  38. package/tinymce-assets/plugins/codesample/plugin.min.js +1 -1
  39. package/tinymce-assets/plugins/directionality/plugin.js +1 -1
  40. package/tinymce-assets/plugins/directionality/plugin.min.js +1 -1
  41. package/tinymce-assets/plugins/emoticons/plugin.js +1 -2
  42. package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
  43. package/tinymce-assets/plugins/fullscreen/plugin.js +2 -3
  44. package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
  45. package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +1 -1
  46. package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +1 -1
  47. package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +1 -1
  48. package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +1 -1
  49. package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +1 -1
  50. package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +1 -1
  51. package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +1 -1
  52. package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +1 -1
  53. package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +1 -1
  54. package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +1 -1
  55. package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +1 -1
  56. package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +1 -1
  57. package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +1 -1
  58. package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +1 -1
  59. package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +1 -1
  60. package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +1 -1
  61. package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +1 -1
  62. package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +1 -1
  63. package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +1 -1
  64. package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +1 -1
  65. package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +1 -1
  66. package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +1 -1
  67. package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +1 -1
  68. package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +1 -1
  69. package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +1 -1
  70. package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +1 -1
  71. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +1 -1
  72. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +1 -1
  73. package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +1 -1
  74. package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +1 -1
  75. package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +1 -1
  76. package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +2 -2
  77. package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +1 -1
  78. package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +1 -1
  79. package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +1 -1
  80. package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +1 -1
  81. package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +1 -1
  82. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +1 -1
  83. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +1 -1
  84. package/tinymce-assets/plugins/help/plugin.js +43 -53
  85. package/tinymce-assets/plugins/help/plugin.min.js +2 -2
  86. package/tinymce-assets/plugins/image/plugin.js +1 -1
  87. package/tinymce-assets/plugins/image/plugin.min.js +1 -1
  88. package/tinymce-assets/plugins/importcss/plugin.js +1 -1
  89. package/tinymce-assets/plugins/importcss/plugin.min.js +1 -1
  90. package/tinymce-assets/plugins/insertdatetime/plugin.js +1 -1
  91. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +1 -1
  92. package/tinymce-assets/plugins/link/plugin.js +3 -4
  93. package/tinymce-assets/plugins/link/plugin.min.js +2 -2
  94. package/tinymce-assets/plugins/lists/plugin.js +3 -4
  95. package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
  96. package/tinymce-assets/plugins/media/plugin.js +2 -2
  97. package/tinymce-assets/plugins/media/plugin.min.js +2 -2
  98. package/tinymce-assets/plugins/nonbreaking/plugin.js +1 -1
  99. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +1 -1
  100. package/tinymce-assets/plugins/pagebreak/plugin.js +1 -1
  101. package/tinymce-assets/plugins/pagebreak/plugin.min.js +1 -1
  102. package/tinymce-assets/plugins/preview/plugin.js +1 -1
  103. package/tinymce-assets/plugins/preview/plugin.min.js +1 -1
  104. package/tinymce-assets/plugins/quickbars/plugin.js +1 -1
  105. package/tinymce-assets/plugins/quickbars/plugin.min.js +1 -1
  106. package/tinymce-assets/plugins/save/plugin.js +2 -3
  107. package/tinymce-assets/plugins/save/plugin.min.js +2 -2
  108. package/tinymce-assets/plugins/searchreplace/plugin.js +2 -3
  109. package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
  110. package/tinymce-assets/plugins/table/plugin.js +48 -51
  111. package/tinymce-assets/plugins/table/plugin.min.js +2 -2
  112. package/tinymce-assets/plugins/template/index.js +7 -0
  113. package/tinymce-assets/plugins/template/plugin.js +567 -0
  114. package/tinymce-assets/plugins/template/plugin.min.js +4 -0
  115. package/tinymce-assets/plugins/visualblocks/plugin.js +1 -1
  116. package/tinymce-assets/plugins/visualblocks/plugin.min.js +1 -1
  117. package/tinymce-assets/plugins/visualchars/plugin.js +1 -1
  118. package/tinymce-assets/plugins/visualchars/plugin.min.js +1 -1
  119. package/tinymce-assets/plugins/wordcount/plugin.js +1 -1
  120. package/tinymce-assets/plugins/wordcount/plugin.min.js +1 -1
  121. package/tinymce-assets/skins/ui/oxide/skin.css +63 -392
  122. package/tinymce-assets/skins/ui/oxide/skin.js +1 -1
  123. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
  124. package/tinymce-assets/skins/ui/oxide-dark/skin.css +66 -395
  125. package/tinymce-assets/skins/ui/oxide-dark/skin.js +1 -1
  126. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
  127. package/tinymce-assets/skins/ui/tinymce-5/skin.css +41 -369
  128. package/tinymce-assets/skins/ui/tinymce-5/skin.js +1 -1
  129. package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -1
  130. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +46 -374
  131. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +1 -1
  132. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  133. package/tinymce-assets/themes/silver/theme.js +302 -661
  134. package/tinymce-assets/themes/silver/theme.min.js +2 -2
  135. package/esm2022/lib/angular-material-shared.module.mjs +0 -19
  136. package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +0 -107
  137. package/esm2022/lib/utils/guid-generator.mjs +0 -36
  138. package/lib/angular-material-shared.module.d.ts +0 -10
  139. /package/{lib → tiny-mce}/utils/guid-generator.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 7.0.1 (2024-04-10)
2
+ * TinyMCE version 6.8.3 (2024-02-08)
3
3
  */
4
4
 
5
5
  (function () {
@@ -979,7 +979,7 @@
979
979
  };
980
980
  return nu$d(group(1), group(2));
981
981
  };
982
- const detect$4 = (versionRegexes, agent) => {
982
+ const detect$5 = (versionRegexes, agent) => {
983
983
  const cleanedAgent = String(agent).toLowerCase();
984
984
  if (versionRegexes.length === 0) {
985
985
  return unknown$3();
@@ -997,7 +997,7 @@
997
997
  };
998
998
  const Version = {
999
999
  nu: nu$d,
1000
- detect: detect$4,
1000
+ detect: detect$5,
1001
1001
  unknown: unknown$3
1002
1002
  };
1003
1003
 
@@ -1014,14 +1014,14 @@
1014
1014
  });
1015
1015
  };
1016
1016
 
1017
- const detect$3 = (candidates, userAgent) => {
1017
+ const detect$4 = (candidates, userAgent) => {
1018
1018
  const agent = String(userAgent).toLowerCase();
1019
1019
  return find$5(candidates, candidate => {
1020
1020
  return candidate.search(agent);
1021
1021
  });
1022
1022
  };
1023
1023
  const detectBrowser = (browsers, userAgent) => {
1024
- return detect$3(browsers, userAgent).map(browser => {
1024
+ return detect$4(browsers, userAgent).map(browser => {
1025
1025
  const version = Version.detect(browser.versionRegexes, userAgent);
1026
1026
  return {
1027
1027
  current: browser.name,
@@ -1030,7 +1030,7 @@
1030
1030
  });
1031
1031
  };
1032
1032
  const detectOs = (oses, userAgent) => {
1033
- return detect$3(oses, userAgent).map(os => {
1033
+ return detect$4(oses, userAgent).map(os => {
1034
1034
  const version = Version.detect(os.versionRegexes, userAgent);
1035
1035
  return {
1036
1036
  current: os.name,
@@ -1233,7 +1233,7 @@
1233
1233
  chromeos: constant$1(chromeos)
1234
1234
  };
1235
1235
 
1236
- const detect$2 = (userAgent, userAgentDataOpt, mediaMatch) => {
1236
+ const detect$3 = (userAgent, userAgentDataOpt, mediaMatch) => {
1237
1237
  const browsers = PlatformInfo.browsers();
1238
1238
  const oses = PlatformInfo.oses();
1239
1239
  const browser = userAgentDataOpt.bind(userAgentData => detectBrowser$1(browsers, userAgentData)).orThunk(() => detectBrowser(browsers, userAgent)).fold(Browser.unknown, Browser.nu);
@@ -1245,11 +1245,11 @@
1245
1245
  deviceType
1246
1246
  };
1247
1247
  };
1248
- const PlatformDetection = { detect: detect$2 };
1248
+ const PlatformDetection = { detect: detect$3 };
1249
1249
 
1250
1250
  const mediaMatch = query => window.matchMedia(query).matches;
1251
1251
  let platform = cached(() => PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch));
1252
- const detect$1 = () => platform();
1252
+ const detect$2 = () => platform();
1253
1253
 
1254
1254
  const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({
1255
1255
  target,
@@ -1354,7 +1354,7 @@
1354
1354
 
1355
1355
  const get$a = _win => {
1356
1356
  const win = _win === undefined ? window : _win;
1357
- if (detect$1().browser.isFirefox()) {
1357
+ if (detect$2().browser.isFirefox()) {
1358
1358
  return Optional.none();
1359
1359
  } else {
1360
1360
  return Optional.from(win.visualViewport);
@@ -2758,7 +2758,6 @@
2758
2758
  baseBehaviour,
2759
2759
  'representing',
2760
2760
  'item-events',
2761
- 'toolbar-button-events',
2762
2761
  'tooltipping'
2763
2762
  ],
2764
2763
  [mousedown()]: [
@@ -3196,13 +3195,6 @@
3196
3195
  const is = (s, test) => test(s);
3197
3196
  return ClosestOrAncestor(is, ancestor$1, scope, predicate, isRoot);
3198
3197
  };
3199
- const sibling$1 = (scope, predicate) => {
3200
- const element = scope.dom;
3201
- if (!element.parentNode) {
3202
- return Optional.none();
3203
- }
3204
- return child$1(SugarElement.fromDom(element.parentNode), x => !eq(scope, x) && predicate(x));
3205
- };
3206
3198
  const child$1 = (scope, predicate) => {
3207
3199
  const pred = node => predicate(SugarElement.fromDom(node));
3208
3200
  const result = find$5(scope.dom.childNodes, pred);
@@ -3227,9 +3219,7 @@
3227
3219
 
3228
3220
  const closest$2 = (scope, predicate, isRoot) => closest$3(scope, predicate, isRoot).isSome();
3229
3221
 
3230
- const first$1 = selector => one(selector);
3231
3222
  const ancestor = (scope, selector, isRoot) => ancestor$1(scope, e => is(e, selector), isRoot);
3232
- const sibling = (scope, selector) => sibling$1(scope, e => is(e, selector));
3233
3223
  const child = (scope, selector) => child$1(scope, e => is(e, selector));
3234
3224
  const descendant = (scope, selector) => one(selector, scope);
3235
3225
  const closest$1 = (scope, selector, isRoot) => {
@@ -9841,7 +9831,7 @@
9841
9831
  memButton.getOpt(comp).each(Focusing.focus);
9842
9832
  })])
9843
9833
  ]),
9844
- components: components.concat(detail.progress ? [memBannerProgress.asSpec()] : []).concat([memButton.asSpec()]),
9834
+ components: components.concat(detail.progress ? [memBannerProgress.asSpec()] : []).concat(!detail.closeButton ? [] : [memButton.asSpec()]),
9845
9835
  apis
9846
9836
  };
9847
9837
  };
@@ -9855,7 +9845,8 @@
9855
9845
  required$1('onAction'),
9856
9846
  required$1('text'),
9857
9847
  required$1('iconProvider'),
9858
- required$1('translationProvider')
9848
+ required$1('translationProvider'),
9849
+ defaultedBoolean('closeButton', true)
9859
9850
  ],
9860
9851
  apis: {
9861
9852
  updateProgress: (apis, comp, percent) => {
@@ -9894,6 +9885,7 @@
9894
9885
  ], settings.type) ? settings.type : undefined,
9895
9886
  progress: settings.progressBar === true,
9896
9887
  icon: settings.icon,
9888
+ closeButton: settings.closeButton,
9897
9889
  onAction: close,
9898
9890
  iconProvider: sharedBackstage.providers.icons,
9899
9891
  translationProvider: sharedBackstage.providers.translate
@@ -10322,6 +10314,10 @@
10322
10314
  getDefaultFontStack: getDefaultFontStack
10323
10315
  });
10324
10316
 
10317
+ const autocompleteSelector = '[data-mce-autocompleter]';
10318
+ const detect$1 = elm => closest$1(elm, autocompleteSelector);
10319
+ const findIn = elm => descendant(elm, autocompleteSelector);
10320
+
10325
10321
  const setup$e = (api, editor) => {
10326
10322
  const redirectKeyToItem = (item, e) => {
10327
10323
  emitWith(item, keydown(), { raw: e });
@@ -10357,8 +10353,8 @@
10357
10353
  }
10358
10354
  }
10359
10355
  });
10360
- editor.on('NodeChange', () => {
10361
- if (api.isActive() && !api.isProcessingAction() && !editor.queryCommandState('mceAutoCompleterInRange')) {
10356
+ editor.on('NodeChange', e => {
10357
+ if (api.isActive() && !api.isProcessingAction() && detect$1(SugarElement.fromDom(e.element)).isNone()) {
10362
10358
  api.cancelIfNecessary();
10363
10359
  }
10364
10360
  });
@@ -10894,16 +10890,14 @@
10894
10890
  ];
10895
10891
  const toolbarButtonSchema = objOf([
10896
10892
  type,
10897
- onAction,
10898
- optionalShortcut
10893
+ onAction
10899
10894
  ].concat(baseToolbarButtonFields));
10900
10895
  const createToolbarButton = spec => asRaw('toolbarbutton', toolbarButtonSchema, spec);
10901
10896
 
10902
10897
  const baseToolbarToggleButtonFields = [active].concat(baseToolbarButtonFields);
10903
10898
  const toggleButtonSchema = objOf(baseToolbarToggleButtonFields.concat([
10904
10899
  type,
10905
- onAction,
10906
- optionalShortcut
10900
+ onAction
10907
10901
  ]));
10908
10902
  const createToggleButton = spec => asRaw('ToggleButton', toggleButtonSchema, spec);
10909
10903
 
@@ -11081,8 +11075,6 @@
11081
11075
  const ExclusivityChannel = generate$6('tooltip.exclusive');
11082
11076
  const ShowTooltipEvent = generate$6('tooltip.show');
11083
11077
  const HideTooltipEvent = generate$6('tooltip.hide');
11084
- const ImmediateHideTooltipEvent = generate$6('tooltip.immediateHide');
11085
- const ImmediateShowTooltipEvent = generate$6('tooltip.immediateShow');
11086
11078
 
11087
11079
  const hideAllExclusive = (component, _tConfig, _tState) => {
11088
11080
  component.getSystem().broadcastOn([ExclusivityChannel], {});
@@ -11104,11 +11096,9 @@
11104
11096
  const events$9 = (tooltipConfig, state) => {
11105
11097
  const hide = comp => {
11106
11098
  state.getTooltip().each(p => {
11107
- if (p.getSystem().isConnected()) {
11108
- detach(p);
11109
- tooltipConfig.onHide(comp, p);
11110
- state.clearTooltip();
11111
- }
11099
+ detach(p);
11100
+ tooltipConfig.onHide(comp, p);
11101
+ state.clearTooltip();
11112
11102
  });
11113
11103
  state.clearTimer();
11114
11104
  };
@@ -11135,122 +11125,17 @@
11135
11125
  Positioning.position(sink, popup, { anchor: tooltipConfig.anchor(comp) });
11136
11126
  }
11137
11127
  };
11138
- const reposition = comp => {
11139
- state.getTooltip().each(tooltip => {
11140
- const sink = tooltipConfig.lazySink(comp).getOrDie();
11141
- Positioning.position(sink, tooltip, { anchor: tooltipConfig.anchor(comp) });
11142
- });
11143
- };
11144
- const getEvents = () => {
11145
- switch (tooltipConfig.mode) {
11146
- case 'normal':
11147
- return [
11148
- run$1(focusin(), comp => {
11149
- emit(comp, ImmediateShowTooltipEvent);
11150
- }),
11151
- run$1(postBlur(), comp => {
11152
- emit(comp, ImmediateHideTooltipEvent);
11153
- }),
11154
- run$1(mouseover(), comp => {
11155
- emit(comp, ShowTooltipEvent);
11156
- }),
11157
- run$1(mouseout(), comp => {
11158
- emit(comp, HideTooltipEvent);
11159
- })
11160
- ];
11161
- case 'follow-highlight':
11162
- return [
11163
- run$1(highlight$1(), (comp, _se) => {
11164
- emit(comp, ShowTooltipEvent);
11165
- }),
11166
- run$1(dehighlight$1(), comp => {
11167
- emit(comp, HideTooltipEvent);
11168
- })
11169
- ];
11170
- case 'children-normal':
11171
- return [
11172
- run$1(focusin(), (comp, se) => {
11173
- search(comp.element).each(_ => {
11174
- if (is(se.event.target, '[data-mce-tooltip]')) {
11175
- state.getTooltip().fold(() => {
11176
- emit(comp, ImmediateShowTooltipEvent);
11177
- }, tooltip => {
11178
- if (state.isShowing()) {
11179
- tooltipConfig.onShow(comp, tooltip);
11180
- reposition(comp);
11181
- }
11182
- });
11183
- }
11184
- });
11185
- }),
11186
- run$1(postBlur(), comp => {
11187
- search(comp.element).fold(() => {
11188
- emit(comp, ImmediateHideTooltipEvent);
11189
- }, noop);
11190
- }),
11191
- run$1(mouseover(), comp => {
11192
- descendant(comp.element, '[data-mce-tooltip]:hover').each(_ => {
11193
- state.getTooltip().fold(() => {
11194
- emit(comp, ShowTooltipEvent);
11195
- }, tooltip => {
11196
- if (state.isShowing()) {
11197
- tooltipConfig.onShow(comp, tooltip);
11198
- reposition(comp);
11199
- }
11200
- });
11201
- });
11202
- }),
11203
- run$1(mouseout(), comp => {
11204
- descendant(comp.element, '[data-mce-tooltip]:hover').fold(() => {
11205
- emit(comp, HideTooltipEvent);
11206
- }, noop);
11207
- })
11208
- ];
11209
- default:
11210
- return [
11211
- run$1(focusin(), (comp, se) => {
11212
- search(comp.element).each(_ => {
11213
- if (is(se.event.target, '[data-mce-tooltip]')) {
11214
- state.getTooltip().fold(() => {
11215
- emit(comp, ImmediateShowTooltipEvent);
11216
- }, tooltip => {
11217
- if (state.isShowing()) {
11218
- tooltipConfig.onShow(comp, tooltip);
11219
- reposition(comp);
11220
- }
11221
- });
11222
- }
11223
- });
11224
- }),
11225
- run$1(postBlur(), comp => {
11226
- search(comp.element).fold(() => {
11227
- emit(comp, ImmediateHideTooltipEvent);
11228
- }, noop);
11229
- })
11230
- ];
11231
- }
11232
- };
11233
11128
  return derive$2(flatten([
11234
11129
  [
11235
11130
  run$1(ShowTooltipEvent, comp => {
11236
11131
  state.resetTimer(() => {
11237
11132
  show(comp);
11238
- }, tooltipConfig.delayForShow());
11133
+ }, tooltipConfig.delay);
11239
11134
  }),
11240
11135
  run$1(HideTooltipEvent, comp => {
11241
11136
  state.resetTimer(() => {
11242
11137
  hide(comp);
11243
- }, tooltipConfig.delayForHide());
11244
- }),
11245
- run$1(ImmediateShowTooltipEvent, comp => {
11246
- state.resetTimer(() => {
11247
- show(comp);
11248
- }, 0);
11249
- }),
11250
- run$1(ImmediateHideTooltipEvent, comp => {
11251
- state.resetTimer(() => {
11252
- hide(comp);
11253
- }, 0);
11138
+ }, tooltipConfig.delay);
11254
11139
  }),
11255
11140
  run$1(receive(), (comp, message) => {
11256
11141
  const receivingData = message;
@@ -11264,7 +11149,27 @@
11264
11149
  hide(comp);
11265
11150
  })
11266
11151
  ],
11267
- getEvents()
11152
+ tooltipConfig.mode === 'normal' ? [
11153
+ run$1(focusin(), comp => {
11154
+ emit(comp, ShowTooltipEvent);
11155
+ }),
11156
+ run$1(postBlur(), comp => {
11157
+ emit(comp, HideTooltipEvent);
11158
+ }),
11159
+ run$1(mouseover(), comp => {
11160
+ emit(comp, ShowTooltipEvent);
11161
+ }),
11162
+ run$1(mouseout(), comp => {
11163
+ emit(comp, HideTooltipEvent);
11164
+ })
11165
+ ] : [
11166
+ run$1(highlight$1(), (comp, _se) => {
11167
+ emit(comp, ShowTooltipEvent);
11168
+ }),
11169
+ run$1(dehighlight$1(), comp => {
11170
+ emit(comp, HideTooltipEvent);
11171
+ })
11172
+ ]
11268
11173
  ]));
11269
11174
  };
11270
11175
 
@@ -11278,13 +11183,10 @@
11278
11183
  required$1('tooltipDom'),
11279
11184
  defaulted('exclusive', true),
11280
11185
  defaulted('tooltipComponents', []),
11281
- defaultedFunction('delayForShow', constant$1(300)),
11282
- defaultedFunction('delayForHide', constant$1(300)),
11186
+ defaulted('delay', 300),
11283
11187
  defaultedStringEnum('mode', 'normal', [
11284
11188
  'normal',
11285
- 'follow-highlight',
11286
- 'children-keyboard-focus',
11287
- 'children-normal'
11189
+ 'follow-highlight'
11288
11190
  ]),
11289
11191
  defaulted('anchor', comp => ({
11290
11192
  type: 'hotspot',
@@ -11306,8 +11208,7 @@
11306
11208
  southwest$2,
11307
11209
  northwest$2
11308
11210
  ])
11309
- },
11310
- bubble: nu$5(0, -2, {})
11211
+ }
11311
11212
  })),
11312
11213
  onHandler('onHide'),
11313
11214
  onHandler('onShow')
@@ -11579,15 +11480,13 @@
11579
11480
  const renderColorStructure = (item, providerBackstage, fallbackIcon) => {
11580
11481
  const colorPickerCommand = 'custom';
11581
11482
  const removeColorCommand = 'remove';
11483
+ const itemText = item.ariaLabel;
11582
11484
  const itemValue = item.value;
11583
11485
  const iconSvg = item.iconContent.map(name => getOr(name, providerBackstage.icons, fallbackIcon));
11584
- const attributes = item.ariaLabel.map(al => ({
11585
- 'aria-label': providerBackstage.translate(al),
11586
- 'data-mce-name': al
11587
- })).getOr({});
11588
11486
  const getDom = () => {
11589
11487
  const common = colorClass;
11590
11488
  const icon = iconSvg.getOr('');
11489
+ const attributes = itemText.map(text => ({ title: providerBackstage.translate(text) })).getOr({});
11591
11490
  const baseDom = {
11592
11491
  tag: 'div',
11593
11492
  attributes,
@@ -11634,8 +11533,8 @@
11634
11533
  const renderItemDomStructure = ariaLabel => {
11635
11534
  const domTitle = ariaLabel.map(label => ({
11636
11535
  attributes: {
11637
- 'id': generate$6('menu-item'),
11638
- 'aria-label': global$8.translate(label)
11536
+ title: global$8.translate(label),
11537
+ id: generate$6('menu-item')
11639
11538
  }
11640
11539
  })).getOr({});
11641
11540
  return {
@@ -11678,7 +11577,7 @@
11678
11577
  }
11679
11578
  };
11680
11579
 
11681
- const tooltipBehaviour = (meta, sharedBackstage, tooltipText) => get$g(meta, 'tooltipWorker').map(tooltipWorker => [Tooltipping.config({
11580
+ const tooltipBehaviour = (meta, sharedBackstage) => get$g(meta, 'tooltipWorker').map(tooltipWorker => [Tooltipping.config({
11682
11581
  lazySink: sharedBackstage.getSink,
11683
11582
  tooltipDom: {
11684
11583
  tag: 'div',
@@ -11696,12 +11595,7 @@
11696
11595
  Tooltipping.setComponents(component, [external$1({ element: SugarElement.fromDom(elm) })]);
11697
11596
  });
11698
11597
  }
11699
- })]).getOrThunk(() => {
11700
- return tooltipText.map(text => [Tooltipping.config({
11701
- ...sharedBackstage.providers.tooltips.getConfig({ tooltipText: text }),
11702
- mode: 'follow-highlight'
11703
- })]).getOr([]);
11704
- });
11598
+ })]).getOr([]);
11705
11599
  const encodeText = text => global$7.DOM.encode(text);
11706
11600
  const replaceText = (text, matchText) => {
11707
11601
  const translated = global$8.translate(text);
@@ -11725,7 +11619,6 @@
11725
11619
  caret: Optional.none(),
11726
11620
  value: spec.value
11727
11621
  }, sharedBackstage.providers, renderIcons, spec.icon);
11728
- const tooltipString = spec.text.filter(text => !useText && text !== '');
11729
11622
  return renderCommonItem({
11730
11623
  data: buildData(spec),
11731
11624
  enabled: spec.enabled,
@@ -11733,7 +11626,7 @@
11733
11626
  onAction: _api => onItemValueHandler(spec.value, spec.meta),
11734
11627
  onSetup: constant$1(noop),
11735
11628
  triggersSubmenu: false,
11736
- itemBehaviours: tooltipBehaviour(spec, sharedBackstage, tooltipString)
11629
+ itemBehaviours: tooltipBehaviour(spec.meta, sharedBackstage)
11737
11630
  }, structure, itemResponse, sharedBackstage.providers);
11738
11631
  };
11739
11632
 
@@ -11810,7 +11703,6 @@
11810
11703
  caret: Optional.none(),
11811
11704
  value: spec.value
11812
11705
  }, providersBackstage, renderIcons);
11813
- const optTooltipping = spec.text.filter(constant$1(!useText)).map(t => Tooltipping.config(providersBackstage.tooltips.getConfig({ tooltipText: providersBackstage.translate(t) })));
11814
11706
  return deepMerge(renderCommonItem({
11815
11707
  data: buildData(spec),
11816
11708
  enabled: spec.enabled,
@@ -11821,7 +11713,7 @@
11821
11713
  return noop;
11822
11714
  },
11823
11715
  triggersSubmenu: false,
11824
- itemBehaviours: [...optTooltipping.toArray()]
11716
+ itemBehaviours: []
11825
11717
  }, structure, itemResponse, providersBackstage), {
11826
11718
  toggling: {
11827
11719
  toggleClass: tickedClass,
@@ -12779,7 +12671,10 @@
12779
12671
  },
12780
12672
  setTooltip: tooltip => {
12781
12673
  const translatedTooltip = providersBackstage.translate(tooltip);
12782
- set$9(component.element, 'aria-label', translatedTooltip);
12674
+ setAll$1(component.element, {
12675
+ 'aria-label': translatedTooltip,
12676
+ 'title': translatedTooltip
12677
+ });
12783
12678
  }
12784
12679
  });
12785
12680
  const structure = renderItemStructure({
@@ -13173,7 +13068,6 @@
13173
13068
  };
13174
13069
  const onClose = (component, menu) => {
13175
13070
  ariaControls.unlink(hotspot.element);
13176
- lazySink().getOr(menu).element.dom.dispatchEvent(new window.FocusEvent('focusout'));
13177
13071
  if (extras !== undefined && extras.onClose !== undefined) {
13178
13072
  extras.onClose(component, menu);
13179
13073
  }
@@ -13492,7 +13386,7 @@
13492
13386
  onItemValueHandler(d.value, d.meta);
13493
13387
  }
13494
13388
  }, itemResponse, sharedBackstage, {
13495
- itemBehaviours: tooltipBehaviour(d.meta, sharedBackstage, Optional.none()),
13389
+ itemBehaviours: tooltipBehaviour(d.meta, sharedBackstage),
13496
13390
  cardText: {
13497
13391
  matchText,
13498
13392
  highlightOn
@@ -13543,12 +13437,17 @@
13543
13437
  };
13544
13438
  };
13545
13439
 
13546
- const rangeToSimRange = r => SimRange.create(SugarElement.fromDom(r.startContainer), r.startOffset, SugarElement.fromDom(r.endContainer), r.endOffset);
13440
+ const getAutocompleterRange = (dom, initRange) => {
13441
+ return detect$1(SugarElement.fromDom(initRange.startContainer)).map(elm => {
13442
+ const range = dom.createRng();
13443
+ range.selectNode(elm.dom);
13444
+ return range;
13445
+ });
13446
+ };
13547
13447
  const register$b = (editor, sharedBackstage) => {
13548
13448
  const autocompleterId = generate$6('autocompleter');
13549
13449
  const processingAction = Cell(false);
13550
13450
  const activeState = Cell(false);
13551
- const activeRange = value$2();
13552
13451
  const autocompleter = build$1(InlineView.sketch({
13553
13452
  dom: {
13554
13453
  tag: 'div',
@@ -13587,15 +13486,15 @@
13587
13486
  return bind$3(matches, match => {
13588
13487
  const choices = match.items;
13589
13488
  return createAutocompleteItems(choices, match.matchText, (itemValue, itemMeta) => {
13590
- const autocompleterApi = {
13591
- hide: () => cancelIfNecessary(),
13592
- reload: fetchOptions => {
13593
- hideIfNecessary();
13594
- editor.execCommand('mceAutocompleterReload', false, { fetchOptions });
13595
- }
13596
- };
13597
- editor.execCommand('mceAutocompleterRefreshActiveRange');
13598
- activeRange.get().each(range => {
13489
+ const nr = editor.selection.getRng();
13490
+ getAutocompleterRange(editor.dom, nr).each(range => {
13491
+ const autocompleterApi = {
13492
+ hide: () => cancelIfNecessary(),
13493
+ reload: fetchOptions => {
13494
+ hideIfNecessary();
13495
+ editor.execCommand('mceAutocompleterReload', false, { fetchOptions });
13496
+ }
13497
+ };
13599
13498
  processingAction.set(true);
13600
13499
  match.onAction(autocompleterApi, range, itemValue, itemMeta);
13601
13500
  processingAction.set(false);
@@ -13604,14 +13503,16 @@
13604
13503
  });
13605
13504
  };
13606
13505
  const display = (lookupData, items) => {
13607
- const columns = findMap(lookupData, ld => Optional.from(ld.columns)).getOr(1);
13608
- InlineView.showMenuAt(autocompleter, {
13609
- anchor: {
13610
- type: 'selection',
13611
- getSelection: () => activeRange.get().map(rangeToSimRange),
13612
- root: SugarElement.fromDom(editor.getBody())
13613
- }
13614
- }, createInlineMenuFrom(createPartialMenuWithAlloyItems('autocompleter-value', true, items, columns, { menuType: 'normal' }), columns, FocusMode.ContentFocus, 'normal'));
13506
+ findIn(SugarElement.fromDom(editor.getBody())).each(element => {
13507
+ const columns = findMap(lookupData, ld => Optional.from(ld.columns)).getOr(1);
13508
+ InlineView.showMenuAt(autocompleter, {
13509
+ anchor: {
13510
+ type: 'node',
13511
+ root: SugarElement.fromDom(editor.getBody()),
13512
+ node: Optional.from(element)
13513
+ }
13514
+ }, createInlineMenuFrom(createPartialMenuWithAlloyItems('autocompleter-value', true, items, columns, { menuType: 'normal' }), columns, FocusMode.ContentFocus, 'normal'));
13515
+ });
13615
13516
  getMenu().each(Highlighting.highlightFirst);
13616
13517
  };
13617
13518
  const updateDisplay = lookupData => {
@@ -13657,12 +13558,10 @@
13657
13558
  updateDisplay(lookupData);
13658
13559
  });
13659
13560
  editor.on('AutocompleterUpdate', ({lookupData}) => updateDisplay(lookupData));
13660
- editor.on('AutocompleterUpdateActiveRange', ({range}) => activeRange.set(range));
13661
13561
  editor.on('AutocompleterEnd', () => {
13662
13562
  hideIfNecessary();
13663
13563
  activeState.set(false);
13664
13564
  processingAction.set(false);
13665
- activeRange.clear();
13666
13565
  });
13667
13566
  const autocompleterUiApi = {
13668
13567
  cancelIfNecessary,
@@ -14440,7 +14339,7 @@
14440
14339
  };
14441
14340
  const ariaLabel = itemText.replace(/\_| \- |\-/g, match => mapItemName[match]);
14442
14341
  const disabledClass = providersBackstage.isDisabled() ? ' tox-collection__item--state-disabled' : '';
14443
- return `<div data-mce-tooltip="${ ariaLabel }" class="tox-collection__item${ disabledClass }" tabindex="-1" data-collection-item-value="${ global$3.encodeAllRaw(item.value) }" aria-label="${ ariaLabel }">${ iconContent }${ textContent }</div>`;
14342
+ return `<div class="tox-collection__item${ disabledClass }" tabindex="-1" data-collection-item-value="${ global$3.encodeAllRaw(item.value) }" title="${ ariaLabel }" aria-label="${ ariaLabel }">${ iconContent }${ textContent }</div>`;
14444
14343
  });
14445
14344
  const chunks = spec.columns !== 'auto' && spec.columns > 1 ? chunk$1(htmlLines, spec.columns) : [htmlLines];
14446
14345
  const html = map$2(chunks, ch => `<div class="tox-collection__group">${ ch.join('') }</div>`);
@@ -14470,7 +14369,6 @@
14470
14369
  run$1(focusout(), runOnItem(comp => {
14471
14370
  descendant(comp.element, '.' + activeClass).each(currentActive => {
14472
14371
  remove$2(currentActive, activeClass);
14473
- blur$1(currentActive);
14474
14372
  });
14475
14373
  })),
14476
14374
  runOnExecute$1(runOnItem((comp, se, tgt, itemValue) => {
@@ -14506,43 +14404,6 @@
14506
14404
  }),
14507
14405
  receivingConfig(),
14508
14406
  Replacing.config({}),
14509
- Tooltipping.config({
14510
- ...providersBackstage.tooltips.getConfig({
14511
- tooltipText: '',
14512
- onShow: comp => {
14513
- descendant(comp.element, '.' + activeClass + '[data-mce-tooltip]').each(current => {
14514
- getOpt(current, 'data-mce-tooltip').each(text => {
14515
- Tooltipping.setComponents(comp, providersBackstage.tooltips.getComponents({ tooltipText: text }));
14516
- });
14517
- });
14518
- }
14519
- }),
14520
- mode: 'children-keyboard-focus',
14521
- anchor: comp => ({
14522
- type: 'node',
14523
- node: descendant(comp.element, '.' + activeClass).orThunk(() => first$1('.tox-collection__item')),
14524
- root: comp.element,
14525
- layouts: {
14526
- onLtr: constant$1([
14527
- south$2,
14528
- north$2,
14529
- southeast$2,
14530
- northeast$2,
14531
- southwest$2,
14532
- northwest$2
14533
- ]),
14534
- onRtl: constant$1([
14535
- south$2,
14536
- north$2,
14537
- southeast$2,
14538
- northeast$2,
14539
- southwest$2,
14540
- northwest$2
14541
- ])
14542
- },
14543
- bubble: nu$5(0, -2, {})
14544
- })
14545
- }),
14546
14407
  Representing.config({
14547
14408
  store: {
14548
14409
  mode: 'memory',
@@ -14567,10 +14428,6 @@
14567
14428
  'disabling',
14568
14429
  'alloy.base.behaviour',
14569
14430
  'collection-events'
14570
- ],
14571
- [focusin()]: [
14572
- 'collection-events',
14573
- 'tooltipping'
14574
14431
  ]
14575
14432
  }
14576
14433
  });
@@ -16294,16 +16151,6 @@
16294
16151
  const editorApi = value$2();
16295
16152
  const memReplaced = record({ dom: { tag: spec.tag } });
16296
16153
  const initialValue = value$2();
16297
- const focusBehaviour = !isOldCustomEditor(spec) && spec.onFocus.isSome() ? [
16298
- Focusing.config({
16299
- onFocus: comp => {
16300
- spec.onFocus.each(onFocusFn => {
16301
- onFocusFn(comp.element.dom);
16302
- });
16303
- }
16304
- }),
16305
- Tabstopping.config({})
16306
- ] : [];
16307
16154
  return {
16308
16155
  dom: {
16309
16156
  tag: 'div',
@@ -16321,11 +16168,11 @@
16321
16168
  });
16322
16169
  });
16323
16170
  })]),
16324
- withComp(Optional.none(), () => editorApi.get().fold(() => initialValue.get().getOr(''), ed => ed.getValue()), (_component, value) => {
16171
+ withComp(Optional.none(), () => editorApi.get().fold(() => initialValue.get().getOr(''), ed => ed.getValue()), (component, value) => {
16325
16172
  editorApi.get().fold(() => initialValue.set(value), ed => ed.setValue(value));
16326
16173
  }),
16327
16174
  ComposingConfigs.self()
16328
- ].concat(focusBehaviour)),
16175
+ ]),
16329
16176
  components: [memReplaced.asSpec()]
16330
16177
  };
16331
16178
  };
@@ -16596,7 +16443,7 @@
16596
16443
  const bodySendMessageChannel = generate$6('body-send-message');
16597
16444
  const dialogFocusShiftedChannel = generate$6('dialog-focus-shifted');
16598
16445
 
16599
- const browser = detect$1().browser;
16446
+ const browser = detect$2().browser;
16600
16447
  const isSafari = browser.isSafari();
16601
16448
  const isFirefox = browser.isFirefox();
16602
16449
  const isSafariOrFirefox = isSafari || isFirefox;
@@ -16859,18 +16706,12 @@
16859
16706
  'disabling',
16860
16707
  'alloy.base.behaviour',
16861
16708
  'toggling',
16862
- 'toolbar-button-events',
16863
- 'tooltipping'
16709
+ 'toolbar-button-events'
16864
16710
  ],
16865
16711
  [attachedToDom()]: [
16866
16712
  'toolbar-button-events',
16867
16713
  commonButtonDisplayEvent
16868
16714
  ],
16869
- [detachedFromDom()]: [
16870
- 'toolbar-button-events',
16871
- 'dropdown-events',
16872
- 'tooltipping'
16873
- ],
16874
16715
  [mousedown()]: [
16875
16716
  'focusing',
16876
16717
  'alloy.base.behaviour',
@@ -16901,7 +16742,7 @@
16901
16742
 
16902
16743
  const updateMenuText = generate$6('update-menu-text');
16903
16744
  const updateMenuIcon = generate$6('update-menu-icon');
16904
- const renderCommonDropdown = (spec, prefix, sharedBackstage, btnName) => {
16745
+ const renderCommonDropdown = (spec, prefix, sharedBackstage) => {
16905
16746
  const editorOffCell = Cell(noop);
16906
16747
  const optMemDisplayText = spec.text.map(text => record(renderLabel$1(text, prefix, sharedBackstage.providers)));
16907
16748
  const optMemDisplayIcon = spec.icon.map(iconName => record(renderReplaceableIconFromPack(iconName, sharedBackstage.providers.icons)));
@@ -16913,16 +16754,18 @@
16913
16754
  return Optional.some(true);
16914
16755
  };
16915
16756
  const role = spec.role.fold(() => ({}), role => ({ role }));
16916
- const ariaLabelAttribute = spec.ariaLabel.fold(() => ({}), ariaLabel => {
16917
- const translatedAriaLabel = sharedBackstage.providers.translate(ariaLabel);
16918
- return { 'aria-label': translatedAriaLabel };
16757
+ const tooltipAttributes = spec.tooltip.fold(() => ({}), tooltip => {
16758
+ const translatedTooltip = sharedBackstage.providers.translate(tooltip);
16759
+ return {
16760
+ 'title': translatedTooltip,
16761
+ 'aria-label': translatedTooltip
16762
+ };
16919
16763
  });
16920
16764
  const iconSpec = render$3('chevron-down', {
16921
16765
  tag: 'div',
16922
16766
  classes: [`${ prefix }__select-chevron`]
16923
16767
  }, sharedBackstage.providers.icons);
16924
16768
  const fixWidthBehaviourName = generate$6('common-button-display-events');
16925
- const customEventsName = 'dropdown-events';
16926
16769
  const memDropdown = record(Dropdown.sketch({
16927
16770
  ...spec.uid ? { uid: spec.uid } : {},
16928
16771
  ...role,
@@ -16932,10 +16775,7 @@
16932
16775
  prefix,
16933
16776
  `${ prefix }--select`
16934
16777
  ].concat(map$2(spec.classes, c => `${ prefix }--${ c }`)),
16935
- attributes: {
16936
- ...ariaLabelAttribute,
16937
- ...isNonNullable(btnName) ? { 'data-mce-name': btnName } : {}
16938
- }
16778
+ attributes: { ...tooltipAttributes }
16939
16779
  },
16940
16780
  components: componentRenderPipeline([
16941
16781
  optMemDisplayIcon.map(mem => mem.asSpec()),
@@ -16955,8 +16795,7 @@
16955
16795
  receivingConfig(),
16956
16796
  Unselecting.config({}),
16957
16797
  Replacing.config({}),
16958
- ...spec.tooltip.map(t => Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({ tooltipText: sharedBackstage.providers.translate(t) }))).toArray(),
16959
- config(customEventsName, [
16798
+ config('dropdown-events', [
16960
16799
  onControlAttached(spec, editorOffCell),
16961
16800
  onControlDetached(spec, editorOffCell)
16962
16801
  ]),
@@ -16975,7 +16814,7 @@
16975
16814
  ])
16976
16815
  ]),
16977
16816
  eventOrder: deepMerge(toolbarButtonEventOrder, {
16978
- [mousedown()]: [
16817
+ mousedown: [
16979
16818
  'focusing',
16980
16819
  'alloy.base.behaviour',
16981
16820
  'item-type-events',
@@ -16983,8 +16822,7 @@
16983
16822
  ],
16984
16823
  [attachedToDom()]: [
16985
16824
  'toolbar-button-events',
16986
- Tooltipping.name(),
16987
- customEventsName,
16825
+ 'dropdown-events',
16988
16826
  fixWidthBehaviourName
16989
16827
  ]
16990
16828
  }),
@@ -17166,9 +17004,8 @@
17166
17004
  uid: sketchSpec.uid,
17167
17005
  text: initialItem.map(item => item.text),
17168
17006
  icon: Optional.none(),
17169
- tooltip: Optional.none(),
17007
+ tooltip: spec.label,
17170
17008
  role: Optional.none(),
17171
- ariaLabel: spec.label,
17172
17009
  fetch: (comp, callback) => {
17173
17010
  const items = fetchItems(comp, spec.name, spec.items, Representing.getValue(comp));
17174
17011
  callback(build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {
@@ -17522,8 +17359,6 @@
17522
17359
  'tox-lock-icon__' + iconName
17523
17360
  ]
17524
17361
  }, providersBackstage.icons);
17525
- const label = spec.label.getOr('Constrain proportions');
17526
- const translatedLabel = providersBackstage.translate(label);
17527
17362
  const pLock = FormCoupledInputs.parts.lock({
17528
17363
  dom: {
17529
17364
  tag: 'button',
@@ -17533,10 +17368,7 @@
17533
17368
  'tox-button--naked',
17534
17369
  'tox-button--icon'
17535
17370
  ],
17536
- attributes: {
17537
- 'aria-label': translatedLabel,
17538
- 'data-mce-name': label
17539
- }
17371
+ attributes: { title: providersBackstage.translate(spec.label.getOr('Constrain proportions')) }
17540
17372
  },
17541
17373
  components: [
17542
17374
  makeIcon('lock'),
@@ -17545,8 +17377,7 @@
17545
17377
  buttonBehaviours: derive$1([
17546
17378
  Disabling.config({ disabled: () => !spec.enabled || providersBackstage.isDisabled() }),
17547
17379
  receivingConfig(),
17548
- Tabstopping.config({}),
17549
- Tooltipping.config(providersBackstage.tooltips.getConfig({ tooltipText: translatedLabel }))
17380
+ Tabstopping.config({})
17550
17381
  ])
17551
17382
  });
17552
17383
  const formGroup = components => ({
@@ -18075,12 +17906,11 @@
18075
17906
  },
18076
17907
  setIcon: icon => emitWith(component, updateMenuIcon, { icon })
18077
17908
  });
18078
- const renderMenuButton = (spec, prefix, backstage, role, tabstopping = true, btnName) => {
17909
+ const renderMenuButton = (spec, prefix, backstage, role, tabstopping = true) => {
18079
17910
  return renderCommonDropdown({
18080
17911
  text: spec.text,
18081
17912
  icon: spec.icon,
18082
17913
  tooltip: spec.tooltip,
18083
- ariaLabel: spec.tooltip,
18084
17914
  searchable: spec.search.isSome(),
18085
17915
  role,
18086
17916
  fetch: (dropdownComp, callback) => {
@@ -18098,7 +17928,7 @@
18098
17928
  presets: 'normal',
18099
17929
  classes: [],
18100
17930
  dropdownBehaviours: [...tabstopping ? [Tabstopping.config({})] : []]
18101
- }, prefix, backstage.shared, btnName);
17931
+ }, prefix, backstage.shared);
18102
17932
  };
18103
17933
  const getFetch = (items, getButton, backstage) => {
18104
17934
  const getMenuItemAction = item => api => {
@@ -18136,7 +17966,10 @@
18136
17966
  dom: {
18137
17967
  tag: 'span',
18138
17968
  classes: ['tox-tree__label'],
18139
- attributes: { 'aria-label': text }
17969
+ attributes: {
17970
+ 'title': text,
17971
+ 'aria-label': text
17972
+ }
18140
17973
  },
18141
17974
  components: [text$2(text)]
18142
17975
  });
@@ -18938,14 +18771,13 @@
18938
18771
  fromPromise
18939
18772
  };
18940
18773
 
18941
- const renderCommonSpec = (spec, actionOpt, extraBehaviours = [], dom, components, tooltip, providersBackstage) => {
18774
+ const renderCommonSpec = (spec, actionOpt, extraBehaviours = [], dom, components, providersBackstage) => {
18942
18775
  const action = actionOpt.fold(() => ({}), action => ({ action }));
18943
18776
  const common = {
18944
18777
  buttonBehaviours: derive$1([
18945
18778
  DisablingConfigs.button(() => !spec.enabled || providersBackstage.isDisabled()),
18946
18779
  receivingConfig(),
18947
18780
  Tabstopping.config({}),
18948
- ...tooltip.map(t => Tooltipping.config(providersBackstage.tooltips.getConfig({ tooltipText: providersBackstage.translate(t) }))).toArray(),
18949
18781
  config('button press', [
18950
18782
  preventDefault('click'),
18951
18783
  preventDefault('mousedown')
@@ -18966,19 +18798,19 @@
18966
18798
  const domFinal = deepMerge(common, { dom });
18967
18799
  return deepMerge(domFinal, { components });
18968
18800
  };
18969
- const renderIconButtonSpec = (spec, action, providersBackstage, extraBehaviours = [], btnName) => {
18970
- const tooltipAttributes = spec.tooltip.map(tooltip => ({ 'aria-label': providersBackstage.translate(tooltip) })).getOr({});
18801
+ const renderIconButtonSpec = (spec, action, providersBackstage, extraBehaviours = []) => {
18802
+ const tooltipAttributes = spec.tooltip.map(tooltip => ({
18803
+ 'aria-label': providersBackstage.translate(tooltip),
18804
+ 'title': providersBackstage.translate(tooltip)
18805
+ })).getOr({});
18971
18806
  const dom = {
18972
18807
  tag: 'button',
18973
18808
  classes: ['tox-tbtn'],
18974
- attributes: {
18975
- ...tooltipAttributes,
18976
- 'data-mce-name': btnName
18977
- }
18809
+ attributes: tooltipAttributes
18978
18810
  };
18979
18811
  const icon = spec.icon.map(iconName => renderIconFromPack$1(iconName, providersBackstage.icons));
18980
18812
  const components = componentRenderPipeline([icon]);
18981
- return renderCommonSpec(spec, action, extraBehaviours, dom, components, spec.tooltip, providersBackstage);
18813
+ return renderCommonSpec(spec, action, extraBehaviours, dom, components, providersBackstage);
18982
18814
  };
18983
18815
  const calculateClassesFromButtonType = buttonType => {
18984
18816
  switch (buttonType) {
@@ -19009,13 +18841,9 @@
19009
18841
  const dom = {
19010
18842
  tag: 'button',
19011
18843
  classes,
19012
- attributes: {
19013
- 'aria-label': translatedText,
19014
- 'data-mce-name': spec.text
19015
- }
18844
+ attributes: { title: translatedText }
19016
18845
  };
19017
- const optTooltip = spec.icon.map(constant$1(translatedText));
19018
- return renderCommonSpec(spec, action, extraBehaviours, dom, components, optTooltip, providersBackstage);
18846
+ return renderCommonSpec(spec, action, extraBehaviours, dom, components, providersBackstage);
19019
18847
  };
19020
18848
  const renderButton$1 = (spec, action, providersBackstage, extraBehaviours = [], extraClasses = []) => {
19021
18849
  const buttonSpec = renderButtonSpec(spec, Optional.some(action), providersBackstage, extraBehaviours, extraClasses);
@@ -19038,7 +18866,7 @@
19038
18866
  const isMenuFooterButtonSpec = (spec, buttonType) => buttonType === 'menu';
19039
18867
  const isNormalFooterButtonSpec = (spec, buttonType) => buttonType === 'custom' || buttonType === 'cancel' || buttonType === 'submit';
19040
18868
  const isToggleButtonSpec = (spec, buttonType) => buttonType === 'togglebutton';
19041
- const renderToggleButton = (spec, providers, btnName) => {
18869
+ const renderToggleButton = (spec, providers) => {
19042
18870
  var _a, _b;
19043
18871
  const optMemIcon = spec.icon.map(memIcon => renderReplaceableIconFromPack(memIcon, providers.icons)).map(record);
19044
18872
  const action = comp => {
@@ -19058,11 +18886,14 @@
19058
18886
  ...spec,
19059
18887
  name: (_a = spec.name) !== null && _a !== void 0 ? _a : '',
19060
18888
  primary: buttonType === 'primary',
19061
- tooltip: spec.tooltip,
18889
+ tooltip: Optional.from(spec.tooltip),
19062
18890
  enabled: (_b = spec.enabled) !== null && _b !== void 0 ? _b : false,
19063
18891
  borderless: false
19064
18892
  };
19065
- const tooltipAttributes = buttonSpec.tooltip.or(spec.text).map(tooltip => ({ 'aria-label': providers.translate(tooltip) })).getOr({});
18893
+ const tooltipAttributes = buttonSpec.tooltip.map(tooltip => ({
18894
+ 'aria-label': providers.translate(tooltip),
18895
+ 'title': providers.translate(tooltip)
18896
+ })).getOr({});
19066
18897
  const buttonTypeClasses = calculateClassesFromButtonType(buttonType !== null && buttonType !== void 0 ? buttonType : 'secondary');
19067
18898
  const showIconAndText = spec.icon.isSome() && spec.text.isSome();
19068
18899
  const dom = {
@@ -19072,10 +18903,7 @@
19072
18903
  ...spec.active ? ['tox-button--enabled'] : [],
19073
18904
  ...showIconAndText ? ['tox-button--icon-and-text'] : []
19074
18905
  ],
19075
- attributes: {
19076
- ...tooltipAttributes,
19077
- ...isNonNullable(btnName) ? { 'data-mce-name': btnName } : {}
19078
- }
18906
+ attributes: tooltipAttributes
19079
18907
  };
19080
18908
  const extraBehaviours = [];
19081
18909
  const translatedText = providers.translate(spec.text.getOr(''));
@@ -19085,7 +18913,7 @@
19085
18913
  ...iconComp,
19086
18914
  ...spec.text.isSome() ? [translatedTextComponed] : []
19087
18915
  ];
19088
- const iconButtonSpec = renderCommonSpec(buttonSpec, Optional.some(action), extraBehaviours, dom, components, spec.tooltip, providers);
18916
+ const iconButtonSpec = renderCommonSpec(buttonSpec, Optional.some(action), extraBehaviours, dom, components, providers);
19089
18917
  return Button.sketch(iconButtonSpec);
19090
18918
  };
19091
18919
  const renderFooterButton = (spec, buttonType, backstage) => {
@@ -19102,7 +18930,7 @@
19102
18930
  },
19103
18931
  fetch: getFetch(menuButtonSpec.items, getButton, backstage)
19104
18932
  };
19105
- const memButton = record(renderMenuButton(fixedSpec, 'tox-tbtn', backstage, Optional.none(), true, spec.text.or(spec.tooltip).getOrUndefined()));
18933
+ const memButton = record(renderMenuButton(fixedSpec, 'tox-tbtn', backstage, Optional.none()));
19106
18934
  return memButton.asSpec();
19107
18935
  } else if (isNormalFooterButtonSpec(spec, buttonType)) {
19108
18936
  const action = getAction(spec.name, buttonType);
@@ -19112,7 +18940,7 @@
19112
18940
  };
19113
18941
  return renderButton$1(buttonSpec, action, backstage.shared.providers, []);
19114
18942
  } else if (isToggleButtonSpec(spec, buttonType)) {
19115
- return renderToggleButton(spec, backstage.shared.providers, spec.text.or(spec.tooltip).getOrUndefined());
18943
+ return renderToggleButton(spec, backstage.shared.providers);
19116
18944
  } else {
19117
18945
  console.error('Unknown footer button type: ', buttonType);
19118
18946
  throw new Error('Unknown footer button type');
@@ -19524,51 +19352,14 @@
19524
19352
  });
19525
19353
  };
19526
19354
 
19527
- const renderHtmlPanel = (spec, providersBackstage) => {
19355
+ const renderHtmlPanel = spec => {
19528
19356
  if (spec.presets === 'presentation') {
19529
19357
  return Container.sketch({
19530
19358
  dom: {
19531
19359
  tag: 'div',
19532
19360
  classes: ['tox-form__group'],
19533
19361
  innerHtml: spec.html
19534
- },
19535
- containerBehaviours: derive$1([Tooltipping.config({
19536
- ...providersBackstage.tooltips.getConfig({
19537
- tooltipText: '',
19538
- onShow: comp => {
19539
- descendant(comp.element, '[data-mce-tooltip]:hover').orThunk(() => search(comp.element)).each(current => {
19540
- getOpt(current, 'data-mce-tooltip').each(text => {
19541
- Tooltipping.setComponents(comp, providersBackstage.tooltips.getComponents({ tooltipText: text }));
19542
- });
19543
- });
19544
- }
19545
- }),
19546
- mode: 'children-normal',
19547
- anchor: comp => ({
19548
- type: 'node',
19549
- node: descendant(comp.element, '[data-mce-tooltip]:hover').orThunk(() => search(comp.element).filter(current => getOpt(current, 'data-mce-tooltip').isSome())),
19550
- root: comp.element,
19551
- layouts: {
19552
- onLtr: constant$1([
19553
- south$2,
19554
- north$2,
19555
- southeast$2,
19556
- northeast$2,
19557
- southwest$2,
19558
- northwest$2
19559
- ]),
19560
- onRtl: constant$1([
19561
- south$2,
19562
- north$2,
19563
- southeast$2,
19564
- northeast$2,
19565
- southwest$2,
19566
- northwest$2
19567
- ])
19568
- },
19569
- bubble: nu$5(0, -2, {})
19570
- })
19571
- })])
19362
+ }
19572
19363
  });
19573
19364
  } else {
19574
19365
  return Container.sketch({
@@ -19613,7 +19404,7 @@
19613
19404
  slider: make$2((spec, backstage, data) => renderSlider(spec, backstage.shared.providers, data)),
19614
19405
  urlinput: make$2((spec, backstage, data) => renderUrlInput(spec, backstage, backstage.urlinput, data)),
19615
19406
  customeditor: make$2(renderCustomEditor),
19616
- htmlpanel: make$2((spec, backstage) => renderHtmlPanel(spec, backstage.shared.providers)),
19407
+ htmlpanel: make$2(renderHtmlPanel),
19617
19408
  imagepreview: make$2((spec, _, data) => renderImagePreview(spec, data)),
19618
19409
  table: make$2((spec, backstage) => renderTable(spec, backstage.shared.providers)),
19619
19410
  tree: make$2((spec, backstage) => renderTree(spec, backstage)),
@@ -20121,51 +19912,6 @@
20121
19912
  return { getData };
20122
19913
  };
20123
19914
 
20124
- const TooltipsBackstage = getSink => {
20125
- const tooltipDelay = 300;
20126
- const intervalDelay = tooltipDelay * 0.2;
20127
- let numActiveTooltips = 0;
20128
- const alreadyShowingTooltips = () => numActiveTooltips > 0;
20129
- const getComponents = spec => {
20130
- return [{
20131
- dom: {
20132
- tag: 'div',
20133
- classes: ['tox-tooltip__body']
20134
- },
20135
- components: [text$2(spec.tooltipText)]
20136
- }];
20137
- };
20138
- const getConfig = spec => {
20139
- return {
20140
- delayForShow: () => alreadyShowingTooltips() ? intervalDelay : tooltipDelay,
20141
- delayForHide: constant$1(tooltipDelay),
20142
- exclusive: true,
20143
- lazySink: getSink,
20144
- tooltipDom: {
20145
- tag: 'div',
20146
- classes: [
20147
- 'tox-tooltip',
20148
- 'tox-tooltip--up'
20149
- ]
20150
- },
20151
- tooltipComponents: getComponents(spec),
20152
- onShow: (comp, tooltip) => {
20153
- numActiveTooltips++;
20154
- if (spec.onShow) {
20155
- spec.onShow(comp, tooltip);
20156
- }
20157
- },
20158
- onHide: () => {
20159
- numActiveTooltips--;
20160
- }
20161
- };
20162
- };
20163
- return {
20164
- getConfig,
20165
- getComponents
20166
- };
20167
- };
20168
-
20169
19915
  const isElement = node => isNonNullable(node) && node.nodeType === 1;
20170
19916
  const trim = global$1.trim;
20171
19917
  const hasContentEditableState = value => {
@@ -20372,8 +20118,7 @@
20372
20118
  menuItems: () => editor.ui.registry.getAll().menuItems,
20373
20119
  translate: global$8.translate,
20374
20120
  isDisabled: () => editor.mode.isReadOnly() || !editor.ui.isEnabled(),
20375
- getOption: editor.options.get,
20376
- tooltips: TooltipsBackstage(lazySinks.dialog)
20121
+ getOption: editor.options.get
20377
20122
  };
20378
20123
  const urlinput = UrlInputBackstage(editor);
20379
20124
  const styles = init$7(editor);
@@ -20488,8 +20233,6 @@
20488
20233
  const onDismissPopups = event => {
20489
20234
  broadcastOn(dismissPopups(), { target: SugarElement.fromDom(event.relatedTarget.getContainer()) });
20490
20235
  };
20491
- const onFocusIn = event => editor.dispatch('focusin', event);
20492
- const onFocusOut = event => editor.dispatch('focusout', event);
20493
20236
  editor.on('PostRender', () => {
20494
20237
  editor.on('click', onContentClick);
20495
20238
  editor.on('tap', onContentClick);
@@ -20500,13 +20243,6 @@
20500
20243
  editor.on('ResizeEditor', onEditorResize);
20501
20244
  editor.on('AfterProgressState', onEditorProgress);
20502
20245
  editor.on('DismissPopups', onDismissPopups);
20503
- each$1([
20504
- mothership,
20505
- ...uiMotherships
20506
- ], gui => {
20507
- gui.element.dom.addEventListener('focusin', onFocusIn);
20508
- gui.element.dom.addEventListener('focusout', onFocusOut);
20509
- });
20510
20246
  });
20511
20247
  editor.on('remove', () => {
20512
20248
  editor.off('click', onContentClick);
@@ -20518,13 +20254,6 @@
20518
20254
  editor.off('ResizeEditor', onEditorResize);
20519
20255
  editor.off('AfterProgressState', onEditorProgress);
20520
20256
  editor.off('DismissPopups', onDismissPopups);
20521
- each$1([
20522
- mothership,
20523
- ...uiMotherships
20524
- ], gui => {
20525
- gui.element.dom.removeEventListener('focusin', onFocusIn);
20526
- gui.element.dom.removeEventListener('focusout', onFocusOut);
20527
- });
20528
20257
  onMousedown.unbind();
20529
20258
  onTouchstart.unbind();
20530
20259
  onTouchmove.unbind();
@@ -21988,7 +21717,7 @@
21988
21717
  setOverflow([]);
21989
21718
  setGroups$1(primary, groups);
21990
21719
  const availableWidth = get$c(primary.element);
21991
- const overflows = partition(availableWidth, detail.builtGroups.get(), comp => Math.ceil(comp.element.dom.getBoundingClientRect().width), overflowGroup);
21720
+ const overflows = partition(availableWidth, detail.builtGroups.get(), comp => get$c(comp.element), overflowGroup);
21992
21721
  if (overflows.extra.length === 0) {
21993
21722
  Replacing.remove(primary, overflowGroup);
21994
21723
  setOverflow([]);
@@ -22565,7 +22294,7 @@
22565
22294
  primary: false,
22566
22295
  buttonType: Optional.none(),
22567
22296
  borderless: false
22568
- }, Optional.none(), toolbarSpec.providers, [], 'overflow-button')
22297
+ }, Optional.none(), toolbarSpec.providers)
22569
22298
  },
22570
22299
  splitToolbarBehaviours: getToolbarBehaviours(toolbarSpec, modeName)
22571
22300
  };
@@ -22743,7 +22472,10 @@
22743
22472
  const buttonTypeClasses = calculateClassesFromButtonType((_b = spec.buttonType) !== null && _b !== void 0 ? _b : 'secondary');
22744
22473
  const optTranslatedText = isToggleButton ? spec.text.map(providers.translate) : Optional.some(providers.translate(spec.text));
22745
22474
  const optTranslatedTextComponed = optTranslatedText.map(text$2);
22746
- const ariaLabelAttributes = buttonSpec.tooltip.or(optTranslatedText).map(al => ({ 'aria-label': providers.translate(al) })).getOr({});
22475
+ const tooltipAttributes = buttonSpec.tooltip.or(optTranslatedText).map(tooltip => ({
22476
+ 'aria-label': providers.translate(tooltip),
22477
+ 'title': providers.translate(tooltip)
22478
+ })).getOr({});
22747
22479
  const optIconSpec = optMemIcon.map(memIcon => memIcon.asSpec());
22748
22480
  const components = componentRenderPipeline([
22749
22481
  optIconSpec,
@@ -22753,10 +22485,10 @@
22753
22485
  const dom = {
22754
22486
  tag: 'button',
22755
22487
  classes: buttonTypeClasses.concat(...spec.icon.isSome() && !hasIconAndText ? ['tox-button--icon'] : []).concat(...hasIconAndText ? ['tox-button--icon-and-text'] : []).concat(...spec.borderless ? ['tox-button--naked'] : []).concat(...spec.type === 'togglebutton' && spec.active ? ['tox-button--enabled'] : []),
22756
- attributes: ariaLabelAttributes
22488
+ attributes: tooltipAttributes
22757
22489
  };
22758
22490
  const extraBehaviours = [];
22759
- const iconButtonSpec = renderCommonSpec(buttonSpec, Optional.some(action), extraBehaviours, dom, components, spec.tooltip, providers);
22491
+ const iconButtonSpec = renderCommonSpec(buttonSpec, Optional.some(action), extraBehaviours, dom, components, providers);
22760
22492
  return Button.sketch(iconButtonSpec);
22761
22493
  };
22762
22494
 
@@ -22770,7 +22502,7 @@
22770
22502
  components: map$2(spec.buttons, button => renderViewButton(button, providers))
22771
22503
  };
22772
22504
  };
22773
- const deviceDetection = detect$1().deviceType;
22505
+ const deviceDetection = detect$2().deviceType;
22774
22506
  const isPhone = deviceDetection.isPhone();
22775
22507
  const isTablet = deviceDetection.isTablet();
22776
22508
  const renderViewHeader = spec => {
@@ -22987,17 +22719,6 @@
22987
22719
 
22988
22720
  const factory$6 = (detail, components, _spec) => {
22989
22721
  let toolbarDrawerOpenState = false;
22990
- const toggleStatusbar = editorContainer => {
22991
- sibling(editorContainer, '.tox-statusbar').each(statusBar => {
22992
- if (get$e(statusBar, 'display') === 'none' && get$f(statusBar, 'aria-hidden') === 'true') {
22993
- remove$6(statusBar, 'display');
22994
- remove$7(statusBar, 'aria-hidden');
22995
- } else {
22996
- set$8(statusBar, 'display', 'none');
22997
- set$9(statusBar, 'aria-hidden', 'true');
22998
- }
22999
- });
23000
- };
23001
22722
  const apis = {
23002
22723
  getSocket: comp => {
23003
22724
  return parts$a.getPart(comp, detail, 'socket');
@@ -23083,7 +22804,6 @@
23083
22804
  }
23084
22805
  parts$a.getPart(comp, detail, 'editorContainer').each(editorContainer => {
23085
22806
  const element = editorContainer.element;
23086
- toggleStatusbar(element);
23087
22807
  set$8(element, 'display', 'none');
23088
22808
  set$9(element, 'aria-hidden', 'true');
23089
22809
  });
@@ -23094,7 +22814,6 @@
23094
22814
  }
23095
22815
  parts$a.getPart(comp, detail, 'editorContainer').each(editorContainer => {
23096
22816
  const element = editorContainer.element;
23097
- toggleStatusbar(element);
23098
22817
  remove$6(element, 'display');
23099
22818
  remove$7(element, 'aria-hidden');
23100
22819
  });
@@ -23313,7 +23032,7 @@
23313
23032
  const defaultMenus = {
23314
23033
  file: {
23315
23034
  title: 'File',
23316
- items: 'newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations'
23035
+ items: 'newdocument restoredraft | preview | export print | deleteallconversations'
23317
23036
  },
23318
23037
  edit: {
23319
23038
  title: 'Edit',
@@ -23321,11 +23040,11 @@
23321
23040
  },
23322
23041
  view: {
23323
23042
  title: 'View',
23324
- items: 'code revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments'
23043
+ items: 'code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments'
23325
23044
  },
23326
23045
  insert: {
23327
23046
  title: 'Insert',
23328
- items: 'image link media addcomment pageembed inserttemplate codesample inserttable accordion | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime'
23047
+ items: 'image link media addcomment pageembed template inserttemplate codesample inserttable accordion | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime'
23329
23048
  },
23330
23049
  format: {
23331
23050
  title: 'Format',
@@ -23476,7 +23195,7 @@
23476
23195
  const iframe = curry(loadSkin, false);
23477
23196
  const inline = curry(loadSkin, true);
23478
23197
 
23479
- const makeTooltipText = (editor, labelWithPlaceholder, value) => isEmpty(value) ? editor.translate(labelWithPlaceholder) : editor.translate([
23198
+ const makeTooltipText = (editor, labelWithPlaceholder, value) => editor.translate([
23480
23199
  labelWithPlaceholder,
23481
23200
  editor.translate(value)
23482
23201
  ]);
@@ -23540,7 +23259,7 @@
23540
23259
  getFetch
23541
23260
  };
23542
23261
  };
23543
- const createMenuItems = (backstage, spec) => {
23262
+ const createMenuItems = (editor, backstage, spec) => {
23544
23263
  const dataset = spec.dataset;
23545
23264
  const getStyleItems = dataset.type === 'basic' ? () => map$2(dataset.data, d => processBasic(d, spec.isSelectedFor, spec.getPreviewFor)) : dataset.getData;
23546
23265
  return {
@@ -23548,19 +23267,20 @@
23548
23267
  getStyleItems
23549
23268
  };
23550
23269
  };
23551
- const createSelectButton = (editor, backstage, spec, getTooltip, textUpdateEventName, btnName) => {
23552
- const {items, getStyleItems} = createMenuItems(backstage, spec);
23553
- const tooltipString = Cell(spec.tooltip);
23270
+ const createSelectButton = (editor, backstage, spec, tooltipWithPlaceholder, textUpdateEventName) => {
23271
+ const {items, getStyleItems} = createMenuItems(editor, backstage, spec);
23554
23272
  const getApi = comp => ({
23555
23273
  getComponent: constant$1(comp),
23556
23274
  setTooltip: tooltip => {
23557
23275
  const translatedTooltip = backstage.shared.providers.translate(tooltip);
23558
- set$9(comp.element, 'aria-label', translatedTooltip);
23559
- tooltipString.set(tooltip);
23276
+ setAll$1(comp.element, {
23277
+ 'aria-label': translatedTooltip,
23278
+ 'title': translatedTooltip
23279
+ });
23560
23280
  }
23561
23281
  });
23562
23282
  const onSetup = api => {
23563
- const handler = e => api.setTooltip(makeTooltipText(editor, getTooltip(e.value), e.value));
23283
+ const handler = e => api.setTooltip(makeTooltipText(editor, tooltipWithPlaceholder, e.value));
23564
23284
  editor.on(textUpdateEventName, handler);
23565
23285
  return composeUnbinders(onSetupEvent(editor, 'NodeChange', api => {
23566
23286
  const comp = api.getComponent();
@@ -23571,8 +23291,7 @@
23571
23291
  return renderCommonDropdown({
23572
23292
  text: spec.icon.isSome() ? Optional.none() : spec.text,
23573
23293
  icon: spec.icon,
23574
- ariaLabel: Optional.some(spec.tooltip),
23575
- tooltip: Optional.none(),
23294
+ tooltip: Optional.from(spec.tooltip),
23576
23295
  role: Optional.none(),
23577
23296
  fetch: items.getFetch(backstage, getStyleItems),
23578
23297
  onSetup,
@@ -23580,18 +23299,8 @@
23580
23299
  columns: 1,
23581
23300
  presets: 'normal',
23582
23301
  classes: spec.icon.isSome() ? [] : ['bespoke'],
23583
- dropdownBehaviours: [Tooltipping.config({
23584
- ...backstage.shared.providers.tooltips.getConfig({
23585
- tooltipText: backstage.shared.providers.translate(spec.tooltip),
23586
- onShow: comp => {
23587
- if (spec.tooltip !== tooltipString.get()) {
23588
- const translatedTooltip = backstage.shared.providers.translate(tooltipString.get());
23589
- Tooltipping.setComponents(comp, backstage.shared.providers.tooltips.getComponents({ tooltipText: translatedTooltip }));
23590
- }
23591
- }
23592
- })
23593
- })]
23594
- }, 'tox-tbtn', backstage.shared, btnName);
23302
+ dropdownBehaviours: []
23303
+ }, 'tox-tbtn', backstage.shared);
23595
23304
  };
23596
23305
 
23597
23306
  const process = rawFormats => map$2(rawFormats, item => {
@@ -23632,7 +23341,7 @@
23632
23341
  };
23633
23342
 
23634
23343
  const menuTitle$4 = 'Align';
23635
- const getTooltipPlaceholder$4 = constant$1('Alignment {0}');
23344
+ const btnTooltip$4 = 'Alignment {0}';
23636
23345
  const fallbackAlignment = 'left';
23637
23346
  const alignMenuItems = [
23638
23347
  {
@@ -23673,7 +23382,7 @@
23673
23382
  const dataset = buildBasicStaticDataset(alignMenuItems);
23674
23383
  const onAction = rawItem => () => find$5(alignMenuItems, item => item.format === rawItem.format).each(item => editor.execCommand(item.command));
23675
23384
  return {
23676
- tooltip: makeTooltipText(editor, getTooltipPlaceholder$4(), fallbackAlignment),
23385
+ tooltip: makeTooltipText(editor, btnTooltip$4, fallbackAlignment),
23677
23386
  text: Optional.none(),
23678
23387
  icon: Optional.some('align-left'),
23679
23388
  isSelectedFor,
@@ -23686,9 +23395,9 @@
23686
23395
  isInvalid: item => !editor.formatter.canApply(item.format)
23687
23396
  };
23688
23397
  };
23689
- const createAlignButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$4(editor), getTooltipPlaceholder$4, 'AlignTextUpdate', 'align');
23398
+ const createAlignButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$4(editor), btnTooltip$4, 'AlignTextUpdate');
23690
23399
  const createAlignMenu = (editor, backstage) => {
23691
- const menuItems = createMenuItems(backstage, getSpec$4(editor));
23400
+ const menuItems = createMenuItems(editor, backstage, getSpec$4(editor));
23692
23401
  editor.ui.registry.addNestedMenuItem('align', {
23693
23402
  text: backstage.shared.providers.translate(menuTitle$4),
23694
23403
  onSetup: onSetupEditableToggle(editor),
@@ -23699,11 +23408,14 @@
23699
23408
  const findNearest = (editor, getStyles) => {
23700
23409
  const styles = getStyles();
23701
23410
  const formats = map$2(styles, style => style.format);
23702
- return Optional.from(editor.formatter.closest(formats)).bind(fmt => find$5(styles, data => data.format === fmt));
23411
+ return Optional.from(editor.formatter.closest(formats)).bind(fmt => find$5(styles, data => data.format === fmt)).orThunk(() => someIf(editor.formatter.match('p'), {
23412
+ title: 'Paragraph',
23413
+ format: 'p'
23414
+ }));
23703
23415
  };
23704
23416
 
23705
23417
  const menuTitle$3 = 'Blocks';
23706
- const getTooltipPlaceholder$3 = constant$1('Block {0}');
23418
+ const btnTooltip$3 = 'Block {0}';
23707
23419
  const fallbackFormat = 'Paragraph';
23708
23420
  const getSpec$3 = editor => {
23709
23421
  const isSelectedFor = format => () => editor.formatter.match(format);
@@ -23726,7 +23438,7 @@
23726
23438
  };
23727
23439
  const dataset = buildBasicSettingsDataset(editor, 'block_formats', Delimiter.SemiColon);
23728
23440
  return {
23729
- tooltip: makeTooltipText(editor, getTooltipPlaceholder$3(), fallbackFormat),
23441
+ tooltip: makeTooltipText(editor, btnTooltip$3, fallbackFormat),
23730
23442
  text: Optional.some(fallbackFormat),
23731
23443
  icon: Optional.none(),
23732
23444
  isSelectedFor,
@@ -23739,9 +23451,9 @@
23739
23451
  isInvalid: item => !editor.formatter.canApply(item.format)
23740
23452
  };
23741
23453
  };
23742
- const createBlocksButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$3(editor), getTooltipPlaceholder$3, 'BlocksTextUpdate', 'blocks');
23454
+ const createBlocksButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$3(editor), btnTooltip$3, 'BlocksTextUpdate');
23743
23455
  const createBlocksMenu = (editor, backstage) => {
23744
- const menuItems = createMenuItems(backstage, getSpec$3(editor));
23456
+ const menuItems = createMenuItems(editor, backstage, getSpec$3(editor));
23745
23457
  editor.ui.registry.addNestedMenuItem('blocks', {
23746
23458
  text: menuTitle$3,
23747
23459
  onSetup: onSetupEditableToggle(editor),
@@ -23750,7 +23462,7 @@
23750
23462
  };
23751
23463
 
23752
23464
  const menuTitle$2 = 'Fonts';
23753
- const getTooltipPlaceholder$2 = constant$1('Font {0}');
23465
+ const btnTooltip$2 = 'Font {0}';
23754
23466
  const systemFont = 'System Font';
23755
23467
  const systemStackFonts = [
23756
23468
  '-apple-system',
@@ -23816,7 +23528,7 @@
23816
23528
  };
23817
23529
  const dataset = buildBasicSettingsDataset(editor, 'font_family_formats', Delimiter.SemiColon);
23818
23530
  return {
23819
- tooltip: makeTooltipText(editor, getTooltipPlaceholder$2(), systemFont),
23531
+ tooltip: makeTooltipText(editor, btnTooltip$2, systemFont),
23820
23532
  text: Optional.some(systemFont),
23821
23533
  icon: Optional.none(),
23822
23534
  isSelectedFor,
@@ -23829,9 +23541,9 @@
23829
23541
  isInvalid: never
23830
23542
  };
23831
23543
  };
23832
- const createFontFamilyButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$2(editor), getTooltipPlaceholder$2, 'FontFamilyTextUpdate', 'fontfamily');
23544
+ const createFontFamilyButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$2(editor), btnTooltip$2, 'FontFamilyTextUpdate');
23833
23545
  const createFontFamilyMenu = (editor, backstage) => {
23834
- const menuItems = createMenuItems(backstage, getSpec$2(editor));
23546
+ const menuItems = createMenuItems(editor, backstage, getSpec$2(editor));
23835
23547
  editor.ui.registry.addNestedMenuItem('fontfamily', {
23836
23548
  text: backstage.shared.providers.translate(menuTitle$2),
23837
23549
  onSetup: onSetupEditableToggle(editor),
@@ -23920,7 +23632,7 @@
23920
23632
  pageDown: constant$1(34)
23921
23633
  };
23922
23634
 
23923
- const createBespokeNumberInput = (editor, backstage, spec, btnName) => {
23635
+ const createBespokeNumberInput = (editor, backstage, spec) => {
23924
23636
  let currentComp = Optional.none();
23925
23637
  const getValueFromCurrentComp = comp => comp.map(alloyComp => Representing.getValue(alloyComp)).getOr('');
23926
23638
  const onSetup = onSetupEvent(editor, 'NodeChange SwitchMode', api => {
@@ -23977,15 +23689,14 @@
23977
23689
  dom: {
23978
23690
  tag: 'button',
23979
23691
  attributes: {
23980
- 'aria-label': translatedTooltip,
23981
- 'data-mce-name': title
23692
+ 'title': translatedTooltip,
23693
+ 'aria-label': translatedTooltip
23982
23694
  },
23983
23695
  classes: classes.concat(title)
23984
23696
  },
23985
23697
  components: [renderIconFromPack$1(title, backstage.shared.providers.icons)],
23986
23698
  buttonBehaviours: derive$1([
23987
23699
  Disabling.config({}),
23988
- Tooltipping.config(backstage.shared.providers.tooltips.getConfig({ tooltipText: translatedTooltip })),
23989
23700
  config(altExecuting, [
23990
23701
  onControlAttached({
23991
23702
  onSetup,
@@ -24015,15 +23726,6 @@
24015
23726
  [touchend()]: [
24016
23727
  altExecuting,
24017
23728
  'alloy.base.behaviour'
24018
- ],
24019
- [attachedToDom()]: [
24020
- 'alloy.base.behaviour',
24021
- altExecuting,
24022
- 'tooltipping'
24023
- ],
24024
- [detachedFromDom()]: [
24025
- altExecuting,
24026
- 'tooltipping'
24027
23729
  ]
24028
23730
  }
24029
23731
  });
@@ -24106,8 +23808,7 @@
24106
23808
  return {
24107
23809
  dom: {
24108
23810
  tag: 'div',
24109
- classes: ['tox-number-input'],
24110
- attributes: { ...isNonNullable(btnName) ? { 'data-mce-name': btnName } : {} }
23811
+ classes: ['tox-number-input']
24111
23812
  },
24112
23813
  components: [
24113
23814
  memMinus.asSpec(),
@@ -24135,7 +23836,7 @@
24135
23836
  };
24136
23837
 
24137
23838
  const menuTitle$1 = 'Font sizes';
24138
- const getTooltipPlaceholder$1 = constant$1('Font size {0}');
23839
+ const btnTooltip$1 = 'Font size {0}';
24139
23840
  const fallbackFontSize = '12pt';
24140
23841
  const legacyFontSizes = {
24141
23842
  '8pt': '1',
@@ -24204,7 +23905,7 @@
24204
23905
  };
24205
23906
  const dataset = buildBasicSettingsDataset(editor, 'font_size_formats', Delimiter.Space);
24206
23907
  return {
24207
- tooltip: makeTooltipText(editor, getTooltipPlaceholder$1(), fallbackFontSize),
23908
+ tooltip: makeTooltipText(editor, btnTooltip$1, fallbackFontSize),
24208
23909
  text: Optional.some(fallbackFontSize),
24209
23910
  icon: Optional.none(),
24210
23911
  isSelectedFor,
@@ -24217,7 +23918,7 @@
24217
23918
  isInvalid: never
24218
23919
  };
24219
23920
  };
24220
- const createFontSizeButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$1(editor), getTooltipPlaceholder$1, 'FontSizeTextUpdate', 'fontsize');
23921
+ const createFontSizeButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$1(editor), btnTooltip$1, 'FontSizeTextUpdate');
24221
23922
  const getConfigFromUnit = unit => {
24222
23923
  var _a;
24223
23924
  const baseConfig = { step: 1 };
@@ -24264,9 +23965,9 @@
24264
23965
  }
24265
23966
  };
24266
23967
  };
24267
- const createFontSizeInputButton = (editor, backstage) => createBespokeNumberInput(editor, backstage, getNumberInputSpec(editor), 'fontsizeinput');
23968
+ const createFontSizeInputButton = (editor, backstage) => createBespokeNumberInput(editor, backstage, getNumberInputSpec(editor));
24268
23969
  const createFontSizeMenu = (editor, backstage) => {
24269
- const menuItems = createMenuItems(backstage, getSpec$1(editor));
23970
+ const menuItems = createMenuItems(editor, backstage, getSpec$1(editor));
24270
23971
  editor.ui.registry.addNestedMenuItem('fontsize', {
24271
23972
  text: menuTitle$1,
24272
23973
  onSetup: onSetupEditableToggle(editor),
@@ -24275,9 +23976,9 @@
24275
23976
  };
24276
23977
 
24277
23978
  const menuTitle = 'Formats';
24278
- const getTooltipPlaceholder = value => isEmpty(value) ? 'Formats' : 'Format {0}';
23979
+ const btnTooltip = 'Format {0}';
24279
23980
  const getSpec = (editor, dataset) => {
24280
- const fallbackFormat = 'Formats';
23981
+ const fallbackFormat = 'Paragraph';
24281
23982
  const isSelectedFor = format => () => editor.formatter.match(format);
24282
23983
  const getPreviewFor = format => () => {
24283
23984
  const fmt = editor.formatter.get(format);
@@ -24301,18 +24002,12 @@
24301
24002
  };
24302
24003
  const flattenedItems = bind$3(getStyleFormats(editor), getFormatItems);
24303
24004
  const detectedFormat = findNearest(editor, constant$1(flattenedItems));
24304
- const text = detectedFormat.fold(constant$1({
24305
- title: fallbackFormat,
24306
- tooltipLabel: ''
24307
- }), fmt => ({
24308
- title: fmt.title,
24309
- tooltipLabel: fmt.title
24310
- }));
24311
- emitWith(comp, updateMenuText, { text: text.title });
24312
- fireStylesTextUpdate(editor, { value: text.tooltipLabel });
24005
+ const text = detectedFormat.fold(constant$1(fallbackFormat), fmt => fmt.title);
24006
+ emitWith(comp, updateMenuText, { text });
24007
+ fireStylesTextUpdate(editor, { value: text });
24313
24008
  };
24314
24009
  return {
24315
- tooltip: makeTooltipText(editor, getTooltipPlaceholder(''), ''),
24010
+ tooltip: makeTooltipText(editor, btnTooltip, fallbackFormat),
24316
24011
  text: Optional.some(fallbackFormat),
24317
24012
  icon: Optional.none(),
24318
24013
  isSelectedFor,
@@ -24330,14 +24025,14 @@
24330
24025
  type: 'advanced',
24331
24026
  ...backstage.styles
24332
24027
  };
24333
- return createSelectButton(editor, backstage, getSpec(editor, dataset), getTooltipPlaceholder, 'StylesTextUpdate', 'styles');
24028
+ return createSelectButton(editor, backstage, getSpec(editor, dataset), btnTooltip, 'StylesTextUpdate');
24334
24029
  };
24335
24030
  const createStylesMenu = (editor, backstage) => {
24336
24031
  const dataset = {
24337
24032
  type: 'advanced',
24338
24033
  ...backstage.styles
24339
24034
  };
24340
- const menuItems = createMenuItems(backstage, getSpec(editor, dataset));
24035
+ const menuItems = createMenuItems(editor, backstage, getSpec(editor, dataset));
24341
24036
  editor.ui.registry.addNestedMenuItem('styles', {
24342
24037
  text: menuTitle,
24343
24038
  onSetup: onSetupEditableToggle(editor),
@@ -24561,19 +24256,19 @@
24561
24256
  setText: text => emitWith(component, updateMenuText, { text }),
24562
24257
  setIcon: icon => emitWith(component, updateMenuIcon, { icon })
24563
24258
  });
24564
- const getTooltipAttributes = (tooltip, providersBackstage) => tooltip.map(tooltip => ({ 'aria-label': providersBackstage.translate(tooltip) })).getOr({});
24259
+ const getTooltipAttributes = (tooltip, providersBackstage) => tooltip.map(tooltip => ({
24260
+ 'aria-label': providersBackstage.translate(tooltip),
24261
+ 'title': providersBackstage.translate(tooltip)
24262
+ })).getOr({});
24565
24263
  const focusButtonEvent = generate$6('focus-button');
24566
- const renderCommonStructure = (optIcon, optText, tooltip, behaviours, providersBackstage, btnName) => {
24264
+ const renderCommonStructure = (optIcon, optText, tooltip, behaviours, providersBackstage) => {
24567
24265
  const optMemDisplayText = optText.map(text => record(renderLabel$1(text, 'tox-tbtn', providersBackstage)));
24568
24266
  const optMemDisplayIcon = optIcon.map(icon => record(renderReplaceableIconFromPack(icon, providersBackstage.icons)));
24569
24267
  return {
24570
24268
  dom: {
24571
24269
  tag: 'button',
24572
24270
  classes: ['tox-tbtn'].concat(optText.isSome() ? ['tox-tbtn--select'] : []),
24573
- attributes: {
24574
- ...getTooltipAttributes(tooltip, providersBackstage),
24575
- ...isNonNullable(btnName) ? { 'data-mce-name': btnName } : {}
24576
- }
24271
+ attributes: getTooltipAttributes(tooltip, providersBackstage)
24577
24272
  },
24578
24273
  components: componentRenderPipeline([
24579
24274
  optMemDisplayIcon.map(mem => mem.asSpec()),
@@ -24613,7 +24308,7 @@
24613
24308
  ].concat(behaviours.getOr([])))
24614
24309
  };
24615
24310
  };
24616
- const renderFloatingToolbarButton = (spec, backstage, identifyButtons, attributes, btnName) => {
24311
+ const renderFloatingToolbarButton = (spec, backstage, identifyButtons, attributes) => {
24617
24312
  const sharedBackstage = backstage.shared;
24618
24313
  const editorOffCell = Cell(noop);
24619
24314
  const specialisation = {
@@ -24632,7 +24327,7 @@
24632
24327
  }),
24633
24328
  markers: { toggledClass: 'tox-tbtn--enabled' },
24634
24329
  parts: {
24635
- button: renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.some(behaviours), sharedBackstage.providers, btnName),
24330
+ button: renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.some(behaviours), sharedBackstage.providers),
24636
24331
  toolbar: {
24637
24332
  dom: {
24638
24333
  tag: 'div',
@@ -24643,10 +24338,10 @@
24643
24338
  }
24644
24339
  });
24645
24340
  };
24646
- const renderCommonToolbarButton = (spec, specialisation, providersBackstage, btnName) => {
24341
+ const renderCommonToolbarButton = (spec, specialisation, providersBackstage) => {
24647
24342
  var _d;
24648
24343
  const editorOffCell = Cell(noop);
24649
- const structure = renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.none(), providersBackstage, btnName);
24344
+ const structure = renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.none(), providersBackstage);
24650
24345
  return Button.sketch({
24651
24346
  dom: structure.dom,
24652
24347
  components: structure.components,
@@ -24661,7 +24356,6 @@
24661
24356
  onControlAttached(specialisation, editorOffCell),
24662
24357
  onControlDetached(specialisation, editorOffCell)
24663
24358
  ]),
24664
- ...spec.tooltip.map(t => Tooltipping.config(providersBackstage.tooltips.getConfig({ tooltipText: providersBackstage.translate(t) + spec.shortcut.map(shortcut => ` (${ convertText(shortcut) })`).getOr('') }))).toArray(),
24665
24359
  DisablingConfigs.toolbarButton(() => !spec.enabled || providersBackstage.isDisabled()),
24666
24360
  receivingConfig()
24667
24361
  ].concat(specialisation.toolbarButtonBehaviours)),
@@ -24669,14 +24363,14 @@
24669
24363
  }
24670
24364
  });
24671
24365
  };
24672
- const renderToolbarButton = (spec, providersBackstage, btnName) => renderToolbarButtonWith(spec, providersBackstage, [], btnName);
24673
- const renderToolbarButtonWith = (spec, providersBackstage, bonusEvents, btnName) => renderCommonToolbarButton(spec, {
24366
+ const renderToolbarButton = (spec, providersBackstage) => renderToolbarButtonWith(spec, providersBackstage, []);
24367
+ const renderToolbarButtonWith = (spec, providersBackstage, bonusEvents) => renderCommonToolbarButton(spec, {
24674
24368
  toolbarButtonBehaviours: bonusEvents.length > 0 ? [config('toolbarButtonWith', bonusEvents)] : [],
24675
24369
  getApi: getButtonApi,
24676
24370
  onSetup: spec.onSetup
24677
- }, providersBackstage, btnName);
24678
- const renderToolbarToggleButton = (spec, providersBackstage, btnName) => renderToolbarToggleButtonWith(spec, providersBackstage, [], btnName);
24679
- const renderToolbarToggleButtonWith = (spec, providersBackstage, bonusEvents, btnName) => renderCommonToolbarButton(spec, {
24371
+ }, providersBackstage);
24372
+ const renderToolbarToggleButton = (spec, providersBackstage) => renderToolbarToggleButtonWith(spec, providersBackstage, []);
24373
+ const renderToolbarToggleButtonWith = (spec, providersBackstage, bonusEvents) => renderCommonToolbarButton(spec, {
24680
24374
  toolbarButtonBehaviours: [
24681
24375
  Replacing.config({}),
24682
24376
  Toggling.config({
@@ -24687,7 +24381,7 @@
24687
24381
  ].concat(bonusEvents.length > 0 ? [config('toolbarToggleButtonWith', bonusEvents)] : []),
24688
24382
  getApi: getToggleApi,
24689
24383
  onSetup: spec.onSetup
24690
- }, providersBackstage, btnName);
24384
+ }, providersBackstage);
24691
24385
  const fetchChoices = (getApi, spec, providersBackstage) => comp => Future.nu(callback => spec.fetch(callback)).map(items => Optional.from(createTieredDataFrom(deepMerge(createPartialChoiceMenu(generate$6('menu-value'), items, value => {
24692
24386
  spec.onItemAction(getApi(comp), value);
24693
24387
  }, spec.columns, spec.presets, ItemResponse$1.CLOSE_ON_EXECUTE, spec.select.getOr(never), providersBackstage), {
@@ -24698,8 +24392,7 @@
24698
24392
  });
24699
24393
  })])
24700
24394
  }))));
24701
- const renderSplitButton = (spec, sharedBackstage, btnName) => {
24702
- const tooltipString = Cell(spec.tooltip.getOr(''));
24395
+ const renderSplitButton = (spec, sharedBackstage) => {
24703
24396
  const getApi = comp => ({
24704
24397
  isEnabled: () => !Disabling.isDisabled(comp),
24705
24398
  setEnabled: state => Disabling.set(comp, !state),
@@ -24719,8 +24412,10 @@
24719
24412
  setIcon: icon => descendant(comp.element, 'span').each(button => comp.getSystem().getByDom(button).each(buttonComp => emitWith(buttonComp, updateMenuIcon, { icon }))),
24720
24413
  setTooltip: tooltip => {
24721
24414
  const translatedTooltip = sharedBackstage.providers.translate(tooltip);
24722
- set$9(comp.element, 'aria-label', translatedTooltip);
24723
- tooltipString.set(tooltip);
24415
+ setAll$1(comp.element, {
24416
+ 'aria-label': translatedTooltip,
24417
+ 'title': translatedTooltip
24418
+ });
24724
24419
  }
24725
24420
  });
24726
24421
  const editorOffCell = Cell(noop);
@@ -24734,8 +24429,7 @@
24734
24429
  classes: ['tox-split-button'],
24735
24430
  attributes: {
24736
24431
  'aria-pressed': false,
24737
- ...getTooltipAttributes(spec.tooltip, sharedBackstage.providers),
24738
- ...isNonNullable(btnName) ? { 'data-mce-name': btnName } : {}
24432
+ ...getTooltipAttributes(spec.tooltip, sharedBackstage.providers)
24739
24433
  }
24740
24434
  },
24741
24435
  onExecute: button => {
@@ -24755,30 +24449,12 @@
24755
24449
  onControlAttached(specialisation, editorOffCell),
24756
24450
  onControlDetached(specialisation, editorOffCell)
24757
24451
  ]),
24758
- Unselecting.config({}),
24759
- ...spec.tooltip.map(tooltip => {
24760
- return Tooltipping.config({
24761
- ...sharedBackstage.providers.tooltips.getConfig({
24762
- tooltipText: sharedBackstage.providers.translate(tooltip),
24763
- onShow: comp => {
24764
- if (tooltipString.get() !== tooltip) {
24765
- const translatedTooltip = sharedBackstage.providers.translate(tooltipString.get());
24766
- Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: translatedTooltip }));
24767
- }
24768
- }
24769
- })
24770
- });
24771
- }).toArray()
24452
+ Unselecting.config({})
24772
24453
  ]),
24773
24454
  eventOrder: {
24774
24455
  [attachedToDom()]: [
24775
24456
  'alloy.base.behaviour',
24776
- 'split-dropdown-events',
24777
- 'tooltipping'
24778
- ],
24779
- [detachedFromDom()]: [
24780
- 'split-dropdown-events',
24781
- 'tooltipping'
24457
+ 'split-dropdown-events'
24782
24458
  ]
24783
24459
  },
24784
24460
  toggleClass: 'tox-tbtn--enabled',
@@ -24861,16 +24537,16 @@
24861
24537
  items: ['addcomment']
24862
24538
  }
24863
24539
  ];
24864
- const renderFromBridge = (bridgeBuilder, render) => (spec, backstage, editor, btnName) => {
24540
+ const renderFromBridge = (bridgeBuilder, render) => (spec, backstage, editor) => {
24865
24541
  const internal = bridgeBuilder(spec).mapError(errInfo => formatError(errInfo)).getOrDie();
24866
- return render(internal, backstage, editor, btnName);
24542
+ return render(internal, backstage, editor);
24867
24543
  };
24868
24544
  const types = {
24869
- button: renderFromBridge(createToolbarButton, (s, backstage, _, btnName) => renderToolbarButton(s, backstage.shared.providers, btnName)),
24870
- togglebutton: renderFromBridge(createToggleButton, (s, backstage, _, btnName) => renderToolbarToggleButton(s, backstage.shared.providers, btnName)),
24871
- menubutton: renderFromBridge(createMenuButton, (s, backstage, _, btnName) => renderMenuButton(s, 'tox-tbtn', backstage, Optional.none(), false, btnName)),
24872
- splitbutton: renderFromBridge(createSplitButton, (s, backstage, _, btnName) => renderSplitButton(s, backstage.shared, btnName)),
24873
- grouptoolbarbutton: renderFromBridge(createGroupToolbarButton, (s, backstage, editor, btnName) => {
24545
+ button: renderFromBridge(createToolbarButton, (s, backstage) => renderToolbarButton(s, backstage.shared.providers)),
24546
+ togglebutton: renderFromBridge(createToggleButton, (s, backstage) => renderToolbarToggleButton(s, backstage.shared.providers)),
24547
+ menubutton: renderFromBridge(createMenuButton, (s, backstage) => renderMenuButton(s, 'tox-tbtn', backstage, Optional.none(), false)),
24548
+ splitbutton: renderFromBridge(createSplitButton, (s, backstage) => renderSplitButton(s, backstage.shared)),
24549
+ grouptoolbarbutton: renderFromBridge(createGroupToolbarButton, (s, backstage, editor) => {
24874
24550
  const buttons = editor.ui.registry.getAll().buttons;
24875
24551
  const identify = toolbar => identifyButtons(editor, {
24876
24552
  buttons,
@@ -24880,16 +24556,16 @@
24880
24556
  const attributes = { [Attribute]: backstage.shared.header.isPositionedAtTop() ? AttributeValue.TopToBottom : AttributeValue.BottomToTop };
24881
24557
  switch (getToolbarMode(editor)) {
24882
24558
  case ToolbarMode$1.floating:
24883
- return renderFloatingToolbarButton(s, backstage, identify, attributes, btnName);
24559
+ return renderFloatingToolbarButton(s, backstage, identify, attributes);
24884
24560
  default:
24885
24561
  throw new Error('Toolbar groups are only supported when using floating toolbar mode');
24886
24562
  }
24887
24563
  })
24888
24564
  };
24889
- const extractFrom = (spec, backstage, editor, btnName) => get$g(types, spec.type).fold(() => {
24565
+ const extractFrom = (spec, backstage, editor) => get$g(types, spec.type).fold(() => {
24890
24566
  console.error('skipping button defined by', spec);
24891
24567
  return Optional.none();
24892
- }, render => Optional.some(render(spec, backstage, editor, btnName)));
24568
+ }, render => Optional.some(render(spec, backstage, editor)));
24893
24569
  const bespokeButtons = {
24894
24570
  styles: createStylesButton,
24895
24571
  fontsize: createFontSizeButton,
@@ -24934,7 +24610,7 @@
24934
24610
  console.warn(`Ignoring the '${ toolbarItem }' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`);
24935
24611
  return Optional.none();
24936
24612
  } else {
24937
- return extractFrom(spec, backstage, editor, toolbarItem.toLowerCase());
24613
+ return extractFrom(spec, backstage, editor);
24938
24614
  }
24939
24615
  });
24940
24616
  const identifyButtons = (editor, toolbarConfig, backstage, prefixes) => {
@@ -24970,7 +24646,7 @@
24970
24646
  }
24971
24647
  };
24972
24648
 
24973
- const detection = detect$1();
24649
+ const detection = detect$2();
24974
24650
  const isiOS12 = detection.os.isiOS() && detection.os.version.major <= 12;
24975
24651
  const setupEvents$1 = (editor, uiRefs) => {
24976
24652
  const {uiMotherships} = uiRefs;
@@ -25156,7 +24832,6 @@
25156
24832
  const editorMaxWidthOpt = getMaxWidthOption(editor).or(getWidth(editor));
25157
24833
  const headerBackstage = backstage.shared.header;
25158
24834
  const isPositionedAtTop = headerBackstage.isPositionedAtTop;
25159
- const minimumToolbarWidth = 150;
25160
24835
  const toolbarMode = getToolbarMode(editor);
25161
24836
  const isSplitToolbar = toolbarMode === ToolbarMode.sliding || toolbarMode === ToolbarMode.floating;
25162
24837
  const visible = Cell(false);
@@ -25202,45 +24877,45 @@
25202
24877
  const updateChromeWidth = () => {
25203
24878
  floatContainer.on(container => {
25204
24879
  const maxWidth = editorMaxWidthOpt.getOrThunk(() => {
25205
- return getBounds$3().width - viewport$1(targetElm).left - 10;
24880
+ const bodyMargin = parseToInt(get$e(body(), 'margin-left')).getOr(0);
24881
+ return get$c(body()) - absolute$3(targetElm).left + bodyMargin;
25206
24882
  });
25207
24883
  set$8(container.element, 'max-width', maxWidth + 'px');
25208
24884
  });
25209
24885
  };
25210
- const updateChromePosition = (isOuterContainerWidthRestored, prevScroll) => {
24886
+ const updateChromePosition = optToolbarWidth => {
25211
24887
  floatContainer.on(container => {
25212
24888
  const toolbar = OuterContainer.getToolbar(mainUi.outerContainer);
25213
24889
  const offset = calcToolbarOffset(toolbar);
25214
24890
  const targetBounds = box$1(targetElm);
25215
- const offsetParent = getOffsetParent$1(editor, mainUi.outerContainer.element);
25216
- const getLeft = () => offsetParent.fold(() => targetBounds.x, offsetParent => {
25217
- const offsetBox = box$1(offsetParent);
25218
- const isOffsetParentBody = eq(offsetParent, body());
25219
- return isOffsetParentBody ? targetBounds.x : targetBounds.x - offsetBox.x;
25220
- });
25221
- const getTop = () => offsetParent.fold(() => isPositionedAtTop() ? Math.max(targetBounds.y - get$d(container.element) + offset, 0) : targetBounds.bottom, offsetParent => {
24891
+ const {top, left} = getOffsetParent$1(editor, mainUi.outerContainer.element).fold(() => {
24892
+ return {
24893
+ top: isPositionedAtTop() ? Math.max(targetBounds.y - get$d(container.element) + offset, 0) : targetBounds.bottom,
24894
+ left: targetBounds.x
24895
+ };
24896
+ }, offsetParent => {
25222
24897
  var _a;
25223
24898
  const offsetBox = box$1(offsetParent);
25224
24899
  const scrollDelta = (_a = offsetParent.dom.scrollTop) !== null && _a !== void 0 ? _a : 0;
25225
24900
  const isOffsetParentBody = eq(offsetParent, body());
25226
24901
  const topValue = isOffsetParentBody ? Math.max(targetBounds.y - get$d(container.element) + offset, 0) : targetBounds.y - offsetBox.y + scrollDelta - get$d(container.element) + offset;
25227
- return isPositionedAtTop() ? topValue : targetBounds.bottom;
24902
+ return {
24903
+ top: isPositionedAtTop() ? topValue : targetBounds.bottom,
24904
+ left: isOffsetParentBody ? targetBounds.x : targetBounds.x - offsetBox.x
24905
+ };
25228
24906
  });
25229
- const left = getLeft();
25230
- const widthProperties = someIf(isOuterContainerWidthRestored, Math.ceil(mainUi.outerContainer.element.dom.getBoundingClientRect().width)).filter(w => w > minimumToolbarWidth).map(toolbarWidth => {
25231
- const scroll = prevScroll.getOr(get$b());
25232
- const availableWidth = window.innerWidth - (left - scroll.left);
25233
- const width = Math.max(Math.min(toolbarWidth, availableWidth), minimumToolbarWidth);
25234
- if (availableWidth < toolbarWidth) {
25235
- set$8(mainUi.outerContainer.element, 'width', width + 'px');
25236
- }
25237
- return { width: width + 'px' };
25238
- }).getOr({ width: 'max-content' });
25239
24907
  const baseProperties = {
25240
24908
  position: 'absolute',
25241
24909
  left: Math.round(left) + 'px',
25242
- top: getTop() + 'px'
24910
+ top: Math.round(top) + 'px'
25243
24911
  };
24912
+ const widthProperties = optToolbarWidth.map(toolbarWidth => {
24913
+ const scroll = get$b();
24914
+ const minimumToolbarWidth = 150;
24915
+ const availableWidth = window.innerWidth - (left - scroll.left);
24916
+ const width = Math.max(Math.min(toolbarWidth, availableWidth), minimumToolbarWidth);
24917
+ return { width: width + 'px' };
24918
+ }).getOr({});
25244
24919
  setAll(mainUi.outerContainer.element, {
25245
24920
  ...baseProperties,
25246
24921
  ...widthProperties
@@ -25253,17 +24928,21 @@
25253
24928
  m.broadcastOn([repositionPopups()], {});
25254
24929
  });
25255
24930
  };
25256
- const restoreOuterContainerWidth = () => {
24931
+ const restoreAndGetCompleteOuterContainerWidth = () => {
25257
24932
  if (!useFixedToolbarContainer) {
25258
24933
  const toolbarCurrentRightsidePosition = absolute$3(mainUi.outerContainer.element).left + getOuter$1(mainUi.outerContainer.element);
25259
24934
  if (toolbarCurrentRightsidePosition >= window.innerWidth - maximumDistanceToEdge || getRaw(mainUi.outerContainer.element, 'width').isSome()) {
25260
24935
  set$8(mainUi.outerContainer.element, 'position', 'absolute');
25261
24936
  set$8(mainUi.outerContainer.element, 'left', '0px');
25262
24937
  remove$6(mainUi.outerContainer.element, 'width');
25263
- return true;
24938
+ const w = getOuter$1(mainUi.outerContainer.element);
24939
+ return Optional.some(w);
24940
+ } else {
24941
+ return Optional.none();
25264
24942
  }
24943
+ } else {
24944
+ return Optional.none();
25265
24945
  }
25266
- return false;
25267
24946
  };
25268
24947
  const update = stickyAction => {
25269
24948
  if (!isVisible()) {
@@ -25272,18 +24951,12 @@
25272
24951
  if (!useFixedToolbarContainer) {
25273
24952
  updateChromeWidth();
25274
24953
  }
25275
- const prevScroll = get$b();
25276
- const isOuterContainerWidthRestored = useFixedToolbarContainer ? false : restoreOuterContainerWidth();
24954
+ const optToolbarWidth = useFixedToolbarContainer ? Optional.none() : restoreAndGetCompleteOuterContainerWidth();
25277
24955
  if (isSplitToolbar) {
25278
24956
  OuterContainer.refreshToolbar(mainUi.outerContainer);
25279
24957
  }
25280
24958
  if (!useFixedToolbarContainer) {
25281
- const currentScroll = get$b();
25282
- const optScroll = someIf(prevScroll.left !== currentScroll.left, prevScroll);
25283
- updateChromePosition(isOuterContainerWidthRestored, optScroll);
25284
- optScroll.each(scroll => {
25285
- to(scroll.left, currentScroll.top);
25286
- });
24959
+ updateChromePosition(optToolbarWidth);
25287
24960
  }
25288
24961
  if (isSticky) {
25289
24962
  floatContainer.on(stickyAction);
@@ -25426,18 +25099,11 @@
25426
25099
  attachSystem(uiContainer, mainUi.mothership);
25427
25100
  }
25428
25101
  attachSystem(uiContainer, uiRefs.dialogUi.mothership);
25429
- const setup = () => {
25430
- setToolbar(editor, uiRefs, rawUiConfig, backstage);
25431
- OuterContainer.setMenubar(mainUi.outerContainer, identifyMenus(editor, rawUiConfig));
25432
- ui.show();
25433
- setupEvents(editor, targetElm, ui, toolbarPersist);
25434
- editor.nodeChanged();
25435
- };
25436
- if (toolbarPersist) {
25437
- editor.once('SkinLoaded', setup);
25438
- } else {
25439
- setup();
25440
- }
25102
+ setToolbar(editor, uiRefs, rawUiConfig, backstage);
25103
+ OuterContainer.setMenubar(mainUi.outerContainer, identifyMenus(editor, rawUiConfig));
25104
+ ui.show();
25105
+ setupEvents(editor, targetElm, ui, toolbarPersist);
25106
+ editor.nodeChanged();
25441
25107
  };
25442
25108
  editor.on('show', render);
25443
25109
  editor.on('hide', ui.hide);
@@ -26023,7 +25689,7 @@
26023
25689
  const register$9 = (editor, registryContextToolbars, sink, extras) => {
26024
25690
  const backstage = extras.backstage;
26025
25691
  const sharedBackstage = backstage.shared;
26026
- const isTouch = detect$1().deviceType.isTouch;
25692
+ const isTouch = detect$2().deviceType.isTouch;
26027
25693
  const lastElement = value$2();
26028
25694
  const lastTrigger = value$2();
26029
25695
  const lastContextPosition = value$2();
@@ -26191,11 +25857,6 @@
26191
25857
  close();
26192
25858
  }
26193
25859
  });
26194
- editor.on('ExecCommand', ({command}) => {
26195
- if (command.toLowerCase() === 'toggleview') {
26196
- close();
26197
- }
26198
- });
26199
25860
  editor.on('AfterProgressState', event => {
26200
25861
  if (event.state) {
26201
25862
  close();
@@ -26423,20 +26084,17 @@
26423
26084
  {
26424
26085
  name: 'bold',
26425
26086
  text: 'Bold',
26426
- icon: 'bold',
26427
- shortcut: 'Meta+B'
26087
+ icon: 'bold'
26428
26088
  },
26429
26089
  {
26430
26090
  name: 'italic',
26431
26091
  text: 'Italic',
26432
- icon: 'italic',
26433
- shortcut: 'Meta+I'
26092
+ icon: 'italic'
26434
26093
  },
26435
26094
  {
26436
26095
  name: 'underline',
26437
26096
  text: 'Underline',
26438
- icon: 'underline',
26439
- shortcut: 'Meta+U'
26097
+ icon: 'underline'
26440
26098
  },
26441
26099
  {
26442
26100
  name: 'strikethrough',
@@ -26458,19 +26116,16 @@
26458
26116
  tooltip: btn.text,
26459
26117
  icon: btn.icon,
26460
26118
  onSetup: onSetupStateToggle(editor, btn.name),
26461
- onAction: onActionToggleFormat(editor, btn.name),
26462
- shortcut: btn.shortcut
26119
+ onAction: onActionToggleFormat(editor, btn.name)
26463
26120
  });
26464
26121
  });
26465
26122
  for (let i = 1; i <= 6; i++) {
26466
26123
  const name = 'h' + i;
26467
- const shortcut = `Access+${ i }`;
26468
26124
  editor.ui.registry.addToggleButton(name, {
26469
26125
  text: name.toUpperCase(),
26470
26126
  tooltip: 'Heading ' + i,
26471
26127
  onSetup: onSetupStateToggle(editor, name),
26472
- onAction: onActionToggleFormat(editor, name),
26473
- shortcut
26128
+ onAction: onActionToggleFormat(editor, name)
26474
26129
  });
26475
26130
  }
26476
26131
  };
@@ -26486,15 +26141,13 @@
26486
26141
  name: 'help',
26487
26142
  text: 'Help',
26488
26143
  action: 'mceHelp',
26489
- icon: 'help',
26490
- shortcut: 'Alt+0'
26144
+ icon: 'help'
26491
26145
  },
26492
26146
  {
26493
26147
  name: 'selectall',
26494
26148
  text: 'Select all',
26495
26149
  action: 'SelectAll',
26496
- icon: 'select-all',
26497
- shortcut: 'Meta+A'
26150
+ icon: 'select-all'
26498
26151
  },
26499
26152
  {
26500
26153
  name: 'newdocument',
@@ -26506,15 +26159,13 @@
26506
26159
  name: 'print',
26507
26160
  text: 'Print',
26508
26161
  action: 'mcePrint',
26509
- icon: 'print',
26510
- shortcut: 'Meta+P'
26162
+ icon: 'print'
26511
26163
  }
26512
26164
  ], btn => {
26513
26165
  editor.ui.registry.addButton(btn.name, {
26514
26166
  tooltip: btn.text,
26515
26167
  icon: btn.icon,
26516
- onAction: onActionExecCommand(editor, btn.action),
26517
- shortcut: btn.shortcut
26168
+ onAction: onActionExecCommand(editor, btn.action)
26518
26169
  });
26519
26170
  });
26520
26171
  global$1.each([
@@ -26726,16 +26377,14 @@
26726
26377
  icon: 'undo',
26727
26378
  enabled: false,
26728
26379
  onSetup: onSetupUndoRedoState(editor, 'hasUndo'),
26729
- onAction: onActionExecCommand(editor, 'undo'),
26730
- shortcut: 'Meta+Z'
26380
+ onAction: onActionExecCommand(editor, 'undo')
26731
26381
  });
26732
26382
  editor.ui.registry.addButton('redo', {
26733
26383
  tooltip: 'Redo',
26734
26384
  icon: 'redo',
26735
26385
  enabled: false,
26736
26386
  onSetup: onSetupUndoRedoState(editor, 'hasRedo'),
26737
- onAction: onActionExecCommand(editor, 'redo'),
26738
- shortcut: 'Meta+Y'
26387
+ onAction: onActionExecCommand(editor, 'redo')
26739
26388
  });
26740
26389
  };
26741
26390
  const register$2 = editor => {
@@ -27008,7 +26657,7 @@
27008
26657
  });
27009
26658
  };
27010
26659
  const initAndShow = (editor, e, buildMenu, backstage, contextmenu, anchorType) => {
27011
- const detection = detect$1();
26660
+ const detection = detect$2();
27012
26661
  const isiOS = detection.os.isiOS();
27013
26662
  const isMacOS = detection.os.isMacOS();
27014
26663
  const isAndroid = detection.os.isAndroid();
@@ -27115,7 +26764,7 @@
27115
26764
  }
27116
26765
  };
27117
26766
  const setup$5 = (editor, lazySink, backstage) => {
27118
- const detection = detect$1();
26767
+ const detection = detect$2();
27119
26768
  const isTouch = detection.deviceType.isTouch;
27120
26769
  const contextmenu = build$1(InlineView.sketch({
27121
26770
  dom: { tag: 'div' },
@@ -27780,23 +27429,20 @@
27780
27429
  const snapLastTopLeft = () => startCell.get().each(snapTopLeft);
27781
27430
  const snapBottomRight = cell => snapTo(bottomRight, cell, getBottomRightSnap, 'bottom');
27782
27431
  const snapLastBottomRight = () => finishCell.get().each(snapBottomRight);
27783
- if (detect$1().deviceType.isTouch()) {
27784
- const domToSugar = arr => map$2(arr, SugarElement.fromDom);
27432
+ if (detect$2().deviceType.isTouch()) {
27785
27433
  editor.on('TableSelectionChange', e => {
27786
27434
  if (!isVisible.get()) {
27787
27435
  attach(sink, topLeft);
27788
27436
  attach(sink, bottomRight);
27789
27437
  isVisible.set(true);
27790
27438
  }
27791
- const start = SugarElement.fromDom(e.start);
27792
- const finish = SugarElement.fromDom(e.finish);
27793
- startCell.set(start);
27794
- finishCell.set(finish);
27795
- Optional.from(e.otherCells).each(otherCells => {
27796
- tlTds.set(domToSugar(otherCells.upOrLeftCells));
27797
- brTds.set(domToSugar(otherCells.downOrRightCells));
27798
- snapTopLeft(start);
27799
- snapBottomRight(finish);
27439
+ startCell.set(e.start);
27440
+ finishCell.set(e.finish);
27441
+ e.otherCells.each(otherCells => {
27442
+ tlTds.set(otherCells.upOrLeftCells);
27443
+ brTds.set(otherCells.downOrRightCells);
27444
+ snapTopLeft(e.start);
27445
+ snapBottomRight(e.finish);
27800
27446
  });
27801
27447
  });
27802
27448
  editor.on('ResizeEditor ResizeWindow ScrollContent', () => {
@@ -27958,8 +27604,8 @@
27958
27604
  tag: 'div',
27959
27605
  classes: ['tox-statusbar__resize-handle'],
27960
27606
  attributes: {
27961
- 'aria-label': providersBackstage.translate(resizeLabel),
27962
- 'data-mce-name': 'resize-handle'
27607
+ 'title': providersBackstage.translate('Resize'),
27608
+ 'aria-label': providersBackstage.translate(resizeLabel)
27963
27609
  },
27964
27610
  behaviours: [
27965
27611
  Dragging.config({
@@ -27976,8 +27622,7 @@
27976
27622
  onDown: () => keyboardHandler(editor, resizeType, 0, 1)
27977
27623
  }),
27978
27624
  Tabstopping.config({}),
27979
- Focusing.config({}),
27980
- Tooltipping.config(providersBackstage.tooltips.getConfig({ tooltipText: providersBackstage.translate('Resize') }))
27625
+ Focusing.config({})
27981
27626
  ]
27982
27627
  }, providersBackstage.icons));
27983
27628
  };
@@ -28053,7 +27698,7 @@
28053
27698
  dom: {
28054
27699
  tag: 'a',
28055
27700
  attributes: {
28056
- 'href': 'https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v7',
27701
+ 'href': 'https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v6',
28057
27702
  'rel': 'noopener',
28058
27703
  'target': '_blank',
28059
27704
  'aria-label': global$8.translate([
@@ -28173,7 +27818,7 @@
28173
27818
  const lazyMothership = value$2();
28174
27819
  const lazyDialogMothership = value$2();
28175
27820
  const lazyPopupMothership = value$2();
28176
- const platform = detect$1();
27821
+ const platform = detect$2();
28177
27822
  const isTouch = platform.deviceType.isTouch();
28178
27823
  const touchPlatformClass = 'tox-platform-touch';
28179
27824
  const deviceClasses = isTouch ? [touchPlatformClass] : [];
@@ -28384,7 +28029,10 @@
28384
28029
  const editorContainer = OuterContainer.parts.editorContainer({
28385
28030
  components: flatten([
28386
28031
  editorComponents,
28387
- isInline ? [] : [memBottomAnchorBar.asSpec()]
28032
+ isInline ? [] : [
28033
+ memBottomAnchorBar.asSpec(),
28034
+ ...statusbar.toArray()
28035
+ ]
28388
28036
  ])
28389
28037
  });
28390
28038
  const isHidden = isDistractionFree(editor);
@@ -28411,10 +28059,7 @@
28411
28059
  },
28412
28060
  components: [
28413
28061
  editorContainer,
28414
- ...isInline ? [] : [
28415
- partViewWrapper,
28416
- ...statusbar.toArray()
28417
- ],
28062
+ ...isInline ? [] : [partViewWrapper],
28418
28063
  partThrobber
28419
28064
  ],
28420
28065
  behaviours: derive$1([
@@ -28752,7 +28397,7 @@
28752
28397
  const toggleButtonSpecFields = [
28753
28398
  ...baseFooterButtonFields,
28754
28399
  requiredStringEnum('type', ['togglebutton']),
28755
- optionalTooltip,
28400
+ requiredString('tooltip'),
28756
28401
  optionalIcon,
28757
28402
  optionalText,
28758
28403
  defaultedBoolean('active', false)
@@ -28833,7 +28478,6 @@
28833
28478
  defaultedString('tag', 'textarea'),
28834
28479
  requiredString('scriptId'),
28835
28480
  requiredString('scriptUrl'),
28836
- optionFunction('onFocus'),
28837
28481
  defaultedPostMsg('settings', undefined)
28838
28482
  ]);
28839
28483
  const customEditorFieldsOld = formComponentFields.concat([
@@ -29976,13 +29620,10 @@
29976
29620
  attributes: {
29977
29621
  'type': 'button',
29978
29622
  'aria-label': providersBackstage.translate('Close'),
29979
- 'data-mce-name': 'close'
29623
+ 'title': providersBackstage.translate('Close')
29980
29624
  }
29981
29625
  },
29982
- buttonBehaviours: derive$1([
29983
- Tabstopping.config({}),
29984
- Tooltipping.config(providersBackstage.tooltips.getConfig({ tooltipText: providersBackstage.translate('Close') }))
29985
- ]),
29626
+ buttonBehaviours: derive$1([Tabstopping.config({})]),
29986
29627
  components: [render$3('close', {
29987
29628
  tag: 'span',
29988
29629
  classes: ['tox-icon']