Comparing version 0.4.0 to 0.4.1
@@ -87,4 +87,2 @@ import * as _tiptap_extension_horizontal_rule from '@tiptap/extension-horizontal-rule'; | ||
declare const getPrevText: (editor: Editor, position: number) => string; | ||
declare const PlaceholderExtension: _tiptap_core.Extension<_tiptap_extension_placeholder.PlaceholderOptions, any>; | ||
@@ -94,2 +92,2 @@ declare const simpleExtensions: readonly [_tiptap_core.Mark<_tiptap_extension_underline.UnderlineOptions, any>, _tiptap_core.Mark<_tiptap_extension_text_style.TextStyleOptions, any>, _tiptap_core.Extension<_tiptap_extension_color.ColorOptions, any>, _tiptap_core.Mark<_tiptap_extension_highlight.HighlightOptions, any>, _tiptap_core.Extension<tiptap_markdown.MarkdownOptions, tiptap_markdown.MarkdownStorage>, _tiptap_core.Extension<any, any>]; | ||
export { AIHighlight, type AIHighlightOptions, Command, Horizontal as HorizontalRule, ImageResizer, PlaceholderExtension as Placeholder, type SuggestionItem, UpdatedImage, addAIHighlight, createSuggestionItems, getPrevText, handleCommandNavigation, inputRegex, pasteRegex, removeAIHighlight, renderItems, simpleExtensions }; | ||
export { AIHighlight, type AIHighlightOptions, Command, Horizontal as HorizontalRule, ImageResizer, PlaceholderExtension as Placeholder, type SuggestionItem, UpdatedImage, addAIHighlight, createSuggestionItems, handleCommandNavigation, inputRegex, pasteRegex, removeAIHighlight, renderItems, simpleExtensions }; |
'use client' | ||
import{A as v,B as w,C as x,D as y,a,b,c,d,e,f,g,m as h,n as i,o as j,p as k,q as l,r as m,s as n,t as o,u as p,v as q,w as r,x as s,y as t,z as u}from"./chunk-L6UFMXIG.js";export{e as AIHighlight,s as CharacterCount,t as CodeBlockLowlight,h as Command,v as GlobalDragHandle,y as HorizontalRule,a as ImageResizer,m as InputRule,w as Placeholder,r as StarterKit,p as TaskItem,q as TaskList,n as TiptapImage,o as TiptapLink,b as UpdatedImage,u as Youtube,g as addAIHighlight,j as createSuggestionItems,l as getPrevText,k as handleCommandNavigation,c as inputRegex,d as pasteRegex,f as removeAIHighlight,i as renderItems,x as simpleExtensions}; | ||
import{A as v,B as w,C as x,a,b,c,d,e,f,g,m as h,n as i,o as j,p as k,q as l,r as m,s as n,t as o,u as p,v as q,w as r,x as s,y as t,z as u}from"./chunk-RCJTUCCX.js";export{e as AIHighlight,r as CharacterCount,s as CodeBlockLowlight,h as Command,u as GlobalDragHandle,x as HorizontalRule,a as ImageResizer,l as InputRule,v as Placeholder,q as StarterKit,o as TaskItem,p as TaskList,m as TiptapImage,n as TiptapLink,b as UpdatedImage,t as Youtube,g as addAIHighlight,j as createSuggestionItems,k as handleCommandNavigation,c as inputRegex,d as pasteRegex,f as removeAIHighlight,i as renderItems,w as simpleExtensions}; |
'use client' | ||
import{C as c,h as s,i as l,j as u,k as v,l as x}from"./chunk-L6UFMXIG.js";import{useCurrentEditor as No}from"@tiptap/react";import{}from"@tiptap/core";import{useMemo as N,useRef as I,forwardRef as h}from"react";import{EditorProvider as B}from"@tiptap/react";import{Provider as M}from"jotai";import S from"tunnel-rat";import{jsx as d}from"react/jsx-runtime";var g=({children:e})=>{let o=I(S()).current;return d(M,{store:l,children:d(u.Provider,{value:o,children:e})})},f=h(({className:e,children:o,initialContent:i,...r},n)=>{let t=N(()=>[...c,...r.extensions??[]],[r.extensions]);return d("div",{ref:n,className:e,children:d(B,{...r,content:i,extensions:t,children:o})})});f.displayName="EditorContent";import{BubbleMenu as w,isNodeSelection as T,useCurrentEditor as L}from"@tiptap/react";import{useMemo as D,useRef as H,useEffect as O,forwardRef as W}from"react";import{jsx as E}from"react/jsx-runtime";var C=W(({children:e,tippyOptions:o,...i},r)=>{let{editor:n}=L(),t=H(null);O(()=>{!t.current||!o?.placement||(t.current.setProps({placement:o.placement}),t.current.popperInstance?.update())},[o?.placement]);let p=D(()=>({shouldShow:({editor:m,state:y})=>{let{selection:a}=y,{empty:R}=a;return!(!m.isEditable||m.isActive("image")||R||T(a))},tippyOptions:{onCreate:m=>{t.current=m},moveTransition:"transform 0.15s ease-out",...o},...i}),[i,o]);return n?E("div",{ref:r,children:E(w,{editor:n,...p,children:e})}):null});C.displayName="EditorBubble";import{forwardRef as A}from"react";import{Slot as J}from"@radix-ui/react-slot";import{useCurrentEditor as F}from"@tiptap/react";import{jsx as k}from"react/jsx-runtime";var b=A(({children:e,asChild:o,onSelect:i,...r},n)=>{let{editor:t}=F(),p=o?J:"div";return t?k(p,{ref:n,...r,onClick:()=>i?.(t),children:e}):null});b.displayName="EditorBubbleItem";import{forwardRef as V}from"react";import{CommandEmpty as q,CommandItem as z}from"cmdk";import{useCurrentEditor as G}from"@tiptap/react";import{useAtomValue as K}from"jotai";import{jsx as U}from"react/jsx-runtime";var P=V(({children:e,onCommand:o,...i},r)=>{let{editor:n}=G(),t=K(s);return!n||!t?null:U(z,{ref:r,...i,onSelect:()=>o({editor:n,range:t}),children:e})});P.displayName="EditorCommandItem";var Q=q;export{C as EditorBubble,b as EditorBubbleItem,v as EditorCommand,Q as EditorCommandEmpty,P as EditorCommandItem,x as EditorCommandList,f as EditorContent,g as EditorRoot,No as useEditor}; | ||
import{B as c,h as s,i as l,j as u,k as v,l as x}from"./chunk-RCJTUCCX.js";import{useCurrentEditor as No}from"@tiptap/react";import{}from"@tiptap/core";import{useMemo as N,useRef as I,forwardRef as h}from"react";import{EditorProvider as B}from"@tiptap/react";import{Provider as M}from"jotai";import S from"tunnel-rat";import{jsx as d}from"react/jsx-runtime";var g=({children:e})=>{let o=I(S()).current;return d(M,{store:l,children:d(u.Provider,{value:o,children:e})})},f=h(({className:e,children:o,initialContent:i,...r},n)=>{let t=N(()=>[...c,...r.extensions??[]],[r.extensions]);return d("div",{ref:n,className:e,children:d(B,{...r,content:i,extensions:t,children:o})})});f.displayName="EditorContent";import{BubbleMenu as w,isNodeSelection as T,useCurrentEditor as L}from"@tiptap/react";import{useMemo as D,useRef as H,useEffect as O,forwardRef as W}from"react";import{jsx as E}from"react/jsx-runtime";var C=W(({children:e,tippyOptions:o,...i},r)=>{let{editor:n}=L(),t=H(null);O(()=>{!t.current||!o?.placement||(t.current.setProps({placement:o.placement}),t.current.popperInstance?.update())},[o?.placement]);let p=D(()=>({shouldShow:({editor:m,state:y})=>{let{selection:a}=y,{empty:R}=a;return!(!m.isEditable||m.isActive("image")||R||T(a))},tippyOptions:{onCreate:m=>{t.current=m},moveTransition:"transform 0.15s ease-out",...o},...i}),[i,o]);return n?E("div",{ref:r,children:E(w,{editor:n,...p,children:e})}):null});C.displayName="EditorBubble";import{forwardRef as A}from"react";import{Slot as J}from"@radix-ui/react-slot";import{useCurrentEditor as F}from"@tiptap/react";import{jsx as k}from"react/jsx-runtime";var b=A(({children:e,asChild:o,onSelect:i,...r},n)=>{let{editor:t}=F(),p=o?J:"div";return t?k(p,{ref:n,...r,onClick:()=>i?.(t),children:e}):null});b.displayName="EditorBubbleItem";import{forwardRef as V}from"react";import{CommandEmpty as q,CommandItem as z}from"cmdk";import{useCurrentEditor as G}from"@tiptap/react";import{useAtomValue as K}from"jotai";import{jsx as U}from"react/jsx-runtime";var P=V(({children:e,onCommand:o,...i},r)=>{let{editor:n}=G(),t=K(s);return!n||!t?null:U(z,{ref:r,...i,onSelect:()=>o({editor:n,range:t}),children:e})});P.displayName="EditorCommandItem";var Q=q;export{C as EditorBubble,b as EditorBubbleItem,v as EditorCommand,Q as EditorCommandEmpty,P as EditorCommandItem,x as EditorCommandList,f as EditorContent,g as EditorRoot,No as useEditor}; |
{ | ||
"name": "novel", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Notion-style WYSIWYG editor with AI-powered autocompletions", | ||
@@ -28,2 +28,7 @@ "license": "Apache-2.0", | ||
"require": "./dist/plugins.cjs" | ||
}, | ||
"./utils": { | ||
"types": "./dist/utils.d.ts", | ||
"import": "./dist/utils.js", | ||
"require": "./dist/utils.cjs" | ||
} | ||
@@ -30,0 +35,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60056
19
293
5