profile
viewpoint
Vadim Demedes vadimdemedes https://vadimdemedes.com Building ideas using JavaScript and Node.js.

vadimdemedes/cancan 597

🔑 Pleasant authorization library for Node.js

vadimdemedes/create-ink-app 72

Generate a starter Ink app

vadimdemedes/cat-facts 53

Interesting cat facts

vadimdemedes/create-gist 15

Create an anonymous GitHub Gist

novemberborn/cached-module-loader 14

Highly experimental bundler and loader of Node.js modules

vadimdemedes/buble-register 14

Bublé require hook

vadimdemedes/AnsiEscapes 13

ANSI escape codes for manipulating the terminal

vadimdemedes/awesome-print 12

Beautifully print your JavaScript objects

vadimdemedes/bucket-app 11

Interactive readme for your projects

vadimdemedes/code-excerpt 7

Extract excerpts from a source code

issue commentvadimdemedes/ink

Emojis render with trailing spaces within Boxes

See https://github.com/vadimdemedes/ink/blob/master/src/measure-text.ts.

quinnvoker

comment created time in 4 days

issue commentvadimdemedes/ink

Terminal history cleared if output is greater than height of terminal window

@sindresorhus Curious what your thoughts are about this problem!

LeeCheneler

comment created time in 4 days

issue commentvadimdemedes/ink

Terminal history cleared if output is greater than height of terminal window

So if we remove that, terminal won't render correctly the part that's above the visible area. I don't like that I have to erase the terminal history, but unfortunately I haven't found any other solution, this seems to be how all terminals behave.

LeeCheneler

comment created time in 4 days

issue commentvadimdemedes/ink

Terminal history cleared if output is greater than height of terminal window

Yeah, you are right, this behavior is built on purpose. A lot of people got confused why UIs that are taller than terminal's viewport don't render correctly (the part outside of the viewport), that's why I built it to clear the terminal history on every render to ensure all UI is rendered as expected.

LeeCheneler

comment created time in 4 days

issue commentvadimdemedes/ink

Ink defines global window object

It looks like our best bet here would be to convert the react-devtools-core import into a require call which can be put inside the DEV condition.

I think this solution is good, do you want to submit a PR for it?

loilo

comment created time in 4 days

pull request commentvadimdemedes/ink

Mention TypeScript version requirement

It's used in this repository to compile the sources. Re https://github.com/vadimdemedes/ink/issues/375, would not using import type fix this issue? Haven't seen this one myself before.

sindresorhus

comment created time in 4 days

pull request commentvadimdemedes/ink

Add TypeScript setup guide

@sindresorhus Do you think we need something like this? My thinking is because Ink doesn't require any special treatment to work with TypeScript, we don't need a guide for it. Normally libraries don't include guides like this, because it looks more like an intro to TypeScript itself, which in my opinion doesn't belong to Ink or other projects' readme.

LitoMore

comment created time in 9 days

pull request commentvadimdemedes/ink

Fix `borderColor` type

Thanks!

matejbudzel

comment created time in 9 days

push eventvadimdemedes/ink

matejbudzel

commit sha ac28ae4d60bc9988d0ecb66a63deae7b7e99303b

Fix `borderColor` type (#379)

view details

push time in 9 days

PR merged vadimdemedes/ink

Fix `borderColor` type

Type of borderColor property in Styles interface can (and should) match the color property of Text component, but it did not. It was limited to basic foreground colors without the option use string values.

+2 -1

0 comment

1 changed file

matejbudzel

pr closed time in 9 days

CommitCommentEvent

release vadimdemedes/ink-select-input

v4.1.0

released time in 9 days

push eventvadimdemedes/ink-select-input

Vadim Demedes

commit sha 437d040ccdf26410a0ec2fc3fe0e1d94e7493646

4.1.0

view details

push time in 9 days

created tagvadimdemedes/ink-select-input

tagv4.1.0

Select input component for Ink

created time in 9 days

issue commentvadimdemedes/create-ink-app

Should create in named folder, not current folder

Agree, I like @riongull's solution with a dot to avoid creating a new folder.

@LitoMore Sure, go ahead!

msfeldstein

comment created time in 10 days

issue closedvadimdemedes/ink

Announce to ReasonML binding for Ink

Hi :wave: thank you for making & maintaining this great project.

Not an issue, I wanna let you know I just release reason-ink, a BuckleScript binding for Ink.

https://github.com/cometkim/reason-ink

ReasonML (& OCaml) people can use ink to build a CLI app!

closed time in 11 days

cometkim

pull request commentvadimdemedes/ink

Add "Remove" escape keyboard sequence as delete key

Released in 3.0.6.

grimmen

comment created time in 11 days

release vadimdemedes/ink

v3.0.6

released time in 11 days

created tagvadimdemedes/ink

tagv3.0.6

🌈 React for interactive command-line apps

created time in 11 days

push eventvadimdemedes/ink

Vadim Demedes

commit sha c23f01902943ca941efe4044fd449285b09d5da0

3.0.6

view details

push time in 11 days

push eventvadimdemedes/ink

Vadim Demedes

commit sha 3824006e26f3f926177941b63c7ae68f06c6e5a1

Format code

view details

push time in 11 days

push eventvadimdemedes/ink

grimmen

commit sha 96568dd2a67d8c25fb05534720d24c2b7ca9fb15

Add "Remove" escape keyboard sequence as delete key (#364)

view details

push time in 11 days

PR merged vadimdemedes/ink

Add "Remove" escape keyboard sequence as delete key

Some keyboards with separate delete key sends this sequence

Fixes #363

+13 -1

10 comments

3 changed files

grimmen

pr closed time in 11 days

issue closedvadimdemedes/ink

Delete key is not recognized

On my keyboard (Linux, Microsoft Keyboard), the Delete key is not recognized by this line :

https://github.com/vadimdemedes/ink/blob/5c9eae4c104bc5c246b5014821f09dd9f88fb364/src/hooks/use-input.ts#L151

The key sends the "Remove" escape sequence = \u001b[3~

Modifying the line to :

delete: input === '\u007F' || input === '\u001B[3~',

Fixes the situation.

closed time in 11 days

grimmen

pull request commentvadimdemedes/ink

Add "Remove" escape keyboard sequence as delete key

Thanks!

grimmen

comment created time in 11 days

push eventvadimdemedes/ink

Sean Murray

commit sha ef7e286780137f888f8a34b1922df62a273b5ff8

Fix error of text string outside text box in example (#372)

view details

push time in 11 days

PR merged vadimdemedes/ink

Fix error of text string outside text box in example

ERROR Text string "Press Tab to focus next element, Shift+Tab to focus previous element, Esc to reset focus." must be rendered inside <Text> component

+1 -2

1 comment

1 changed file

seanjmurray

pr closed time in 11 days

pull request commentvadimdemedes/ink

Fix error of text string outside text box in example

Thanks!

seanjmurray

comment created time in 11 days

issue commentvadimdemedes/ink

NerdFont icons fail when rendering inside <Box />

I don't have time at the moment to look into it, would you be able to dive deeper on this?

yeet-bix

comment created time in 11 days

pull request commentvadimdemedes/ink

Mention TypeScript version requirement

Hm, how come Ink works with 3.9.7 in master?

sindresorhus

comment created time in 11 days

issue commentvadimdemedes/ink

Emojis render with trailing spaces within Boxes

That's the quirkiness of some emojis, sometimes they take 2 characters to display for some reason. Not super educated about this subject, but if anyone feels adventurous, go ahead and take a stab a this!

quinnvoker

comment created time in 11 days

issue commentvadimdemedes/ink

Raw Mode and Subprocesses

Could you post a minimal reproduction?

elmpp

comment created time in 11 days

issue commentvadimdemedes/ink-select-input

Typescript: cannot import Item component - type is imported instead

I think you can solve this via:

import {FC, ComponentType} from 'react';
import {ItemProps} from 'ink-select-input';

interface Props {
  itemComponent: ComponentType<ItemProps>
}

const MyCustomComponent: FC<Props> = ({itemComponent}) => ...;
goliney

comment created time in 11 days

issue commentvadimdemedes/ink-select-input

Reset highlight after items change

So, I wonder if the condition could be changed. For example, just compare the values of the items, or at least the length of the array.

I think that's an appropriate solution. Would you be able to contribute a fix?

lujiajing1126

comment created time in 11 days

issue closedvadimdemedes/ink-select-input

How could I change the highlight item's color?

The highlight item's default color is blue, this color is not legibility over black terminal background color. I want to change the highlight color to be more bright.

Hope there are some solution inside this component, thanks.

closed time in 11 days

Bijiabo

issue commentvadimdemedes/ink-select-input

How could I change the highlight item's color?

You can customize the item component via itemComponent prop. You can copy https://github.com/vadimdemedes/ink-select-input/blob/master/src/Item.tsx and start there ;)

Bijiabo

comment created time in 11 days

issue closedvadimdemedes/ink-select-input

React.createElement: type is invalid

Using a fresh install of https://github.com/vadimdemedes/create-ink-app, installing ink-select-input, and running the demo from the README generates the following error:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

The above error occurred in the <Demo> component:
    in Demo (created by App)
    in div (created by Box)
    in Box (created by App)
    in App
    in App

Check the render method of `Demo`.
    at createFiberFromTypeAndProps (/node_modules/react-reconciler/cjs/react-reconciler.development.js:16627:21)
    at createFiberFromElement (/node_modules/react-reconciler/cjs/react-reconciler.development.js:16650:15)
    at reconcileSingleElement (/node_modules/react-reconciler/cjs/react-reconciler.development.js:5302:23)
    at reconcileChildFibers (/node_modules/react-reconciler/cjs/react-reconciler.development.js:5362:35)
    at reconcileChildren (/node_modules/react-reconciler/cjs/react-reconciler.development.js:7865:28)
    at mountIndeterminateComponent (/node_modules/react-reconciler/cjs/react-reconciler.development.js:8629:5)
    at beginWork$1 (/node_modules/react-reconciler/cjs/react-reconciler.development.js:9938:16)
    at Object.invokeGuardedCallbackImpl (/node_modules/react-reconciler/cjs/react-reconciler.development.js:11563:10)
    at invokeGuardedCallback (/node_modules/react-reconciler/cjs/react-reconciler.development.js:11740:31)
    at beginWork$$1 (/node_modules/react-reconciler/cjs/react-reconciler.development.js:15778:7)

closed time in 11 days

DomVinyard

issue commentvadimdemedes/ink-select-input

React.createElement: type is invalid

@deshiknaves is correct, it's exported via default prop for non-ESM imports.

DomVinyard

comment created time in 11 days

issue closedvadimdemedes/ink-select-input

Create an option to render horizontally

Can we have the option to render ink-select-input horizontally?

In the SelectInput.js file you can change the alignment by changing line 24 and 41 to key.leftArrow and key.rightArrow respectively and changing the flex direction to "row" on line 75.

See below for examples:

Screen Shot 2020-08-25 at 4 38 40 PM

Screen Shot 2020-08-25 at 4 40 22 PM

And it renders like this: Screen Shot 2020-08-25 at 4 42 05 PM

closed time in 11 days

H3RSKO

issue commentvadimdemedes/ink-select-input

Create an option to render horizontally

It's great that you published it, let's leave it separate ;)

H3RSKO

comment created time in 11 days

PR closed vadimdemedes/ink-select-input

Added color selection and orientation functionality

Hey Vadim, we are working on a project and created some functionality changes to your select-input component that may be useful to include in the main ink-select-input package.

  • We added the ability to specify selector orientation: -- include displayDirection='column' or displayDirection='row' as an argument when calling SelectInput. Default is row.

  • We added the ability to pass in a default and an accent color variable. -- include defaultColor={someColor} and/or accentColor={diffColor}

In this image there are two select components being rendered. For both of them the default color is green, and the accent color is red. The top components orientation is horizontal and the bottom's is vertical.

Screen Shot 2020-09-03 at 4 57 21 PM

+82 -27

2 comments

11 changed files

H3RSKO

pr closed time in 11 days

pull request commentvadimdemedes/ink-select-input

Added color selection and orientation functionality

I see you already did - https://github.com/vadimdemedes/ink-select-input/issues/29#issuecomment-680315246. Nice!

H3RSKO

comment created time in 11 days

pull request commentvadimdemedes/ink-select-input

Added color selection and orientation functionality

Do you mind publishing this as a separate component? I'd like to keep this one simple.

H3RSKO

comment created time in 11 days

pull request commentvadimdemedes/ink-select-input

Add option to control selected index from outside of the component

Could you add tests and document this in the readme?

dnnsmnstrr

comment created time in 11 days

PullRequestReviewEvent

Pull request review commentvadimdemedes/ink-select-input

Add option to control selected index from outside of the component

 const SelectInput: FC<Props> = ({ 	items = [], 	isFocused = true, 	initialIndex = 0,+	index = 0, 	indicatorComponent = Indicator, 	itemComponent = Item, 	limit: customLimit, 	onSelect, 	onHighlight }) => { 	const [rotateIndex, setRotateIndex] = useState(0);-	const [selectedIndex, setSelectedIndex] = useState(initialIndex);+	const [selectedIndex, setSelectedIndex] = useState(initialIndex || index);
	const [selectedIndex, setSelectedIndex] = useState(typeof index === 'number' ? index : initialIndex);
dnnsmnstrr

comment created time in 11 days

PR closed vadimdemedes/ink-select-input

fix: add missing peer dependency react

What's the problem this PR addresses?

ink-select-input depends on react but doesn't declare it

How did you fix it?

Added react as a peer dependency

+4 -4

1 comment

2 changed files

merceyz

pr closed time in 11 days

pull request commentvadimdemedes/ink-select-input

fix: add missing peer dependency react

Thanks! Pushed a fix for the same problem in https://github.com/vadimdemedes/ink-select-input/commit/68fc0f7a52138b79262c9bab64db06eae0ce7f4c.

merceyz

comment created time in 11 days

push eventvadimdemedes/ink-select-input

Vadim Demedes

commit sha 68fc0f7a52138b79262c9bab64db06eae0ce7f4c

Update dependencies

view details

push time in 11 days

push eventvadimdemedes/ink-select-input

Vadim Demedes

commit sha 13af01fc46ca5f1cb3776fa6619c5f3c508b118b

Run CI for pull requests

view details

push time in 11 days

push eventvadimdemedes/ink-select-input

Vadim Demedes

commit sha d7e9082ddaf0e24c33aeeddeda2d75e6fc8649f2

Fix typo

view details

push time in 11 days

push eventvadimdemedes/ink-select-input

Matic Zavadlal

commit sha 5859c1f5aed233d948b734717b948084a738ad97

Add generics for inferring value type (#32)

view details

push time in 11 days

PR merged vadimdemedes/ink-select-input

Add generics for inferring value type

Hey 👋 ,

I've created this PR to improve TypeScript type checking support. There are not many changes, as you can see, but what it does is very powerful. What the "new" typing system does is it automatically guesses the return type of items. This comes in very handy in onSelect callback.

To give you an idea, previously we would have to use the as modifier to unwrap unknown into concrete type like this

const data: { id: string, title: string }[] = [];

const View = (
  <Select
    items={data.map((section) => ({
      key: section.id,
      label: section.title,
      value: section,
    }))}
    onSelect={(item) => props.onSelect(item.value as X)} // notice this
  />
);


With this PR, we get beautiful intellisense and type-safe onSelect methods

const data: { id: string, title: string }[] = [];

const View = (
  <Select
    items={data.map((section) => ({
      key: section.id,
      label: section.title,
      value: section,
    }))}
    onSelect={(item) => props.onSelect(item.value)} // type-checked
  />
);

I hope you find this useful! 🙌

+11 -10

1 comment

1 changed file

maticzav

pr closed time in 11 days

push eventmaticzav/ink-select-input

Vadim Demedes

commit sha ba50c5313150968f2fe946360a6af11e94fc20fc

Update SelectInput.tsx

view details

push time in 11 days

pull request commentvadimdemedes/ink-select-input

Improve TypeScript support

Fantastic, thanks a lot!

maticzav

comment created time in 11 days

issue commentvadimdemedes/ink-text-input

Clearing value scrambles up cursor

Fix is released in 4.0.1. Thanks for reporting!

dkundel

comment created time in 11 days

release vadimdemedes/ink-text-input

v4.0.1

released time in 11 days

push eventvadimdemedes/ink-text-input

Vadim Demedes

commit sha 04087499f89684aa6d4ffcaa4b3040d64723cc97

4.0.1

view details

push time in 11 days

created tagvadimdemedes/ink-text-input

tagv4.0.1

Text input component for Ink

created time in 11 days

push eventvadimdemedes/ink-text-input

Vadim Demedes

commit sha e40d7bf4fcaba6a464ae01799dc1d9fc070d340d

Run CI for pull requests

view details

push time in 11 days

delete branch vadimdemedes/ink-text-input

delete branch : reset-cursor

delete time in 11 days

push eventvadimdemedes/ink-text-input

Vadim Demedes

commit sha 35558d49ca82ae7f6439cbfd3f8b35f0ccbd31b5

Reset cursor if updated text is shorter than the last one (#60)

view details

push time in 11 days

PR merged vadimdemedes/ink-text-input

Reset cursor if updated text is shorter than the last one

Fixes https://github.com/vadimdemedes/ink-text-input/issues/59.

+48 -2

0 comment

3 changed files

vadimdemedes

pr closed time in 11 days

issue closedvadimdemedes/ink-text-input

Clearing value scrambles up cursor

Hi there! I'm currently building something with the TextInput component and when I'm clearing the value the behavior becomes odd and I couldn't really figure out why.

Here's what I'm doing:

const { default: InkTextInput } = require('ink-text-input');
const Example = () => {
  const [content, setContent] = useState('');
  useInput((_, key) => {
    if (key.return) {
      setContent('');
    }
  });

  return (
    <Box>
      <InkTextInput value={content} onChange={setContent} />
    </Box>
  );
};

The first time when I type content into it, it works great. Then when I hit return and it clears it it will first capture the first character and then prepend everything else. For example if I type in 1234 it will the first time write 1234. The second time it will write 2341.

ink: 3.0.3 ink-text-input: 4.0.0

closed time in 11 days

dkundel

issue commentvadimdemedes/ink-text-input

use the Chinese input method

Closing this, but if anyone can contribute, please do.

zhipenglin

comment created time in 11 days

issue closedvadimdemedes/ink-text-input

use the Chinese input method

When you use the Chinese input method, you can only input one character at a time, but in fact, I have played several characters.

closed time in 11 days

zhipenglin

issue closedvadimdemedes/ink-text-input

Allow preserving rawMode in stdin after unmount

Not all applications finish when this component is not rendered, and some applications are managed in rawMode independently of ink. Adding this prop will allow to properly use this component with this type of applications.

closed time in 11 days

danikaze

issue closedvadimdemedes/ink-text-input

Hope UncontrolledTextInput can clears input after submission

I found UncontrolledTextInput very useful. However, there is an inconvenient place that after UncontrolledTextInput submits the input, the value will stay in the input. This is inconvenient to use, as input in the CLI is usually cleared after submission. I made the following simple adjustments based on your program. Hopefully, you have a comfortable way to add props to the application to control whether it clears its input after submission.

export class UncontrolledTextInput extends PureComponent {
	state = {
		value: ''
	}

	setValue(value) {
		this.setState({value});
	}
	clearValue(value){
		this.props.whenSubmit && this.props.whenSubmit(value)
		this.setState({
			value: ''
		})
	}

	setValue = this.setValue.bind(this);

	render() {
		return <TextInputWithStdin {...this.props} onSubmit={this.clearValue} value={this.state.value} onChange={this.setValue}/>;
	}
}

Thank you for your work!

closed time in 11 days

bakabird

PR opened vadimdemedes/ink-text-input

Reset cursor if updated text is shorter than the last one

Fixes https://github.com/vadimdemedes/ink-text-input/issues/59.

+48 -2

0 comment

3 changed files

pr created time in 11 days

create barnchvadimdemedes/ink-text-input

branch : reset-cursor

created branch time in 11 days

issue commentvadimdemedes/ink-text-input

Clearing value scrambles up cursor

Reproduced, going to take a look.

dkundel

comment created time in 11 days

startedmitchellh/go-glint

started time in 21 days

issue closedvadimdemedes/tailwind-rn

Using new tailwind with some better stuff

Hi there, first of all thank you for this lib, it is really convenient for people who like to use tailwind like me.

For new tailwind version, I really missed some feature like https://tailwindcss.com/docs/space#app, which is very save a lot of unessential codes to add margin between components in flex.

So do you guys have plan to update new version of tailwind for this package.

closed time in a month

infothien

issue commentvadimdemedes/tailwind-rn

Using new tailwind with some better stuff

Hey @infothien, thanks!

Unfortunately, space-* classes can't be supported in React Native, because they use nested CSS selectors like .space-y-0 > * + *. tailwind() function exposed by this module basically returns an object of styles and doesn't have a concept of selectors.

infothien

comment created time in a month

issue commentvadimdemedes/ink

CI rendering is broken since 3.0.0

Fix released in 3.0.5. Thanks!

adam-lynch

comment created time in a month

release vadimdemedes/ink

v3.0.5

released time in a month

created tagvadimdemedes/ink

tagv3.0.5

🌈 React for interactive command-line apps

created time in a month

push eventvadimdemedes/ink

Vadim Demedes

commit sha e1a108008fbf33056206115a8953e7eef8203500

3.0.5

view details

push time in a month

pull request commentvadimdemedes/ink

Add "Remove" escape keyboard sequence as delete key

Here's an example PR that adds support for page up/down sequences - https://github.com/vadimdemedes/ink/pull/336.

grimmen

comment created time in a month

pull request commentvadimdemedes/ink

Add "Remove" escape keyboard sequence as delete key

Could you add a test to test/hooks.tsx, which ensures this sequence is treated as a delete key?

grimmen

comment created time in a month

pull request commentvadimdemedes/ink

Add "Remove" escape keyboard sequence as delete key

Yeah, you are right, I also found it in keypress module at https://github.com/TooTallNate/keypress/blob/master/index.js#L314. Thanks for the PR!

grimmen

comment created time in a month

push eventvadimdemedes/ink

Ioannis Poulakas

commit sha 4bd670bb158b11077dea851abd6615a2fb81b7cf

Add git-contrib-calendar link to "Who's using Ink" section (#367)

view details

push time in a month

PR merged vadimdemedes/ink

Add git-contrib-calendar link on "Who's using Ink" section

I have recently discovered Ink, and I was amazed by the concept, awesome work 👍

While experimenting with Ink, I have built a git contributions calendar for local repositories.
Feel free to include it on the "Who's using Ink" README section if you wish.

+1 -0

1 comment

1 changed file

giannisp

pr closed time in a month

push eventgiannisp/ink

Vadim Demedes

commit sha cf3262964bfad50b6c193672ef36ccdea5707db5

Update readme.md

view details

push time in a month

pull request commentvadimdemedes/ink

Add git-contrib-calendar link on "Who's using Ink" section

Wow, that's cool! And thank you, glad you're enjoying Ink :)

giannisp

comment created time in a month

push eventvadimdemedes/ink

Vadim Demedes

commit sha 9b98dd4bf93a03ac4eae0e60580a7c14f40fc662

Update tests to simulate missing columns value in CI

view details

push time in a month

push eventvadimdemedes/ink

Adam Lynch

commit sha 447078bdccfe0c77924f6507cba9223fb4a0f93a

Fallback to 80 if number of columns isn't set (#368)

view details

push time in a month

PR merged vadimdemedes/ink

Fallback to 80 if number of columns isn't set

Fixes #366.

Side note: As I said in that issue, node.yogaNode.getComputedWidth returns 0, but I didn't touch that. This single change solves my issue.

Related:

  • #325
  • #327

cc @bartlangelaan

+2 -2

2 comments

1 changed file

adam-lynch

pr closed time in a month

issue closedvadimdemedes/ink

CI rendering is broken since 3.0.0

@vadimdemedes, as I said in https://github.com/vadimdemedes/ink/issues/275#issuecomment-682007306 earlier, I've been trying to narrow down an issue with rendering related to continuous integration services. I managed to narrow it to the Ink 3 release.

I ran npx create-ink-app, pasted the counter from the README into ui.js, and added an effect which calls exit once the count reaches 10;

const React = require("react");
const { useState, useEffect } = React;
const { render, Text, useApp } = require("ink");

const Counter = () => {
  const { exit } = useApp();
  const [counter, setCounter] = useState(0);

  useEffect(() => {
    const timer = setInterval(() => {
      setCounter((previousCounter) => previousCounter + 1);
    }, 100);

    return () => {
      clearInterval(timer);
    };
  }, []);

  useEffect(() => {
    if (counter === 10) {
      exit();
    }
  }, [counter, exit]);

  return <Text color="green">{counter} tests passed</Text>;
};

module.exports = Counter;

Locally that works as expected; the count is incremented and then it exits. 10 is rendered.

On CircleCI however, this is what's outputted:

image

No final frame is rendered and there's a bunch of extra newlines.

And it works fine on CircleCI with ink@2.7.1;

image

Please let me know if I'm using exit incorrectly or something like that. I'm happy to make a PR but I just need some feedback

closed time in a month

adam-lynch

pull request commentvadimdemedes/ink

Fallback to 80 if number of columns isn't set

CI is failing due to an unrelated error fixed via https://github.com/vadimdemedes/ink/commit/9f6343a35d8b0b792f68f25794ea5b83898dc0cb.

adam-lynch

comment created time in a month

pull request commentvadimdemedes/ink

Fallback to 80 if number of columns isn't set

Great catch, thanks!

adam-lynch

comment created time in a month

push eventvadimdemedes/ink

Vadim Demedes

commit sha 9f6343a35d8b0b792f68f25794ea5b83898dc0cb

Fix internal types

view details

push time in a month

Pull request review commentvadimdemedes/tailwind-rn

Support custom colors on background selector

 const source = ` @tailwind utilities; `; +/**+ * @returns {String[]} A list of provided custom colors+ */+const getCustomColors = () => {+	try {+		const config = require(path.resolve('tailwind.config'));++		if (+			config &&+			config.theme &&+			config.theme.extend &&+			config.theme.extend.colors+		) {+			return Object.keys(config.theme.extend.colors);+		}+	} catch (error) {+		if (error.code !== 'MODULE_NOT_FOUND') {+			throw error;+		}

Feel free to fork this PR and open your own.

vinpac

comment created time in a month

PullRequestReviewEvent

pull request commentvadimdemedes/tailwind-rn

Adds opacity support to getColor()

Thanks for this PR. Could you add opacity as a second argument to getColor?

getColor('blue-500', {opacity: 0.5})

Make sure to also add validation to ensure that only supported values by Tailwind are accepted (e.g. 0, 0.25, 0.5, ...).

eduludi

comment created time in a month

issue commentvadimdemedes/tailwind-rn

Font Weight probleme with some props

Could you see if font weight works without tailwind-rn? Haven't tested this library on Android.

As for shadows, if I'm not mistaken it's a React Native issue, where they don't support spread shadow property, which Tailwind CSS specifies.

josef256

comment created time in a month

issue commentvadimdemedes/ink

CI rendering is broken since 3.0.0

Hm that's odd. I ran your code with CI=true environment variable, which triggers the CI rendering behavior, and it works fine. Would you be able to help digging into it? I'd start with capturing output from your script to see what Ink outputs: node ./ink-test/cli.js > output.txt.

adam-lynch

comment created time in a month

pull request commentvadimdemedes/ink

Add "Remove" escape keyboard sequence as delete key

By "sequence" Sindre meant ANSI sequence (\u001B[3~), where is it documented?

grimmen

comment created time in a month

pull request commentvadimdemedes/ink

Add "Remove" escape keyboard sequence as delete key

@grimmen Could you send a link?

grimmen

comment created time in a month

startedhyscale/hyscale

started time in a month

more