UNPKG

@blocknote/react

Version:

A "Notion-style" block-based extensible text editor built on top of Prosemirror and Tiptap.

1 lines 8.83 MB
{"version":3,"file":"blocknote-react.umd.cjs","sources":["../src/editor/BlockNoteContext.ts","../src/hooks/useBlockNoteEditor.ts","../src/hooks/useUIElementPositioning.ts","../src/hooks/useUIPluginState.ts","../src/editor/ComponentsContext.tsx","../src/i18n/dictionary.ts","../src/components/FilePanel/DefaultTabs/EmbedTab.tsx","../src/components/FilePanel/DefaultTabs/UploadTab.tsx","../src/components/FilePanel/FilePanel.tsx","../src/components/FilePanel/FilePanelController.tsx","../src/hooks/useEditorChange.ts","../src/hooks/useEditorSelectionChange.ts","../src/hooks/useEditorContentOrSelectionChange.ts","../src/util/mergeRefs.ts","../../../node_modules/react-icons/lib/iconContext.mjs","../../../node_modules/react-icons/lib/iconBase.mjs","../../../node_modules/react-icons/ri/index.mjs","../src/hooks/useSelectedBlocks.ts","../src/components/FormattingToolbar/DefaultButtons/BasicTextStyleButton.tsx","../src/components/ColorPicker/ColorIcon.tsx","../src/components/ColorPicker/ColorPicker.tsx","../src/components/FormattingToolbar/DefaultButtons/ColorStyleButton.tsx","../src/components/LinkToolbar/EditLinkMenuItems.tsx","../src/components/FormattingToolbar/DefaultButtons/CreateLinkButton.tsx","../src/components/FormattingToolbar/DefaultButtons/FileCaptionButton.tsx","../src/components/FormattingToolbar/DefaultButtons/FileDeleteButton.tsx","../src/components/FormattingToolbar/DefaultButtons/FileRenameButton.tsx","../src/components/FormattingToolbar/DefaultButtons/FileReplaceButton.tsx","../src/components/FormattingToolbar/DefaultButtons/NestBlockButtons.tsx","../src/components/FormattingToolbar/DefaultSelects/BlockTypeSelect.tsx","../src/util/sanitizeUrl.ts","../src/components/FormattingToolbar/DefaultButtons/FileDownloadButton.tsx","../src/components/FormattingToolbar/DefaultButtons/FilePreviewButton.tsx","../src/components/FormattingToolbar/DefaultButtons/TextAlignButton.tsx","../src/components/FormattingToolbar/FormattingToolbar.tsx","../src/components/FormattingToolbar/FormattingToolbarController.tsx","../src/components/LinkToolbar/DefaultButtons/DeleteLinkButton.tsx","../src/components/LinkToolbar/DefaultButtons/EditLinkButton.tsx","../src/components/LinkToolbar/DefaultButtons/OpenLinkButton.tsx","../src/components/LinkToolbar/LinkToolbar.tsx","../src/components/LinkToolbar/LinkToolbarController.tsx","../../../node_modules/react-icons/ai/index.mjs","../src/components/SideMenu/DefaultButtons/AddBlockButton.tsx","../../../node_modules/react-icons/md/index.mjs","../src/components/SideMenu/DragHandleMenu/DefaultItems/BlockColorsItem.tsx","../src/components/SideMenu/DragHandleMenu/DefaultItems/RemoveBlockItem.tsx","../src/components/SideMenu/DragHandleMenu/DragHandleMenu.tsx","../src/components/SideMenu/DefaultButtons/DragHandleButton.tsx","../src/components/SideMenu/SideMenu.tsx","../src/components/SideMenu/SideMenuController.tsx","../src/components/SuggestionMenu/GridSuggestionMenu/getDefaultReactEmojiPickerItems.tsx","../src/components/SuggestionMenu/GridSuggestionMenu/GridSuggestionMenu.tsx","../src/components/SuggestionMenu/hooks/useCloseSuggestionMenuNoItems.ts","../src/components/SuggestionMenu/hooks/useLoadSuggestionMenuItems.ts","../src/components/SuggestionMenu/GridSuggestionMenu/hooks/useGridSuggestionMenuKeyboardNavigation.ts","../src/components/SuggestionMenu/GridSuggestionMenu/GridSuggestionMenuWrapper.tsx","../src/components/SuggestionMenu/GridSuggestionMenu/GridSuggestionMenuController.tsx","../src/components/SuggestionMenu/SuggestionMenu.tsx","../src/components/SuggestionMenu/hooks/useSuggestionMenuKeyboardNavigation.ts","../src/components/SuggestionMenu/SuggestionMenuWrapper.tsx","../src/components/SuggestionMenu/getDefaultReactSlashMenuItems.tsx","../src/components/SuggestionMenu/SuggestionMenuController.tsx","../src/components/TableHandles/ExtendButton/ExtendButton.tsx","../src/components/TableHandles/TableHandleMenu/DefaultButtons/AddButton.tsx","../src/components/TableHandles/TableHandleMenu/DefaultButtons/DeleteButton.tsx","../src/components/TableHandles/TableHandleMenu/TableHandleMenu.tsx","../src/components/TableHandles/TableHandle.tsx","../src/components/TableHandles/hooks/useExtendButtonsPositioning.ts","../src/components/TableHandles/hooks/useTableHandlesPositioning.ts","../src/components/TableHandles/TableHandlesController.tsx","../src/editor/BlockNoteDefaultUI.tsx","../src/hooks/usePrefersColorScheme.ts","../src/editor/EditorContent.tsx","../src/editor/ElementRenderer.tsx","../src/editor/BlockNoteView.tsx","../../../node_modules/react-dom/client.js","../src/schema/@util/ReactRenderUtil.ts","../src/schema/ReactBlockSpec.tsx","../src/blocks/FileBlockContent/useResolveUrl.tsx","../src/blocks/FileBlockContent/helpers/toExternalHTML/FigureWithCaption.tsx","../src/hooks/useOnUploadEnd.ts","../src/hooks/useOnUploadStart.ts","../src/hooks/useUploadLoading.ts","../src/blocks/FileBlockContent/helpers/render/AddFileButton.tsx","../src/blocks/FileBlockContent/helpers/render/FileNameWithIcon.tsx","../src/blocks/FileBlockContent/helpers/render/FileBlockWrapper.tsx","../src/blocks/FileBlockContent/helpers/toExternalHTML/LinkWithCaption.tsx","../src/blocks/AudioBlockContent/AudioBlockContent.tsx","../src/blocks/FileBlockContent/FileBlockContent.tsx","../src/blocks/FileBlockContent/helpers/render/ResizableFileBlockWrapper.tsx","../src/blocks/ImageBlockContent/ImageBlockContent.tsx","../../../node_modules/react-icons/tb/index.mjs","../src/blocks/PageBreakBlockContent/getPageBreakReactSlashMenuItems.tsx","../src/blocks/VideoBlockContent/VideoBlockContent.tsx","../src/components/FormattingToolbar/ExperimentalMobileFormattingToolbarController.tsx","../src/hooks/useActiveStyles.ts","../src/hooks/useCreateBlockNote.tsx","../src/hooks/useEditorForceUpdate.tsx","../src/schema/ReactInlineContentSpec.tsx","../src/schema/ReactStyleSpec.tsx","../src/util/elementOverflow.ts"],"sourcesContent":["import {\n BlockNoteEditor,\n BlockNoteSchema,\n BlockSchema,\n DefaultBlockSchema,\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentSchema,\n StyleSchema,\n} from \"@blocknote/core\";\nimport { createContext, useContext, useState } from \"react\";\n\ntype BlockNoteContextValue<\n BSchema extends BlockSchema = DefaultBlockSchema,\n ISchema extends InlineContentSchema = DefaultInlineContentSchema,\n SSchema extends StyleSchema = DefaultStyleSchema\n> = {\n setContentEditableProps?: ReturnType<typeof useState<Record<string, any>>>[1]; // copy type of setXXX from useState\n editor?: BlockNoteEditor<BSchema, ISchema, SSchema>;\n colorSchemePreference?: \"light\" | \"dark\";\n};\n\nexport const BlockNoteContext = createContext<\n BlockNoteContextValue | undefined\n>(undefined);\n\n/**\n * Get the BlockNoteContext instance from the nearest BlockNoteContext provider\n * @param _schema: optional, pass in the schema to return type-safe Context if you're using a custom schema\n */\nexport function useBlockNoteContext<\n BSchema extends BlockSchema = DefaultBlockSchema,\n ISchema extends InlineContentSchema = DefaultInlineContentSchema,\n SSchema extends StyleSchema = DefaultStyleSchema\n>(\n _schema?: BlockNoteSchema<BSchema, ISchema, SSchema>\n): BlockNoteContextValue<BSchema, ISchema, SSchema> | undefined {\n const context = useContext(BlockNoteContext) as any;\n\n return context;\n}\n","import {\n BlockNoteEditor,\n BlockNoteSchema,\n BlockSchema,\n DefaultBlockSchema,\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentSchema,\n StyleSchema,\n} from \"@blocknote/core\";\n\nimport { useBlockNoteContext } from \"../editor/BlockNoteContext.js\";\n\n/**\n * Get the BlockNoteEditor instance from the nearest BlockNoteContext provider\n * @param _schema: optional, pass in the schema to return type-safe BlockNoteEditor if you're using a custom schema\n */\nexport function useBlockNoteEditor<\n BSchema extends BlockSchema = DefaultBlockSchema,\n ISchema extends InlineContentSchema = DefaultInlineContentSchema,\n SSchema extends StyleSchema = DefaultStyleSchema\n>(\n _schema?: BlockNoteSchema<BSchema, ISchema, SSchema>\n): BlockNoteEditor<BSchema, ISchema, SSchema> {\n const context = useBlockNoteContext(_schema);\n\n if (!context?.editor) {\n throw new Error(\n \"useBlockNoteEditor was called outside of a BlockNoteContext provider or BlockNoteView component\"\n );\n }\n\n return context.editor;\n}\n","import {\n useDismiss,\n useFloating,\n UseFloatingOptions,\n useInteractions,\n useTransitionStyles,\n} from \"@floating-ui/react\";\nimport { useEffect, useMemo } from \"react\";\n\nexport function useUIElementPositioning(\n show: boolean,\n referencePos: DOMRect | null,\n zIndex: number,\n options?: Partial<UseFloatingOptions>\n) {\n const { refs, update, context, floatingStyles } = useFloating({\n open: show,\n ...options,\n });\n const { isMounted, styles } = useTransitionStyles(context);\n\n // handle \"escape\" and other dismiss events, these will add some listeners to\n // getFloatingProps which need to be attached to the floating element\n const dismiss = useDismiss(context);\n\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss]);\n\n useEffect(() => {\n update();\n }, [referencePos, update]);\n\n useEffect(() => {\n // Will be null on initial render when used in UI component controllers.\n if (referencePos === null) {\n return;\n }\n refs.setReference({\n getBoundingClientRect: () => referencePos,\n });\n }, [referencePos, refs]);\n\n return useMemo(() => {\n return {\n isMounted,\n ref: refs.setFloating,\n style: {\n display: \"flex\",\n ...styles,\n ...floatingStyles,\n zIndex: zIndex,\n },\n getFloatingProps,\n getReferenceProps,\n };\n }, [\n floatingStyles,\n isMounted,\n refs.setFloating,\n styles,\n zIndex,\n getFloatingProps,\n getReferenceProps,\n ]);\n}\n","import { useEffect, useState } from \"react\";\n\nexport function useUIPluginState<State>(\n onUpdate: (callback: (state: State) => void) => void\n): State | undefined {\n const [state, setState] = useState<State>();\n\n useEffect(() => {\n return onUpdate((state) => {\n setState({ ...state });\n });\n }, [onUpdate]);\n\n return state;\n}\n","import {\n ChangeEvent,\n ComponentType,\n createContext,\n CSSProperties,\n KeyboardEvent,\n MouseEvent,\n ReactNode,\n useContext,\n} from \"react\";\n\nimport { DefaultReactGridSuggestionItem } from \"../components/SuggestionMenu/GridSuggestionMenu/types.js\";\nimport { DefaultReactSuggestionItem } from \"../components/SuggestionMenu/types.js\";\n\nexport type ComponentProps = {\n FormattingToolbar: {\n Root: {\n className?: string;\n children?: ReactNode;\n };\n Button: {\n className?: string;\n mainTooltip: string;\n secondaryTooltip?: string;\n icon?: ReactNode;\n onClick?: (e: MouseEvent) => void;\n isSelected?: boolean;\n isDisabled?: boolean;\n } & (\n | { children: ReactNode; label?: string }\n | { children?: undefined; label: string }\n );\n Select: {\n className?: string;\n items: {\n text: string;\n icon: ReactNode;\n onClick: () => void;\n isSelected: boolean;\n isDisabled?: boolean;\n }[];\n isDisabled?: boolean;\n };\n };\n FilePanel: {\n Root: {\n className?: string;\n tabs: {\n name: string;\n tabPanel: ReactNode;\n }[];\n openTab: string;\n setOpenTab: (name: string) => void;\n defaultOpenTab: string;\n loading: boolean;\n };\n Button: {\n className?: string;\n onClick: () => void;\n } & (\n | { children: ReactNode; label?: string }\n | { children?: undefined; label: string }\n );\n FileInput: {\n className?: string;\n accept: string;\n value: File | null;\n placeholder: string;\n onChange: (payload: File | null) => void;\n };\n TabPanel: {\n className?: string;\n children?: ReactNode;\n };\n TextInput: {\n className?: string;\n value: string;\n placeholder: string;\n onChange: (event: ChangeEvent<HTMLInputElement>) => void;\n onKeyDown: (event: KeyboardEvent) => void;\n };\n };\n LinkToolbar: {\n Root: {\n className?: string;\n children?: ReactNode;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n };\n Button: {\n className?: string;\n mainTooltip: string;\n secondaryTooltip?: string;\n icon?: ReactNode;\n onClick?: (e: MouseEvent) => void;\n isSelected?: boolean;\n isDisabled?: boolean;\n } & (\n | { children: ReactNode; label?: string }\n | { children?: undefined; label: string }\n );\n };\n SideMenu: {\n Root: {\n className?: string;\n children?: ReactNode;\n };\n Button: {\n className?: string;\n onClick?: (e: MouseEvent) => void;\n icon?: ReactNode;\n onDragStart?: (e: React.DragEvent) => void;\n onDragEnd?: (e: React.DragEvent) => void;\n draggable?: boolean;\n } & (\n | { children: ReactNode; label?: string }\n | { children?: undefined; label: string }\n );\n };\n SuggestionMenu: {\n Root: {\n id: string;\n className?: string;\n children?: ReactNode;\n };\n EmptyItem: {\n className?: string;\n children?: ReactNode;\n };\n Item: {\n className?: string;\n id: string;\n isSelected: boolean;\n onClick: () => void;\n item: DefaultReactSuggestionItem;\n };\n Label: {\n className?: string;\n children?: ReactNode;\n };\n Loader: {\n className?: string;\n children?: ReactNode;\n };\n };\n GridSuggestionMenu: {\n Root: {\n id: string;\n columns: number;\n className?: string;\n children?: ReactNode;\n };\n EmptyItem: {\n columns: number;\n className?: string;\n children?: ReactNode;\n };\n Item: {\n className?: string;\n id: string;\n isSelected: boolean;\n onClick: () => void;\n item: DefaultReactGridSuggestionItem;\n };\n // Label: {\n // className?: string;\n // children?: ReactNode;\n // };\n Loader: {\n columns: number;\n className?: string;\n children?: ReactNode;\n };\n };\n TableHandle: {\n Root: {\n className?: string;\n draggable: boolean;\n onDragStart: (e: React.DragEvent) => void;\n onDragEnd: () => void;\n style?: CSSProperties;\n } & (\n | { children: ReactNode; label?: string }\n | { children?: undefined; label: string }\n );\n ExtendButton: {\n className?: string;\n onClick: (e: React.MouseEvent) => void;\n onMouseDown: (e: React.MouseEvent) => void;\n children: ReactNode;\n };\n };\n // TODO: We should try to make everything as generic as we can\n Generic: {\n Form: {\n Root: {\n children?: ReactNode;\n };\n TextInput: {\n className?: string;\n name: string;\n label?: string;\n icon: ReactNode;\n autoFocus?: boolean;\n placeholder: string;\n value: string;\n onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;\n onChange: (event: ChangeEvent<HTMLInputElement>) => void;\n onSubmit?: () => void;\n };\n };\n Menu: {\n Root: {\n sub?: boolean;\n position?: \"top\" | \"right\" | \"bottom\" | \"left\";\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n };\n Divider: {\n className?: string;\n };\n Dropdown: {\n className?: string;\n children?: ReactNode;\n sub?: boolean;\n };\n Item: {\n className?: string;\n children?: ReactNode;\n\n subTrigger?: boolean;\n icon?: ReactNode;\n checked?: boolean;\n onClick?: () => void;\n };\n Label: {\n className?: string;\n children?: ReactNode;\n };\n Trigger: {\n children?: ReactNode;\n sub?: boolean;\n };\n };\n Popover: {\n Root: {\n children?: ReactNode;\n opened?: boolean;\n position?: \"top\" | \"right\" | \"bottom\" | \"left\";\n };\n Content: {\n className?: string;\n variant: \"form-popover\" | \"panel-popover\";\n children?: ReactNode;\n };\n Trigger: {\n children?: ReactNode;\n };\n };\n };\n};\n\nexport type Components = {\n [Components in keyof Omit<ComponentProps, \"Generic\">]: {\n [Component in keyof ComponentProps[Components]]: ComponentType<\n ComponentProps[Components][Component]\n >;\n };\n} & {\n // only needed as Generic Root/etc elements are 1 level of nesting deeper\n Generic: {\n [GenericComponents in keyof ComponentProps[\"Generic\"]]: {\n [Component in keyof ComponentProps[\"Generic\"][GenericComponents]]: ComponentType<\n ComponentProps[\"Generic\"][GenericComponents][Component]\n >;\n };\n };\n};\n\nexport const ComponentsContext = createContext<Components | undefined>(\n undefined\n);\n\nexport function useComponentsContext(): Components | undefined {\n return useContext(ComponentsContext)!;\n}\n","import { Dictionary } from \"@blocknote/core\";\nimport { useBlockNoteContext } from \"../editor/BlockNoteContext.js\";\n\nexport function useDictionary(): Dictionary {\n const ctx = useBlockNoteContext();\n return ctx!.editor!.dictionary;\n}\n","import {\n BlockSchema,\n DefaultBlockSchema,\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentSchema,\n StyleSchema,\n filenameFromURL,\n} from \"@blocknote/core\";\nimport { ChangeEvent, KeyboardEvent, useCallback, useState } from \"react\";\n\nimport { useComponentsContext } from \"../../../editor/ComponentsContext.js\";\nimport { useBlockNoteEditor } from \"../../../hooks/useBlockNoteEditor.js\";\nimport { useDictionary } from \"../../../i18n/dictionary.js\";\nimport { FilePanelProps } from \"../FilePanelProps.js\";\n\nexport const EmbedTab = <\n B extends BlockSchema = DefaultBlockSchema,\n I extends InlineContentSchema = DefaultInlineContentSchema,\n S extends StyleSchema = DefaultStyleSchema\n>(\n props: FilePanelProps<I, S>\n) => {\n const Components = useComponentsContext()!;\n const dict = useDictionary();\n\n const { block } = props;\n\n const editor = useBlockNoteEditor<B, I, S>();\n\n const [currentURL, setCurrentURL] = useState<string>(\"\");\n\n const handleURLChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setCurrentURL(event.currentTarget.value);\n },\n []\n );\n\n const handleURLEnter = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n editor.updateBlock(block, {\n props: {\n name: filenameFromURL(currentURL),\n url: currentURL,\n } as any,\n });\n }\n },\n [editor, block, currentURL]\n );\n\n const handleURLClick = useCallback(() => {\n editor.updateBlock(block, {\n props: {\n name: filenameFromURL(currentURL),\n url: currentURL,\n } as any,\n });\n }, [editor, block, currentURL]);\n\n return (\n <Components.FilePanel.TabPanel className={\"bn-tab-panel\"}>\n <Components.FilePanel.TextInput\n className={\"bn-text-input\"}\n placeholder={dict.file_panel.embed.url_placeholder}\n value={currentURL}\n onChange={handleURLChange}\n onKeyDown={handleURLEnter}\n data-test={\"embed-input\"}\n />\n <Components.FilePanel.Button\n className={\"bn-button\"}\n onClick={handleURLClick}\n data-test=\"embed-input-button\">\n {dict.file_panel.embed.embed_button[block.type] ||\n dict.file_panel.embed.embed_button[\"file\"]}\n </Components.FilePanel.Button>\n </Components.FilePanel.TabPanel>\n );\n};\n","import {\n BlockSchema,\n DefaultBlockSchema,\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentSchema,\n StyleSchema,\n} from \"@blocknote/core\";\nimport { useCallback, useEffect, useState } from \"react\";\n\nimport { useComponentsContext } from \"../../../editor/ComponentsContext.js\";\nimport { useBlockNoteEditor } from \"../../../hooks/useBlockNoteEditor.js\";\nimport { useDictionary } from \"../../../i18n/dictionary.js\";\nimport { FilePanelProps } from \"../FilePanelProps.js\";\n\nexport const UploadTab = <\n B extends BlockSchema = DefaultBlockSchema,\n I extends InlineContentSchema = DefaultInlineContentSchema,\n S extends StyleSchema = DefaultStyleSchema\n>(\n props: FilePanelProps<I, S> & {\n setLoading: (loading: boolean) => void;\n }\n) => {\n const Components = useComponentsContext()!;\n const dict = useDictionary();\n\n const { block, setLoading } = props;\n\n const editor = useBlockNoteEditor<B, I, S>();\n\n const [uploadFailed, setUploadFailed] = useState<boolean>(false);\n\n useEffect(() => {\n if (uploadFailed) {\n setTimeout(() => {\n setUploadFailed(false);\n }, 3000);\n }\n }, [uploadFailed]);\n\n const handleFileChange = useCallback(\n (file: File | null) => {\n if (file === null) {\n return;\n }\n\n async function upload(file: File) {\n setLoading(true);\n\n if (editor.uploadFile !== undefined) {\n try {\n let updateData = await editor.uploadFile(file);\n if (typeof updateData === \"string\") {\n // received a url\n updateData = {\n props: {\n name: file.name,\n url: updateData,\n },\n };\n }\n editor.updateBlock(block, updateData);\n } catch (e) {\n setUploadFailed(true);\n } finally {\n setLoading(false);\n }\n }\n }\n\n upload(file);\n },\n [block, editor, setLoading]\n );\n\n const config = editor.schema.blockSchema[block.type];\n const accept =\n config.isFileBlock && config.fileBlockAccept?.length\n ? config.fileBlockAccept.join(\",\")\n : \"*/*\";\n\n return (\n <Components.FilePanel.TabPanel className={\"bn-tab-panel\"}>\n <Components.FilePanel.FileInput\n className=\"bn-file-input\"\n data-test=\"upload-input\"\n accept={accept}\n placeholder={\n dict.file_panel.upload.file_placeholder[block.type] ||\n dict.file_panel.upload.file_placeholder[\"file\"]\n }\n value={null}\n onChange={handleFileChange}\n />\n {uploadFailed && (\n <div className=\"bn-error-text\">\n {dict.file_panel.upload.upload_error}\n </div>\n )}\n </Components.FilePanel.TabPanel>\n );\n};\n","import {\n BlockSchema,\n DefaultBlockSchema,\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentSchema,\n StyleSchema,\n} from \"@blocknote/core\";\nimport { useState } from \"react\";\n\nimport {\n ComponentProps,\n useComponentsContext,\n} from \"../../editor/ComponentsContext.js\";\nimport { useBlockNoteEditor } from \"../../hooks/useBlockNoteEditor.js\";\nimport { useDictionary } from \"../../i18n/dictionary.js\";\nimport { EmbedTab } from \"./DefaultTabs/EmbedTab.js\";\nimport { UploadTab } from \"./DefaultTabs/UploadTab.js\";\nimport { FilePanelProps } from \"./FilePanelProps.js\";\n\ntype PanelProps = ComponentProps[\"FilePanel\"][\"Root\"];\n\n/**\n * By default, the FilePanel component will render with default tabs. However,\n * you can override the tabs to render by passing the `tabs` prop. You can use\n * the default tab panels in the `DefaultTabPanels` directory or make your own\n * using the `FilePanelPanel` component.\n */\nexport const FilePanel = <\n B extends BlockSchema = DefaultBlockSchema,\n I extends InlineContentSchema = DefaultInlineContentSchema,\n S extends StyleSchema = DefaultStyleSchema\n>(\n props: FilePanelProps<I, S> &\n Partial<Pick<PanelProps, \"defaultOpenTab\" | \"tabs\">>\n) => {\n const Components = useComponentsContext()!;\n const dict = useDictionary();\n\n const editor = useBlockNoteEditor<B, I, S>();\n\n const [loading, setLoading] = useState<boolean>(false);\n\n const tabs: PanelProps[\"tabs\"] = props.tabs ?? [\n ...(editor.uploadFile !== undefined\n ? [\n {\n name: dict.file_panel.upload.title,\n tabPanel: <UploadTab block={props.block} setLoading={setLoading} />,\n },\n ]\n : []),\n {\n name: dict.file_panel.embed.title,\n tabPanel: <EmbedTab block={props.block} />,\n },\n ];\n\n const [openTab, setOpenTab] = useState<string>(\n props.defaultOpenTab || tabs[0].name\n );\n\n return (\n <Components.FilePanel.Root\n className={\"bn-panel\"}\n defaultOpenTab={openTab}\n openTab={openTab}\n setOpenTab={setOpenTab}\n tabs={tabs}\n loading={loading}\n />\n );\n};\n","import {\n BlockSchema,\n DefaultBlockSchema,\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentSchema,\n StyleSchema,\n} from \"@blocknote/core\";\nimport { UseFloatingOptions, flip, offset } from \"@floating-ui/react\";\nimport { FC } from \"react\";\n\nimport { useBlockNoteEditor } from \"../../hooks/useBlockNoteEditor.js\";\nimport { useUIElementPositioning } from \"../../hooks/useUIElementPositioning.js\";\nimport { useUIPluginState } from \"../../hooks/useUIPluginState.js\";\nimport { FilePanel } from \"./FilePanel.js\";\nimport { FilePanelProps } from \"./FilePanelProps.js\";\n\nexport const FilePanelController = <\n B extends BlockSchema = DefaultBlockSchema,\n I extends InlineContentSchema = DefaultInlineContentSchema,\n S extends StyleSchema = DefaultStyleSchema\n>(props: {\n filePanel?: FC<FilePanelProps<I, S>>;\n floatingOptions?: Partial<UseFloatingOptions>;\n}) => {\n const editor = useBlockNoteEditor<B, I, S>();\n\n if (!editor.filePanel) {\n throw new Error(\n \"FileToolbarController can only be used when BlockNote editor schema contains file block\"\n );\n }\n\n const state = useUIPluginState(\n editor.filePanel.onUpdate.bind(editor.filePanel)\n );\n\n const { isMounted, ref, style, getFloatingProps } = useUIElementPositioning(\n state?.show || false,\n state?.referencePos || null,\n 5000,\n {\n placement: \"bottom\",\n middleware: [offset(10), flip()],\n onOpenChange: (open) => {\n if (!open) {\n editor.filePanel!.closeMenu();\n editor.focus();\n }\n },\n ...props.floatingOptions,\n }\n );\n\n if (!isMounted || !state) {\n return null;\n }\n\n const { show, referencePos, ...data } = state;\n\n const Component = props.filePanel || FilePanel;\n\n return (\n <div ref={ref} style={style} {...getFloatingProps()}>\n <Component {...data} />\n </div>\n );\n};\n","import type { BlockNoteEditor } from \"@blocknote/core\";\nimport { useEffect } from \"react\";\nimport { useBlockNoteContext } from \"../editor/BlockNoteContext.js\";\n\nexport function useEditorChange(\n callback: () => void,\n editor?: BlockNoteEditor<any, any, any>\n) {\n const editorContext = useBlockNoteContext();\n if (!editor) {\n editor = editorContext?.editor;\n }\n\n useEffect(() => {\n if (!editor) {\n throw new Error(\n \"'editor' is required, either from BlockNoteContext or as a function argument\"\n );\n }\n\n return editor.onChange(callback);\n }, [callback, editor]);\n}\n","import type { BlockNoteEditor } from \"@blocknote/core\";\nimport { useEffect } from \"react\";\nimport { useBlockNoteContext } from \"../editor/BlockNoteContext.js\";\n\nexport function useEditorSelectionChange(\n callback: () => void,\n editor?: BlockNoteEditor<any, any, any>\n) {\n const editorContext = useBlockNoteContext();\n if (!editor) {\n editor = editorContext?.editor;\n }\n\n useEffect(() => {\n if (!editor) {\n throw new Error(\n \"'editor' is required, either from BlockNoteContext or as a function argument\"\n );\n }\n return editor.onSelectionChange(callback);\n }, [callback, editor]);\n}\n","import type { BlockNoteEditor } from \"@blocknote/core\";\nimport { useEditorChange } from \"./useEditorChange.js\";\nimport { useEditorSelectionChange } from \"./useEditorSelectionChange.js\";\n\nexport function useEditorContentOrSelectionChange(\n callback: () => void,\n editor?: BlockNoteEditor<any, any, any>\n) {\n useEditorChange(callback, editor);\n useEditorSelectionChange(callback, editor);\n}\n","// https://github.com/gregberge/react-merge-refs/blob/main/src/index.tsx\nexport function mergeRefs<T = any>(\n refs: Array<React.MutableRefObject<T> | React.LegacyRef<T> | undefined | null>\n): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n}\n","import React from \"react\";\nexport var DefaultContext = {\n color: undefined,\n size: undefined,\n className: undefined,\n style: undefined,\n attr: undefined\n};\nexport var IconContext = React.createContext && /*#__PURE__*/React.createContext(DefaultContext);","var _excluded = [\"attr\", \"size\", \"title\"];\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport React from \"react\";\nimport { IconContext, DefaultContext } from \"./iconContext.mjs\";\nfunction Tree2Element(tree) {\n return tree && tree.map((node, i) => /*#__PURE__*/React.createElement(node.tag, _objectSpread({\n key: i\n }, node.attr), Tree2Element(node.child)));\n}\nexport function GenIcon(data) {\n return props => /*#__PURE__*/React.createElement(IconBase, _extends({\n attr: _objectSpread({}, data.attr)\n }, props), Tree2Element(data.child));\n}\nexport function IconBase(props) {\n var elem = conf => {\n var {\n attr,\n size,\n title\n } = props,\n svgProps = _objectWithoutProperties(props, _excluded);\n var computedSize = size || conf.size || \"1em\";\n var className;\n if (conf.className) className = conf.className;\n if (props.className) className = (className ? className + \" \" : \"\") + props.className;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n stroke: \"currentColor\",\n fill: \"currentColor\",\n strokeWidth: \"0\"\n }, conf.attr, attr, svgProps, {\n className: className,\n style: _objectSpread(_objectSpread({\n color: props.color || conf.color\n }, conf.style), props.style),\n height: computedSize,\n width: computedSize,\n xmlns: \"http://www.w3.org/2000/svg\"\n }), title && /*#__PURE__*/React.createElement(\"title\", null, title), props.children);\n };\n return IconContext !== undefined ? /*#__PURE__*/React.createElement(IconContext.Consumer, null, conf => elem(conf)) : elem(DefaultContext);\n}","// THIS FILE IS AUTO GENERATED\nimport { GenIcon } from '../lib/index.mjs';\nexport function RiArrowDownCircleFill2 (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM13 12V8H11V12H8L12 16L16 12H13Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownCircleFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM13 12V8H11V12H8L12 16L16 12H13Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownCircleLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20ZM13 12H16L12 16L8 12H11V8H13V12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownDoubleFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 19.1642L18.2071 12.9571L16.7929 11.5429L12 16.3358L7.20711 11.5429L5.79289 12.9571L12 19.1642ZM12 13.5143L18.2071 7.30722L16.7929 5.89301L12 10.6859L7.20711 5.89301L5.79289 7.30722L12 13.5143Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownDoubleLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 19.1642L18.2071 12.9571L16.7929 11.5429L12 16.3358L7.20711 11.5429L5.79289 12.9571L12 19.1642ZM12 13.5143L18.2071 7.30722L16.7929 5.89301L12 10.6859L7.20711 5.89301L5.79289 7.30722L12 13.5143Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M13 12H20L12 20L4 12H11V4H13V12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownSFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 16L6 10H18L12 16Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownSLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownWideFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 15.6315L20.9679 10.8838L20.0321 9.11619L12 13.3685L3.96788 9.11619L3.0321 10.8838L12 15.6315Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDownWideLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 15.6315L20.9679 10.8838L20.0321 9.11619L12 13.3685L3.96788 9.11619L3.0321 10.8838L12 15.6315Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDropDownFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 14L8 10H16L12 14Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDropDownLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 15.0006L7.75732 10.758L9.17154 9.34375L12 12.1722L14.8284 9.34375L16.2426 10.758L12 15.0006Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDropLeftFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M9 12L13 8V16L9 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDropLeftLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M11.8284 12.0005L14.6569 14.8289L13.2426 16.2431L9 12.0005L13.2426 7.75781L14.6569 9.17203L11.8284 12.0005Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDropRightFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M14 12L10 16V8L14 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDropRightLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12.1717 12.0005L9.34326 9.17203L10.7575 7.75781L15.0001 12.0005L10.7575 16.2431L9.34326 14.8289L12.1717 12.0005Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDropUpFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 10L16 14H8L12 10Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowDropUpLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 11.8284L9.17154 14.6569L7.75732 13.2426L12 9L16.2426 13.2426L14.8284 14.6569L12 11.8284Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowGoBackFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M8 7V11L2 6L8 1V5H13C17.4183 5 21 8.58172 21 13C21 17.4183 17.4183 21 13 21H4V19H13C16.3137 19 19 16.3137 19 13C19 9.68629 16.3137 7 13 7H8Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowGoBackLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M5.82843 6.99955L8.36396 9.53509L6.94975 10.9493L2 5.99955L6.94975 1.0498L8.36396 2.46402L5.82843 4.99955H13C17.4183 4.99955 21 8.58127 21 12.9996C21 17.4178 17.4183 20.9996 13 20.9996H4V18.9996H13C16.3137 18.9996 19 16.3133 19 12.9996C19 9.68584 16.3137 6.99955 13 6.99955H5.82843Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowGoForwardFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M16 7H11C7.68629 7 5 9.68629 5 13C5 16.3137 7.68629 19 11 19H20V21H11C6.58172 21 3 17.4183 3 13C3 8.58172 6.58172 5 11 5H16V1L22 6L16 11V7Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowGoForwardLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M18.1716 6.99955H11C7.68629 6.99955 5 9.68584 5 12.9996C5 16.3133 7.68629 18.9996 11 18.9996H20V20.9996H11C6.58172 20.9996 3 17.4178 3 12.9996C3 8.58127 6.58172 4.99955 11 4.99955H18.1716L15.636 2.46402L17.0503 1.0498L22 5.99955L17.0503 10.9493L15.636 9.53509L18.1716 6.99955Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftCircleFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM12 11V8L8 12L12 16V13H16V11H12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftCircleLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20ZM12 11H16V13H12V16L8 12L12 8V11Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftDoubleFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M4.83578 12L11.0429 18.2071L12.4571 16.7929L7.66421 12L12.4571 7.20712L11.0429 5.79291L4.83578 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftDoubleLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M4.83578 12L11.0429 18.2071L12.4571 16.7929L7.66421 12L12.4571 7.20712L11.0429 5.79291L4.83578 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftDownFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12.3608 13.0515L17.3105 18.0013H5.99683V6.68758L10.9466 11.6373L16.6034 5.98047L18.0176 7.39468L12.3608 13.0515Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftDownLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M9 13.589L17.6066 4.98242L19.0208 6.39664L10.4142 15.0032H18V17.0032H7V6.00324H9V13.589Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 13V20L4 12L12 4V11H20V13H12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftRightFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M16 16V12L21 17L16 22V18H4V16H16ZM8 2V5.999L20 6V8H8V12L3 7L8 2Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftRightLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M16.0503 12.0498L21 16.9996L16.0503 21.9493L14.636 20.5351L17.172 17.9988L4 17.9996V15.9996L17.172 15.9988L14.636 13.464L16.0503 12.0498ZM7.94975 2.0498L9.36396 3.46402L6.828 5.9988L20 5.99955V7.99955L6.828 7.9988L9.36396 10.5351L7.94975 11.9493L3 6.99955L7.94975 2.0498Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftSFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M8 12L14 6V18L8 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftSLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftUpFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12.3608 10.9468L18.0176 16.6037L16.6034 18.0179L10.9466 12.361L5.99683 17.3108V5.99707H17.3105L12.3608 10.9468Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftUpLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M9.41421 8L18.0208 16.6066L16.6066 18.0208L8 9.41421V17H6V6H17V8H9.41421Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftWideFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M8.36853 12L13.1162 3.03212L14.8838 3.9679L10.6315 12L14.8838 20.0321L13.1162 20.9679L8.36853 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowLeftWideLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M8.36853 12L13.1162 3.03212L14.8838 3.9679L10.6315 12L14.8838 20.0321L13.1162 20.9679L8.36853 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowRightCircleFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM12 11H8V13H12V16L16 12L12 8V11Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowRightCircleLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 11V8L16 12L12 16V13H8V11H12ZM12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowRightDoubleFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowRightDoubleLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowRightDownFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M11.6366 13.0515L5.97974 7.39468L7.39395 5.98047L13.0508 11.6373L18.0006 6.68758V18.0013H6.68684L11.6366 13.0515Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowRightDownLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M14.5895 16.0032L5.98291 7.39664L7.39712 5.98242L16.0037 14.589V7.00324H18.0037V18.0032H7.00373V16.0032H14.5895Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowRightFill (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M12 13H4V11H12V4L20 12L12 20V13Z\"},\"child\":[]}]})(props);\n};\nexport function RiArrowRightLine (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M16.1716 10.9999L10