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

blipgloss

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blipgloss - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

12

dist/index.d.ts

@@ -40,4 +40,14 @@ import { CString } from 'bun:ffi';

Render(text: string): CString;
Copy(): this;
Copy(): Style;
FreeHandle(): void;
private UnsetRule;
UnsetAlign(): this;
UnsetBackground(): this;
UnsetBlink(): this;
UnsetBold(): this;
UnsetBorderBackground(): this;
UnsetBorderBottom(): this;
UnsetBorderBottomBackground(): this;
UnsetBorderBottomForeground(): this;
UnsetBorderForeground(): this;
}

@@ -44,0 +54,0 @@ declare function NewStyle(): Style;

@@ -71,3 +71,3 @@ "use strict";

Copy: {
args: [],
args: [import_bun_ffi.FFIType.ptr],
returns: import_bun_ffi.FFIType.ptr

@@ -103,2 +103,6 @@ },

},
UnsetRule: {
args: [import_bun_ffi.FFIType.ptr, import_bun_ffi.FFIType.ptr],
returns: import_bun_ffi.FFIType.void
},
FreeString: {

@@ -230,4 +234,3 @@ args: [import_bun_ffi.FFIType.ptr],

Copy() {
__privateSet(this, _handle, symbols.Copy());
return this;
return new _Style(symbols.Copy(__privateGet(this, _handle)));
}

@@ -237,2 +240,33 @@ FreeHandle() {

}
UnsetRule(key) {
symbols.UnsetRule(__privateGet(this, _handle), (0, import_bun_ffi3.ptr)(encode(key)));
return this;
}
UnsetAlign() {
return this.UnsetRule("UnsetAlign");
}
UnsetBackground() {
return this.UnsetRule("UnsetBackground");
}
UnsetBlink() {
return this.UnsetRule("UnsetBlink");
}
UnsetBold() {
return this.UnsetRule("UnsetBold");
}
UnsetBorderBackground() {
return this.UnsetRule("UnsetBorderBackground");
}
UnsetBorderBottom() {
return this.UnsetRule("UnsetBorderBottom");
}
UnsetBorderBottomBackground() {
return this.UnsetRule("UnsetBorderBottomBackground");
}
UnsetBorderBottomForeground() {
return this.UnsetRule("UnsetBorderBottomForeground");
}
UnsetBorderForeground() {
return this.UnsetRule("UnsetBorderForeground");
}
};

@@ -239,0 +273,0 @@ var Style = _Style;

2

package.json
{
"name": "blipgloss",
"version": "0.0.4",
"version": "0.1.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.mjs",

@@ -124,4 +124,24 @@ # blipgloss

`TODO`
Just use `Copy()`:
```js
const style = lipgloss.NewStyle().Foreground("219")
const wildStyle = style.Copy().Blink(true)
```
`Copy()` performs a copy on the underlying data structure ensuring that you get a true, dereferenced copy of a style. Without copying it's possible to mutate styles.
## Unsetting Rules
All rules can be unset:
```js
const style = lipgloss.NewStyle().
Bold(true). // make it bold
UnsetBold(). // jk don't make it bold
Background("227"). // yellow background
UnsetBackground() // never mind
```
## Rendering

@@ -128,0 +148,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

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