Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f2ea8cb

Browse filesBrowse files
authored
feat: api reference (#21)
1 parent 7a45391 commit f2ea8cb
Copy full SHA for f2ea8cb

File tree

311 files changed

+691690
-22
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

311 files changed

+691690
-22
lines changed

‎.vitepress/config.js

Copy file name to clipboardExpand all lines: .vitepress/config.js
+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ module.exports = {
3838
link: '/introduction',
3939
activeMatch: '^/(?!plugins)',
4040
},
41+
{
42+
text: 'API',
43+
link: 'https://docs.nativescript.org/api-reference/',
44+
activeMatch: '^/api-reference',
45+
},
4146
{
4247
text: 'Plugins',
4348
link: '/plugins/index',

‎index.md

Copy file name to clipboardExpand all lines: index.md
+42-22
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,20 @@ If you are looking for NS7 & NS6 docs, you can still find them here:
1313

1414
## Prerequisites
1515

16-
The docs have been written with no assumptions of the readers experience, however it does assume knowledge of JavaScript fundamentals. If you are new to JavaScript, we recommend these resources from <abbr title="Mozilla Developer Network">MDN</abbr>:
16+
The docs have been written with no assumtions of the readers experience, however it does assume knowledge of JavaScript fundamentals. If you are new to JavaScript, we recommend these resources from <abbr title="Mozilla Developer Network">MDN</abbr>:
1717

1818
- [Introduction to JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
1919
- [Re-Introduction to JavaScript to refresh your knowledge](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)
2020

21-
## Templates
21+
## [Environment Setup](environment-setup)
22+
23+
You will want to setup your development machine using the [Environment Setup guide here](environment-setup) which involves preparing your machine for iOS and Android development as well as installing the [NativeScript CLI](https://www.npmjs.com/package/nativescript) via `npm install -g nativescript`
24+
25+
## Overview of NativeScript development
26+
27+
:::warning Note
28+
The following is a general overview of NativeScript development. To try any of the commands mentioned be sure you have a proper environment setup first.
29+
:::
2230

2331
NativeScript allows scaffolding projects with various templates to kickstart your app development. Official templates can be found in the [Templates GitHub repository](https://github.com/NativeScript/nativescript-app-templates/tree/master/packages) and on [NPM](https://www.npmjs.com/search?q=%40nativescript%20template).
2432

@@ -58,8 +66,13 @@ Here are some of the default templates you may want to try:
5866
A basic template with a single page and no custom styles.
5967

6068
<!-- TODO: make nicer images -->
61-
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-blank/tools/assets/appTemplate-ios.png" style="height:400px;">
62-
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-blank/tools/assets/appTemplate-android.png" style="height:400px;">
69+
70+
/// frame ios
71+
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-blank/tools/assets/appTemplate-ios.png">
72+
///
73+
/// frame android
74+
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-blank/tools/assets/appTemplate-android.png">
75+
///
6376

6477
To use, run:
6578

@@ -72,8 +85,13 @@ ns create myCoolApp --template @nativescript/template-blank
7285
A simple template with a side drawer.
7386

7487
<!-- TODO: make nicer images -->
75-
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-drawer-navigation/tools/assets/appTemplate-ios.png" style="height:400px">
76-
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-drawer-navigation/tools/assets/appTemplate-android.png" style="height:400px">
88+
89+
/// frame ios
90+
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-drawer-navigation/tools/assets/appTemplate-ios.png">
91+
///
92+
/// frame android
93+
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-drawer-navigation/tools/assets/appTemplate-android.png">
94+
///
7795

7896
To use, run:
7997

@@ -86,8 +104,13 @@ ns create myCoolApp --template @nativescript/template-drawer-navigation
86104
A simple template with multiple tabs.
87105

88106
<!-- TODO: make nicer images -->
89-
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-tab-navigation/tools/assets/phone-tab-ios.png" style="height:400px">
90-
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-tab-navigation/tools/assets/phone-tab-android.png" style="height:400px">
107+
108+
/// frame ios
109+
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-tab-navigation/tools/assets/appTemplate-ios.png">
110+
///
111+
/// frame android
112+
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-tab-navigation/tools/assets/appTemplate-android.png">
113+
///
91114

92115
To use, run:
93116

@@ -98,9 +121,12 @@ ns create myCoolApp --template @nativescript/template-tab-navigation
98121
### List and Details
99122

100123
A simple template with a ListView and a details screen.
101-
102-
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-master-detail/tools/assets/phone-masterDetail-ios.png" style="height:400px">
103-
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-master-detail/tools/assets/phone-masterDetail-detail-ios.png" style="height:400px">
124+
/// frame ios
125+
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-master-detail/tools/assets/appTemplate-ios.png">
126+
///
127+
/// frame android
128+
<img src="https://raw.githubusercontent.com/NativeScript/nativescript-app-templates/master/packages/template-master-detail/tools/assets/appTemplate-android.png">
129+
///
104130

105131
To use, run:
106132

@@ -183,10 +209,10 @@ ns run android
183209
```JSON
184210
{
185211
"name": "@nativescript/template-master-detail-ts",
186-
"displayName": "Master-Detail with Firebase",
187-
"main": "app.js",
188-
"version": "7.0.4",
189-
"description": "Master-detail interface to display collection of items from Firebase and inspect and edit selected item properties. ",
212+
"displayName": "Master-Detail",
213+
"main": "app/app.ts",
214+
"version": "8.0.0",
215+
"description": "Master-detail interface to display collection of items from json collection and inspect and edit selected item properties. ",
190216
"license": "Apache-2.0",
191217
"readme": "NativeScript Application",
192218
"repository": {
@@ -215,7 +241,7 @@ ns run android
215241
- Publish your app template to npm (https://www.npmjs.com/) using **ns-template-[custom-template-name-goes-here]-ts** format for the npm package name.
216242

217243
- Provide a screenshot preview to be used in a future NativeScript Marketplace integration under **tools/assets/marketplace.png** in your app template folder structure.
218-
Check [tools/postinstall.js [NOT FOUND]](https://github.com/NativeScript/template-master-detail-ts/blob/master/tools/postinstall.js) that implements a mechanism for removing the "tools" infrastructure folder from the generated app.
244+
Check [tools/postinstall.js](https://github.com/NativeScript/template-master-detail-ts/blob/master/tools/postinstall.js) that implements a mechanism for removing the "tools" infrastructure folder from the generated app.
219245

220246
- Provide correct `repository` property value in the root package.json file of your app template (see the "Package.json guidelines" section above for additional package.json requirements).
221247

@@ -354,9 +380,3 @@ NavigationButton {
354380
- [Read JavaScript App Template Style Guide](https://github.com/NativeScript/nativescript-starter-kits-utils/blob/master/docs/style-guide-app-template.md)
355381

356382
- [Read Angular App Template Style Guide](https://github.com/NativeScript/nativescript-starter-kits-utils/blob/master/docs/style-guide-app-template-ng.md)
357-
358-
## Versioning Scheme
359-
360-
`@nativescript/core` does not follow Semantic Versioning. Major framework releases are released every six months (~March and ~September), while minor and patch releases may be released as often as every week. Patch releases should never contain breaking changes, however minor, and major releases can. We strive to note any breaking changes in the Changelogs, to make upgrades as easy as possible.
361-
362-
When referencing the `@nativescript/core` package, you should use a fixed version constraint such as `7.0.11`, or alternatively `~7.0.11` to allow installing patch updates.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Fonts
2+
//
3+
$FONT_FAMILY: 'Inter var', 'Roboto Regular', 'Segoe UI', sans-serif
4+
$FONT_FAMILY_MONO: Menlo, Monaco, Consolas, 'Courier New', monospace
5+
6+
$FONT_SIZE: 16px
7+
$FONT_SIZE_MONO: 14px
8+
9+
$LINE_HEIGHT: 1.333em
10+
11+
12+
// Colors
13+
//
14+
$COLOR_BACKGROUND: #fdfdfd
15+
$COLOR_TEXT: #222
16+
$COLOR_TEXT_ASIDE: #808080
17+
$COLOR_LINK: #4da6ff
18+
19+
$COLOR_MENU_DIVIDER: #eee
20+
$COLOR_MENU_DIVIDER_FOCUS: #000
21+
$COLOR_MENU_LABEL: #808080
22+
23+
$COLOR_PANEL: #fff
24+
$COLOR_PANEL_DIVIDER: #eee
25+
26+
$COLOR_COMMENT_TAG: #808080
27+
$COLOR_COMMENT_TAG_TEXT: #fff
28+
29+
$COLOR_CODE_BACKGROUND: rgba(#000, 0.04)
30+
31+
$COLOR_TS: #9600ff
32+
$COLOR_TS_INTERFACE: #7da01f
33+
$COLOR_TS_ENUM: #cc9900
34+
$COLOR_TS_CLASS: #4da6ff
35+
$COLOR_TS_PRIVATE: #808080
36+
37+
$TOOLBAR_COLOR: #fff
38+
$TOOLBAR_TEXT_COLOR: #333
39+
$TOOLBAR_HEIGHT: 40px
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Displays all regular comment tags
2+
//
3+
// <dl class="tsd-comment-tags">
4+
// <dt>see</dt>
5+
// <dd><p><a href="#">Dispatcher.EVENT_BEGIN</a></p></dd>
6+
// <dt>see</dt>
7+
// <dd><p><a href="#">Dispatcher.EVENT_BEGIN_RESOLVE</a></p></dd>
8+
// <dt>see</dt>
9+
// <dd><p><a href="#">Dispatcher.EVENT_END_RESOLVE</a></p></dd>
10+
// </dl>
11+
//
12+
dl.tsd-comment-tags
13+
overflow: hidden
14+
15+
dt
16+
clear: both
17+
float: left
18+
padding: 1px 5px
19+
margin: 0 10px 0 0
20+
border-radius: 4px
21+
border: 1px solid $COLOR_COMMENT_TAG
22+
color: $COLOR_COMMENT_TAG
23+
font-size: 0.8em
24+
font-weight: normal
25+
26+
dd
27+
margin: 0 0 10px 0
28+
29+
p
30+
margin: 0
31+
32+
33+
// Special formatting for the main reflection on each page.
34+
//
35+
// <section class="tsd-panel tsd-comment">
36+
// <div class="tsd-comment tsd-typography">
37+
// <div class="lead"><p>The default TypeDoc main application class.</p></div>
38+
// <p>This class holds the two main components of TypeDoc, the Dispatcher and the Renderer.</p>
39+
// </div>
40+
// </section>
41+
//
42+
.tsd-panel.tsd-comment .lead
43+
font-size: 1.1em
44+
line-height: $LINE_HEIGHT
45+
margin-bottom: 2em
46+
47+
&:last-child
48+
margin-bottom: 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Classes set on the body to control the visible state of the filtered elements
2+
//
3+
.toggle-protected .tsd-is-private
4+
display: none
5+
6+
.toggle-public .tsd-is-private,
7+
.toggle-public .tsd-is-protected,
8+
.toggle-public .tsd-is-private-protected
9+
display: none
10+
11+
.toggle-inherited .tsd-is-inherited
12+
display: none
13+
14+
.toggle-only-exported .tsd-is-not-exported
15+
display: none
16+
17+
.toggle-externals .tsd-is-external
18+
display: none
19+
20+
21+
// Filter Buttons in the toolbar
22+
//
23+
#tsd-filter
24+
position: relative
25+
display: inline-block
26+
height: $TOOLBAR_HEIGHT
27+
vertical-align: bottom
28+
29+
.no-filter &
30+
display: none
31+
32+
.tsd-filter-group
33+
display: inline-block
34+
height: $TOOLBAR_HEIGHT
35+
vertical-align: bottom
36+
white-space: nowrap
37+
38+
input
39+
display: none
40+
41+
+size-xs-sm
42+
.tsd-filter-group
43+
display: block
44+
position: absolute
45+
top: $TOOLBAR_HEIGHT
46+
right: 20px
47+
height: auto
48+
background-color: $COLOR_PANEL
49+
visibility: hidden
50+
transform: translate(50%,0)
51+
box-shadow: 0 0 4px rgba(#000, 0.25)
52+
53+
.has-options &
54+
visibility: visible
55+
56+
.to-has-options &
57+
animation: fade-in 0.2s
58+
59+
.from-has-options &
60+
animation: fade-out 0.2s
61+
62+
label,
63+
.tsd-select
64+
display: block
65+
padding-right: 20px
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Displays the type hierarchy
2+
//
3+
// <ul class="tsd-hierarchy">
4+
// <li>
5+
// <a href="#" class="tsd-signature-type">Event</a>
6+
// <ul class="tsd-hierarchy">
7+
// <li>
8+
// <span class="target">DispatcherEvent</span>
9+
// <ul class="tsd-hierarchy">
10+
// <li><a href="#" class="tsd-signature-type">BaseState</a></li>
11+
// <li><a href="#" class="tsd-signature-type">ReflectionEvent</a></li>
12+
// </ul>
13+
// </li>
14+
// </ul>
15+
// </li>
16+
// </ul>
17+
//
18+
.tsd-hierarchy
19+
list-style: square
20+
padding: 0 0 0 20px
21+
margin: 0
22+
23+
.target
24+
font-weight: bold
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Displays an index of grouped links.
2+
//
3+
// <section class="tsd-panel tsd-index-panel">
4+
// <div class="tsd-index-content">
5+
// <div class="tsd-index-section">
6+
// <h3>Constructor methods</h3>
7+
// <ul class="tsd-member-index">
8+
// <li class="tsd-kind-constructor-method tsd-parent-kind-class"><a href="#" class="tsd-kind-icon">constructor</a></li>
9+
// </ul>
10+
// </div>
11+
// <div class="tsd-index-section">
12+
// <h3>Properties</h3>
13+
// <ul class="tsd-member-index">
14+
// <li class="tsd-kind-property tsd-parent-kind-class"><a href="#" class="tsd-kind-icon">EVENT_<wbr>BEGIN</a></li>
15+
// <li class="tsd-kind-property tsd-parent-kind-class"><a href="#" class="tsd-kind-icon">EVENT_<wbr>BEGIN_<wbr>DECLARATION</a></li>
16+
// <li class="tsd-kind-property tsd-parent-kind-class"><a href="#" class="tsd-kind-icon">EVENT_<wbr>BEGIN_<wbr>DOCUMENT</a></li>
17+
// <li class="tsd-kind-property tsd-parent-kind-class"><a href="#" class="tsd-kind-icon">EVENT_<wbr>BEGIN_<wbr>RESOLVE</a></li>
18+
// </ul>
19+
// </div>
20+
// </div>
21+
// </section>
22+
//
23+
.tsd-index-panel
24+
.tsd-index-content
25+
margin-bottom: -30px !important
26+
27+
.tsd-index-section
28+
margin-bottom: 30px !important
29+
30+
h3
31+
@extend h4
32+
margin: 0 -20px 10px -20px
33+
padding: 0 20px 10px 20px
34+
border-bottom: 1px solid $COLOR_PANEL_DIVIDER
35+
36+
ul.tsd-index-list
37+
+vendors(column-count, 3)
38+
+vendors(column-gap, 20px)
39+
padding: 0
40+
list-style: none
41+
line-height: $LINE_HEIGHT
42+
43+
+size-xs-sm
44+
+vendors(column-count, 1)
45+
46+
+size-md
47+
+vendors(column-count, 2)
48+
49+
li
50+
+vendors(column-break-inside, avoid)
51+
+vendors(page-break-inside, avoid)
52+
53+
a,
54+
.tsd-parent-kind-module a
55+
color: $COLOR_TS
56+
57+
.tsd-parent-kind-interface a
58+
color: $COLOR_TS_INTERFACE
59+
60+
.tsd-parent-kind-enum a
61+
color: $COLOR_TS_ENUM
62+
63+
.tsd-parent-kind-class a
64+
color: $COLOR_TS_CLASS
65+
66+
67+
.tsd-kind-module a
68+
color: $COLOR_TS
69+
70+
.tsd-kind-interface a
71+
color: $COLOR_TS_INTERFACE
72+
73+
.tsd-kind-enum a
74+
color: $COLOR_TS_ENUM
75+
76+
.tsd-kind-class a
77+
color: $COLOR_TS_CLASS
78+
79+
.tsd-is-private a
80+
color: $COLOR_TS_PRIVATE

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.