Comparing version 0.1.6 to 0.1.7
@@ -12,3 +12,13 @@ declare type BlipglossColor = string | { | ||
} | ||
declare type BorderStyle = 'rounded' | 'double' | 'normal' | 'hidden' | 'thick'; | ||
declare type CustomBorder = { | ||
Top?: string; | ||
Bottom?: string; | ||
Left?: string; | ||
Right?: string; | ||
TopLeft?: string; | ||
TopRight?: string; | ||
BottomLeft?: string; | ||
BottomRight?: string; | ||
}; | ||
declare type BorderStyle = 'rounded' | 'double' | 'normal' | 'hidden' | 'thick' | CustomBorder; | ||
declare class Style { | ||
@@ -86,2 +96,2 @@ #private; | ||
export { HasDarkBackground, Height, JoinHorizontal, JoinVertical, NewStyle, Position, Style, Width }; | ||
export { BorderStyle, CustomBorder, HasDarkBackground, Height, JoinHorizontal, JoinVertical, NewStyle, Position, Style, Width }; |
@@ -143,2 +143,6 @@ "use strict"; | ||
}, | ||
CustomBorder: { | ||
args: [import_bun_ffi.FFIType.ptr, import_bun_ffi.FFIType.ptr], | ||
returns: import_bun_ffi.FFIType.void | ||
}, | ||
FreeString: { | ||
@@ -270,3 +274,7 @@ args: [import_bun_ffi.FFIType.ptr], | ||
BorderStyle(style) { | ||
symbols.BorderStyle(__privateGet(this, _handle), (0, import_bun_ffi3.ptr)(encode(style))); | ||
if (typeof style === "string") { | ||
symbols.BorderStyle(__privateGet(this, _handle), (0, import_bun_ffi3.ptr)(encode(style))); | ||
} else { | ||
symbols.CustomBorder(__privateGet(this, _handle), (0, import_bun_ffi3.ptr)(encode(JSON.stringify(style)))); | ||
} | ||
return this; | ||
@@ -273,0 +281,0 @@ } |
{ | ||
"name": "blipgloss", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/index.mjs", |
@@ -161,4 +161,4 @@ # blipgloss | ||
const style = NewStyle() | ||
.BorderStyle(lipgloss.NormalBorder()) | ||
.BorderForeground(lipgloss.Color("63")) | ||
.BorderStyle('normal') | ||
.BorderForeground("63") | ||
@@ -173,3 +173,14 @@ // Set a rounded, yellow-on-purple border to the top and left | ||
// TODO: Make own border | ||
// Make your own border | ||
const style = NewStyle() | ||
.BorderStyle({ | ||
Top: "._.:*:", | ||
Bottom: "._.:*:", | ||
Left: "|*", | ||
Right: "|*", | ||
TopLeft: "*", | ||
TopRight: "*", | ||
BottomLeft: "*", | ||
BottomRight: "*", | ||
}) | ||
``` | ||
@@ -176,0 +187,0 @@ |
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
11398057
863
275