@diplodoc/transform 4.65.1 → 4.65.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/js/yfm.js CHANGED
@@ -137,30 +137,30 @@
137
137
 
138
138
  // node_modules/@diplodoc/tabs-extension/build/runtime/index.js
139
139
  (() => {
140
- var x = "yfm-tabs", L = "yfm-tab", O = "yfm-tab-panel", H = "yfm-tab-list", l = "active";
140
+ var x = "yfm-tabs", H = "yfm-tab", O = "yfm-tab-panel", L = "yfm-tab-list", l = "active";
141
141
  var T = "data-diplodoc-group", G = "data-diplodoc-key", y = "data-diplodoc-variant", S = "data-diplodoc-id", U = "defaultTabsGroup-";
142
142
  var F = "data-diplodoc-forced";
143
- var W = "yfm-tabs-dropdown-select";
144
- var w = "yfm-tabs-vertical";
145
- var v = ((g) => (g.Regular = "regular", g.Radio = "radio", g.Dropdown = "dropdown", g.Accordion = "accordion", g))(v || {}), X = Symbol.for("diplodocTabs");
143
+ var w = "yfm-tabs-dropdown-select";
144
+ var W = "yfm-tabs-vertical";
145
+ var v = ((g) => (g.Regular = "regular", g.Radio = "radio", g.Dropdown = "dropdown", g.Accordion = "accordion", g))(v || {}), Z = Symbol.for("diplodocTabs");
146
146
  var h = (C) => {
147
147
  let t = C.composedPath();
148
148
  return Array.isArray(t) && t.length > 0 ? t[0] : C.target;
149
- }, R = (C) => {
149
+ }, X = (C) => {
150
150
  let t = h(C);
151
151
  return !t || !t.matches;
152
- }, Z = (C) => Math.abs(C.scrollHeight - C.clientHeight) > 1 ? C : C.parentElement ? Z(C.parentElement) : void 0, Q = (C, t) => {
152
+ }, R = (C) => Math.abs(C.scrollHeight - C.clientHeight) > 1 ? C : C.parentElement ? R(C.parentElement) : void 0, Q = (C, t) => {
153
153
  let e = C.getBoundingClientRect(), o = t.getBoundingClientRect();
154
154
  return { top: e.top - o.top, left: e.left - o.left, scrollTop: t.scrollTop, scrollLeft: t.scrollLeft };
155
155
  };
156
- var n = { TABS: `.${x}`, TAB_LIST: `.${H}`, TAB: `.${L}`, TAB_PANEL: `.${O}`, VERTICAL_TABS: `.${w}` }, f = class {
156
+ var n = { TABS: `.${x}`, TAB_LIST: `.${L}`, TAB: `.${H}`, TAB_PANEL: `.${O}`, VERTICAL_TABS: `.${W}` }, f = class {
157
157
  constructor(t, e = {}) {
158
158
  this._onSelectTabHandlers = /* @__PURE__ */ new Set();
159
159
  this._currentPageTabGroups = [];
160
160
  this._isRestoringTabs = false;
161
161
  this._document = t, this._options = Object.assign({ saveTabsToLocalStorage: false, saveTabsToQueryStateMode: "none" }, e), this._document.addEventListener("click", (o) => {
162
162
  let g = h(o);
163
- if (o.target && this.hideAllDropdown(o.target), R(o)) return;
163
+ if (o.target && this.hideAllDropdown(o.target), X(o)) return;
164
164
  if (this.isElementDropdownSelect(g)) {
165
165
  g.classList.toggle(l);
166
166
  return;
@@ -190,7 +190,7 @@
190
190
  }
191
191
  if (!g) return;
192
192
  let I = h(o);
193
- if (R(o) || !this.isValidTabElement(I)) return;
193
+ if (X(o) || !this.isValidTabElement(I)) return;
194
194
  let { tabs: a, nodes: c } = this.getTabs(I), i = this.getTabDataFromHTMLElement(I), r = a.findIndex(({ key: A }) => (i == null ? void 0 : i.key) && A === i.key);
195
195
  if (!i || a.length <= 1 || r === -1) return;
196
196
  let s = (r + (g === "left" ? -1 : 1) + a.length) % a.length;
@@ -268,7 +268,7 @@
268
268
  let { group: o, key: g, variant: I } = t;
269
269
  if (!o) return;
270
270
  this.saveTabPreferred({ group: o, key: g, variant: I });
271
- let a = e && Z(e), c = a && Q(e, a);
271
+ let a = e && R(e), c = a && Q(e, a);
272
272
  this.updateHTML({ group: o, key: g, variant: I }, e, I) > 0 && (this.fireSelectTabEvent({ group: o, key: g, variant: I }, e == null ? void 0 : e.dataset.diplodocId), c && this.resetScroll(e, a, c));
273
273
  }
274
274
  updateHTML(t, e, o) {
@@ -394,7 +394,7 @@
394
394
  return !!this.getTabsType(t);
395
395
  }
396
396
  isElementDropdownSelect(t) {
397
- return t.classList.contains(W);
397
+ return t.classList.contains(w);
398
398
  }
399
399
  getTabDataFromHTMLElement(t) {
400
400
  var I, a, c;
@@ -419,7 +419,7 @@
419
419
  }), { tabs: g, nodes: o };
420
420
  }
421
421
  };
422
- typeof window != "undefined" && typeof document != "undefined" && !window[X] && (window[X] = new f(document));
422
+ typeof window != "undefined" && typeof document != "undefined" && !window[Z] && (window[Z] = new f(document));
423
423
  })();
424
424
 
425
425
  // src/js/polyfill.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/transform",
3
- "version": "4.65.1",
3
+ "version": "4.65.2",
4
4
  "description": "A simple transformer of text in YFM (Yandex Flavored Markdown) to HTML",
5
5
  "keywords": [
6
6
  "markdown",
@@ -54,7 +54,7 @@
54
54
  "dependencies": {
55
55
  "@diplodoc/cut-extension": "^1.1.0",
56
56
  "@diplodoc/file-extension": "^0.2.1",
57
- "@diplodoc/tabs-extension": "^3.7.5",
57
+ "@diplodoc/tabs-extension": "^3.7.6",
58
58
  "@diplodoc/utils": "^2.1.0",
59
59
  "chalk": "^4.1.2",
60
60
  "cheerio": "^1.0.0",