@payloadcms/richtext-lexical 3.68.0-internal.6fa474a → 3.68.0-internal.a0125d7

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.
@@ -62,5 +62,5 @@ ${e.map(ad).join(`
62
62
  `+t.code:"")+"\n```",import:({children:t,closeMatch:e,openMatch:o})=>{let r=o?.[1];return t.startsWith(`
63
63
  `)&&(t=t.slice(1)),t.endsWith(`
64
64
  `)&&(t=t.slice(0,-1)),!!e&&!t.includes(`
65
- `)&&o?.input?.trim()!=="```"+r?{code:r+(t?.length?t:""),language:""}:{code:t,language:r}}};import{jsx as yC}from"react/jsx-runtime";import{CodeField as RC,useFormFields as IC}from"@payloadcms/ui";import{useId as vC,useMemo as MC}from"react";var $o={abap:"ABAP",apex:"Apex",azcli:"Azure CLI",bat:"Batch",bicep:"Bicep",cameligo:"CameLIGO",clojure:"Clojure",coffee:"CoffeeScript",cpp:"C++",csharp:"C#",csp:"CSP",css:"CSS",cypher:"Cypher",dart:"Dart",dockerfile:"Dockerfile",ecl:"ECL",elixir:"Elixir",flow9:"Flow9",freemarker2:"FreeMarker 2",fsharp:"F#",go:"Go",graphql:"GraphQL",handlebars:"Handlebars",hcl:"HCL",html:"HTML",ini:"INI",java:"Java",javascript:"JavaScript",julia:"Julia",kotlin:"Kotlin",less:"Less",lexon:"Lexon",liquid:"Liquid",lua:"Lua",m3:"M3",markdown:"Markdown",mdx:"MDX",mips:"MIPS",msdax:"DAX",mysql:"MySQL","objective-c":"Objective-C",pascal:"Pascal",pascaligo:"PascaLIGO",perl:"Perl",pgsql:"PostgreSQL",php:"PHP",pla:"PLA",plaintext:"Plain Text",postiats:"Postiats",powerquery:"Power Query",powershell:"PowerShell",protobuf:"Protobuf",pug:"Pug",python:"Python",qsharp:"Q#",r:"R",razor:"Razor",redis:"Redis",redshift:"Amazon Redshift",restructuredtext:"reStructuredText",ruby:"Ruby",rust:"Rust",sb:"Small Basic",scala:"Scala",scheme:"Scheme",scss:"SCSS",shell:"Shell",solidity:"Solidity",sophia:"Sophia",sparql:"SPARQL",sql:"SQL",st:"Structured Text",swift:"Swift",systemverilog:"SystemVerilog",tcl:"Tcl",twig:"Twig",typescript:"TypeScript",typespec:"TypeSpec",vb:"Visual Basic",wgsl:"WGSL",xml:"XML",yaml:"YAML"};var DC=({autoComplete:t,field:e,forceRender:o,languages:r=$o,path:n,permissions:l,readOnly:i,renderedBlocks:s,schemaPath:d,typescript:c,validate:u})=>{let a=IC(([w])=>w.language),m=a?.value||a?.initialValue||"typescript",p=vC(),f=r[m],h=MC(()=>({...e,type:"code",admin:{...e.admin,editorOptions:{},editorProps:{defaultPath:m==="ts"?`file-${e.name}-${p}.tsx`:void 0},language:m}}),[e,m,p]),x=`${e.name}-${m}-${f}`;return h&&yC(RC,{autoComplete:t,field:h,forceRender:o,onMount:(w,E)=>{E.editor.defineTheme("vs-dark",{base:"vs-dark",colors:{"editor.background":"#222222"},inherit:!0,rules:[]}),E.editor.defineTheme("vs",{base:"vs",colors:{"editor.background":"#f5f5f5"},inherit:!0,rules:[]}),E.languages.typescript.typescriptDefaults.setCompilerOptions({allowNonTsExtensions:!0,allowJs:!0,allowSyntheticDefaultImports:!0,esModuleInterop:!0,jsx:E.languages.typescript.JsxEmit.React,moduleResolution:E.languages.typescript.ModuleResolutionKind.NodeJs,noEmit:!0,paths:c?.paths,reactNamespace:"React",target:E.languages.typescript.ScriptTarget[c?.target??"ESNext"],typeRoots:c?.typeRoots??["node_modules/@types"]}),E.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!c?.enableSemanticValidation,noSyntaxValidation:!1}),(async()=>{c?.fetchTypes&&Array.isArray(c.fetchTypes)&&c.fetchTypes.length>0&&await Promise.all(c.fetchTypes.map(async _=>{let g=await(await fetch(_.url)).text();E.languages.typescript.typescriptDefaults.addExtraLib(g,_.filePath)}))})()},path:n,permissions:l,readOnly:i,renderedBlocks:s,schemaPath:d,validate:u},x)};import{jsx as re,jsxs as cc}from"react/jsx-runtime";import{useLexicalEditable as jC}from"@lexical/react/useLexicalEditable";import{ChevronIcon as HC,Combobox as UC,CopyToClipboard as WC,PopupList as GC,RenderFields as VC,useForm as KC,useFormFields as uc,useTranslation as JC}from"@payloadcms/ui";import zC from"react";import{jsx as oc}from"react/jsx-runtime";import"react";var rc=()=>oc("svg",{fill:"none",height:"12",viewBox:"0 0 15 12",width:"15",xmlns:"http://www.w3.org/2000/svg",children:oc("path",{d:"M11.3738 8.62598L14.0404 5.95931L11.3738 3.29264M3.37376 3.29264L0.707092 5.95931L3.37376 8.62598M9.04043 0.625977L5.70709 11.2926",stroke:"currentColor",strokeLinecap:"square"})});import{jsx as lc}from"react/jsx-runtime";import"react";import{useCollapsible as AC}from"@payloadcms/ui";import{jsx as nc}from"react/jsx-runtime";import"react";var Ao=()=>nc("svg",{fill:"none",height:"15",viewBox:"0 0 15 15",width:"15",xmlns:"http://www.w3.org/2000/svg",children:nc("path",{d:"M7.16667 13.8333V9.83333M7.16667 9.83333L9.16667 11.8333M7.16667 9.83333L5.16667 11.8333M7.16667 4.5V0.5M7.16667 4.5L9.16667 2.5M7.16667 4.5L5.16667 2.5M1.83333 7.16667H0.5M5.83333 7.16667H4.5M9.83333 7.16667H8.5M13.8333 7.16667H12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})});var $C="code-block-collapse-button",ic=()=>{let{toggle:t}=AC();return lc("button",{className:$C,onClick:t,type:"button",children:lc(Ao,{})})};import{jsx as sc,jsxs as OC}from"react/jsx-runtime";import"react";import{useCollapsible as PC,useTranslation as BC}from"@payloadcms/ui";var FC="code-block-floating-collapse-button",ac=()=>{let{isCollapsed:t,toggle:e}=PC(),{t:o}=BC();return t?OC("button",{className:FC,onClick:e,type:"button",children:[sc("span",{children:o("general:collapse")}),sc(Ao,{})]}):null};var We="payload-richtext-code-block",XC=t=>{let{languages:e}=t,o=e||$o,{BlockCollapsible:r,formSchema:n,RemoveButton:l}=Ce(),{setModified:i}=KC(),{t:s}=JC(),{codeField:d}=uc(([f])=>({codeField:f?.code})),{selectedLanguageField:c,setSelectedLanguage:u}=uc(([f,h])=>({selectedLanguageField:f?.language,setSelectedLanguage:x=>{h({type:"UPDATE",path:"language",value:x}),i(!0)}})),a=o[c?.value],m=jC(),p=zC.useMemo(()=>Object.entries(o).map(([f,h])=>({name:`${f} ${h}`,Component:re(GC.Button,{active:!1,disabled:!1,onClick:()=>{u(f)},children:re("span",{className:`${We}__language-code`,"data-language":f,children:h})})})),[o,u]);return re(r,{Actions:cc("div",{className:`${We}__actions`,children:[re(UC,{button:cc("div",{className:`${We}__language-selector-button`,"data-selected-language":c?.value,children:[re("span",{children:a}),re(HC,{className:`${We}__chevron`})]}),buttonType:"custom",className:`${We}__language-selector`,disabled:!m,entries:p,horizontalAlign:"right",minEntriesForSearch:8,searchPlaceholder:s("fields:searchForLanguage"),showScrollbar:!0,size:"large"}),re(WC,{value:d?.value??""}),re(ic,{}),m&&re(l,{})]}),className:We,collapsibleProps:{AfterCollapsible:re(ac,{}),disableHeaderToggle:!0,disableToggleIndicator:!0},Pill:re("div",{className:`${We}__pill`,children:re(rc,{})}),children:re(VC,{fields:n,forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:"",permissions:!0,readOnly:!m})})};import{c as ZC}from"react/compiler-runtime";import{jsx as ut}from"react/jsx-runtime";import{FieldContext as YC,FieldPathContext as dc,ServerFunctionsContext as mc,ShimmerEffect as qC,useServerFunctions as QC}from"@payloadcms/ui";import e2,{useEffect as t2,useRef as o2}from"react";var r2=t=>{let e=ZC(9),{field:o,initialValue:r,Loading:n,path:l,schemaPath:i,setValue:s,value:d}=t,[c,u]=e2.useState(null),a=QC(),{_internal_renderField:m}=a,[p,f]=i.split(".",2),h=l??(o&&"name"in o?o?.name:"")??"",x;e[0]!==m||e[1]!==o||e[2]!==r||e[3]!==l||e[4]!==i?(x=()=>{(async function(){let{Field:y}=await m({field:{...o||{},type:"richText",admin:{...o?.admin||{},hidden:!1}},initialValue:r??void 0,path:l,schemaPath:i});u(y)})()},e[0]=m,e[1]=o,e[2]=r,e[3]=l,e[4]=i,e[5]=x):x=e[5];let w=x,E=o2(!1),N,_;if(e[6]!==w?(N=()=>{E.current||(E.current=!0,w())},_=[w],e[6]=w,e[7]=N,e[8]=_):(N=e[7],_=e[8]),t2(N,_),!c)return typeof n<"u"?n:ut(qC,{});let C={...a,getFormState:async b=>a.getFormState({...b,collectionSlug:p==="collection"?f:void 0,globalSlug:p==="global"?f:void 0})};if(typeof d>"u"&&!s)return ut(mc,{value:{...C},children:ut(dc,{value:h,children:c},h)});let g={disabled:!1,formInitializing:!1,formProcessing:!1,formSubmitted:!1,initialValue:d,path:h,setValue:s??n2,showError:!1,value:d};return ut(mc,{value:{...C},children:ut(dc,{value:h,children:ut(YC,{value:g,children:c})},h)})};function n2(){}function pc({nodes:t,text:e}){let o={root:{type:"root",children:[],direction:"ltr",format:"",indent:0,version:1}};return e&&o.root.children.push({type:"paragraph",children:[{type:"text",detail:0,format:0,mode:"normal",style:"",text:e,version:1}],direction:"ltr",format:"",indent:0,textFormat:0,textStyle:"",version:1}),t?.length&&o.root.children.push(...t),o}var l2=pc;export{Nt as $createAutoLinkNode,Ae as $createBlockNode,Ye as $createHorizontalRuleNode,mt as $createInlineBlockNode,_e as $createLinkNode,He as $createRelationshipNode,pe as $createUploadNode,we as $isAutoLinkNode,$e as $isBlockNode,St as $isHorizontalRuleNode,pt as $isInlineBlockNode,J as $isLinkNode,Er as $isRelationshipNode,ct as $isUploadNode,Ac as AlignFeatureClient,Te as AutoLinkNode,bC as BlockCollapsible,TC as BlockEditButton,ie as BlockNode,SC as BlockRemoveButton,Uc as BlockquoteFeatureClient,qu as BlocksFeatureClient,_d as BoldFeatureClient,le as CAN_USE_DOM,Nf as ChecklistFeatureClient,XC as CodeBlockBlockComponent,DC as CodeComponent,C0 as DETAIL_TYPE_TO_DETAIL,f0 as DOUBLE_LINE_BREAK,R0 as DebugJsxConverterFeatureClient,k0 as ELEMENT_FORMAT_TO_TYPE,b0 as ELEMENT_TYPE_TO_FORMAT,kc as ENABLE_SLASH_MENU_COMMAND,gc as EditorConfigProvider,ft as FieldsDrawer,th as FixedToolbarFeatureClient,gm as HeadingFeatureClient,$m as HorizontalRuleFeatureClient,ke as HorizontalRuleNode,Xe as INSERT_BLOCK_COMMAND,Ze as INSERT_INLINE_BLOCK_COMMAND,m0 as IS_ALL_FORMATTING,Zm as IndentFeatureClient,xC as InlineBlockContainer,aC as InlineBlockEditButton,fC as InlineBlockLabel,dt as InlineBlockNode,dC as InlineBlockRemoveButton,Nd as InlineCodeFeatureClient,ph as InlineToolbarFeatureClient,Id as ItalicFeatureClient,g0 as LTR_REGEX,Xf as LexicalPluginToLexicalFeatureClient,df as LinkFeatureClient,oe as LinkNode,p0 as NON_BREAKING_SPACE,F as NodeFormat,$f as OrderedListFeatureClient,n0 as ParagraphFeatureClient,Cc as Point,h0 as RTL_REGEX,_c as Rect,b1 as RelationshipFeatureClient,Se as RelationshipNode,r2 as RenderLexical,qx as RichTextField,o0 as SlateToLexicalFeatureClient,Ad as StrikethroughFeatureClient,Bd as SubscriptFeatureClient,Wd as SuperscriptFeatureClient,_0 as TEXT_MODE_TO_TYPE,x0 as TEXT_TYPE_TO_FORMAT,T0 as TEXT_TYPE_TO_MODE,ue as TOGGLE_LINK_COMMAND,lx as TableFeatureClient,md as TestRecorderFeatureClient,lm as TextStateFeatureClient,Ft as ToolbarButton,Ue as ToolbarDropdown,xd as TreeViewFeatureClient,zd as UnderlineFeatureClient,Uf as UnorderedListFeatureClient,Ux as UploadFeatureClient,me as UploadNode,lC as addSwipeDownListener,oC as addSwipeLeftListener,rC as addSwipeRightListener,nC as addSwipeUpListener,l2 as buildDefaultEditorState,pc as buildEditorState,tc as codeConverterClient,or as createBlockNode,$ as createClientFeature,I0 as defaultColors,Yr as defaultEditorLexicalConfig,Ir as getDOMRangeRect,Tc as getEnabledNodes,LC as getRestPopulateFn,qe as getSelectedNode,Qx as isHTMLElement,bc as isPoint,eC as joinClasses,qr as sanitizeClientEditorConfig,Qa as sanitizeClientFeatures,_o as setFloatingElemPosition,fo as setFloatingElemPositionForLinkEditor,Z as slashMenuBasicGroupWithItems,be as toolbarAddDropdownGroupWithItems,nr as toolbarFeatureButtonsGroupWithItems,Y as toolbarFormatGroupWithItems,te as toolbarTextDropdownGroupWithItems,Ce as useBlockComponentContext,H as useEditorConfigContext,ge as useInlineBlockComponentContext,xc as useLexicalDocumentDrawer,he as useLexicalDrawer,Ot as useLexicalListDrawer};
65
+ `)&&o?.input?.trim()!=="```"+r?{code:r+(t?.length?t:""),language:""}:{code:t,language:r}}};import{jsx as yC}from"react/jsx-runtime";import{CodeField as RC,useFormFields as IC}from"@payloadcms/ui";import{useId as vC,useMemo as MC}from"react";var $o={abap:"ABAP",apex:"Apex",azcli:"Azure CLI",bat:"Batch",bicep:"Bicep",cameligo:"CameLIGO",clojure:"Clojure",coffee:"CoffeeScript",cpp:"C++",csharp:"C#",csp:"CSP",css:"CSS",cypher:"Cypher",dart:"Dart",dockerfile:"Dockerfile",ecl:"ECL",elixir:"Elixir",flow9:"Flow9",freemarker2:"FreeMarker 2",fsharp:"F#",go:"Go",graphql:"GraphQL",handlebars:"Handlebars",hcl:"HCL",html:"HTML",ini:"INI",java:"Java",javascript:"JavaScript",julia:"Julia",kotlin:"Kotlin",less:"Less",lexon:"Lexon",liquid:"Liquid",lua:"Lua",m3:"M3",markdown:"Markdown",mdx:"MDX",mips:"MIPS",msdax:"DAX",mysql:"MySQL","objective-c":"Objective-C",pascal:"Pascal",pascaligo:"PascaLIGO",perl:"Perl",pgsql:"PostgreSQL",php:"PHP",pla:"PLA",plaintext:"Plain Text",postiats:"Postiats",powerquery:"Power Query",powershell:"PowerShell",protobuf:"Protobuf",pug:"Pug",python:"Python",qsharp:"Q#",r:"R",razor:"Razor",redis:"Redis",redshift:"Amazon Redshift",restructuredtext:"reStructuredText",ruby:"Ruby",rust:"Rust",sb:"Small Basic",scala:"Scala",scheme:"Scheme",scss:"SCSS",shell:"Shell",solidity:"Solidity",sophia:"Sophia",sparql:"SPARQL",sql:"SQL",st:"Structured Text",swift:"Swift",systemverilog:"SystemVerilog",tcl:"Tcl",twig:"Twig",typescript:"TypeScript",typespec:"TypeSpec",vb:"Visual Basic",wgsl:"WGSL",xml:"XML",yaml:"YAML"};var DC=({autoComplete:t,field:e,forceRender:o,languages:r=$o,path:n,permissions:l,readOnly:i,renderedBlocks:s,schemaPath:d,typescript:c,validate:u})=>{let a=IC(([w])=>w.language),m=a?.value||a?.initialValue||"typescript",p=vC(),f=r[m],h=MC(()=>({...e,type:"code",admin:{...e.admin,editorOptions:{},editorProps:{defaultPath:m==="ts"?`file-${e.name}-${p}.tsx`:void 0},language:m}}),[e,m,p]),x=`${e.name}-${m}-${f}`;return h&&yC(RC,{autoComplete:t,field:h,forceRender:o,onMount:(w,E)=>{E.editor.defineTheme("vs-dark",{base:"vs-dark",colors:{"editor.background":"#222222"},inherit:!0,rules:[]}),E.editor.defineTheme("vs",{base:"vs",colors:{"editor.background":"#f5f5f5"},inherit:!0,rules:[]}),E.languages.typescript.typescriptDefaults.setCompilerOptions({allowNonTsExtensions:!0,allowJs:!0,allowSyntheticDefaultImports:!0,esModuleInterop:!0,jsx:E.languages.typescript.JsxEmit.React,moduleResolution:E.languages.typescript.ModuleResolutionKind.NodeJs,noEmit:!0,paths:c?.paths,reactNamespace:"React",target:E.languages.typescript.ScriptTarget[c?.target??"ESNext"],typeRoots:c?.typeRoots??["node_modules/@types"]}),E.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!c?.enableSemanticValidation,noSyntaxValidation:!1}),(async()=>c?.fetchTypes&&Array.isArray(c.fetchTypes)&&c.fetchTypes.length>0&&await Promise.all(c.fetchTypes.map(async _=>{let g=await(await fetch(_.url)).text();E.languages.typescript.typescriptDefaults.addExtraLib(g,_.filePath)})))()},path:n,permissions:l,readOnly:i,renderedBlocks:s,schemaPath:d,validate:u},x)};import{jsx as re,jsxs as cc}from"react/jsx-runtime";import{useLexicalEditable as jC}from"@lexical/react/useLexicalEditable";import{ChevronIcon as HC,Combobox as UC,CopyToClipboard as WC,PopupList as GC,RenderFields as VC,useForm as KC,useFormFields as uc,useTranslation as JC}from"@payloadcms/ui";import zC from"react";import{jsx as oc}from"react/jsx-runtime";import"react";var rc=()=>oc("svg",{fill:"none",height:"12",viewBox:"0 0 15 12",width:"15",xmlns:"http://www.w3.org/2000/svg",children:oc("path",{d:"M11.3738 8.62598L14.0404 5.95931L11.3738 3.29264M3.37376 3.29264L0.707092 5.95931L3.37376 8.62598M9.04043 0.625977L5.70709 11.2926",stroke:"currentColor",strokeLinecap:"square"})});import{jsx as lc}from"react/jsx-runtime";import"react";import{useCollapsible as AC}from"@payloadcms/ui";import{jsx as nc}from"react/jsx-runtime";import"react";var Ao=()=>nc("svg",{fill:"none",height:"15",viewBox:"0 0 15 15",width:"15",xmlns:"http://www.w3.org/2000/svg",children:nc("path",{d:"M7.16667 13.8333V9.83333M7.16667 9.83333L9.16667 11.8333M7.16667 9.83333L5.16667 11.8333M7.16667 4.5V0.5M7.16667 4.5L9.16667 2.5M7.16667 4.5L5.16667 2.5M1.83333 7.16667H0.5M5.83333 7.16667H4.5M9.83333 7.16667H8.5M13.8333 7.16667H12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})});var $C="code-block-collapse-button",ic=()=>{let{toggle:t}=AC();return lc("button",{className:$C,onClick:t,type:"button",children:lc(Ao,{})})};import{jsx as sc,jsxs as OC}from"react/jsx-runtime";import"react";import{useCollapsible as PC,useTranslation as BC}from"@payloadcms/ui";var FC="code-block-floating-collapse-button",ac=()=>{let{isCollapsed:t,toggle:e}=PC(),{t:o}=BC();return t?OC("button",{className:FC,onClick:e,type:"button",children:[sc("span",{children:o("general:collapse")}),sc(Ao,{})]}):null};var We="payload-richtext-code-block",XC=t=>{let{languages:e}=t,o=e||$o,{BlockCollapsible:r,formSchema:n,RemoveButton:l}=Ce(),{setModified:i}=KC(),{t:s}=JC(),{codeField:d}=uc(([f])=>({codeField:f?.code})),{selectedLanguageField:c,setSelectedLanguage:u}=uc(([f,h])=>({selectedLanguageField:f?.language,setSelectedLanguage:x=>{h({type:"UPDATE",path:"language",value:x}),i(!0)}})),a=o[c?.value],m=jC(),p=zC.useMemo(()=>Object.entries(o).map(([f,h])=>({name:`${f} ${h}`,Component:re(GC.Button,{active:!1,disabled:!1,onClick:()=>{u(f)},children:re("span",{className:`${We}__language-code`,"data-language":f,children:h})})})),[o,u]);return re(r,{Actions:cc("div",{className:`${We}__actions`,children:[re(UC,{button:cc("div",{className:`${We}__language-selector-button`,"data-selected-language":c?.value,children:[re("span",{children:a}),re(HC,{className:`${We}__chevron`})]}),buttonType:"custom",className:`${We}__language-selector`,disabled:!m,entries:p,horizontalAlign:"right",minEntriesForSearch:8,searchPlaceholder:s("fields:searchForLanguage"),showScrollbar:!0,size:"large"}),re(WC,{value:d?.value??""}),re(ic,{}),m&&re(l,{})]}),className:We,collapsibleProps:{AfterCollapsible:re(ac,{}),disableHeaderToggle:!0,disableToggleIndicator:!0},Pill:re("div",{className:`${We}__pill`,children:re(rc,{})}),children:re(VC,{fields:n,forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:"",permissions:!0,readOnly:!m})})};import{c as ZC}from"react/compiler-runtime";import{jsx as ut}from"react/jsx-runtime";import{FieldContext as YC,FieldPathContext as dc,ServerFunctionsContext as mc,ShimmerEffect as qC,useServerFunctions as QC}from"@payloadcms/ui";import e2,{useEffect as t2,useRef as o2}from"react";var r2=t=>{let e=ZC(9),{field:o,initialValue:r,Loading:n,path:l,schemaPath:i,setValue:s,value:d}=t,[c,u]=e2.useState(null),a=QC(),{_internal_renderField:m}=a,[p,f]=i.split(".",2),h=l??(o&&"name"in o?o?.name:"")??"",x;e[0]!==m||e[1]!==o||e[2]!==r||e[3]!==l||e[4]!==i?(x=()=>{(async function(){let{Field:y}=await m({field:{...o||{},type:"richText",admin:{...o?.admin||{},hidden:!1}},initialValue:r??void 0,path:l,schemaPath:i});u(y)})()},e[0]=m,e[1]=o,e[2]=r,e[3]=l,e[4]=i,e[5]=x):x=e[5];let w=x,E=o2(!1),N,_;if(e[6]!==w?(N=()=>{E.current||(E.current=!0,w())},_=[w],e[6]=w,e[7]=N,e[8]=_):(N=e[7],_=e[8]),t2(N,_),!c)return typeof n<"u"?n:ut(qC,{});let C={...a,getFormState:async b=>a.getFormState({...b,collectionSlug:p==="collection"?f:void 0,globalSlug:p==="global"?f:void 0})};if(typeof d>"u"&&!s)return ut(mc,{value:{...C},children:ut(dc,{value:h,children:c},h)});let g={disabled:!1,formInitializing:!1,formProcessing:!1,formSubmitted:!1,initialValue:d,path:h,setValue:s??n2,showError:!1,value:d};return ut(mc,{value:{...C},children:ut(dc,{value:h,children:ut(YC,{value:g,children:c})},h)})};function n2(){}function pc({nodes:t,text:e}){let o={root:{type:"root",children:[],direction:"ltr",format:"",indent:0,version:1}};return e&&o.root.children.push({type:"paragraph",children:[{type:"text",detail:0,format:0,mode:"normal",style:"",text:e,version:1}],direction:"ltr",format:"",indent:0,textFormat:0,textStyle:"",version:1}),t?.length&&o.root.children.push(...t),o}var l2=pc;export{Nt as $createAutoLinkNode,Ae as $createBlockNode,Ye as $createHorizontalRuleNode,mt as $createInlineBlockNode,_e as $createLinkNode,He as $createRelationshipNode,pe as $createUploadNode,we as $isAutoLinkNode,$e as $isBlockNode,St as $isHorizontalRuleNode,pt as $isInlineBlockNode,J as $isLinkNode,Er as $isRelationshipNode,ct as $isUploadNode,Ac as AlignFeatureClient,Te as AutoLinkNode,bC as BlockCollapsible,TC as BlockEditButton,ie as BlockNode,SC as BlockRemoveButton,Uc as BlockquoteFeatureClient,qu as BlocksFeatureClient,_d as BoldFeatureClient,le as CAN_USE_DOM,Nf as ChecklistFeatureClient,XC as CodeBlockBlockComponent,DC as CodeComponent,C0 as DETAIL_TYPE_TO_DETAIL,f0 as DOUBLE_LINE_BREAK,R0 as DebugJsxConverterFeatureClient,k0 as ELEMENT_FORMAT_TO_TYPE,b0 as ELEMENT_TYPE_TO_FORMAT,kc as ENABLE_SLASH_MENU_COMMAND,gc as EditorConfigProvider,ft as FieldsDrawer,th as FixedToolbarFeatureClient,gm as HeadingFeatureClient,$m as HorizontalRuleFeatureClient,ke as HorizontalRuleNode,Xe as INSERT_BLOCK_COMMAND,Ze as INSERT_INLINE_BLOCK_COMMAND,m0 as IS_ALL_FORMATTING,Zm as IndentFeatureClient,xC as InlineBlockContainer,aC as InlineBlockEditButton,fC as InlineBlockLabel,dt as InlineBlockNode,dC as InlineBlockRemoveButton,Nd as InlineCodeFeatureClient,ph as InlineToolbarFeatureClient,Id as ItalicFeatureClient,g0 as LTR_REGEX,Xf as LexicalPluginToLexicalFeatureClient,df as LinkFeatureClient,oe as LinkNode,p0 as NON_BREAKING_SPACE,F as NodeFormat,$f as OrderedListFeatureClient,n0 as ParagraphFeatureClient,Cc as Point,h0 as RTL_REGEX,_c as Rect,b1 as RelationshipFeatureClient,Se as RelationshipNode,r2 as RenderLexical,qx as RichTextField,o0 as SlateToLexicalFeatureClient,Ad as StrikethroughFeatureClient,Bd as SubscriptFeatureClient,Wd as SuperscriptFeatureClient,_0 as TEXT_MODE_TO_TYPE,x0 as TEXT_TYPE_TO_FORMAT,T0 as TEXT_TYPE_TO_MODE,ue as TOGGLE_LINK_COMMAND,lx as TableFeatureClient,md as TestRecorderFeatureClient,lm as TextStateFeatureClient,Ft as ToolbarButton,Ue as ToolbarDropdown,xd as TreeViewFeatureClient,zd as UnderlineFeatureClient,Uf as UnorderedListFeatureClient,Ux as UploadFeatureClient,me as UploadNode,lC as addSwipeDownListener,oC as addSwipeLeftListener,rC as addSwipeRightListener,nC as addSwipeUpListener,l2 as buildDefaultEditorState,pc as buildEditorState,tc as codeConverterClient,or as createBlockNode,$ as createClientFeature,I0 as defaultColors,Yr as defaultEditorLexicalConfig,Ir as getDOMRangeRect,Tc as getEnabledNodes,LC as getRestPopulateFn,qe as getSelectedNode,Qx as isHTMLElement,bc as isPoint,eC as joinClasses,qr as sanitizeClientEditorConfig,Qa as sanitizeClientFeatures,_o as setFloatingElemPosition,fo as setFloatingElemPositionForLinkEditor,Z as slashMenuBasicGroupWithItems,be as toolbarAddDropdownGroupWithItems,nr as toolbarFeatureButtonsGroupWithItems,Y as toolbarFormatGroupWithItems,te as toolbarTextDropdownGroupWithItems,Ce as useBlockComponentContext,H as useEditorConfigContext,ge as useInlineBlockComponentContext,xc as useLexicalDocumentDrawer,he as useLexicalDrawer,Ot as useLexicalListDrawer};
66
66
  //# sourceMappingURL=index.js.map