vue-move-directives
Version:
A set of Vue 3 directives to animate elements moving to other elements.
15 lines (14 loc) • 760 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.MoveDirectivesPlugin = void 0;
const mitt_1 = require("mitt");
const moverTarget_1 = require("./directives/moverTarget");
const mover_1 = require("./directives/mover");
;
exports.MoveDirectivesPlugin = {
install(app, options) {
const emitter = (options === null || options === void 0 ? void 0 : options.customEmitter) || (0, mitt_1.default)();
app.directive((options === null || options === void 0 ? void 0 : options.moverNameOverride) || 'mover', (0, mover_1.mover)(emitter));
app.directive((options === null || options === void 0 ? void 0 : options.moverTargetNameOverride) || 'mover-target', (0, moverTarget_1.moverTarget)(emitter));
},
};
;