New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@remirror/extension-font-size

Package Overview
Dependencies
Maintainers
2
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/extension-font-size - npm Package Compare versions

Comparing version 0.0.0-pr2166.1 to 0.0.0-pr2166.2

dist/_tsup-dts-rollup.d.cts

117

dist/_tsup-dts-rollup.d.ts

@@ -0,1 +1,118 @@

import { ApplySchemaAttributes } from '@remirror/core';
import { Array1 } from '@remirror/core';
import { CommandFunction } from '@remirror/core';
import { DomSizeUnit } from '@remirror/core';
import { Helper } from '@remirror/core';
import { KeyBindingProps } from '@remirror/core';
import { MarkExtension } from '@remirror/core';
import { MarkExtensionSpec } from '@remirror/core';
import { MarkSpecOverride } from '@remirror/core';
import { ParsedDomSize } from '@remirror/core';
import { PrimitiveSelection } from '@remirror/core';
import { Static } from '@remirror/core';
export declare const decreaseFontSizeOptions: Remirror.CommandDecoratorOptions;
export declare const FONT_SIZE_ATTRIBUTE = "data-font-size-mark";
export declare interface FontSizeAttributes {
/**
* The font size.
*
* @defaultValue ''
*/
size?: string;
}
/**
* Add a font size to the selected text (or text within a specified range).
*/
declare class FontSizeExtension extends MarkExtension<FontSizeOptions> {
get name(): "fontSize";
createTags(): ("formattingMark" | "fontStyle")[];
createMarkSpec(extra: ApplySchemaAttributes, override: MarkSpecOverride): MarkExtensionSpec;
private getFontSize;
/**
* Set the text size color value for the selected text.
*/
setFontSize(size: string | number, options?: SizeCommandOptions): CommandFunction;
increaseFontSize(options?: SizeCommandOptions): CommandFunction;
decreaseFontSize(options?: SizeCommandOptions): CommandFunction;
/**
* Remove the size mark from the selection.
*/
removeFontSize(options?: SizeCommandOptions): CommandFunction;
/**
* Handle exiting the mark forwards.
*/
increaseFontSizeShortcut(props: KeyBindingProps): boolean;
/**
* Handle exiting the mark forwards.
*/
decreaseFontSizeShortcut(props: KeyBindingProps): boolean;
/**
* Get the font size at the current selection (or provided custom selection).
* Returns an array of parsed font size tuples if there are multiple sizes in
* the non-empty selection.
*/
getFontSizeForSelection(position?: PrimitiveSelection): Helper<Array1<ParsedDomSize>>;
getFontSizeFromDom(position?: PrimitiveSelection): Helper<ParsedDomSize>;
}
export { FontSizeExtension }
export { FontSizeExtension as FontSizeExtension_alias_1 }
export declare interface FontSizeOptions {
/**
* The default size value.
*
* @defaultValue ''
*/
defaultSize?: Static<string>;
/**
* The default unit to use for the font sizes.
*
* @defaultValue 'pt'
*/
unit?: DomSizeUnit;
/**
* The amount to increment the font by when the font size is incremented.
*
* A function can be passed if you would like the increment level to be
* influenced by the current font size. A larger increment can be set for
* larger sizes.
*
* @param parsedSize - the size as a tuple of size and unit.
* @param direction - `-1` when decreasing the value and `+1` when increasing
* the value.
*/
increment?: number | ((parsedSize: ParsedDomSize, direction: -1 | 1) => number);
/**
* The maximum font size.
*/
max?: number;
/**
* The minimum font size.
*/
min?: number;
/**
* The nearest multiple to round the font size to. This can be `1` to only
* accept whole number or `0.5` to accept both whole numbers and numbers
* ending in `.5`.
*
* It is advisable to only set values that produce whole numbers when divided
* by 1.
*
* @defaultValue 0.5
*/
roundingMultiple?: number;
}
export declare const increaseFontSizeOptions: Remirror.CommandDecoratorOptions;
export declare const setFontSizeOptions: Remirror.CommandDecoratorOptions;
declare interface SizeCommandOptions {
selection?: PrimitiveSelection;
}
export { }

8

dist/remirror-extension-font-size.d.ts

@@ -1,1 +0,7 @@

export {};
export { FontSizeExtension } from './_tsup-dts-rollup';
export { FontSizeOptions } from './_tsup-dts-rollup';
export { FontSizeAttributes } from './_tsup-dts-rollup';
export { setFontSizeOptions } from './_tsup-dts-rollup';
export { increaseFontSizeOptions } from './_tsup-dts-rollup';
export { decreaseFontSizeOptions } from './_tsup-dts-rollup';
export { FONT_SIZE_ATTRIBUTE } from './_tsup-dts-rollup';

6

dist/remirror-extension-font-size.js

@@ -16,7 +16,7 @@ var _initClass, _FontSizeExtension, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _initProto;

function _checkInRHS(value) { if (Object(value) !== value) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== value ? typeof value : "null")); return value; }
// packages/remirror__extension-font-size/src/font-size-extension.ts
// src/font-size-extension.ts
import round from "round";
import { clamp, command, convertPixelsToDomUnit, extension, ExtensionPriority, ExtensionTag, getFontSize, getMarkRanges, getTextSelection, helper, isElementDomNode, isFunction, isString, joinStyles, keyBinding, MarkExtension, NamedShortcut, omitExtraAttributes, parseSizeUnit } from "@remirror/core";
// packages/remirror__extension-font-size/src/font-size-utils.ts
// src/font-size-utils.ts
import { ExtensionFontSizeMessages as Messages } from "@remirror/messages";

@@ -52,3 +52,3 @@ var setFontSizeOptions = {

// packages/remirror__extension-font-size/src/font-size-extension.ts
// src/font-size-extension.ts
var FontSizeExtension = ((_dec = extension({

@@ -55,0 +55,0 @@ defaultOptions: {

{
"name": "@remirror/extension-font-size",
"version": "0.0.0-pr2166.1",
"version": "0.0.0-pr2166.2",
"description": "Add font size to the selected text, or text within the provided range.",

@@ -38,11 +38,12 @@ "keywords": [

"@babel/runtime": "^7.22.3",
"@remirror/core": "0.0.0-pr2166.1",
"@remirror/messages": "0.0.0-pr2166.1",
"@remirror/core": "0.0.0-pr2166.2",
"@remirror/messages": "0.0.0-pr2166.2",
"round": "^2.0.1"
},
"devDependencies": {
"@remirror/pm": "0.0.0-pr2166.1"
"@remirror/cli": "0.0.0-pr2166.2",
"@remirror/pm": "0.0.0-pr2166.2"
},
"peerDependencies": {
"@remirror/pm": "0.0.0-pr2166.1"
"@remirror/pm": "0.0.0-pr2166.2"
},

@@ -54,3 +55,6 @@ "publishConfig": {

"sizeLimit": "5 KB"
},
"scripts": {
"build": "remirror-cli build"
}
}

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

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