@diplodoc/transform 4.45.3 → 4.45.4

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
@@ -60,25 +60,25 @@
60
60
 
61
61
  // node_modules/@diplodoc/cut-extension/build/runtime/index.js
62
62
  (() => {
63
- var c = "yfm_cut", i = { CUT: ".yfm .yfm-cut", TITLE: ".yfm .yfm-cut-title", CONTENT: ".yfm .yfm-cut-content" }, n = { OPEN: "open" };
64
- var C = (g) => {
63
+ var i = "yfm_cut", I = { CUT: ".yfm .yfm-cut", TITLE: ".yfm .yfm-cut-title", CONTENT: ".yfm .yfm-cut-content" }, n = { OPEN: "open" };
64
+ var o = (g) => {
65
65
  let t = g.composedPath();
66
66
  return Array.isArray(t) && t.length > 0 ? t[0] : g.target;
67
- }, o = (g) => {
68
- let t = C(g);
67
+ }, l = (g) => {
68
+ let t = o(g);
69
69
  return !t || !t.matches;
70
70
  };
71
- var I = class {
71
+ var c = class {
72
72
  constructor(t) {
73
73
  __publicField(this, "__doc");
74
74
  __publicField(this, "_onDocClick", (t) => {
75
- if (o(t)) return;
75
+ if (l(t)) return;
76
76
  let e = this._findTitleInPath(t);
77
77
  e && this._toggleCut(e);
78
78
  });
79
79
  __publicField(this, "_matchTitle", (t) => {
80
80
  var _a;
81
- return t instanceof HTMLElement ? (_a = t == null ? void 0 : t.matches) == null ? void 0 : _a.call(t, i.TITLE) : false;
81
+ return t instanceof HTMLElement ? (_a = t == null ? void 0 : t.matches) == null ? void 0 : _a.call(t, I.TITLE) : false;
82
82
  });
83
83
  this.__doc = t, this.__doc.addEventListener("click", this._onDocClick);
84
84
  }
@@ -87,7 +87,7 @@
87
87
  }
88
88
  focusActiveCut() {
89
89
  let t = window.location.hash.slice(1), e = document.getElementById(t);
90
- e instanceof HTMLElement && e.matches(i.CUT) && (e.classList.toggle(n.OPEN), e.setAttribute("open", "true"), setTimeout(() => {
90
+ e instanceof HTMLElement && e.matches(I.CUT) && (e.classList.toggle(n.OPEN), e.setAttribute("open", "true"), setTimeout(() => {
91
91
  e.classList.add("cut-highlight"), e.scrollIntoView();
92
92
  }, 70), setTimeout(() => {
93
93
  e.classList.remove("cut-highlight");
@@ -95,7 +95,7 @@
95
95
  }
96
96
  _findTitleInPath(t) {
97
97
  var _a, _b;
98
- let e = C(t);
98
+ let e = o(t);
99
99
  return this._matchTitle(e) ? e : (_b = (_a = t.composedPath) == null ? void 0 : _a.call(t)) == null ? void 0 : _b.find(this._matchTitle);
100
100
  }
101
101
  _toggleCut(t) {
@@ -103,7 +103,7 @@
103
103
  (_a = t.parentElement) == null ? void 0 : _a.classList.toggle(n.OPEN);
104
104
  }
105
105
  };
106
- typeof window < "u" && typeof document < "u" && !window[c] && (window[c] = new I(document));
106
+ typeof window < "u" && typeof document < "u" && !window[i] && (window[i] = new c(document));
107
107
  })();
108
108
 
109
109
  // node_modules/@diplodoc/tabs-extension/build/runtime/index.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/transform",
3
- "version": "4.45.3",
3
+ "version": "4.45.4",
4
4
  "description": "A simple transformer of text in YFM (Yandex Flavored Markdown) to HTML",
5
5
  "keywords": [
6
6
  "markdown",
@@ -47,7 +47,7 @@
47
47
  "postinstall": "cd playground && npm ci --ignore-scripts || true"
48
48
  },
49
49
  "dependencies": {
50
- "@diplodoc/cut-extension": "^0.7.1",
50
+ "@diplodoc/cut-extension": "^0.7.2",
51
51
  "@diplodoc/file-extension": "^0.2.0",
52
52
  "@diplodoc/tabs-extension": "^3.5.0",
53
53
  "chalk": "^4.1.2",
@@ -22,6 +22,7 @@
22
22
  line-height: 20px;
23
23
  word-wrap: break-word;
24
24
  color: var(--yfm-color-text);
25
+ tab-size: var(--yfm-tab-size, inherit);
25
26
 
26
27
  * {
27
28
  box-sizing: border-box;
@@ -286,12 +287,6 @@
286
287
 
287
288
  dd {
288
289
  margin-left: 0;
289
-
290
- & > ol:first-child,
291
- & > ul:first-child,
292
- & > dd:first-child {
293
- padding-left: 0;
294
- }
295
290
  }
296
291
 
297
292
  ul,
@@ -324,9 +319,13 @@
324
319
  content: counter(list) '. ';
325
320
  }
326
321
 
327
- // No direct ancestor (>) combinator to preserve legacy behavior
328
- ol.yfm_no-list-reset li::marker {
329
- content: unset;
322
+ ol.yfm_no-list-reset {
323
+ counter-reset: unset;
324
+
325
+ // No direct ancestor (>) combinator to preserve legacy behavior
326
+ & li::marker {
327
+ content: unset;
328
+ }
330
329
  }
331
330
 
332
331
  li {
@@ -349,6 +348,7 @@
349
348
  font-size: 0.875em;
350
349
  white-space: pre-wrap;
351
350
  color: var(--yfm-color-inline-code);
351
+ tab-size: var(--yfm-tab-size-code, inherit);
352
352
  }
353
353
 
354
354
  pre {
@@ -17,17 +17,3 @@
17
17
  }
18
18
  }
19
19
  }
20
-
21
- .yfm-cut-content {
22
- .yfm:not(.yfm_no-list-reset) & ol {
23
- counter-reset: cut-list;
24
-
25
- & > li {
26
- counter-increment: cut-list;
27
-
28
- &::before {
29
- content: counters(cut-list, '.') '. ';
30
- }
31
- }
32
- }
33
- }