@lyfie/luthor 2.7.2 → 2.7.3
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/{LegacyRichEditor-B7tBYiAH.d.ts → LegacyRichEditor-BK1LjaUd.d.ts} +1 -1
- package/dist/chunk-4DHY4VVC.js +18 -0
- package/dist/{chunk-PFWQGTSK.js → chunk-5VVQH4YY.js} +1 -1
- package/dist/{chunk-V75SOSOI.js → chunk-6KIISXIV.js} +1 -1
- package/dist/{chunk-RS22WMZX.js → chunk-6UNJGUCM.js} +1 -1
- package/dist/{chunk-UUMK4YO2.js → chunk-CNIX7SRP.js} +1 -1
- package/dist/{chunk-PDH3XYA6.js → chunk-CXFVQX2C.js} +1 -1
- package/dist/{chunk-52PO7X2X.js → chunk-H33QXH5Y.js} +1 -1
- package/dist/{chunk-I3AHXHY7.js → chunk-IZH46QEO.js} +1 -1
- package/dist/{chunk-OIPXHSVH.js → chunk-S4COFPXG.js} +1 -1
- package/dist/{index-BqE8djZV.d.ts → index-D2lyPRu1.d.ts} +2 -3
- package/dist/{index-J754GpIL.d.ts → index-eZXI9w3M.d.ts} +2 -4
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/presets/compose/index.d.ts +1 -1
- package/dist/presets/compose/index.js +1 -1
- package/dist/presets/extensive/index.d.ts +2 -2
- package/dist/presets/extensive/index.js +1 -1
- package/dist/presets/headless-editor/index.d.ts +1 -1
- package/dist/presets/headless-editor/index.js +1 -1
- package/dist/presets/html-editor/index.d.ts +2 -2
- package/dist/presets/html-editor/index.js +1 -1
- package/dist/presets/legacy-rich/index.d.ts +2 -2
- package/dist/presets/legacy-rich/index.js +1 -1
- package/dist/presets/md-editor/index.d.ts +2 -2
- package/dist/presets/md-editor/index.js +1 -1
- package/dist/presets/simple-editor/index.d.ts +1 -1
- package/dist/presets/simple-editor/index.js +1 -1
- package/dist/presets/slash-editor/index.d.ts +1 -1
- package/dist/presets/slash-editor/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-CVDX3AKZ.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
import {ha,sa,Ea,ja}from'./chunk-
|
|
1
|
+
import {ha,sa,Ea,ja}from'./chunk-4DHY4VVC.js';import {jsonToMarkdown}from'@lyfie/luthor-headless';import {useRef,useState,useMemo,useCallback,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';var W=JSON.stringify({root:{children:[{children:[{detail:0,format:0,mode:"normal",style:"",text:"",type:"text",version:1}],direction:null,format:"",indent:0,type:"paragraph",version:1}],direction:null,format:"",indent:0,type:"root",version:1}});function N(o){return typeof o=="number"?`${o}px`:o}function D(o,n){if(typeof o=="number"&&Number.isFinite(o))return o;if(typeof o=="string"){let l=o.trim();if(l.length===0)return n;let g=Number.parseFloat(l.replace("px",""));if(Number.isFinite(g))return g}return n}function ce(o){try{let n=o?JSON.parse(o):void 0;return ja(jsonToMarkdown(n))}catch{return ""}}function Z(o,n,l){return l<=n?n:Math.min(l,Math.max(n,o))}function me(o,n,l){o.focus();let L=Array.from(o.children).filter(s=>s instanceof HTMLElement).reduce((s,r)=>{let u=r.getBoundingClientRect(),M=u.top+u.height/2;if(!s)return r;let y=s.getBoundingClientRect(),P=y.top+y.height/2;return Math.abs(M-l)<Math.abs(P-l)?r:s},null)??o.firstElementChild??o,C=o.getBoundingClientRect(),x=L.getBoundingClientRect(),a=Z(n,C.left+1,C.right-1),c=Z(l,x.top+1,x.bottom-1),d=document,m=d.caretPositionFromPoint?.(a,c);if(m){let s=window.getSelection();if(!s)return;let r=document.createRange();r.setStart(m.offsetNode,m.offset),r.collapse(true),s.removeAllRanges(),s.addRange(r);return}let f=d.caretRangeFromPoint?.(a,c);if(!f)return;let p=window.getSelection();p&&(f.collapse(true),p.removeAllRanges(),p.addRange(f));}function j({className:o,variantClassName:n,initialTheme:l,onThemeChange:g,theme:z,defaultContent:L,showDefaultContent:C=false,placeholder:x,formattingOptions:a,onSend:c,outputFormat:d="md",clearOnSend:m=true,allowEmptySend:f=false,submitOnEnter:p=false,allowShiftEnter:s=true,minHeight:r=56,maxHeight:u=220,minWidth:M=240,maxWidth:y="100%",showBottomToolbar:P=true,toolbarButtons:te=[],toolbarClassName:oe,toolbarStyle:re,showSendButton:R=true,sendButtonPlacement:w="inside",sendButtonContent:K="Send",sendButtonAriaLabel:V="Send message",sendButtonClassName:I,scrollAreaClassName:B}){let F=useRef(null),E=useRef(null),[J,ie]=useState(()=>D(r,56)),q=useMemo(()=>D(r,56),[r]),A=useMemo(()=>D(u,220),[u]),O=useMemo(()=>({bold:a?.bold!==false,italic:a?.italic!==false,strikethrough:a?.strikethrough!==false}),[a]),ne=useMemo(()=>({disabledCommandIds:["history.undo","history.redo"],bindings:{"format.bold":[{key:"b",ctrlKey:true},{key:"b",metaKey:true}],"format.italic":[{key:"i",ctrlKey:true},{key:"i",metaKey:true}],"format.strikethrough":[{key:"x",ctrlKey:true,shiftKey:true},{key:"x",metaKey:true,shiftKey:true}],"format.code":false,"block.codeblock":false}}),[]),_=useCallback(()=>{let e=F.current?.getJSON()??W,t=ce(e);return {json:e,markdown:t,text:d==="json"?e:t}},[d]),T=useCallback(()=>{if(!c)return;let e=_();!f&&!e.markdown.trim()||(c({format:d,text:e.text,markdown:e.markdown,json:e.json}),m&&F.current?.injectJSON(W));},[f,m,c,d,_]),h=useCallback(()=>{let e=E.current;if(!e)return;let t=e.querySelector(".luthor-content-editable");if(!t)return;let i=Math.max(q,Math.min(A,t.scrollHeight));ie(i);},[A,q]),se=useCallback(e=>{!p||e.key!=="Enter"||e.nativeEvent.isComposing||e.shiftKey&&s||(e.preventDefault(),T());},[s,T,p]),le=useCallback(e=>{let t=e.target;if(t.closest("button, a, input, textarea, [contenteditable='true']")||t.closest(".luthor-simple-editor-bottom-toolbar"))return;let S=E.current?.querySelector(".luthor-content-editable");S&&(e.preventDefault(),me(S,e.clientX,e.clientY));},[]);useEffect(()=>{h();},[h]),useEffect(()=>{let e=E.current;if(!e)return;let t=e.querySelector(".luthor-content-editable");if(!t)return;let i=()=>h();t.addEventListener("input",i),t.addEventListener("keyup",i),t.addEventListener("paste",i);let S=typeof ResizeObserver<"u"?new ResizeObserver(()=>h()):null;S?.observe(t);let Y=new MutationObserver(()=>h());return Y.observe(t,{childList:true,subtree:true,characterData:true}),()=>{t.removeEventListener("input",i),t.removeEventListener("keyup",i),t.removeEventListener("paste",i),S?.disconnect(),Y.disconnect();}},[h]),useEffect(()=>{let t=E.current?.querySelector(".luthor-richtext-container");if(!t||!B)return;let i=B.split(/\s+/).filter(Boolean);if(i.length!==0)return t.classList.add(...i),()=>{t.classList.remove(...i);}},[B]);let ae=useMemo(()=>({"--luthor-simple-editor-min-height":N(r),"--luthor-simple-editor-max-height":N(u),"--luthor-simple-editor-current-height":`${J}px`,"--luthor-simple-editor-min-width":N(M),"--luthor-simple-editor-max-width":N(y)}),[J,u,y,r,M]);return jsx("div",{ref:E,className:["luthor-preset-simple-editor",R&&w==="inside"?"luthor-preset-simple-editor--send-inside":"",o].filter(Boolean).join(" "),style:ae,onKeyDownCapture:se,onMouseDownCapture:le,children:jsxs("div",{className:"luthor-simple-editor-row",children:[jsxs("div",{className:"luthor-simple-editor-shell",children:[jsx(Ea,{ref:F,initialTheme:l,onThemeChange:g,theme:z,defaultContent:L,showDefaultContent:C,placeholder:x,variantClassName:["luthor-preset-simple-editor__variant",n].filter(Boolean).join(" "),isToolbarEnabled:false,availableModes:["visual-only","visual"],initialMode:"visual",shortcutConfig:ne,featureFlags:{bold:O.bold,italic:O.italic,underline:false,strikethrough:O.strikethrough,fontFamily:false,fontSize:false,lineHeight:false,textColor:false,textHighlight:false,subscript:false,superscript:false,link:false,horizontalRule:false,table:false,list:false,image:false,blockFormat:false,code:false,codeIntelligence:false,codeFormat:false,iframeEmbed:false,youTubeEmbed:false,floatingToolbar:false,contextMenu:false,commandPalette:false,slashCommand:false,emoji:false,draggableBlock:false,customNode:false,themeToggle:false,history:false}}),R&&w==="inside"&&jsx("button",{type:"button",className:["luthor-simple-editor-action","luthor-simple-editor-action-send","luthor-simple-editor-action-send--inside",I].filter(Boolean).join(" "),"data-testid":"simple-editor-send-button",onClick:T,"aria-label":V,children:K}),P&&jsx("div",{className:["luthor-simple-editor-bottom-toolbar",oe].filter(Boolean).join(" "),style:re,"data-testid":"simple-editor-actions",children:te.map(e=>jsx("button",{type:"button",className:["luthor-simple-editor-action",e.className].filter(Boolean).join(" "),"aria-label":e.ariaLabel,disabled:e.disabled,title:e.title,onClick:e.onClick,children:e.content},e.id))})]}),R&&w==="right"&&jsx("button",{type:"button",className:["luthor-simple-editor-action","luthor-simple-editor-action-send","luthor-simple-editor-action-send--right",I].filter(Boolean).join(" "),"data-testid":"simple-editor-send-button",onClick:T,"aria-label":V,children:K})]})})}var fe={id:"simple-editor",label:"Simple Editor",description:"Lightweight editor with constrained formatting and send controls.",extensions:sa({featureFlags:{bold:true,italic:true,underline:false,strikethrough:true,table:false,image:false,blockFormat:false,code:false,codeIntelligence:false,codeFormat:false,list:false,iframeEmbed:false,youTubeEmbed:false,commandPalette:false,slashCommand:false,draggableBlock:false,customNode:false,history:false}}),components:{Editor:j},toolbar:[],config:ha("simple-editor","Type your message..."),css:"simple-editor/styles.css"};export{j as a,fe as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as EditorPreset, h as ToolbarItemType } from './index-
|
|
2
|
-
import { FontFamilyOption, FontSizeOption, LineHeightOption, CodeLanguageOptionsConfig
|
|
1
|
+
import { n as EditorPreset, h as ToolbarItemType } from './index-eZXI9w3M.js';
|
|
2
|
+
import { FontFamilyOption, FontSizeOption, LineHeightOption, CodeLanguageOptionsConfig } from '@lyfie/luthor-headless';
|
|
3
3
|
|
|
4
4
|
declare const extensiveToolbar: readonly ["undo", "redo", "fontFamily", "heading", "fontSize", "lineHeight", "textColor", "textHighlight", "bold", "italic", "underline", "strikethrough", "subscript", "superscript", "link", "image", "table", "horizontalRule", "iframeEmbed", "youtubeEmbed", "blockquote", "code", "codeBlock", "bulletedList", "numberedList", "checkList", "commandPalette", "floatingToolbar", "contextMenu", "draggableBlock", "customNode", "sourceMode", "themeToggle"];
|
|
5
5
|
declare const extensivePreset: EditorPreset;
|
|
@@ -12,7 +12,6 @@ type ExtensivePresetConfig = {
|
|
|
12
12
|
isCopyAllowed?: boolean;
|
|
13
13
|
languageOptions?: readonly string[] | CodeLanguageOptionsConfig;
|
|
14
14
|
showLineNumbers?: boolean;
|
|
15
|
-
grammarPreloadMode?: CodeGrammarPreloadMode;
|
|
16
15
|
};
|
|
17
16
|
declare function createExtensivePreset(config?: ExtensivePresetConfig): EditorPreset;
|
|
18
17
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { LuthorEditorThemeOverrides, CommandPaletteItem, SlashCommandItem, FontFamilyOption, FontSizeOption, LineHeightOption,
|
|
2
|
+
import { LuthorEditorThemeOverrides, CommandPaletteItem, SlashCommandItem, FontFamilyOption, FontSizeOption, LineHeightOption, CodeHighlightProvider, CodeLanguageOptionsConfig, LuthorTheme, SourceMetadataMode, MarkdownBridgeFlavor, Extension as Extension$1, EditorConfig } from '@lyfie/luthor-headless';
|
|
3
3
|
|
|
4
4
|
type CoreTheme = "light" | "dark";
|
|
5
5
|
type CoreEditorMode = "visual-only" | "visual-editor" | "visual" | "json" | "markdown" | "html";
|
|
@@ -386,7 +386,6 @@ type ExtensiveExtensionsConfig = {
|
|
|
386
386
|
isDraggableBoxEnabled?: boolean;
|
|
387
387
|
scaleByRatio?: boolean;
|
|
388
388
|
syntaxHighlighting?: "auto" | "disabled";
|
|
389
|
-
grammarPreloadMode?: CodeGrammarPreloadMode;
|
|
390
389
|
codeHighlightProvider?: CodeHighlightProvider | null;
|
|
391
390
|
loadCodeHighlightProvider?: () => Promise<CodeHighlightProvider | null>;
|
|
392
391
|
maxAutoDetectCodeLength?: number;
|
|
@@ -396,7 +395,7 @@ type ExtensiveExtensionsConfig = {
|
|
|
396
395
|
/** Maximum list sub-indent levels (excluding the top-level list). Default: 8 */
|
|
397
396
|
maxListIndentation?: number;
|
|
398
397
|
};
|
|
399
|
-
declare function buildExtensiveExtensions({ fontFamilyOptions, fontSizeOptions, lineHeightOptions, minimumDefaultLineHeight, featureFlags, isDraggableBoxEnabled, scaleByRatio, syntaxHighlighting,
|
|
398
|
+
declare function buildExtensiveExtensions({ fontFamilyOptions, fontSizeOptions, lineHeightOptions, minimumDefaultLineHeight, featureFlags, isDraggableBoxEnabled, scaleByRatio, syntaxHighlighting, codeHighlightProvider, loadCodeHighlightProvider, maxAutoDetectCodeLength, isCopyAllowed, languageOptions, showLineNumbers, maxListIndentation, }?: ExtensiveExtensionsConfig): Extension[];
|
|
400
399
|
type ExtensiveExtensions = ReturnType<typeof buildExtensiveExtensions>;
|
|
401
400
|
declare function createExtensiveExtensions(config?: ExtensiveExtensionsConfig): ExtensiveExtensions;
|
|
402
401
|
declare const extensiveExtensions: Extension[];
|
|
@@ -466,7 +465,6 @@ interface ExtensiveEditorProps {
|
|
|
466
465
|
markdownBridgeFlavor?: MarkdownBridgeFlavor;
|
|
467
466
|
markdownSourceOfTruth?: boolean;
|
|
468
467
|
syntaxHighlighting?: "auto" | "disabled";
|
|
469
|
-
grammarPreloadMode?: CodeGrammarPreloadMode;
|
|
470
468
|
codeHighlightProvider?: CodeHighlightProvider | null;
|
|
471
469
|
loadCodeHighlightProvider?: () => Promise<CodeHighlightProvider | null>;
|
|
472
470
|
maxAutoDetectCodeLength?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CoreEditorCommands, b as CoreEditorActiveStates, c as CoreTheme, d as CoreEditorMode, e as CoreToolbarClassNames, f as ToolbarStyleVars, T as ToolbarLayout, g as ToolbarVisibility, B as BlockHeadingLevel, h as ToolbarItemType, D as DefaultSettings } from './index-
|
|
2
|
-
export { i as BLOCK_HEADING_LEVELS, j as BlockFormat, k as CommandConfig, l as CommandGenerationOptions, m as DEFAULT_TOOLBAR_LAYOUT, n as EditorPreset, o as EditorThemeOverrides, p as ExtensiveEditor, q as ExtensiveEditorMode, E as ExtensiveEditorProps, a as ExtensiveEditorRef, r as ExtensiveExtensionsConfig, s as FeatureFlag, F as FeatureFlagOverrides, t as FeatureFlags, I as ImageAlignment, u as InsertImageConfig, v as InsertTableConfig, K as KeyboardShortcut, Q as QuoteStyleVars, S as ShortcutBindingOverride, w as ShortcutConfig, x as SlashCommandVisibility, y as SlashCommandVisibilityFilters, z as SlashCommandVisibilitySelection, A as TRADITIONAL_TOOLBAR_LAYOUT, G as TextAlignment, H as ToolbarAlignment, J as ToolbarPosition, L as ToolbarSection, M as commandsToCommandPaletteItems, N as commandsToSlashCommandItems, O as createExtensiveExtensions, P as extensiveExtensions, R as generateCommands, U as presetRegistry, V as registerKeyboardShortcuts } from './index-
|
|
1
|
+
import { C as CoreEditorCommands, b as CoreEditorActiveStates, c as CoreTheme, d as CoreEditorMode, e as CoreToolbarClassNames, f as ToolbarStyleVars, T as ToolbarLayout, g as ToolbarVisibility, B as BlockHeadingLevel, h as ToolbarItemType, D as DefaultSettings } from './index-eZXI9w3M.js';
|
|
2
|
+
export { i as BLOCK_HEADING_LEVELS, j as BlockFormat, k as CommandConfig, l as CommandGenerationOptions, m as DEFAULT_TOOLBAR_LAYOUT, n as EditorPreset, o as EditorThemeOverrides, p as ExtensiveEditor, q as ExtensiveEditorMode, E as ExtensiveEditorProps, a as ExtensiveEditorRef, r as ExtensiveExtensionsConfig, s as FeatureFlag, F as FeatureFlagOverrides, t as FeatureFlags, I as ImageAlignment, u as InsertImageConfig, v as InsertTableConfig, K as KeyboardShortcut, Q as QuoteStyleVars, S as ShortcutBindingOverride, w as ShortcutConfig, x as SlashCommandVisibility, y as SlashCommandVisibilityFilters, z as SlashCommandVisibilitySelection, A as TRADITIONAL_TOOLBAR_LAYOUT, G as TextAlignment, H as ToolbarAlignment, J as ToolbarPosition, L as ToolbarSection, M as commandsToCommandPaletteItems, N as commandsToSlashCommandItems, O as createExtensiveExtensions, P as extensiveExtensions, R as generateCommands, U as presetRegistry, V as registerKeyboardShortcuts } from './index-eZXI9w3M.js';
|
|
3
3
|
import { CommandPaletteItem, EmojiCatalogItem, SlashCommandItem, FloatingToolbarExtension, LexicalEditor, EditorConfig } from '@lyfie/luthor-headless';
|
|
4
4
|
import * as luthorHeadless from '@lyfie/luthor-headless';
|
|
5
5
|
export { luthorHeadless as headless };
|
|
@@ -8,11 +8,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ForwardRefExoticComponent, SVGProps, RefAttributes, ReactNode } from 'react';
|
|
10
10
|
export { ComposeEditor, ComposeEditorProps, composePreset } from './presets/compose/index.js';
|
|
11
|
-
import { S as StyleVarRecord, a as StyleVarValueRecord, F as FeatureFlagsLike, b as FeatureShortcutSpec, T as ToolbarFeatureMap, P as PresetModeCache } from './index-
|
|
12
|
-
export { E as ExtensivePresetConfig, c as createExtensivePreset, e as extensivePreset } from './index-
|
|
11
|
+
import { S as StyleVarRecord, a as StyleVarValueRecord, F as FeatureFlagsLike, b as FeatureShortcutSpec, T as ToolbarFeatureMap, P as PresetModeCache } from './index-D2lyPRu1.js';
|
|
12
|
+
export { E as ExtensivePresetConfig, c as createExtensivePreset, e as extensivePreset } from './index-D2lyPRu1.js';
|
|
13
13
|
export { HTMLEditor, HTMLEditorMode, HTMLEditorProps, htmlEditorPreset } from './presets/html-editor/index.js';
|
|
14
14
|
export { HeadlessEditorPreset, HeadlessEditorPresetProps, headlessEditorPreset } from './presets/headless-editor/index.js';
|
|
15
|
-
export { L as LegacyRichEditor, a as LegacyRichEditorMode, b as LegacyRichEditorProps, c as LegacyRichSourceFormat } from './LegacyRichEditor-
|
|
15
|
+
export { L as LegacyRichEditor, a as LegacyRichEditorMode, b as LegacyRichEditorProps, c as LegacyRichSourceFormat } from './LegacyRichEditor-BK1LjaUd.js';
|
|
16
16
|
export { MarkDownEditor, MarkDownEditorMode, MarkDownEditorProps, mdEditorPreset } from './presets/md-editor/index.js';
|
|
17
17
|
export { SimpleEditor, SimpleEditorOutputFormat, SimpleEditorProps, SimpleEditorSendPayload, SimpleFormattingOptions, SimpleToolbarButton, simpleEditorPreset } from './presets/simple-editor/index.js';
|
|
18
18
|
export { SlashEditor, SlashEditorProps, slashEditorPreset } from './presets/slash-editor/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-H33QXH5Y.js';export{a as SlashEditor,b as slashEditorPreset}from'./chunk-H33QXH5Y.js';import {b as b$5}from'./chunk-CXFVQX2C.js';export{a as ComposeEditor,b as composePreset}from'./chunk-CXFVQX2C.js';import {b}from'./chunk-6KIISXIV.js';export{a as HeadlessEditorPreset,b as headlessEditorPreset}from'./chunk-6KIISXIV.js';import {b as b$2}from'./chunk-CNIX7SRP.js';export{a as HTMLEditor,b as htmlEditorPreset}from'./chunk-CNIX7SRP.js';import {b as b$3}from'./chunk-IZH46QEO.js';export{a as MarkDownEditor,b as mdEditorPreset}from'./chunk-IZH46QEO.js';import {g}from'./chunk-5VVQH4YY.js';export{f as LegacyRichEditor,g as legacyRichPreset}from'./chunk-5VVQH4YY.js';export{a as PresetFeaturePolicy,b as joinClassNames}from'./chunk-6UNJGUCM.js';import {b as b$4}from'./chunk-S4COFPXG.js';export{a as SimpleEditor,b as simpleEditorPreset}from'./chunk-S4COFPXG.js';import {Ga}from'./chunk-4DHY4VVC.js';export{x as AlignCenterIcon,y as AlignJustifyIcon,w as AlignLeftIcon,z as AlignRightIcon,b as BLOCK_HEADING_LEVELS,i as BoldIcon,Z as Button,T as ChevronDownIcon,U as CloseIcon,n as CodeBlockIcon,m as CodeIcon,H as CommandIcon,V as CommandPalette,c as DEFAULT_TOOLBAR_LAYOUT,aa as Dialog,$ as Dropdown,Q as EmojiIcon,W as EmojiSuggestionMenu,Ea as ExtensiveEditor,E as EyeIcon,D as FileCodeIcon,ba as FloatingToolbar,F as HighlighterIcon,Y as IconButton,v as ImageIcon,L as IndentIcon,j as ItalicIcon,ea as LinkHoverBubble,o as LinkIcon,r as ListCheckIcon,q as ListIcon,s as ListOrderedIcon,B as MinusIcon,fa as ModeTabs,O as MoonIcon,M as OutdentIcon,I as PaletteIcon,G as PencilIcon,K as QuoteIcon,u as RedoIcon,P as SearchIcon,_ as Select,X as SlashCommandMenu,ga as SourceView,l as StrikethroughIcon,R as SubscriptIcon,N as SunIcon,S as SuperscriptIcon,d as TRADITIONAL_TOOLBAR_LAYOUT,C as TableIcon,oa as Toolbar,J as TypeIcon,k as UnderlineIcon,t as UndoIcon,p as UnlinkIcon,A as UploadIcon,f as commandsToCommandPaletteItems,g as commandsToSlashCommandItems,va as createDefaultSettingsStyleVarRecord,sa as createExtensiveExtensions,Ha as createExtensivePreset,za as createFeatureGuardedCommands,da as createFloatingToolbarExtension,Aa as createModeCache,ha as createPresetEditorConfig,ta as extensiveExtensions,Ga as extensivePreset,na as filterToolbarLayout,ka as formatHTMLSource,ia as formatJSONSource,ja as formatMarkdownSource,e as generateCommands,Ba as invalidateModeCache,wa as isEditableCommandTarget,Ca as isModeCached,xa as isShortcutMatch,la as isToolbarItemSupported,ma as isToolbarItemVisible,Da as markModeCached,ya as mergeToolbarVisibilityWithFeatures,ua as normalizeStyleVarsKey,h as registerKeyboardShortcuts,ca as setFloatingToolbarContext}from'./chunk-4DHY4VVC.js';import*as luthorHeadless from'@lyfie/luthor-headless';export{luthorHeadless as headless };export{CodeIntelligenceExtension,codeIntelligenceExtension}from'@lyfie/luthor-headless';var st={extensive:Ga,compose:b$5,"simple-editor":b$4,"legacy-rich":g,"md-editor":b$3,"html-editor":b$2,"slash-editor":b$1,"headless-editor":b};export{st as presetRegistry};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { E as ExtensiveEditorProps, F as FeatureFlagOverrides, a as ExtensiveEditorRef, n as EditorPreset } from '../../index-
|
|
2
|
+
import { E as ExtensiveEditorProps, F as FeatureFlagOverrides, a as ExtensiveEditorRef, n as EditorPreset } from '../../index-eZXI9w3M.js';
|
|
3
3
|
import '@lyfie/luthor-headless';
|
|
4
4
|
|
|
5
5
|
type ComposeEditorProps = Omit<ExtensiveEditorProps, "featureFlags"> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ComposeEditor,b as composePreset}from'../../chunk-
|
|
1
|
+
export{a as ComposeEditor,b as composePreset}from'../../chunk-CXFVQX2C.js';import'../../chunk-6UNJGUCM.js';import'../../chunk-4DHY4VVC.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as ExtensivePresetConfig, b as FeatureShortcutSpec, T as ToolbarFeatureMap, c as createExtensivePreset, e as extensivePreset, d as extensiveToolbar } from '../../index-
|
|
2
|
-
export { W as DEFAULT_FEATURE_FLAGS, p as ExtensiveEditor, q as ExtensiveEditorMode, E as ExtensiveEditorProps, a as ExtensiveEditorRef, r as ExtensiveExtensionsConfig, s as FeatureFlag, F as FeatureFlagOverrides, t as FeatureFlags, O as createExtensiveExtensions, P as extensiveExtensions, X as isFeatureEnabled, Y as resolveFeatureFlags } from '../../index-
|
|
1
|
+
export { E as ExtensivePresetConfig, b as FeatureShortcutSpec, T as ToolbarFeatureMap, c as createExtensivePreset, e as extensivePreset, d as extensiveToolbar } from '../../index-D2lyPRu1.js';
|
|
2
|
+
export { W as DEFAULT_FEATURE_FLAGS, p as ExtensiveEditor, q as ExtensiveEditorMode, E as ExtensiveEditorProps, a as ExtensiveEditorRef, r as ExtensiveExtensionsConfig, s as FeatureFlag, F as FeatureFlagOverrides, t as FeatureFlags, O as createExtensiveExtensions, P as extensiveExtensions, X as isFeatureEnabled, Y as resolveFeatureFlags } from '../../index-eZXI9w3M.js';
|
|
3
3
|
import '@lyfie/luthor-headless';
|
|
4
4
|
import 'react';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{pa as DEFAULT_FEATURE_FLAGS,Ea as ExtensiveEditor,sa as createExtensiveExtensions,Ha as createExtensivePreset,ta as extensiveExtensions,Ga as extensivePreset,Fa as extensiveToolbar,ra as isFeatureEnabled,qa as resolveFeatureFlags}from'../../chunk-
|
|
1
|
+
export{pa as DEFAULT_FEATURE_FLAGS,Ea as ExtensiveEditor,sa as createExtensiveExtensions,Ha as createExtensivePreset,ta as extensiveExtensions,Ga as extensivePreset,Fa as extensiveToolbar,ra as isFeatureEnabled,qa as resolveFeatureFlags}from'../../chunk-4DHY4VVC.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { E as ExtensiveEditorProps, F as FeatureFlagOverrides, a as ExtensiveEditorRef, n as EditorPreset } from '../../index-
|
|
2
|
+
import { E as ExtensiveEditorProps, F as FeatureFlagOverrides, a as ExtensiveEditorRef, n as EditorPreset } from '../../index-eZXI9w3M.js';
|
|
3
3
|
import '@lyfie/luthor-headless';
|
|
4
4
|
|
|
5
5
|
declare const HEADLESS_EDITOR_DEFAULT_MODES: readonly ["visual-only", "visual", "json", "markdown", "html"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as HeadlessEditorPreset,b as headlessEditorPreset}from'../../chunk-
|
|
1
|
+
export{a as HeadlessEditorPreset,b as headlessEditorPreset}from'../../chunk-6KIISXIV.js';import'../../chunk-6UNJGUCM.js';import'../../chunk-4DHY4VVC.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { a as ExtensiveEditorRef, n as EditorPreset } from '../../index-
|
|
3
|
-
import { b as LegacyRichEditorProps, a as LegacyRichEditorMode } from '../../LegacyRichEditor-
|
|
2
|
+
import { a as ExtensiveEditorRef, n as EditorPreset } from '../../index-eZXI9w3M.js';
|
|
3
|
+
import { b as LegacyRichEditorProps, a as LegacyRichEditorMode } from '../../LegacyRichEditor-BK1LjaUd.js';
|
|
4
4
|
import '@lyfie/luthor-headless';
|
|
5
5
|
|
|
6
6
|
type HTMLEditorMode = Exclude<LegacyRichEditorMode, "markdown">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as HTMLEditor,b as htmlEditorPreset}from'../../chunk-
|
|
1
|
+
export{a as HTMLEditor,b as htmlEditorPreset}from'../../chunk-CNIX7SRP.js';import'../../chunk-5VVQH4YY.js';import'../../chunk-6UNJGUCM.js';import'../../chunk-4DHY4VVC.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { d as LEGACY_RICH_DEFAULT_FEATURE_FLAGS, e as LEGACY_RICH_DUAL_SOURCE_MODES, f as LEGACY_RICH_HTML_MODES, g as LEGACY_RICH_MARKDOWN_MODES, h as LEGACY_RICH_TOOLBAR_LAYOUT, L as LegacyRichEditor, a as LegacyRichEditorMode, b as LegacyRichEditorProps, c as LegacyRichSourceFormat } from '../../LegacyRichEditor-
|
|
2
|
-
import { n as EditorPreset } from '../../index-
|
|
1
|
+
export { d as LEGACY_RICH_DEFAULT_FEATURE_FLAGS, e as LEGACY_RICH_DUAL_SOURCE_MODES, f as LEGACY_RICH_HTML_MODES, g as LEGACY_RICH_MARKDOWN_MODES, h as LEGACY_RICH_TOOLBAR_LAYOUT, L as LegacyRichEditor, a as LegacyRichEditorMode, b as LegacyRichEditorProps, c as LegacyRichSourceFormat } from '../../LegacyRichEditor-BK1LjaUd.js';
|
|
2
|
+
import { n as EditorPreset } from '../../index-eZXI9w3M.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@lyfie/luthor-headless';
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as LEGACY_RICH_DEFAULT_FEATURE_FLAGS,c as LEGACY_RICH_DUAL_SOURCE_MODES,b as LEGACY_RICH_HTML_MODES,a as LEGACY_RICH_MARKDOWN_MODES,e as LEGACY_RICH_TOOLBAR_LAYOUT,f as LegacyRichEditor,g as legacyRichPreset}from'../../chunk-
|
|
1
|
+
export{d as LEGACY_RICH_DEFAULT_FEATURE_FLAGS,c as LEGACY_RICH_DUAL_SOURCE_MODES,b as LEGACY_RICH_HTML_MODES,a as LEGACY_RICH_MARKDOWN_MODES,e as LEGACY_RICH_TOOLBAR_LAYOUT,f as LegacyRichEditor,g as legacyRichPreset}from'../../chunk-5VVQH4YY.js';import'../../chunk-6UNJGUCM.js';import'../../chunk-4DHY4VVC.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { b as LegacyRichEditorProps, a as LegacyRichEditorMode } from '../../LegacyRichEditor-
|
|
3
|
-
import { a as ExtensiveEditorRef, n as EditorPreset } from '../../index-
|
|
2
|
+
import { b as LegacyRichEditorProps, a as LegacyRichEditorMode } from '../../LegacyRichEditor-BK1LjaUd.js';
|
|
3
|
+
import { a as ExtensiveEditorRef, n as EditorPreset } from '../../index-eZXI9w3M.js';
|
|
4
4
|
import '@lyfie/luthor-headless';
|
|
5
5
|
|
|
6
6
|
type MarkDownEditorMode = Exclude<LegacyRichEditorMode, "html">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as MarkDownEditor,b as mdEditorPreset}from'../../chunk-
|
|
1
|
+
export{a as MarkDownEditor,b as mdEditorPreset}from'../../chunk-IZH46QEO.js';import'../../chunk-5VVQH4YY.js';import'../../chunk-6UNJGUCM.js';import'../../chunk-4DHY4VVC.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, CSSProperties } from 'react';
|
|
3
3
|
import { LuthorTheme } from '@lyfie/luthor-headless';
|
|
4
|
-
import { E as ExtensiveEditorProps, n as EditorPreset } from '../../index-
|
|
4
|
+
import { E as ExtensiveEditorProps, n as EditorPreset } from '../../index-eZXI9w3M.js';
|
|
5
5
|
|
|
6
6
|
type SizeValue = number | string;
|
|
7
7
|
type SimpleEditorOutputFormat = "md" | "json";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SimpleEditor,b as simpleEditorPreset}from'../../chunk-
|
|
1
|
+
export{a as SimpleEditor,b as simpleEditorPreset}from'../../chunk-S4COFPXG.js';import'../../chunk-4DHY4VVC.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as ExtensiveEditorProps, x as SlashCommandVisibility, F as FeatureFlagOverrides, n as EditorPreset } from '../../index-
|
|
2
|
+
import { E as ExtensiveEditorProps, x as SlashCommandVisibility, F as FeatureFlagOverrides, n as EditorPreset } from '../../index-eZXI9w3M.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@lyfie/luthor-headless';
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SlashEditor,b as slashEditorPreset}from'../../chunk-
|
|
1
|
+
export{a as SlashEditor,b as slashEditorPreset}from'../../chunk-H33QXH5Y.js';import'../../chunk-6UNJGUCM.js';import'../../chunk-4DHY4VVC.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyfie/luthor",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.3",
|
|
4
4
|
"description": "Luthor presets and plug-and-play configuration for the headless editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@lexical/table": "^0.40.0",
|
|
59
59
|
"@lexical/utils": "^0.40.0",
|
|
60
60
|
"lexical": "^0.40.0",
|
|
61
|
-
"@lyfie/luthor-headless": "2.7.
|
|
61
|
+
"@lyfie/luthor-headless": "2.7.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/node": "^20.19.33",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"tsup": "^8.0.0",
|
|
72
72
|
"typescript": "^5.7.3",
|
|
73
73
|
"vitest": "^3.2.4",
|
|
74
|
-
"@repo/
|
|
75
|
-
"@repo/
|
|
74
|
+
"@repo/eslint-config": "0.0.0",
|
|
75
|
+
"@repo/typescript-config": "0.0.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"react": "^18.0.0 || ^19.0.0",
|