Skip to content

Commit

Permalink
cambio de versión, y modificación en en README y otros cambios menores
Browse files Browse the repository at this point in the history
  • Loading branch information
everskyblue committed Aug 14, 2024
1 parent 802dea8 commit bc93c1b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ addView function adds views to the **[CoordinatePage](#coordinatepage)**
#### example

```typescript
import addView, { CoordinatePage } from "voir-native";
import { addView, CoordinatePage } from "voir-native";
import { Action, Page, contentView } from "tabris";

contentView.append(<CoordinatePage layoutData="stretch" />);
Expand All @@ -76,10 +76,10 @@ addView(<Action title="setting" />, <Page title="setting" stretch />);

| parameter types
|:--
| Array\<**_IMenuItemOption_**\>
| Array\<**_MenuItemOption_**\>

```typescript
interface IMenuItemOption {
interface MenuItemOption {
id: string;
text: string;
image?: string;
Expand Down Expand Up @@ -126,17 +126,19 @@ show popup message with duration time

| method | parameter types |
| ---------------- | --------------- |
| contructor | string, number |
| static makeToast | string, number |
| constructor | string, number |
| static makeText | string, number |
| show | |

#### example

```typescript
import { Toast } from "voir-native";

Toast.makeText("hello");
Toast.makeText("hello", 2000).show();

```
static methods: **SHORT | MEDIUM | LONG**

### Modal

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "voir-native",
"version": "0.4.1",
"version": "0.4.2",
"description": "It is a framework to develop applications in a more controlled way with tabrisjs",
"main": "dist/index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export function addView(...widgets: (Page | Action | SearchAction)[]) {
/**
* @Version 0.4
*/
abstract class VoirRender {
abstract renderAction(): Action[];
abstract class VoirRender implements Render {
abstract renderAction(): (Action | SearchAction)[];

abstract render(): Page;
abstract render(): Widget;

constructor() {
const elms = [];
Expand All @@ -42,7 +42,7 @@ abstract class VoirRender {
const actions = this.renderAction();
if (actions) elms.push(...Array.from(actions));
}

//@ts-ignore
addView(...elms, this.render());
}
}
Expand Down
9 changes: 6 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "ES6",
"target": "ES5",
"module": "CommonJS",
"removeComments": false,
"noImplicitAny": true,
"lib": ["ES2017"],
"noImplicitThis": false,
"lib": ["ES2022"],
"declaration": true,
"emitDeclarationOnly": true,
"declarationDir": "./types"
"declarationDir": "./types",
"allowJs": true,
"checkJs": false
},
"include": ["src/**/*"],
"exclude": ["node_modules", "./types"]
Expand Down
6 changes: 3 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export declare function addView(...widgets: (Page | Action | SearchAction)[]): N
/**
* @Version 0.4
*/
declare abstract class VoirRender {
abstract renderAction(): Action[];
abstract render(): Page;
declare abstract class VoirRender implements Render {
abstract renderAction(): (Action | SearchAction)[];
abstract render(): Widget;
constructor();
}
export interface Render {
Expand Down
2 changes: 1 addition & 1 deletion types/modal/toast.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import AnimationTime from "./animation-time";
export default class Toast extends AnimationTime {
show: (time: number) => any;
show: () => any;
readonly _message: import("tabris").widgets.TextView;
readonly _modal: import("tabris").widgets.Composite<import("tabris").Widget<any>>;
constructor(message: string, duration: number);
Expand Down

0 comments on commit bc93c1b

Please sign in to comment.