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

minitel-standalone

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minitel-standalone - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

10

dist/components/input.js

@@ -7,2 +7,3 @@ "use strict";

const richchargrid_js_1 = require("../richchargrid.js");
const utils_js_1 = require("../utils.js");
class Input extends minitelobject_js_1.MinitelObject {

@@ -76,11 +77,12 @@ constructor(children, attributes, minitel) {

const lines = this.value.split('\n');
let cumulPosition = lines.filter((_, i) => i < this.cursorActuallyAt[0] - 1).reduce((p, v) => p + v.length + 1, 0);
let cumulPosition = lines.filter((_, i) => i < this.cursorActuallyAt[0]).reduce((p, v) => p + v.length + 1, 0);
cumulPosition += this.cursorActuallyAt[1];
const chars = this.value.split('');
chars.splice(cumulPosition, 0, key === '\x0d' ? '\n' : key);
this.value = chars.join('');
if (key === '\x0d') {
this.lastFocusCursorX = this.cursorActuallyAt[1] = 0;
this.lastFocusCursorX = 0;
this.cursorActuallyAt[1] = 0;
this.cursorActuallyAt[0] += 1;
}
this.value = chars.join('');
if (this.attributes.onChange)

@@ -120,3 +122,3 @@ this.attributes.onChange(this);

for (let line of lines) {
result.mergeY(richchargrid_js_1.RichCharGrid.fromLine(line, attributes).setWidth(concreteWidth, attributes.textAlign, fillChar));
result.mergeY(richchargrid_js_1.RichCharGrid.fromLine(line, attributes).setWidth(concreteWidth, utils_js_1.alignInvrt[attributes.textAlign], fillChar));
}

@@ -123,0 +125,0 @@ if (attributes.height != null) {

2

package.json
{
"name": "minitel-standalone",
"version": "1.2.1",
"version": "1.2.2",
"description": "A standalone package for minitel components",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -5,2 +5,3 @@ import { Focusable, FocusableAttributes } from '../abstract/focusable.js';

import { RichCharGrid } from '../richchargrid.js';
import { alignInvrt } from '../utils.js';
import type { Minitel } from './minitel.js';

@@ -109,11 +110,12 @@

let cumulPosition = lines.filter((_, i) => i < this.cursorActuallyAt[0] - 1).reduce((p, v) => p + v.length + 1, 0);
let cumulPosition = lines.filter((_, i) => i < this.cursorActuallyAt[0]).reduce((p, v) => p + v.length + 1, 0);
cumulPosition += this.cursorActuallyAt[1];
const chars = this.value.split('');
chars.splice(cumulPosition, 0, key === '\x0d' ? '\n' : key);
this.value = chars.join('');
if (key === '\x0d') {
this.lastFocusCursorX = this.cursorActuallyAt[1] = 0;
this.lastFocusCursorX = 0;
this.cursorActuallyAt[1] = 0;
this.cursorActuallyAt[0] += 1;
}
this.value = chars.join('');

@@ -155,3 +157,3 @@ if (this.attributes.onChange) this.attributes.onChange(this);

for (let line of lines) {
result.mergeY(RichCharGrid.fromLine(line, attributes).setWidth(concreteWidth, attributes.textAlign, fillChar));
result.mergeY(RichCharGrid.fromLine(line, attributes).setWidth(concreteWidth, alignInvrt[attributes.textAlign], fillChar));
}

@@ -158,0 +160,0 @@ if (attributes.height != null) {

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