@ni/nimble-components 20.1.20 → 20.1.21

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.
@@ -16288,7 +16288,7 @@
16288
16288
 
16289
16289
  /**
16290
16290
  * Do not edit directly
16291
- * Generated on Thu, 31 Aug 2023 18:57:21 GMT
16291
+ * Generated on Fri, 01 Sep 2023 05:37:36 GMT
16292
16292
  */
16293
16293
 
16294
16294
  const Information100DarkUi = "#a46eff";
@@ -56170,6 +56170,15 @@ img.ProseMirror-separator {
56170
56170
  }
56171
56171
  `;
56172
56172
 
56173
+ /**
56174
+ * TipTap node types.
56175
+ * @public
56176
+ */
56177
+ const TipTapNodeName = {
56178
+ bulletList: 'bulletList',
56179
+ numberedList: 'orderedList'
56180
+ };
56181
+
56173
56182
  /**
56174
56183
  * A nimble styled rich text editor
56175
56184
  */
@@ -56498,10 +56507,14 @@ img.ProseMirror-separator {
56498
56507
  this.tiptapEditor.off('transaction');
56499
56508
  }
56500
56509
  updateEditorButtonsState() {
56510
+ const { extensionManager, state } = this.tiptapEditor;
56511
+ const { extensions } = extensionManager;
56512
+ const { selection } = state;
56513
+ const parentList = findParentNode((node) => isList(node.type.name, extensions))(selection);
56501
56514
  this.boldButton.checked = this.tiptapEditor.isActive('bold');
56502
56515
  this.italicsButton.checked = this.tiptapEditor.isActive('italic');
56503
- this.bulletListButton.checked = this.tiptapEditor.isActive('bulletList');
56504
- this.numberedListButton.checked = this.tiptapEditor.isActive('orderedList');
56516
+ this.bulletListButton.checked = parentList?.node.type.name === TipTapNodeName.bulletList;
56517
+ this.numberedListButton.checked = parentList?.node.type.name === TipTapNodeName.numberedList;
56505
56518
  }
56506
56519
  keyActivatesButton(event) {
56507
56520
  switch (event.key) {
@@ -56561,7 +56574,7 @@ img.ProseMirror-separator {
56561
56574
  - this.tiptapEditor.view.dom.clientWidth;
56562
56575
  }
56563
56576
  getTipTapExtension(extensionName) {
56564
- return this.tiptapEditor.extensionManager.extensions.find(extension => extension.name === extensionName);
56577
+ return this.tiptapEditor.extensionManager.extensions.find((extension) => extension.name === extensionName);
56565
56578
  }
56566
56579
  setEditorTabIndex() {
56567
56580
  this.tiptapEditor.setOptions({