@diplodoc/transform 4.77.0 → 4.77.1
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/css/_yfm-only.css +2 -0
- package/dist/css/_yfm-only.css.map +3 -3
- package/dist/css/_yfm-only.min.css +1 -1
- package/dist/css/_yfm-only.min.css.map +3 -3
- package/dist/css/base.css.map +1 -1
- package/dist/css/base.min.css.map +1 -1
- package/dist/css/print.css.map +1 -1
- package/dist/css/yfm.css +2 -0
- package/dist/css/yfm.css.map +3 -3
- package/dist/css/yfm.min.css +1 -1
- package/dist/css/yfm.min.css.map +3 -3
- package/dist/js/_yfm-only.js +4 -0
- package/dist/js/_yfm-only.js.map +2 -2
- package/dist/js/_yfm-only.min.js +1 -1
- package/dist/js/_yfm-only.min.js.map +2 -2
- package/dist/js/base.js.map +1 -1
- package/dist/js/base.min.js.map +1 -1
- package/dist/js/yfm.js +4 -0
- package/dist/js/yfm.js.map +2 -2
- package/dist/js/yfm.min.js +1 -1
- package/dist/js/yfm.min.js.map +2 -2
- package/dist/scss/_term.scss +8 -0
- package/lib/plugins/links/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/js/anchor.ts +1 -1
- package/src/js/constant.ts +1 -1
- package/src/js/inline-code/index.ts +1 -1
- package/src/js/term/utils.ts +10 -0
- package/src/scss/_term.scss +8 -0
- package/src/transform/plugins/links/index.ts +1 -1
package/src/js/anchor.ts
CHANGED
package/src/js/constant.ts
CHANGED
package/src/js/term/utils.ts
CHANGED
|
@@ -178,6 +178,16 @@ export function openDefinition(target: HTMLElement) {
|
|
|
178
178
|
|
|
179
179
|
export function closeDefinition(definition: HTMLElement) {
|
|
180
180
|
definition.classList.remove(openClass);
|
|
181
|
+
|
|
182
|
+
// Restore the off-screen position declared in CSS so the (still laid-out)
|
|
183
|
+
// definition box does not extend the page's scrollable area. Inline
|
|
184
|
+
// top/left were set by setDefinitionPosition() while the definition was
|
|
185
|
+
// open; without this reset they would keep the box in the document flow.
|
|
186
|
+
definition.style.top = '';
|
|
187
|
+
definition.style.left = '';
|
|
188
|
+
definition.removeAttribute('relativeX');
|
|
189
|
+
definition.removeAttribute('relativeY');
|
|
190
|
+
|
|
181
191
|
const term = getTermByDefinition(definition);
|
|
182
192
|
const termParent = termParentElement(term);
|
|
183
193
|
|
package/src/scss/_term.scss
CHANGED
|
@@ -21,6 +21,14 @@
|
|
|
21
21
|
visibility: hidden;
|
|
22
22
|
opacity: 0;
|
|
23
23
|
|
|
24
|
+
// Keep the closed definition off-screen so its (still laid-out) box
|
|
25
|
+
// does not extend the page's scrollable area. Inline top/left set by
|
|
26
|
+
// setDefinitionPosition() are cleared in closeDefinition() to restore
|
|
27
|
+
// these values. Negative-direction overflow does not create a
|
|
28
|
+
// scrollable region, while the box stays measurable for positioning.
|
|
29
|
+
top: -9999px;
|
|
30
|
+
left: -9999px;
|
|
31
|
+
|
|
24
32
|
padding: 10px;
|
|
25
33
|
|
|
26
34
|
background-color: var(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type Token from 'markdown-it/lib/token';
|
|
2
|
-
import type {Logger} from '
|
|
2
|
+
import type {Logger} from '../../log';
|
|
3
3
|
import type {CacheContext, StateCore} from '../../typings';
|
|
4
4
|
import type {MarkdownItPluginCb, MarkdownItPluginOpts} from '../typings';
|
|
5
5
|
import type {MarkdownItIncluded} from '../includes/types';
|