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

@aurigma/design-atoms-text

Package Overview
Dependencies
Maintainers
5
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurigma/design-atoms-text - npm Package Compare versions

Comparing version 7.1.2 to 7.1.3

1

dist/TextEditor/Interfaces/ITextEditor.d.ts

@@ -145,2 +145,3 @@ import { EventObject } from "@aurigma/design-atoms-model/EventObject";

redrawActiveTextInEditMode: boolean;
disableDrawBaseline: boolean;
redraw(): void;

@@ -147,0 +148,0 @@ setFontRegistry(fontRegistry: IFontRegistry): any;

4

dist/TextEditor/Interfaces/ITextService.d.ts

@@ -82,3 +82,3 @@ import { EventObject } from "@aurigma/design-atoms-model/EventObject";

*/
measureText(scale: number, isExtendToBlackBox?: boolean): Promise<RectangleF>;
measureText(scale: number, isExtendToBlackBox?: boolean): RectangleF;
/**

@@ -88,3 +88,3 @@ * Measures the text frame.

*/
measureTextFrame(useActiveText: boolean): Promise<RectangleF>;
measureTextFrame(useActiveText: boolean): RectangleF;
}

@@ -45,2 +45,3 @@ import { EventObject } from "@aurigma/design-atoms-model/EventObject";

constructor(elementHandler: ITextEditorElementHandler, fontService: IFontService, useSimpleFontList: boolean, _inputTextValidator: IInputTextValidator, designAtomsApiClient: IDesignAtomsApiClient, colorPreviewService: IColorPreviewService, colorParser: IColorParser, rgbColorParser: IRgbColorParser);
get disableDrawBaseline(): boolean;
get highlightInEditingModeEnabled(): boolean;

@@ -47,0 +48,0 @@ /**

@@ -65,2 +65,5 @@ import { Color } from "@aurigma/design-atoms-model/Colors";

}
get disableDrawBaseline() {
return true;
}
get highlightInEditingModeEnabled() {

@@ -67,0 +70,0 @@ return false;

@@ -53,2 +53,3 @@ import { EventObject } from "@aurigma/design-atoms-model/EventObject";

constructor(_clipboard: IClipboard, _inputTextValidator: IInputTextValidator, _fontRegistry: IFontRegistry, _renderer: ITextEditorRenderer);
get disableDrawBaseline(): boolean;
/**

@@ -55,0 +56,0 @@ * Indicates if the editor is initialized and ready to work.

@@ -80,2 +80,5 @@ import { EventObject } from "@aurigma/design-atoms-model/EventObject";

}
get disableDrawBaseline() {
return false;
}
/**

@@ -321,10 +324,10 @@ * Indicates if the editor is initialized and ready to work.

}
async _checkFrameChanged() {
_checkFrameChanged() {
const initialRectangle = this._rectangle;
let currentRectangle = null;
if (this._isBoundedText === false) {
currentRectangle = await this._textManager.measureText(this._previewScale);
currentRectangle = this._textManager.measureText(this._previewScale);
}
else if (this._overflowStrategy === OverflowStrategy.ExpandBox) {
const measuredRectangle = await this._textManager.measureTextFrame(true);
const measuredRectangle = this._textManager.measureTextFrame(true);
if (measuredRectangle.height > initialRectangle.height) {

@@ -331,0 +334,0 @@ currentRectangle = initialRectangle.clone();

@@ -83,5 +83,5 @@ import { IPoint, RectangleF } from "@aurigma/design-atoms-model/Math";

/** @inheritDoc */
measureText(scale: number, isExtendToBlackBox?: boolean): Promise<RectangleF>;
measureText(scale: number, isExtendToBlackBox?: boolean): RectangleF;
/** @inheritDoc */
measureTextFrame(useActiveText: boolean): Promise<RectangleF>;
measureTextFrame(useActiveText: boolean): RectangleF;
getTextLength(): number;

@@ -88,0 +88,0 @@ getCurrentParagraphLength(): number;

@@ -194,8 +194,8 @@ import { EventObject } from "@aurigma/design-atoms-model/EventObject";

/** @inheritDoc */
async measureText(scale, isExtendToBlackBox = false) {
return await this._textMeasurer.measureText(scale, isExtendToBlackBox);
measureText(scale, isExtendToBlackBox = false) {
return this._textMeasurer.measureText(scale, isExtendToBlackBox);
}
/** @inheritDoc */
async measureTextFrame(useActiveText) {
return await this._textMeasurer.measureTextFrame(useActiveText);
measureTextFrame(useActiveText) {
return this._textMeasurer.measureTextFrame(useActiveText);
}

@@ -202,0 +202,0 @@ getTextLength() {

import * as TextWhizz from "@aurigma/text-whizz/TextWhizzJS";
import { Path } from "@aurigma/design-atoms-model/Math/Path";
import { PointF } from "@aurigma/design-atoms-model";
export declare function toTextWhizzPath(textWhizz: typeof TextWhizz, modelPath: Path): TextWhizz.Path;
export declare function fromTextWhizzPath(path: TextWhizz.Path): Path;
export declare function getPathFirstPoint(path: Path): PointF;
export declare function getPathLastPoint(path: Path): PointF;

@@ -53,1 +53,9 @@ import { Path } from "@aurigma/design-atoms-model/Math/Path";

}
export function getPathFirstPoint(path) {
const firstSegment = path.segments[0];
return firstSegment.getPoint(0);
}
export function getPathLastPoint(path) {
const lastSegment = path.segments[path.segments.length - 1];
return lastSegment.getPoint(lastSegment.length - 1);
}
{
"name": "@aurigma/design-atoms-text",
"version": "7.1.2",
"version": "7.1.3",
"description": "",

@@ -51,3 +51,3 @@ "main": "dist/index.js",

"dependencies": {
"@aurigma/design-atoms-model": "7.0.5",
"@aurigma/design-atoms-model": "7.0.6",
"@aurigma/text-whizz": "1.6.36",

@@ -54,0 +54,0 @@ "@xmldom/xmldom": "0.7.7"

@@ -208,2 +208,4 @@ import {EventObject} from "@aurigma/design-atoms-model/EventObject";

disableDrawBaseline: boolean;
redraw(): void;

@@ -210,0 +212,0 @@

@@ -98,3 +98,3 @@ import {EventObject} from "@aurigma/design-atoms-model/EventObject";

*/
measureText(scale: number, isExtendToBlackBox?: boolean): Promise<RectangleF>;
measureText(scale: number, isExtendToBlackBox?: boolean): RectangleF;

@@ -105,3 +105,3 @@ /**

*/
measureTextFrame(useActiveText: boolean): Promise<RectangleF>;
measureTextFrame(useActiveText: boolean): RectangleF;
}

@@ -128,2 +128,6 @@ import { Color, RgbColor } from "@aurigma/design-atoms-model/Colors";

get disableDrawBaseline(): boolean{
return true;
}
get highlightInEditingModeEnabled(): boolean{

@@ -130,0 +134,0 @@ return false;

@@ -98,2 +98,6 @@ import {EventObject} from "@aurigma/design-atoms-model/EventObject";

get disableDrawBaseline(): boolean{
return false;
}
/**

@@ -434,3 +438,3 @@ * Indicates if the editor is initialized and ready to work.

private async _checkFrameChanged(): Promise<void> {
private _checkFrameChanged(): void {
const initialRectangle = this._rectangle;

@@ -440,5 +444,5 @@ let currentRectangle: RectangleF = null;

if (this._isBoundedText === false) {
currentRectangle = await this._textManager.measureText(this._previewScale);
currentRectangle = this._textManager.measureText(this._previewScale);
} else if (this._overflowStrategy === OverflowStrategy.ExpandBox) {
const measuredRectangle = await this._textManager.measureTextFrame(true);
const measuredRectangle = this._textManager.measureTextFrame(true);
if (measuredRectangle.height > initialRectangle.height) {

@@ -445,0 +449,0 @@ currentRectangle = initialRectangle.clone();

@@ -239,9 +239,9 @@ import {IPoint, RectangleF} from "@aurigma/design-atoms-model/Math";

/** @inheritDoc */
async measureText(scale: number, isExtendToBlackBox: boolean = false): Promise<RectangleF> {
return await this._textMeasurer.measureText(scale, isExtendToBlackBox);
measureText(scale: number, isExtendToBlackBox: boolean = false): RectangleF {
return this._textMeasurer.measureText(scale, isExtendToBlackBox);
}
/** @inheritDoc */
async measureTextFrame(useActiveText: boolean): Promise<RectangleF> {
return await this._textMeasurer.measureTextFrame(useActiveText);
measureTextFrame(useActiveText: boolean): RectangleF {
return this._textMeasurer.measureTextFrame(useActiveText);
}

@@ -248,0 +248,0 @@

import * as TextWhizz from "@aurigma/text-whizz/TextWhizzJS";
import {Path} from "@aurigma/design-atoms-model/Math/Path";
import { PointF } from "@aurigma/design-atoms-model";

@@ -61,2 +62,12 @@ class PathContext implements TextWhizz.PathParsingContext {

return context.path;
}
export function getPathFirstPoint(path: Path): PointF {
const firstSegment = path.segments[0];
return firstSegment.getPoint(0);
}
export function getPathLastPoint(path: Path): PointF {
const lastSegment = path.segments[path.segments.length-1];
return lastSegment.getPoint(lastSegment.length-1);
}
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