directix 1.7.0 → 1.8.0
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/README.md +8 -1
- package/dist/index.cjs +28 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.iife.js +28 -12
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +2 -2
- package/dist/index.mjs +28 -12
- package/dist/index.mjs.map +1 -1
- package/dist/nuxt/index.cjs +23 -10
- package/dist/nuxt/index.cjs.map +2 -2
- package/dist/nuxt/index.d.ts +1 -1
- package/dist/nuxt/index.mjs +23 -10
- package/dist/nuxt/index.mjs.map +3 -3
- package/dist/nuxt/runtime/plugin.mjs +23 -10
- package/dist/nuxt/runtime/plugin.mjs.map +3 -3
- package/package.json +19 -9
package/dist/nuxt/index.d.ts
CHANGED
package/dist/nuxt/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* directix v1.
|
|
2
|
+
* directix v1.8.0
|
|
3
3
|
* A comprehensive, easy-to-use, and high-performance Vue custom directives library supporting both Vue 2 and Vue 3
|
|
4
4
|
* (c) 2021-present saqqdy <https://github.com/saqqdy>
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -2473,14 +2473,16 @@ var vFade = defineDirective({
|
|
|
2473
2473
|
el.style.opacity = String(options.minOpacity || 0);
|
|
2474
2474
|
el.style.display = "";
|
|
2475
2475
|
String(el.offsetHeight);
|
|
2476
|
-
requestAnimationFrame(() => {
|
|
2476
|
+
state.animationFrame = requestAnimationFrame(() => {
|
|
2477
|
+
state.animationFrame = null;
|
|
2477
2478
|
el.style.opacity = String(options.maxOpacity || 1);
|
|
2478
2479
|
state.currentOpacity = options.maxOpacity || 1;
|
|
2479
2480
|
});
|
|
2480
2481
|
} else if (options.direction === "out") {
|
|
2481
2482
|
el.style.opacity = String(options.maxOpacity || 1);
|
|
2482
2483
|
el.style.display = "";
|
|
2483
|
-
requestAnimationFrame(() => {
|
|
2484
|
+
state.animationFrame = requestAnimationFrame(() => {
|
|
2485
|
+
state.animationFrame = null;
|
|
2484
2486
|
el.style.opacity = String(options.minOpacity || 0);
|
|
2485
2487
|
setTimeout(() => {
|
|
2486
2488
|
el.style.display = "none";
|
|
@@ -6634,8 +6636,8 @@ var vSanitize = defineDirective({
|
|
|
6634
6636
|
mounted(el, binding) {
|
|
6635
6637
|
if (!isBrowser()) return;
|
|
6636
6638
|
const options = normalizeOptions41(binding.value);
|
|
6637
|
-
if (options.disabled) return;
|
|
6638
6639
|
el.__sanitize = { options };
|
|
6640
|
+
if (options.disabled) return;
|
|
6639
6641
|
const content = el.innerHTML;
|
|
6640
6642
|
if (content) {
|
|
6641
6643
|
el.innerHTML = sanitizeHtml(content, options);
|
|
@@ -6644,8 +6646,17 @@ var vSanitize = defineDirective({
|
|
|
6644
6646
|
updated(el, binding) {
|
|
6645
6647
|
const state = el.__sanitize;
|
|
6646
6648
|
if (!state) return;
|
|
6649
|
+
const prevDisabled = state.options.disabled;
|
|
6647
6650
|
state.options = normalizeOptions41(binding.value);
|
|
6648
|
-
if (state.options.disabled || !state.options.sanitizeOnUpdate)
|
|
6651
|
+
if (state.options.disabled || !state.options.sanitizeOnUpdate) {
|
|
6652
|
+
if (prevDisabled && !state.options.disabled) {
|
|
6653
|
+
const content2 = el.innerHTML;
|
|
6654
|
+
if (content2) {
|
|
6655
|
+
el.innerHTML = sanitizeHtml(content2, state.options);
|
|
6656
|
+
}
|
|
6657
|
+
}
|
|
6658
|
+
return;
|
|
6659
|
+
}
|
|
6649
6660
|
const content = el.innerHTML;
|
|
6650
6661
|
if (content) {
|
|
6651
6662
|
el.innerHTML = sanitizeHtml(content, state.options);
|
|
@@ -7306,12 +7317,13 @@ var TOOLTIP_STYLES = {
|
|
|
7306
7317
|
};
|
|
7307
7318
|
var tooltipContainer = null;
|
|
7308
7319
|
function getTooltipContainer() {
|
|
7309
|
-
if (
|
|
7310
|
-
tooltipContainer
|
|
7311
|
-
tooltipContainer.id = "directix-tooltip-container";
|
|
7312
|
-
tooltipContainer.style.cssText = "position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;";
|
|
7313
|
-
document.body.appendChild(tooltipContainer);
|
|
7320
|
+
if (tooltipContainer && document.body.contains(tooltipContainer)) {
|
|
7321
|
+
return tooltipContainer;
|
|
7314
7322
|
}
|
|
7323
|
+
tooltipContainer = document.createElement("div");
|
|
7324
|
+
tooltipContainer.id = "directix-tooltip-container";
|
|
7325
|
+
tooltipContainer.style.cssText = "position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;";
|
|
7326
|
+
document.body.appendChild(tooltipContainer);
|
|
7315
7327
|
return tooltipContainer;
|
|
7316
7328
|
}
|
|
7317
7329
|
function createTooltip(options) {
|
|
@@ -7537,6 +7549,7 @@ var vTooltip = defineDirective({
|
|
|
7537
7549
|
const newState = createState(newOptions);
|
|
7538
7550
|
el.__tooltip = newState;
|
|
7539
7551
|
setupTriggerHandlers(el, newState);
|
|
7552
|
+
el.setAttribute("aria-describedby", "v-tooltip");
|
|
7540
7553
|
if (newOptions.trigger === "manual") {
|
|
7541
7554
|
showTooltip(el, newState);
|
|
7542
7555
|
}
|