Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@textbus/core

Package Overview
Dependencies
Maintainers
0
Versions
338
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@textbus/core - npm Package Compare versions

Comparing version 4.2.4 to 4.3.0

17

bundles/model/attribute.d.ts
import { VElement, VTextNode } from './element';
import { FormatValue } from './format';
import { Component } from './component';
import { Slot } from './slot';
/**

@@ -64,2 +65,6 @@ * 格式渲染可回退的渲染模式

/**
* 校验是否可应用,当返回 false 时,由不应用
*/
checkHost?(host: Slot, value: T): boolean;
/**
* 格式渲染的方法

@@ -88,2 +93,3 @@ * @param children 子节点集合

constructor(name: string, config: FormatterConfig<T>);
checkHost(host: Slot, value: T): boolean;
render(children: Array<VElement | VTextNode | Component>, formatValue: T, renderEnv: unknown): VElement | FormatHostBindingRender;

@@ -93,2 +99,11 @@ }

/**
* 当应用时,Textbus 默认会应用到当前插槽和其后代组件的所有插槽,
* 当设置为 true 时,则只应用自身
*/
onlySelf?: boolean;
/**
* 校验是否可应用,当返回 false 时,由不应用
*/
checkHost?(host: Slot, value: T): boolean;
/**
* 渲染属性的方法

@@ -108,2 +123,3 @@ * @param node 不附加属性的节点

private config;
readonly onlySelf: boolean;
/**

@@ -115,3 +131,4 @@ * 构建函数

constructor(name: string, config: AttributeConfig<T>);
checkHost(host: Slot, value: T): boolean;
render(node: VElement, formatValue: T, renderEnv: unknown): void;
}

6

bundles/model/component.d.ts

@@ -192,4 +192,3 @@ import { AbstractType, Type, InjectionToken, InjectFlags } from '@viewfly/core';

export interface ContextMenuItem {
iconClasses?: string[];
label: string;
type: string;
disabled?: boolean;

@@ -212,4 +211,3 @@ onClick(): void;

export interface ContextMenuGroup {
iconClasses?: string[];
label: string;
type: string;
disabled?: boolean;

@@ -216,0 +214,0 @@ submenu: Array<ContextMenuItem | ContextMenuCustomItem>;

@@ -87,4 +87,5 @@ import { Observable, Subject } from '@tanbo/stream';

* @param attribute
* @param canRemove
*/
removeAttribute(attribute: Attribute<any>): void;
removeAttribute(attribute: Attribute<any>, canRemove?: (slot: Slot, attr: Attribute<any>) => boolean): void;
/**

@@ -99,5 +100,6 @@ * 根据是否包含指定 Attribute

* @param formats
* @param canApply
*/
write(content: string | Component, formats?: Formats): boolean;
write<T>(content: string | Component, formatter?: Formatter<T>, value?: T): boolean;
write(content: string | Component, formats?: Formats, canApply?: (slot: Slot, formatter: Formatter, value: any) => boolean): boolean;
write<T>(content: string | Component, formatter?: Formatter<T>, value?: T, canApply?: (slot: Slot, formatter: Formatter, value: any) => boolean): boolean;
/**

@@ -128,4 +130,5 @@ * 向插槽内写入内容,并可同时应用格式

* @param data
* @param canApply
*/
applyFormat<U extends FormatValue>(formatter: Formatter<U>, data: FormatRange<U>): void;
applyFormat<U extends FormatValue>(formatter: Formatter<U>, data: FormatRange<U>, canApply?: (slot: Slot, formatter: Formatter, value: any) => boolean): void;
/**

@@ -193,4 +196,5 @@ * 在当前插槽内删除指定的组件

* @param delta
* @param canApply
*/
insertDelta(delta: DeltaLite): DeltaLite;
insertDelta(delta: DeltaLite, canApply?: (slot: Slot, formatter: Formatter, value: any) => boolean): DeltaLite;
/**

@@ -201,4 +205,5 @@ * 清除插槽格式

* @param endIndex 结束位置
* @param canApply
*/
cleanFormats(remainFormats?: Formatter<any>[] | ((formatter: Formatter<any>) => boolean), startIndex?: number, endIndex?: number): void;
cleanFormats(remainFormats?: Formatter<any>[] | ((formatter: Formatter<any>) => boolean), startIndex?: number, endIndex?: number, canApply?: (slot: Slot, formatter: Formatter, value: any) => boolean): void;
/**

@@ -211,5 +216,6 @@ * 当在回调函数中应用样式时,将把应用的样式作为子插槽的最低优化级合并

* 清除插槽属性
* @param excludeAttributes 要排除的属性
* @param remainAttributes 要保留的属性
* @param canRemove
*/
cleanAttributes(excludeAttributes?: Attribute<any>[] | ((attribute: Attribute<any>) => boolean)): void;
cleanAttributes(remainAttributes?: Attribute<any>[] | ((attribute: Attribute<any>) => boolean), canRemove?: (slot: Slot, attr: Attribute<any>) => boolean): void;
/**

@@ -216,0 +222,0 @@ * 根据插槽的格式数据,生成格式树

{
"name": "@textbus/core",
"version": "4.2.4",
"version": "4.3.0",
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",

@@ -49,3 +49,3 @@ "main": "./bundles/index.js",

},
"gitHead": "d26c6771f08dae6ec4f0b9f1929054ccf1e7bcaf"
"gitHead": "cf4fd289b73bc777124a32fe42bb58eba05a34f1"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc