🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@tiptap/vue-2

Package Overview
Dependencies
Maintainers
6
Versions
266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/vue-2 - npm Package Compare versions

Comparing version

to
3.0.0-next.5

dist/menus/index.cjs

24

dist/index.d.ts

@@ -1,7 +0,5 @@

import { BubbleMenuPluginProps } from '@tiptap/extension-bubble-menu';
import Vue, { Component } from 'vue';
import * as _tiptap_core from '@tiptap/core';
import { Editor as Editor$1, DecorationWithType, NodeViewRendererOptions, NodeViewRenderer } from '@tiptap/core';
export * from '@tiptap/core';
import { FloatingMenuPluginProps } from '@tiptap/extension-floating-menu';
import Vue, { Component } from 'vue';
import * as vue_ts_types_dist_types_js from 'vue-ts-types/dist/types.js';

@@ -12,12 +10,2 @@ import { Node } from '@tiptap/pm/model';

interface BubbleMenuInterface extends Vue {
pluginKey: BubbleMenuPluginProps['pluginKey'];
editor: BubbleMenuPluginProps['editor'];
updateDelay: BubbleMenuPluginProps['updateDelay'];
resizeDelay: BubbleMenuPluginProps['resizeDelay'];
shouldShow: BubbleMenuPluginProps['shouldShow'];
options: BubbleMenuPluginProps['options'];
}
declare const BubbleMenu: Component;
declare class Editor extends Editor$1 {

@@ -32,10 +20,2 @@ contentComponent: Vue | null;

interface FloatingMenuInterface extends Vue {
pluginKey: FloatingMenuPluginProps['pluginKey'];
options: FloatingMenuPluginProps['options'];
editor: FloatingMenuPluginProps['editor'];
shouldShow: FloatingMenuPluginProps['shouldShow'];
}
declare const FloatingMenu: Component;
interface NodeViewContentInterface extends Vue {

@@ -101,2 +81,2 @@ as: string;

export { BubbleMenu, type BubbleMenuInterface, Editor, EditorContent, type EditorContentInterface, FloatingMenu, type FloatingMenuInterface, NodeViewContent, type NodeViewContentInterface, NodeViewWrapper, type NodeViewWrapperInterface, VueNodeViewRenderer, type VueNodeViewRendererOptions, VueRenderer, nodeViewProps };
export { Editor, EditorContent, type EditorContentInterface, NodeViewContent, type NodeViewContentInterface, NodeViewWrapper, type NodeViewWrapperInterface, VueNodeViewRenderer, type VueNodeViewRendererOptions, VueRenderer, nodeViewProps };

@@ -1,64 +0,1 @@

// src/BubbleMenu.ts
import { BubbleMenuPlugin } from "@tiptap/extension-bubble-menu";
var BubbleMenu = {
name: "BubbleMenu",
props: {
pluginKey: {
type: [String, Object],
default: "bubbleMenu"
},
editor: {
type: Object,
required: true
},
updateDelay: {
type: Number
},
options: {
type: Object,
default: {}
},
resizeDelay: {
type: Number
},
shouldShow: {
type: Function,
default: null
}
},
watch: {
editor: {
immediate: true,
handler(editor) {
if (!editor) {
return;
}
;
this.$el.style.visibility = "hidden";
this.$el.style.position = "absolute";
this.$el.remove();
this.$nextTick(() => {
editor.registerPlugin(
BubbleMenuPlugin({
updateDelay: this.updateDelay,
resizeDelay: this.resizeDelay,
options: this.options,
editor,
element: this.$el,
pluginKey: this.pluginKey,
shouldShow: this.shouldShow
})
);
});
}
}
},
render(createElement) {
return createElement("div", { style: { visibility: "hidden" } }, this.$slots.default);
},
beforeDestroy() {
this.editor.unregisterPlugin(this.pluginKey);
}
};
// src/Editor.ts

@@ -88,4 +25,5 @@ import { Editor as CoreEditor } from "@tiptap/core";

this.$nextTick(() => {
var _a;
const element = this.$el;
if (!element || !editor.options.element.firstChild) {
if (!element || !((_a = editor.options.element) == null ? void 0 : _a.firstChild)) {
return;

@@ -108,2 +46,3 @@ }

beforeDestroy() {
var _a;
const { editor } = this;

@@ -119,3 +58,3 @@ if (!editor) {

editor.contentComponent = null;
if (!editor.options.element.firstChild) {
if (!((_a = editor.options.element) == null ? void 0 : _a.firstChild)) {
return;

@@ -131,57 +70,2 @@ }

// src/FloatingMenu.ts
import { FloatingMenuPlugin } from "@tiptap/extension-floating-menu";
var FloatingMenu = {
name: "FloatingMenu",
props: {
pluginKey: {
type: [String, Object],
default: "floatingMenu"
},
editor: {
type: Object,
required: true
},
options: {
type: Object,
default: () => ({})
},
shouldShow: {
type: Function,
default: null
}
},
watch: {
editor: {
immediate: true,
handler(editor) {
if (!editor) {
return;
}
;
this.$el.style.visibility = "hidden";
this.$el.style.position = "absolute";
this.$el.remove();
this.$nextTick(() => {
editor.registerPlugin(
FloatingMenuPlugin({
pluginKey: this.pluginKey,
editor,
element: this.$el,
options: this.options,
shouldShow: this.shouldShow
})
);
});
}
}
},
render(createElement) {
return createElement("div", { style: { visibility: "hidden" } }, this.$slots.default);
},
beforeDestroy() {
this.editor.unregisterPlugin(this.pluginKey);
}
};
// src/NodeViewContent.ts

@@ -438,6 +322,4 @@ var NodeViewContent = {

export {
BubbleMenu,
Editor,
EditorContent,
FloatingMenu,
NodeViewContent,

@@ -444,0 +326,0 @@ NodeViewWrapper,

MIT License
Copyright (c) 2024, Tiptap GmbH
Copyright (c) 2025, Tiptap GmbH

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "@tiptap/vue-2",
"description": "Vue components for tiptap",
"version": "3.0.0-next.4",
"version": "3.0.0-next.5",
"homepage": "https://tiptap.dev",

@@ -23,2 +23,10 @@ "keywords": [

"require": "./dist/index.cjs"
},
"./menus": {
"types": {
"import": "./dist/menus/index.d.ts",
"require": "./dist/menus/index.d.cts"
},
"import": "./dist/menus/index.js",
"require": "./dist/menus/index.cjs"
}

@@ -35,14 +43,16 @@ },

"dependencies": {
"@tiptap/extension-bubble-menu": "^3.0.0-next.4",
"@tiptap/extension-floating-menu": "^3.0.0-next.4",
"vue-ts-types": "1.6.2"
},
"devDependencies": {
"@tiptap/core": "^3.0.0-next.4",
"@tiptap/pm": "^3.0.0-next.4",
"@tiptap/core": "^3.0.0-next.5",
"@tiptap/pm": "^3.0.0-next.5",
"vue": "^2.7.16"
},
"optionalDependencies": {
"@tiptap/extension-bubble-menu": "^3.0.0-next.5",
"@tiptap/extension-floating-menu": "^3.0.0-next.5"
},
"peerDependencies": {
"@tiptap/core": "^3.0.0-next.1",
"@tiptap/pm": "^3.0.0-next.1",
"@tiptap/core": "^3.0.0-next.4",
"@tiptap/pm": "^3.0.0-next.4",
"vue": "^2.6.0"

@@ -49,0 +59,0 @@ },

@@ -27,3 +27,3 @@ import Vue, { Component, CreateElement, PropType } from 'vue'

if (!element || !editor.options.element.firstChild) {
if (!element || !editor.options.element?.firstChild) {
return

@@ -65,6 +65,7 @@ }

if (!editor.options.element.firstChild) {
if (!editor.options.element?.firstChild) {
return
}
// TODO using the new editor.mount method might allow us to remove this
const newElement = document.createElement('div')

@@ -71,0 +72,0 @@

@@ -1,5 +0,3 @@

export * from './BubbleMenu.js'
export { Editor } from './Editor.js'
export * from './EditorContent.js'
export * from './FloatingMenu.js'
export * from './NodeViewContent.js'

@@ -6,0 +4,0 @@ export * from './NodeViewWrapper.js'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet