ricos-types
Advanced tools
Comparing version 10.6.7 to 10.7.0
'use strict'; | ||
var commonTypes = require('./commonTypes.js'); | ||
var editorCommandsType = require('./editorCommandsType.js'); | ||
var editorTypes = require('./editorTypes.js'); | ||
var keyTypes = require('./key-types.js'); | ||
var nodeDataRefinedTypes = require('./node-data-refined-types.js'); | ||
var nodeRefinedTypes = require('./node-refined-types.js'); | ||
var pluginMenuTypes = require('./pluginMenuTypes.js'); | ||
var ricosNodes = require('./ricos-nodes.js'); | ||
var shortcuts = require('./shortcuts.js'); | ||
var tiptap = require('./tiptap.js'); | ||
var toolbarEnums = require('./toolbarEnums.js'); | ||
var uploadServicesTypes = require('./uploadServicesTypes.js'); | ||
var ricosSchema = require('ricos-schema'); | ||
var ricosContent = require('ricos-content'); | ||
require('ricos-content'); | ||
const isTextDirection = (dir) => ["rtl", "ltr", "auto"].includes(dir); | ||
const CUSTOM_LINK = "custom-link"; | ||
var __defProp = Object.defineProperty; | ||
var __defProps = Object.defineProperties; | ||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __spreadValues = (a, b) => { | ||
for (var prop in b || (b = {})) | ||
if (__hasOwnProp.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
if (__getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(b)) { | ||
if (__propIsEnum.call(b, prop)) | ||
__defNormalProp(a, prop, b[prop]); | ||
} | ||
return a; | ||
}; | ||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); | ||
const DOC_STYLE_TYPES = { | ||
P: "paragraph", | ||
H1: "headerOne", | ||
H2: "headerTwo", | ||
H3: "headerThree", | ||
H4: "headerFour", | ||
H5: "headerFive", | ||
H6: "headerSix" | ||
}; | ||
const DRAFT_TO_DOC_TYPE = { | ||
[ricosContent.HEADER_BLOCK.ONE]: "headerOne", | ||
[ricosContent.HEADER_BLOCK.TWO]: "headerTwo", | ||
[ricosContent.HEADER_BLOCK.THREE]: "headerThree", | ||
[ricosContent.HEADER_BLOCK.FOUR]: "headerFour", | ||
[ricosContent.HEADER_BLOCK.FIVE]: "headerFive", | ||
[ricosContent.HEADER_BLOCK.SIX]: "headerSix", | ||
[ricosContent.HEADER_BLOCK.PARAGRAPH]: "paragraph" | ||
}; | ||
const DRAFT_TO_DOC_TYPE_WITH_LISTS = __spreadProps(__spreadValues({}, DRAFT_TO_DOC_TYPE), { | ||
"ordered-list-item": "paragraph", | ||
"unordered-list-item": "paragraph" | ||
}); | ||
const isModifierKey = (key) => [ | ||
"Alt", | ||
"AltGraph", | ||
"CapsLock", | ||
"Ctrl", | ||
"Fn", | ||
"FnLock", | ||
"Hyper", | ||
"Meta", | ||
"NumLock", | ||
"ScrollLock", | ||
"Shift", | ||
"Super", | ||
"Symbol", | ||
"SymbolLock" | ||
].includes(key); | ||
const isWhitespaceKeys = (key) => ["Enter", "Tab", "Space"].includes(key); | ||
const isNavigationKey = (key) => [ | ||
"ArrowDown", | ||
"ArrowLeft", | ||
"ArrowRight", | ||
"ArrowUp", | ||
"Arrow", | ||
"End", | ||
"Home", | ||
"PageDown", | ||
"PageUp", | ||
"Escape" | ||
].includes(key); | ||
const isFunctionKey = (key) => [ | ||
"F1", | ||
"F2", | ||
"F3", | ||
"F4", | ||
"F5", | ||
"F6", | ||
"F7", | ||
"F8", | ||
"F9", | ||
"F10", | ||
"F11", | ||
"F12", | ||
"F13", | ||
"F14", | ||
"F15", | ||
"F16", | ||
"F17", | ||
"F18", | ||
"F19", | ||
"F20", | ||
"Soft1", | ||
"Soft2", | ||
"Soft3", | ||
"Soft4" | ||
].includes(key); | ||
const isNumber = (key) => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"].includes(key); | ||
const isNumericKeypadKey = (key) => isNumber(key) || [ | ||
"Decimal", | ||
"Key11", | ||
"Key12", | ||
"Multiply", | ||
"Add", | ||
"Clear", | ||
"Divide", | ||
"Subtract", | ||
"Separator" | ||
].includes(key); | ||
const isLatinKey = (key) => [ | ||
"A", | ||
"B", | ||
"C", | ||
"D", | ||
"E", | ||
"F", | ||
"G", | ||
"H", | ||
"I", | ||
"J", | ||
"K", | ||
"L", | ||
"M", | ||
"N", | ||
"O", | ||
"P", | ||
"Q", | ||
"R", | ||
"S", | ||
"T", | ||
"U", | ||
"V", | ||
"W", | ||
"X", | ||
"Y", | ||
"Z" | ||
].includes(key); | ||
const isNonAlphaNumericKey = (key) => [ | ||
"/", | ||
".", | ||
",", | ||
"]", | ||
"[", | ||
";", | ||
"<", | ||
">", | ||
"?", | ||
"!", | ||
"@", | ||
"#", | ||
"$", | ||
"%", | ||
"^", | ||
"&", | ||
"*", | ||
"(", | ||
")", | ||
"-", | ||
"=", | ||
"_", | ||
"+", | ||
"{", | ||
"}", | ||
"|", | ||
",", | ||
":", | ||
'"', | ||
"~", | ||
"`" | ||
].includes(key); | ||
const isAnyKey = (key) => isNonAlphaNumericKey(key) || isNumber(key) || isNumericKeypadKey(key) || isLatinKey(key) || isFunctionKey(key) || isNavigationKey(key) || isWhitespaceKeys(key) || isModifierKey(key); | ||
const isTriggerKey = (key) => isNonAlphaNumericKey(key) || isNumber(key) || isNumericKeypadKey(key) || isLatinKey(key) || isFunctionKey(key) || isNavigationKey(key) || isWhitespaceKeys(key); | ||
const isTextData = (data) => typeof (data == null ? void 0 : data.text) === "string" && Array.isArray(data == null ? void 0 : data.decorations) && data.decorations.every(isDecoration); | ||
const DECORATION_TYPES = [ | ||
ricosSchema.Decoration_Type.ANCHOR, | ||
ricosSchema.Decoration_Type.BOLD, | ||
ricosSchema.Decoration_Type.COLOR, | ||
ricosSchema.Decoration_Type.EXTERNAL, | ||
ricosSchema.Decoration_Type.FONT_SIZE, | ||
ricosSchema.Decoration_Type.ITALIC, | ||
ricosSchema.Decoration_Type.LINK, | ||
ricosSchema.Decoration_Type.MENTION, | ||
ricosSchema.Decoration_Type.SPOILER, | ||
ricosSchema.Decoration_Type.UNDERLINE | ||
]; | ||
const isDecoration = (data) => DECORATION_TYPES.includes(data.type); | ||
const isParagraphData = (data) => !!data && (!data.indentation || typeof data.indentation === "number") && (!data.textStyle || [ | ||
ricosSchema.TextStyle_TextAlignment.AUTO, | ||
ricosSchema.TextStyle_TextAlignment.CENTER, | ||
ricosSchema.TextStyle_TextAlignment.JUSTIFY, | ||
ricosSchema.TextStyle_TextAlignment.LEFT, | ||
ricosSchema.TextStyle_TextAlignment.RIGHT | ||
].includes(data.textStyle.textAlignment)); | ||
const isIdentified = (node) => typeof node.id === "string" && node.id.length > 0; | ||
const isTextNodeContainer = (node) => node.nodes.every(isTextNode); | ||
const isTextNode = (node) => isLeaf(node) && isTextData(node.textData) && node.type === ricosSchema.Node_Type.TEXT && node.id === ""; | ||
const isParagraphNode = (node) => isIdentified(node) && isParagraphData(node.paragraphData) && node.type === ricosSchema.Node_Type.PARAGRAPH && isTextNodeContainer(node); | ||
const isListNode = (node) => node.type === ricosSchema.Node_Type.ORDERED_LIST || node.type === ricosSchema.Node_Type.BULLETED_LIST; | ||
const isLeaf = (node) => node.nodes.length === 0; | ||
const PLUGIN_MENU_MODAL_ID = "pluginMenu"; | ||
const PLUGIN_MENU_HORIZONTAL_MODAL_ID = "pluginMenuHorizontal"; | ||
const Shortcut = (shortcut) => shortcut; | ||
const isNodeConfig = (c) => c.type === "node"; | ||
const isMarkConfig = (c) => c.type === "mark"; | ||
const isExtensionConfig = (c) => c.type === "extension"; | ||
const isRicosNodeExtension = (ext) => ext.type === "node"; | ||
const isRicosMarkExtension = (ext) => ext.type === "mark"; | ||
const isRicosFunctionalExtension = (ext) => ext.type === "extension"; | ||
var ButtonType = /* @__PURE__ */ ((ButtonType2) => { | ||
ButtonType2["CUSTOM"] = "custom"; | ||
ButtonType2["FILES"] = "file"; | ||
ButtonType2["TOGGLE"] = "toggle"; | ||
ButtonType2["PANEL"] = "panel"; | ||
ButtonType2["INLINE_PANEL"] = "inline-panel"; | ||
ButtonType2["EXTERNAL_MODAL"] = "external-modal"; | ||
ButtonType2["DROPDOWN"] = "dropdown"; | ||
ButtonType2["SEPARATOR"] = "separator"; | ||
ButtonType2["SIZE_ORIGINAL"] = "size-original"; | ||
ButtonType2["SIZE_CONTENT_CENTER"] = "size-content-center"; | ||
ButtonType2["SIZE_SMALL_CENTER"] = "size-small-center"; | ||
ButtonType2["SIZE_SMALL_LEFT"] = "size-small-left"; | ||
ButtonType2["SIZE_SMALL_RIGHT"] = "size-small-right"; | ||
ButtonType2["ALIGN_LEFT"] = "align-left"; | ||
ButtonType2["ALIGN_RIGHT"] = "align-right"; | ||
ButtonType2["ALIGN_CENTER"] = "align-center"; | ||
ButtonType2["SIZE_CONTENT"] = "size-content"; | ||
ButtonType2["SIZE_FULL_WIDTH"] = "size-full-width"; | ||
ButtonType2["SIZE_SMALL"] = "size-small"; | ||
ButtonType2["SIZE_MEDIUM"] = "size-medium"; | ||
ButtonType2["SIZE_LARGE"] = "size-large"; | ||
ButtonType2["TEXT_ALIGN_LEFT"] = "alignment-left"; | ||
ButtonType2["TEXT_ALIGN_CENTER"] = "alignment-center"; | ||
ButtonType2["TEXT_ALIGN_RIGHT"] = "alignment-right"; | ||
ButtonType2["WIDTH"] = "width"; | ||
ButtonType2["HEIGHT"] = "height"; | ||
ButtonType2["LINK"] = "link"; | ||
ButtonType2["SPOILER"] = "spoiler"; | ||
ButtonType2["DELETE"] = "delete"; | ||
ButtonType2["LINK_PREVIEW"] = "link-preview"; | ||
ButtonType2["VIDEO_SETTINGS"] = "video-settings"; | ||
ButtonType2["FILE_UPLOAD_SETTINGS"] = "file-upload-settings"; | ||
ButtonType2["AUDIO_SETTINGS"] = "audio-settings"; | ||
return ButtonType2; | ||
})(ButtonType || {}); | ||
var ModifierKey = /* @__PURE__ */ ((ModifierKey2) => { | ||
ModifierKey2["COMMAND"] = "command"; | ||
ModifierKey2["CTRL"] = "ctrl"; | ||
ModifierKey2["OPTION"] = "option"; | ||
ModifierKey2["SHIFT"] = "shift"; | ||
ModifierKey2["ALT"] = "alt"; | ||
return ModifierKey2; | ||
})(ModifierKey || {}); | ||
var ToolbarType = /* @__PURE__ */ ((ToolbarType2) => { | ||
ToolbarType2["SIDE"] = "SIDE"; | ||
ToolbarType2["MOBILE"] = "MOBILE"; | ||
ToolbarType2["FOOTER"] = "FOOTER"; | ||
ToolbarType2["STATIC"] = "STATIC"; | ||
ToolbarType2["INLINE"] = "INLINE"; | ||
ToolbarType2["PLUGIN"] = "PLUGIN"; | ||
ToolbarType2["FORMATTING"] = "FORMATTING"; | ||
ToolbarType2["INSERT_PLUGIN"] = "INSERT_PLUGIN"; | ||
ToolbarType2["TEXT"] = "ALL-TEXT-TOOLBARS"; | ||
ToolbarType2["SHORTCUT"] = "SHORTCUT"; | ||
ToolbarType2["LINK"] = "LINK"; | ||
ToolbarType2["EXTERNAL"] = "EXTERNAL"; | ||
ToolbarType2["PLUGIN_MENU"] = "PLUGIN_MENU"; | ||
ToolbarType2["MEGA"] = "MEGA"; | ||
ToolbarType2["EMPTY"] = "EMPTY"; | ||
return ToolbarType2; | ||
})(ToolbarType || {}); | ||
var DisplayMode = /* @__PURE__ */ ((DisplayMode2) => { | ||
DisplayMode2["NORMAL"] = "NORMAL"; | ||
DisplayMode2["FLOATING"] = "FLOATING"; | ||
return DisplayMode2; | ||
})(DisplayMode || {}); | ||
var DecorationMode = /* @__PURE__ */ ((DecorationMode2) => { | ||
DecorationMode2["PREPEND"] = "PREPEND"; | ||
DecorationMode2["WRAP"] = "WRAP"; | ||
DecorationMode2["APPEND"] = "APPEND"; | ||
return DecorationMode2; | ||
})(DecorationMode || {}); | ||
var MediaUploadProgressKey = /* @__PURE__ */ ((MediaUploadProgressKey2) => { | ||
MediaUploadProgressKey2[MediaUploadProgressKey2["STARTED"] = 0] = "STARTED"; | ||
MediaUploadProgressKey2[MediaUploadProgressKey2["FINISHED"] = 1] = "FINISHED"; | ||
return MediaUploadProgressKey2; | ||
})(MediaUploadProgressKey || {}); | ||
exports.isTextDirection = commonTypes.isTextDirection; | ||
exports.CUSTOM_LINK = editorCommandsType.CUSTOM_LINK; | ||
exports.DOC_STYLE_TYPES = editorTypes.DOC_STYLE_TYPES; | ||
exports.DRAFT_TO_DOC_TYPE = editorTypes.DRAFT_TO_DOC_TYPE; | ||
exports.DRAFT_TO_DOC_TYPE_WITH_LISTS = editorTypes.DRAFT_TO_DOC_TYPE_WITH_LISTS; | ||
exports.isAnyKey = keyTypes.isAnyKey; | ||
exports.isFunctionKey = keyTypes.isFunctionKey; | ||
exports.isLatinKey = keyTypes.isLatinKey; | ||
exports.isModifierKey = keyTypes.isModifierKey; | ||
exports.isNavigationKey = keyTypes.isNavigationKey; | ||
exports.isNonAlphaNumericKey = keyTypes.isNonAlphaNumericKey; | ||
exports.isNumber = keyTypes.isNumber; | ||
exports.isNumericKeypadKey = keyTypes.isNumericKeypadKey; | ||
exports.isTriggerKey = keyTypes.isTriggerKey; | ||
exports.isWhitespaceKeys = keyTypes.isWhitespaceKeys; | ||
exports.isParagraphData = nodeDataRefinedTypes.isParagraphData; | ||
exports.isTextData = nodeDataRefinedTypes.isTextData; | ||
exports.isListNode = nodeRefinedTypes.isListNode; | ||
exports.isParagraphNode = nodeRefinedTypes.isParagraphNode; | ||
exports.isTextNode = nodeRefinedTypes.isTextNode; | ||
exports.PLUGIN_MENU_HORIZONTAL_MODAL_ID = pluginMenuTypes.PLUGIN_MENU_HORIZONTAL_MODAL_ID; | ||
exports.PLUGIN_MENU_MODAL_ID = pluginMenuTypes.PLUGIN_MENU_MODAL_ID; | ||
exports.Ricos_Nodes = ricosNodes.Ricos_Nodes; | ||
exports.Shortcut = shortcuts.Shortcut; | ||
exports.isExtensionConfig = tiptap.isExtensionConfig; | ||
exports.isMarkConfig = tiptap.isMarkConfig; | ||
exports.isNodeConfig = tiptap.isNodeConfig; | ||
exports.isRicosFunctionalExtension = tiptap.isRicosFunctionalExtension; | ||
exports.isRicosMarkExtension = tiptap.isRicosMarkExtension; | ||
exports.isRicosNodeExtension = tiptap.isRicosNodeExtension; | ||
exports.ButtonType = toolbarEnums.ButtonType; | ||
exports.DecorationMode = toolbarEnums.DecorationMode; | ||
exports.DisplayMode = toolbarEnums.DisplayMode; | ||
exports.ModifierKey = toolbarEnums.ModifierKey; | ||
exports.ToolbarType = toolbarEnums.ToolbarType; | ||
exports.MediaUploadProgressKey = uploadServicesTypes.MediaUploadProgressKey; | ||
Object.defineProperty(exports, 'Decoration_Type', { | ||
@@ -320,37 +72,2 @@ enumerable: true, | ||
}); | ||
exports.ButtonType = ButtonType; | ||
exports.CUSTOM_LINK = CUSTOM_LINK; | ||
exports.DOC_STYLE_TYPES = DOC_STYLE_TYPES; | ||
exports.DRAFT_TO_DOC_TYPE = DRAFT_TO_DOC_TYPE; | ||
exports.DRAFT_TO_DOC_TYPE_WITH_LISTS = DRAFT_TO_DOC_TYPE_WITH_LISTS; | ||
exports.DecorationMode = DecorationMode; | ||
exports.DisplayMode = DisplayMode; | ||
exports.MediaUploadProgressKey = MediaUploadProgressKey; | ||
exports.ModifierKey = ModifierKey; | ||
exports.PLUGIN_MENU_HORIZONTAL_MODAL_ID = PLUGIN_MENU_HORIZONTAL_MODAL_ID; | ||
exports.PLUGIN_MENU_MODAL_ID = PLUGIN_MENU_MODAL_ID; | ||
exports.Shortcut = Shortcut; | ||
exports.ToolbarType = ToolbarType; | ||
exports.isAnyKey = isAnyKey; | ||
exports.isExtensionConfig = isExtensionConfig; | ||
exports.isFunctionKey = isFunctionKey; | ||
exports.isLatinKey = isLatinKey; | ||
exports.isListNode = isListNode; | ||
exports.isMarkConfig = isMarkConfig; | ||
exports.isModifierKey = isModifierKey; | ||
exports.isNavigationKey = isNavigationKey; | ||
exports.isNodeConfig = isNodeConfig; | ||
exports.isNonAlphaNumericKey = isNonAlphaNumericKey; | ||
exports.isNumber = isNumber; | ||
exports.isNumericKeypadKey = isNumericKeypadKey; | ||
exports.isParagraphData = isParagraphData; | ||
exports.isParagraphNode = isParagraphNode; | ||
exports.isRicosFunctionalExtension = isRicosFunctionalExtension; | ||
exports.isRicosMarkExtension = isRicosMarkExtension; | ||
exports.isRicosNodeExtension = isRicosNodeExtension; | ||
exports.isTextData = isTextData; | ||
exports.isTextDirection = isTextDirection; | ||
exports.isTextNode = isTextNode; | ||
exports.isTriggerKey = isTriggerKey; | ||
exports.isWhitespaceKeys = isWhitespaceKeys; | ||
//# sourceMappingURL=index.js.map |
@@ -8,2 +8,3 @@ export { isTextDirection } from './commonTypes.js'; | ||
export { PLUGIN_MENU_HORIZONTAL_MODAL_ID, PLUGIN_MENU_MODAL_ID } from './pluginMenuTypes.js'; | ||
export { Ricos_Nodes } from './ricos-nodes.js'; | ||
export { Shortcut } from './shortcuts.js'; | ||
@@ -10,0 +11,0 @@ export { isExtensionConfig, isMarkConfig, isNodeConfig, isRicosFunctionalExtension, isRicosMarkExtension, isRicosNodeExtension } from './tiptap.js'; |
@@ -0,1 +1,2 @@ | ||
import type { Node as ProseMirrorNode, Schema } from '@tiptap/pm/model'; | ||
import type { ACTION_BUTTON_TYPE, AUDIO_TYPE, BLOCKQUOTE, BULLET_LIST_TYPE, CODE_BLOCK_TYPE, COLLAPSIBLE_LIST_TYPE, DIVIDER_TYPE, DocumentStyle, EMBED_TYPE, EXTERNAL, FILE_UPLOAD_TYPE, GALLERY_TYPE, GIPHY_TYPE, HEADER_BLOCK, HTML_TYPE, IMAGE_TYPE, LINK_BUTTON_TYPE, LINK_PREVIEW_TYPE, NUMBERED_LIST_TYPE, POLL_TYPE, RICOS_ANCHOR_TYPE, RICOS_COLLAPSIBLE_LIST_TYPE, RICOS_DIVIDER_TYPE, RICOS_FILE_TYPE, RICOS_FONT_SIZE_TYPE, RICOS_GALLERY_TYPE, RICOS_GIPHY_TYPE, RICOS_HTML_TYPE, RICOS_IMAGE_TYPE, RICOS_INDENT_TYPE, RICOS_LINE_SPACING_TYPE, RICOS_LINK_TYPE, RICOS_MENTION_TYPE, RICOS_POLL_TYPE, RICOS_TABLE_TYPE, RICOS_TEXT_COLOR_TYPE, RICOS_TEXT_HIGHLIGHT_TYPE, RICOS_VIDEO_TYPE, TABLE_TYPE, UNSTYLED, VERTICAL_EMBED_TYPE, VIDEO_TYPE } from 'ricos-content'; | ||
@@ -15,2 +16,4 @@ import type { ButtonData, ColorData, DividerData, FileData, GalleryData, GIFData, HTMLData, ImageData, Link, LinkData, LinkPreviewData, PollData, VideoData } from 'ricos-schema'; | ||
endKey?: string; | ||
textContent?: string; | ||
selectedNodes: ProseMirrorNode[]; | ||
}; | ||
@@ -148,4 +151,5 @@ type draftSelection = { | ||
clearEditorContent: (triggerUpdate: boolean) => void; | ||
getEditorSchema: () => Schema; | ||
} | ||
export {}; | ||
//# sourceMappingURL=editorCommandsType.d.ts.map |
@@ -30,2 +30,3 @@ export * from './biCallbacksTypes'; | ||
export * from './ricos-editor-plugins'; | ||
export * from './ricos-nodes'; | ||
export * from './ricos-schema'; | ||
@@ -32,0 +33,0 @@ export * from './ricos-toolbars'; |
@@ -1,5 +0,5 @@ | ||
import type { ComponentType } from 'react'; | ||
import type { ComponentType, CSSProperties, ReactNode } from 'react'; | ||
import type { Subscription } from './events'; | ||
import type { KeyboardShortcut } from './shortcuts'; | ||
export type LayoutTypes = 'popover' | 'drawer' | 'dialog' | 'fullscreen' | 'toolbar'; | ||
export type LayoutTypes = 'popover' | 'drawer' | 'dialog' | 'fullscreen' | 'toolbar' | 'base'; | ||
export type Layout = LayoutTypes | { | ||
@@ -15,7 +15,9 @@ desktop: LayoutTypes; | ||
export interface ModalConfig { | ||
Component: ComponentType; | ||
Component: ComponentType<any>; | ||
id: string; | ||
type?: 'exclusive'; | ||
shortcuts?: KeyboardShortcut[]; | ||
layout?: Layout; | ||
autoFocus?: boolean; | ||
disableArrowNavigation?: boolean; | ||
} | ||
@@ -33,2 +35,3 @@ type OpenModalConfig = { | ||
isModalOpen: (id: string) => boolean; | ||
isExclusiveModalOpen: () => boolean; | ||
register: (modalConfig: ModalConfig) => void; | ||
@@ -43,3 +46,10 @@ unregister: (id: string) => void; | ||
} | ||
export type ModalProps = { | ||
children: ReactNode; | ||
modalConfig: Modal; | ||
className?: string; | ||
closeModal: () => void; | ||
zIndex: CSSProperties['zIndex']; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=modalTypes.d.ts.map |
import type { ComponentType } from 'react'; | ||
import type { ToolbarButton } from './pluginTypes'; | ||
import type { Ricos_Node_Type } from './ricos-nodes'; | ||
import type { IToolbarItemConfigTiptap } from './toolbarTypes'; | ||
export interface PluginToolbar { | ||
pluginType: string; | ||
pluginType: Ricos_Node_Type; | ||
getButtons: () => PluginToolbarButton[]; | ||
@@ -7,0 +8,0 @@ toToolbarItemsConfig: () => IToolbarItemConfigTiptap[]; |
import type { ComponentType } from 'react'; | ||
import type { ToolbarButtonProps, ToolbarType } from '.'; | ||
import type { IToolbarItemConfigTiptap, Ricos_Node_Type, ToolbarButtonProps, ToolbarType } from '.'; | ||
import type { InsertPluginButtons } from './insertPluginButtons'; | ||
@@ -75,2 +75,3 @@ export interface PlatformSettings<T> { | ||
shouldCreate?: () => PlatformSettings<boolean>; | ||
filterItems?: (item: IToolbarItemConfigTiptap, nodeType: Ricos_Node_Type) => boolean; | ||
} | { | ||
@@ -77,0 +78,0 @@ name: ToolbarType.LINK; |
import type { Editor } from '@tiptap/core'; | ||
import type { Node as TiptapNode } from '@tiptap/pm/model'; | ||
import type { EditorCommands } from './editorCommandsType'; | ||
import type { ModalConfig } from './modalTypes'; | ||
import type { ModalConfig, ModalService } from './modalTypes'; | ||
export type IToolbarItem = { | ||
@@ -41,3 +41,3 @@ id: string; | ||
commands?: Record<string, TiptapCommand>; | ||
command?: (editorCommands: EditorCommands) => (args: Record<string, any>) => boolean; | ||
command?: (editorCommands: EditorCommands, modalsService: ModalService) => (args: Record<string, any>) => boolean; | ||
modal?: ModalConfig; | ||
@@ -44,0 +44,0 @@ }>; |
{ | ||
"name": "ricos-types", | ||
"version": "10.6.7", | ||
"version": "10.7.0", | ||
"author": { | ||
@@ -34,4 +34,4 @@ "name": "Oded Soffrin", | ||
"@wix/unidriver-core": "^1.1.8", | ||
"ricos-content": "10.6.7", | ||
"ricos-schema": "10.6.7" | ||
"ricos-content": "10.7.0", | ||
"ricos-schema": "10.7.0" | ||
}, | ||
@@ -66,3 +66,3 @@ "unpkg": true, | ||
}, | ||
"falconPackageHash": "f660cabbff0eca80f873b69db438a7169b09c2681722b7bb7b354ba0" | ||
"falconPackageHash": "6c22d1537c7c837d8e425dc421465474c25b0459067cc3ac5189a151" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
539292
291
4037
+ Addedricos-content@10.7.0(transitive)
+ Addedricos-schema@10.7.0(transitive)
- Removedricos-content@10.6.7(transitive)
- Removedricos-schema@10.6.7(transitive)
Updatedricos-content@10.7.0
Updatedricos-schema@10.7.0