GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - UniCoderGroup/ucon: A totally different framework of user interface with components.

This repository was archived by the owner on Sep 26, 2023. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

248 Commits
248 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
components
components
 
 
core
core
 
 
docs
docs
 
 
project
project
 
 
scripts
scripts
 
 
utils
utils
 
 
utty
utty
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
README_zh.md
README_zh.md
 
 
codecov.yml
codecov.yml
 
 
jest.config.js
jest.config.js
 
 
lerna.json
lerna.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
project.info.json
project.info.json
 
 
renovate.json
renovate.json
 
 
tsconfig_base.json
tsconfig_base.json
 
 

Repository files navigation

UCON framework

GitHub Workflow Status GitHub last commit GitHub Translated CodeFactor Join the chat at https://gitter.im/ucon-project/community

Overview

Response a request

UCON is a Node.js super framework for I/O in terminals.

It is designed to make I/O in terminals Visualize, Componentize and Standardize.

As a framework, UCON also provides useful standard components, such as ProgressBar and Table etc.

It is also convenient to create a component on your own, because the design of UCON and the features of terminals. The implementation of a component generally does not need to exceed 50 lines.

Developed by UniCoder Group. DESIGNED IN CHINA.

Visualize

Converts plain text output into a graphic of characters.

Componentize

Each output can be composed of components.

This borrows from the designs of front-end frameworks.

An introduction to components

Standardize

Components

Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. 1

Component categories

In UCON, components are divided into three categories: BlockComponent, InlineComponent and ContainerComponent

BlockComponent

BlockComponents occupy one or more lines without listening for input.

Usage
  1. Create an instance through new
  2. Call mount to mount it to the newest line
  3. You can call other methods to modify the content of it
Example
let pb = new ucon.ProgressBar({
    name: "test"
})......
Warnings
  • Call mount for more than one time may cause undefined behaviors

InlineComponent

InlineComponents render part of a line according to the arguments.

Usage

Call Name([Params][,...Contents]), which returns an instance.

Example
ucon.ucon.log("This book is ", ucon.Italitic("Harry Potter"), ".");
Warnings
  • The instance returned by this call is a derivative of InlineComponent, so it cannot be added directly to the string or passed to the methods of standard console. Please call its render method to get the pure rendered string
  • The functions named as the component name are just a grammar sugar. These functions process the parameters and then construct and return the component instance
  • This categorie of components can have no content parameters, such as the Icon component
  • Content arguments are separated by ', ', but Spaces are not added between arguments, for the same reason as the ucon.log method, to allow another inline component to be part of content

ContainerComponent

ContainerComponents process all the outputs while they are registered.

Usage
  1. Create an instance through new
  2. Call begin to output the beginning and register it
  3. Output things that should be processed by it through ucon.log
  4. Call end to unregister it and output the ending
Example
let group = new ucon.Group();
......
Warnings
  • Only the outputs through ucon.log method will be processed by ContainerComponents
  • Theregister/unregister methods can be called midway to turn processing on/off
  • If the program logic jumps due to exceptions or something else, the stack will be unbalanced, then the output will be confused, so be sure to clear/repair the stack at that time

Component development

[TODO]

Footnotes

  1. https://reactjs.org/docs/components-and-props.html, Introduction ↩

About

A totally different framework of user interface with components.

Topics

componentscross-platformframeworkstandardizeuconuivisualize

Resources

Readme
MIT license
Activity
Custom properties

Stars

2 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Sponsor this project

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.