Skip to content

Commit a000e10

Browse files
committed
chore(docs): update
1 parent 75327a2 commit a000e10

File tree

9 files changed

+136
-142
lines changed

9 files changed

+136
-142
lines changed

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"license": "MIT",
1616
"devDependencies": {
17+
"@vuepress/plugin-google-analytics": "^1.7.1",
1718
"vuepress": "^1.5.3"
1819
}
1920
}

docs/src/.vuepress/config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,11 @@ module.exports = {
116116
plugins: [
117117
'@vuepress/plugin-back-to-top',
118118
'@vuepress/plugin-medium-zoom',
119+
[
120+
'@vuepress/google-analytics',
121+
{
122+
'ga': 'UA-145694313-2'
123+
}
124+
]
119125
]
120126
}

docs/src/api-reference/couchbase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Creates or opens a database
182182
| :---: | :---: |
183183
| name | string |
184184

185-
**Returns**:
185+
**Returns**: [Couchbase](couchbase.md#couchbase-2)
186186

187187
---
188188

docs/src/api-reference/image-zoom.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ImageZoom
22

3+
[![npm](https://img.shields.io/npm/v/@triniwiz/nativescript-image-zoom.svg)](https://www.npmjs.com/package/@triniwiz/nativescript-image-zoom)
4+
[![npm](https://img.shields.io/npm/dt/@triniwiz/nativescript-image-zoom.svg?label=npm%20downloads)](https://www.npmjs.com/package/@triniwiz/nativescript-image-zoom)
5+
36
| Android Device | Android Emulator | iOS Device | iOS Simulator |
47
| :-------------: |:-------------: |:-------------:| :-----: |
58
| :white_check_mark:|:white_check_mark: |:white_check_mark:| :white_check_mark:|

docs/src/api-reference/stripe.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Stripe
22

3+
4+
[![npm](https://img.shields.io/npm/v/@triniwiz/nativescript-stripe.svg)](https://www.npmjs.com/package/@triniwiz/nativescript-stripe)
5+
[![npm](https://img.shields.io/npm/dt/@triniwiz/nativescript-stripe.svg?label=npm%20downloads)](https://www.npmjs.com/package/@triniwiz/nativescript-stripe)
6+
37
| Android Device | Android Emulator | iOS Device | iOS Simulator |
48
| :-------------: |:-------------: |:-------------:| :-----: |
59
| :white_check_mark:|:white_check_mark: |:white_check_mark:| :white_check_mark:|
610

711

812
## Installing
913

10-
```base
14+
```bash
1115
ns plugin add @triniwiz/nativescript-stripe
1216
```
1317

@@ -45,9 +49,9 @@ export class AppModule { }
4549

4650
```ts
4751
import Vue from 'nativescript-vue';
48-
import Pager from 'triniwiz/nativescript-stripe/vue';
52+
import CreditCardView from '@triniwiz/nativescript-stripe/vue';
4953

50-
Vue.use(Pager);
54+
Vue.use(CreditCardView);
5155
```
5256

5357

@@ -58,7 +62,7 @@ Vue.use(Pager);
5862
## React
5963

6064
```tsx
61-
import {creditCardView} from 'triniwiz/nativescript-stripe/react';
65+
import {creditCardView} from '@triniwiz/nativescript-stripe/react';
6266
return (
6367
<creditCardView/>
6468
)
@@ -75,7 +79,7 @@ import "@triniwiz/nativescript-stripe/svelte";
7579

7680
# Usage
7781

78-
IMPORTANT: Make sure you include `xmlns:stripe="nativescript-stripe"` on the Page tag
82+
IMPORTANT: Make sure you include `xmlns:stripe="@triniwiz/nativescript-stripe"` on the Page tag
7983

8084
### Using from view
8185
```xml
@@ -93,14 +97,14 @@ cc.name = "Osei Fortune";
9397

9498
TypeScript
9599
```ts
96-
import { CreditCardView, Card } from 'nativescript-stripe';
100+
import { CreditCardView, Card } from '@triniwiz/nativescript-stripe';
97101
const ccView:CreditCardView = page.getViewById("card");
98102
const cc:Card = ccView.card;
99103
cc.name = "Osei Fortune";
100104
```
101105
### Using from code
102106
```ts
103-
import { Card } from 'nativescript-stripe';
107+
import { Card } from '@triniwiz/nativescript-stripe';
104108
const cc = new Card("1111111111111111",2,18,"123");
105109
cc.name = "Osei Fortune";
106110
```
@@ -132,10 +136,10 @@ Create a Payment Session
132136
let paymentSession = new StripeStandardPaymentSession(page, customerSession, price, "usd", listener);
133137
```
134138

135-
See [Stripe Docs](https://stripe.com/docs/mobile) for more information.
139+
See [Stripe Docs](httpsope will require [Strong Customer Authentication](https://stripe.com/payments/strong-customer-authent://stripe.com/docs/mobile) for more information.
136140

137141
# Strong Customer Authentication
138-
PSD2 regulations in Europe will require [Strong Customer Authentication](https://stripe.com/payments/strong-customer-authentication)
142+
PSD2 regulations in Eurication)
139143
for some credit card purchases. Stripe supports this, though most of the work to make it happen is
140144
required on the backend server and in the mobile app, outside the `@triniwiz/nativescript-stripe` plugin.
141145

docs/src/api-reference/toasty.md

Lines changed: 100 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
# Toasty
22

3+
[![npm](https://img.shields.io/npm/v/@triniwiz/nativescript-toasty.svg)](https://www.npmjs.com/package/@triniwiz/nativescript-toasty)
4+
[![npm](https://img.shields.io/npm/dt/@triniwiz/nativescript-toasty.svg?label=npm%20downloads)](https://www.npmjs.com/package/@triniwiz/nativescript-toasty)
5+
36
| Android Device | Android Emulator | iOS Device | iOS Simulator |
47
| :-------------: |:-------------: |:-------------:| :-----: |
58
| :white_check_mark:|:white_check_mark: |:white_check_mark:| :white_check_mark:|
69

710

11+
A toast :bread: provides simple feedback about an operation in a small popup
12+
813
## Installing
914

1015
```base
1116
ns plugin add @triniwiz/nativescript-toasty
1217
```
1318

19+
- [Toasty(...)](toasty.md#toasty-2)
20+
1421

1522
## Usage
1623

@@ -62,141 +69,114 @@ toast.show();
6269

6370
## API
6471

65-
```typescript
66-
export interface Toasty {
72+
### Methods
6773

68-
constructor(opts: ToastyOptions);
74+
#### Toasty(...)
75+
```ts
76+
new Toasty({ text: 'Some Message' });
77+
```
78+
Creates a toast instance that you can show later on.
6979

70-
position: ToastPosition;
80+
**Return**: [Toasty](toasty.md#toasty-2)
7181

72-
duration: ToastDuration;
82+
---
83+
#### show()
84+
```ts
85+
show(): void;
86+
```
87+
Show the Toasty
7388

74-
textColor: Color | string;
89+
---
90+
#### cancel()
91+
```ts
92+
cancel(): void;
93+
```
94+
Cancels the Toasty
7595

76-
backgroundColor: Color | string;
96+
---
97+
#### setToastPosition(...)
98+
```ts
99+
setToastPosition(value: ToastPosition): Toasty;
100+
```
101+
Sets the Toast position.
77102

78-
yAxisOffset?: Length | number;
103+
**Returns**: [Toasty](toasty.md#toasty-2)
79104

80-
xAxisOffset?: Length | number;
105+
---
106+
#### setToastDuration(...)
107+
```ts
108+
setToastDuration(value: ToastDuration): Toasty;
109+
```
110+
Sets the Toast duration.
81111

82-
readonly width: number;
112+
**Returns**: [Toasty](toasty.md#toasty-2)
83113

84-
readonly height: number;
114+
---
115+
#### setTextColor(...)
116+
```ts
117+
setTextColor(value: Color | string): Toasty;
118+
```
119+
Set the text color of the toast.
85120

121+
**Returns**: [Toasty](toasty.md#toasty-2)
86122

87-
/**
88-
* Show the Toasty
89-
*/
90-
show();
123+
---
124+
#### setBackgroundColor(...)
125+
```ts
126+
setBackgroundColor(value: Color | string): Toasty;
127+
```
128+
:::tip
129+
On Android this currently removes the default Toast rounded borders.
130+
:::
131+
Set the background color of the toast.
91132

92-
/**
93-
* Cancels the Toasty
94-
*/
95-
cancel();
133+
**Returns**: [Toasty](toasty.md#toasty-2)
96134

97-
/**
98-
* Sets the Toast position.
99-
*/
100-
setToastPosition(value: ToastPosition): Toasty;
101135

102-
/**
103-
* Sets the Toast duration.
104-
*/
105-
setToastDuration(value: ToastDuration): Toasty;
106136

107-
/**
108-
* Set the text color of the toast.
109-
* @param value [Color | string] - Color of the string message.
110-
*/
111-
setTextColor(value: Color | string): Toasty;
137+
## Interfaces
112138

113-
/**
114-
* Set the background color of the toast.
115-
* @param value [Color | string] - Color of the background.
116-
* On Android this currently removes the default Toast rounded borders.
117-
*/
118-
setBackgroundColor(value: Color | string): Toasty;
139+
### ToastDuration
119140

120-
}
121-
```
141+
| Prop | Type |
142+
| :---: | :---: |
143+
| SHORT | SHORT |
144+
| LONG | LONG |
145+
146+
147+
### ToastPosition
148+
149+
| Prop | Type |
150+
| :---: | :---: |
151+
| BOTTOM | BOTTOM |
152+
| BOTTOM_LEFT | BOTTOM_LEFT |
153+
| BOTTOM_RIGHT | BOTTOM_RIGHT |
154+
| CENTER | CENTER |
155+
| CENTER_LEFT | CENTER_LEFT |
156+
| CENTER_RIGHT | CENTER_RIGHT |
157+
| TOP | TOP |
158+
| TOP_LEFT | TOP_LEFT |
159+
| TOP_RIGHT | TOP_RIGHT |
160+
161+
### ToastyOptions
162+
163+
| Prop | Type | Description |
164+
| :---: | :---: | :---: |
165+
| text | string | Message text of the Toast. |
166+
| duration | [ToastDuration](toasty.md#toastduration) | Duration to show the Toast. |
167+
| position | [ToastPosition](toasty.md#toastposition) | Position of the Toast. |
168+
| textColor | `Color | string` | Text color of the Toast message. |
169+
| backgroundColor | `Color | string` | Background Color of the Toast. |
170+
| android | any | Android specific configuration options. |
171+
| ios | [ToastyIOSOptions](toasty.md#toastyiosoptions) |
172+
173+
### ToastyIOSOptions
174+
175+
| Prop | Type | Description |
176+
| :---: | :---: | :---: |
177+
| anchorView | any | The native iOS view to anchor the Toast to. |
178+
| messageNumberOfLines | number |The number of lines to allow for the toast message. |
179+
| cornerRadius | number | The corner radius of the Toast.. |
180+
| displayShadow | boolean | True to display a shadow for the Toast.. |
181+
| shadowColor | `Color | string` | The color of the shadow. Only visible if `displayShadow` is true.. |
122182

123-
```typescript
124-
export enum ToastDuration {
125-
'SHORT',
126-
'LONG',
127-
}
128-
129-
export enum ToastPosition {
130-
'BOTTOM',
131-
'BOTTOM_LEFT',
132-
'BOTTOM_RIGHT',
133-
'CENTER',
134-
'CENTER_LEFT',
135-
'CENTER_RIGHT',
136-
'TOP',
137-
'TOP_LEFT',
138-
'TOP_RIGHT',
139-
}
140-
141-
export interface ToastyOptions {
142-
/**
143-
* Message text of the Toast.
144-
*/
145-
text: string;
146-
147-
/**
148-
* Duration to show the Toast.
149-
*/
150-
duration?: ToastDuration;
151-
152-
/**
153-
* Position of the Toast.
154-
*/
155-
position?: ToastPosition;
156-
157-
/**
158-
* Text color of the Toast message.
159-
*/
160-
textColor?: Color | string;
161-
162-
/**
163-
* Background Color of the Toast.
164-
*/
165-
backgroundColor?: Color | string;
166-
167-
/**
168-
* Android specific configuration options.
169-
*/
170-
android?: any;
171-
172-
/**
173-
* iOS Specific configuration options.
174-
*/
175-
ios?: {
176-
/**
177-
* The native iOS view to anchor the Toast to.
178-
*/
179-
anchorView?: any;
180-
181-
/**
182-
* The number of lines to allow for the toast message.
183-
*/
184-
messageNumberOfLines?: number;
185-
186-
/**
187-
* The corner radius of the Toast.
188-
*/
189-
cornerRadius?: number;
190-
191-
/**
192-
* True to display a shadow for the Toast.
193-
*/
194-
displayShadow?: boolean;
195-
196-
/**
197-
* The color of the shadow. Only visible if `displayShadow` is true.
198-
*/
199-
shadowColor?: Color | string;
200-
};
201-
}
202-
```

packages/nativescript-sse/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
ns plugin add @triniwiz/nativescript-sse
55
```
66

7-
## Usage
7+
## API documentation
8+
9+
[Documentation for the latest stable release](https://triniwiz.github.io/nativescript-plugins/api-reference/sse.html)
810

9-
// TODO
1011

1112
## License
1213

packages/nativescript-sse/index.ios.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export class SSE extends BaseSSE {
1414
this._url = NSURL.alloc().initWithString(url);
1515
this._headers = NSDictionary.alloc().initWithDictionary(headers);
1616
this._es = EventSource.alloc().initWithUrlHeaders(this._url, this._headers);
17-
console.log(this._es);
1817
const ref = new WeakRef(this);
1918
const owner = ref.get();
2019
this._es.onMessage((id, event, data) => {

0 commit comments

Comments
 (0)