UNPKG

@bitbybit-dev/base

Version:

Bit By Bit Developers Base CAD Library to Program Geometry

190 lines (189 loc) 4.5 kB
import { Base } from "./base-inputs"; export declare namespace Text { class TextDto { constructor(text?: string); /** * The text * @default Hello World */ text: string; } class TextSplitDto { constructor(text?: string, separator?: string); /** * Text to split * @default a,b,c */ text: string; /** * Text to split by * @default , */ separator: string; } class TextReplaceDto { constructor(text?: string, search?: string, replaceWith?: string); /** * Text to replace * @default a-c */ text: string; /** * Text to search for * @default - */ search: string; /** * Text to replace found occurences * @default b */ replaceWith: string; } class TextJoinDto { constructor(list?: string[], separator?: string); /** * Text to join * @default undefined */ list: string[]; /** * Text to join by * @default , */ separator: string; } class ToStringDto<T> { constructor(item?: T); /** * Item to stringify * @default undefined */ item: T; } class ToStringEachDto<T> { constructor(list?: T[]); /** * Item to stringify * @default undefined */ list: T[]; } class TextFormatDto { constructor(text?: string, values?: string[]); /** * Text to format * @default Hello {0} */ text: string; /** * Values to format * @default ["World"] */ values: string[]; } class VectorCharDto { constructor(char?: string, xOffset?: number, yOffset?: number, height?: number, extrudeOffset?: number); /** * The text * @default A */ char: string; /** * The x offset * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ xOffset?: number; /** * The y offset * @minimum -Infinity * @maximum Infinity * @step 0.1 */ yOffset?: number; /** * The height of the text * @default 1 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ height?: number; /** * The extrude offset * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ extrudeOffset?: number; } class VectorTextDto { constructor(text?: string, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: Base.horizontalAlignEnum, extrudeOffset?: number, centerOnOrigin?: boolean); /** * The text * @default Hello World */ text?: string; /** * The x offset * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ xOffset?: number; /** * The y offset * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ yOffset?: number; /** * The height of the text * @default 1 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ height?: number; /** * The line spacing * @default 1.4 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ lineSpacing?: number; /** * The letter spacing offset * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ letterSpacing?: number; /** * The extrude offset * @default left */ align?: Base.horizontalAlignEnum; /** * The extrude offset * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ extrudeOffset?: number; /** * Will center text on 0, 0, 0 * @default false */ centerOnOrigin?: boolean; } }