Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
38ceb44
feat: flavor snippets wip
NathanWalker Aug 3, 2024
fc797f3
Merge remote-tracking branch 'origin/main' into feat/flavor-snippets
NathanWalker Aug 12, 2024
85b3339
chore: cleanup template
NathanWalker Aug 12, 2024
c55cea3
chore: add shared assets
NathanWalker Aug 12, 2024
41a6cbc
chore: cleanup dialogs
NathanWalker Aug 12, 2024
b29a122
feat: angular flavor wip
NathanWalker Aug 12, 2024
cc8ed1c
Merge remote-tracking branch 'origin/main' into feat/flavor-snippets
NathanWalker Aug 13, 2024
08c0128
feat: angular flavor
Aug 13, 2024
affa653
feat: vue 3 flavor wip
NathanWalker Aug 13, 2024
a46a310
Updates: Vue Flavor
mbflores Aug 14, 2024
36dafb7
Flavors Vue Update
mbflores Aug 14, 2024
f10e27b
feat: angular flavor - ActionBar and TabView fixes
Aug 14, 2024
26a7243
Updates: Vue Flavor
mbflores Aug 14, 2024
2efa8ac
Flavor: Vue
mbflores Aug 14, 2024
488fd86
Flavor: Vue
mbflores Aug 15, 2024
7c3d4c1
Fix Webview
mbflores Aug 16, 2024
b28aeb5
Flavor: Svelte
mbflores Aug 19, 2024
a743e33
Flavors: Svelte Update
mbflores Aug 19, 2024
8fbd177
Flavor Update: Svelte
mbflores Aug 19, 2024
8c13286
Flavor Update: Svelte
mbflores Aug 19, 2024
8d70ec0
Finalized Svelte Flavor
mbflores Aug 19, 2024
ef238cd
Flavor: SolidJS
mbflores Aug 20, 2024
1b0cd6e
WIP Solid
mbflores Aug 28, 2024
71b4d90
Flavor Update: Solid
mbflores Aug 28, 2024
446a73d
Flavor Update: SolidJS
mbflores Aug 29, 2024
2b42f00
Flavor Update: SolidJS
mbflores Aug 29, 2024
5a17662
Flavor Update: SolidJS
mbflores Aug 29, 2024
326f5f1
Flavor Update: React
mbflores Aug 30, 2024
23a9a61
Flavor Update: React
mbflores Sep 2, 2024
bec6dcd
Merge remote-tracking branch 'origin/main' into feat/flavor-snippets
NathanWalker Sep 28, 2024
4e046cd
feat: add snippets to ui guide component pages
NathanWalker Sep 28, 2024
dccddf6
Merge remote-tracking branch 'origin/main' into feat/flavor-snippets
NathanWalker Feb 7, 2025
e32d3fc
feat: updated angular sample to 19.1
NathanWalker Feb 7, 2025
52fc603
feat: add tsx region support for snippets
rigor789 Feb 7, 2025
211e3ca
fix: clean up snippets
rigor789 Feb 7, 2025
d3514fe
feat: new tabs
rigor789 Feb 22, 2025
72215c9
Merge remote-tracking branch 'origin/main' into feat/flavor-snippets
NathanWalker Feb 23, 2025
e7775b6
Merge branch 'main' into feat/flavor-snippets
NathanWalker Feb 23, 2025
ed3a1bc
Merge branch 'feat/8.9-core-additions' into feat/flavor-snippets
NathanWalker Feb 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .vitepress/theme/cliLanguage.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// https://mysticmind.dev/vitepress-fenced-code-block-syntax-highlighting-quirks-with-net-or-other-languages
import { BUNDLED_LANGUAGES } from "shiki";
import cliLanguageGrammar from "./shiki/cli.tmLanguage.json";
import { bundledLanguages } from 'shiki'
import cliLanguageGrammar from './shiki/cli.tmLanguage.json'

BUNDLED_LANGUAGES.push({
id: "cli",
scopeName: "source.cli",
// @ts-ignore
bundledLanguages['cli'] = {
id: 'cli',
scopeName: 'source.cli',
grammar: cliLanguageGrammar,
});
}
// bundledLanguages.push()
110 changes: 104 additions & 6 deletions content/dev-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,116 @@ For example:
![some image](../assets/images/setup/windows/<some_image>.png)
```

<!-- <Tabs>
<Tab name="Vue">
## Tabs

SOMETHING SOMETHING
:::warning

```ts
asd
In order to render Markdown inside a tab, you **must** have one line break above and below the markdown content.

For example:

```xml
<Tab>
# Test
</Tab>
```

Will render `# Test` literally, while

```xml
<Tab>

# Test

</Tab>
```

Will render a `h1` Test title.

:::

<Tabs>
<Tab title="Simple Tab">
This is the most basic tab there is. Pure html content or whatever.
</Tab>

<Tab title="With Code Block">

```ts
console.log('Hello World!')
```

</Tab>

<Tab title="With External Code Block">

<<< @/../examples/typescript/src/ui/ActionBar/page.xml#example

</Tab>

<Tab title="With Two Ext-Code Blocks">

<<< @/../examples/typescript/src/ui/ActionBar/page.xml#example

And another one:

<<< @/../examples/typescript/src/ui/ActionBar/page.xml#example

</Tabs> -->
</Tab>
</Tabs>

### Flavor Tabs

<Tabs>
<Tab flavor="vue">
This is the vue tab
</Tab>
<Tab flavor="typescript">
This is the typescript tab
</Tab>
<Tab flavor="javascript">
This is the javascript tab
</Tab>
<Tab flavor="angular">
This is the angular tab
</Tab>
<Tab flavor="svelte">
This is the svelte tab
</Tab>
<Tab flavor="react">
This is the react tab
</Tab>
<Tab flavor="solid">
This is the solid tab
</Tab>

</Tabs>

All Flavor tabs will be synchronized and ordered consistently:

<Tabs>
<Tab flavor="typescript">
This is the typescript tab
</Tab>
<Tab flavor="javascript">
This is the javascript tab
</Tab>
<Tab flavor="angular">
This is the angular tab
</Tab>
<Tab flavor="svelte">
This is the svelte tab
</Tab>
<Tab flavor="react">
This is the react tab
</Tab>
<Tab flavor="vue">
This is the vue tab
</Tab>
<Tab flavor="solid">
This is the solid tab
</Tab>
</Tabs>

## StepList

Expand Down
7 changes: 6 additions & 1 deletion content/ui/action-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ Views also part of the ActionBar abstraction:
<img src="../assets/images/screenshots/android/ActionBar.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/ActionBar/page.xml#example
<<< @/../examples/typescript/src/ui/ActionBar/page.xml#example
<<< @/../examples/angular/src/ui/ActionBar/component.html#example
<<< @/../examples/react/src/components/ui/actionbar.tsx#example
<<< @/../examples/solid/src/ui/actionbar.tsx#example
<<< @/../examples/svelte/app/components/ui/ActionBar.svelte#example
<<< @/../examples/vue/src/ui/Actionbar/component.vue#example

## Examples

Expand Down
38 changes: 37 additions & 1 deletion content/ui/activity-indicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,43 @@ contributors:
<img src="../assets/images/screenshots/android/ActivityIndicator.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/ActivityIndicator/template.xml#example
<Tabs>
<Tab flavor="vue">

<<< @/../examples/vue/src/ui/ActivityIndicator/component.vue#example

</Tab>
<Tab flavor="typescript">

<<< @/../examples/typescript/src/ui/ActivityIndicator/template.xml#example

</Tab>
<Tab flavor="javascript">

<<< @/../examples/typescript/src/ui/ActivityIndicator/template.xml#example

</Tab>
<Tab flavor="angular">

<<< @/../examples/angular/src/ui/ActivityIndicator/component.html#example

</Tab>
<Tab flavor="svelte">

<<< @/../examples/svelte/app/components/ui/ActivityIndicator.svelte#example

</Tab>
<Tab flavor="react">

<<< @/../examples/react/src/components/ui/activityindicator.tsx#example

</Tab>
<Tab flavor="solid">

<<< @/../examples/solid/src/ui/activityindicator.tsx#example

</Tab>
</Tabs>

## Examples

Expand Down
7 changes: 6 additions & 1 deletion content/ui/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ For more information about the available gestures, see [Gestures](/guide/gesture
<img src="../assets/images/screenshots/android/Button.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/Button/template.xml#example
<<< @/../examples/typescript/src/ui/Button/template.xml#example
<<< @/../examples/angular/src/ui/Button/component.html#example
<<< @/../examples/react/src/components/ui/button.tsx#example
<<< @/../examples/solid/src/ui/button.tsx#example
<<< @/../examples/svelte/app/components/ui/Button.svelte#example
<<< @/../examples/vue/src/ui/Button/component.vue#example

## Examples

Expand Down
7 changes: 6 additions & 1 deletion content/ui/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ See also: [TimePicker](/ui/time-picker).
<img src="../assets/images/screenshots/android/DatePicker.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/DatePicker/template.xml#example
<<< @/../examples/typescript/src/ui/DatePicker/template.xml#example
<<< @/../examples/angular/src/ui/DatePicker/component.html#example
<<< @/../examples/react/src/components/ui/datepicker.tsx#example
<<< @/../examples/solid/src/ui/datepicker.tsx#example
<<< @/../examples/svelte/app/components/ui/DatePicker.svelte#example
<<< @/../examples/vue/src/ui/DatePicker/component.vue#example

```xml
<DatePicker
Expand Down
35 changes: 30 additions & 5 deletions content/ui/dialogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ See [DialogOptions](/api/interface/DialogOptions), [R.style](https://developer.a
<img src="../assets/images/screenshots/android/Dialogs-Alert.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/Dialogs/template.ts#example-alert
<<< @/../examples/typescript/src/ui/Dialogs/template.ts#example-alert
<<< @/../examples/angular/src/ui/Dialogs/component.html#example-alert
<<< @/../examples/react/src/components/ui/dialogs.tsx#example-alert
<<< @/../examples/solid/src/ui/dialogs.tsx#example-alert
<<< @/../examples/svelte/app/components/ui/Dialogs.svelte#example-alert
<<< @/../examples/vue/src/ui/Dialogs/component.vue#example-alert

A dialog for alerting the user.

Expand All @@ -60,7 +65,12 @@ See [alert()](/api/#alert).
<img src="../assets/images/screenshots/android/Dialogs-Action.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/Dialogs/template.ts#example-action
<<< @/../examples/typescript/src/ui/Dialogs/template.ts#example-action
<<< @/../examples/angular/src/ui/Dialogs/component.html#example-action
<<< @/../examples/react/src/components/ui/dialogs.tsx#example-action
<<< @/../examples/solid/src/ui/dialogs.tsx#example-action
<<< @/../examples/svelte/app/components/ui/Dialogs.svelte#example-action
<<< @/../examples/vue/src/ui/Dialogs/component.vue#example-action

A dialog for prompting the user to choose.

Expand All @@ -77,7 +87,12 @@ See [action()](/api/#action).
<img src="../assets/images/screenshots/android/Dialogs-Confirm.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/Dialogs/template.ts#example-confirm
<<< @/../examples/typescript/src/ui/Dialogs/template.ts#example-confirm
<<< @/../examples/angular/src/ui/Dialogs/component.html#example-confirm
<<< @/../examples/react/src/components/ui/dialogs.tsx#example-confirm
<<< @/../examples/solid/src/ui/dialogs.tsx#example-confirm
<<< @/../examples/svelte/app/components/ui/Dialogs.svelte#example-confirm
<<< @/../examples/vue/src/ui/Dialogs/component.vue#example-confirm

A dialog for prompting the user to confirm.

Expand All @@ -92,7 +107,12 @@ See [confirm()](/api/#confirm).
<img src="../assets/images/screenshots/android/Dialogs-Prompt.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/Dialogs/template.ts#example-prompt
<<< @/../examples/typescript/src/ui/Dialogs/template.ts#example-prompt
<<< @/../examples/angular/src/ui/Dialogs/component.html#example-prompt
<<< @/../examples/react/src/components/ui/dialogs.tsx#example-prompt
<<< @/../examples/solid/src/ui/dialogs.tsx#example-prompt
<<< @/../examples/svelte/app/components/ui/Dialogs.svelte#example-prompt
<<< @/../examples/vue/src/ui/Dialogs/component.vue#example-prompt

A dialog for prompting the user for input.

Expand All @@ -111,7 +131,12 @@ See [prompt()](/api/#prompt), [CoreTypes.AutocapitalizationType](/api/namespace/
<img src="../assets/images/screenshots/android/Dialogs-Login.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/Dialogs/template.ts#example-login
<<< @/../examples/typescript/src/ui/Dialogs/template.ts#example-login
<<< @/../examples/angular/src/ui/Dialogs/component.html#example-login
<<< @/../examples/react/src/components/ui/dialogs.tsx#example-login
<<< @/../examples/solid/src/ui/dialogs.tsx#example-login
<<< @/../examples/svelte/app/components/ui/Dialogs.svelte#example-login
<<< @/../examples/vue/src/ui/Dialogs/component.vue#example-login

A dialog for prompting the user for credentials.

Expand Down
11 changes: 9 additions & 2 deletions content/ui/html-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ See also: [WebView](/ui/web-view).
<img src="../assets/images/screenshots/android/HtmlView.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/HtmlView/template.xml#example
<<< @/../examples/src/ui/HtmlView/template.ts#example{xml}
<<< @/../examples/typescript/src/ui/HtmlView/template.xml#example
<<< @/../examples/typescript/src/ui/HtmlView/template.ts#example{xml}

<<< @/../examples/angular/src/ui/HtmlView/component.html#example
<<< @/../examples/angular/src/ui/HtmlView/component.ts#example{html}
<<< @/../examples/react/src/components/ui/htmlview.tsx#example
<<< @/../examples/solid/src/ui/htmlview.tsx#example
<<< @/../examples/svelte/app/components/ui/HtmlView.svelte#example
<<< @/../examples/vue/src/ui/HtmlView/component.vue#example

## Props

Expand Down
4 changes: 2 additions & 2 deletions content/ui/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ When working with images, consider following [the best practices](/performance.h

Working with many images can quickly become a memory hog, for improved image handling it's recommended to use an Image caching library. Here are a few plugins from our community:

- [@triniwiz/image-cache-it](https://triniwiz.github.io/nativescript-plugins/api-reference/image-cache-it.html)
- [@triniwiz/nativescript-image-cache-it](https://triniwiz.github.io/nativescript-plugins/api-reference/image-cache-it.html)
- [@nativescript-community/ui-image](https://github.com/nativescript-community/ui-image)

:::
Expand All @@ -28,7 +28,7 @@ Working with many images can quickly become a memory hog, for improved image han
<img src="../assets/images/screenshots/android/Image.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/Image/template.xml#example
<<< @/../examples/typescript/src/ui/Image/template.xml#example

## Examples

Expand Down
8 changes: 7 additions & 1 deletion content/ui/label.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ The NativeScript `<Label>` is not the same as the HTML `<Label>`.
<img src="../assets/images/screenshots/android/Label.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/Label/template.xml#example
<<< @/../examples/typescript/src/ui/Label/template.xml#example

<<< @/../examples/angular/src/ui/Label/component.html#example
<<< @/../examples/react/src/components/ui/label.tsx#example
<<< @/../examples/solid/src/ui/label.tsx#example
<<< @/../examples/svelte/app/components/ui/Label.svelte#example
<<< @/../examples/vue/src/ui/Label/component.vue#example

## Examples

Expand Down
11 changes: 9 additions & 2 deletions content/ui/list-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ contributors:
<img src="../assets/images/screenshots/android/ListPicker.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/ListPicker/template.xml#example
<<< @/../examples/src/ui/ListPicker/template.ts#example
<<< @/../examples/typescript/src/ui/ListPicker/template.xml#example
<<< @/../examples/typescript/src/ui/ListPicker/template.ts#example

<<< @/../examples/angular/src/ui/ListPicker/component.html#example
<<< @/../examples/angular/src/ui/ListPicker/component.ts#example
<<< @/../examples/react/src/components/ui/label.tsx#example
<<< @/../examples/solid/src/ui/label.tsx#example
<<< @/../examples/svelte/app/components/ui/ListPicker.svelte#example
<<< @/../examples/vue/src/ui/ListPicker/component.vue#example

## Props

Expand Down
15 changes: 11 additions & 4 deletions content/ui/list-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,24 @@ For additional features and improved performance in certain scenarios, consider
<img src="../assets/images/screenshots/android/ListView.png"/>
</DeviceFrame>

<<< @/../examples/src/ui/ListView/template.xml#example
<<< @/../examples/src/ui/ListView/template.ts#example
<<< @/../examples/typescript/src/ui/ListView/template.xml#example
<<< @/../examples/typescript/src/ui/ListView/template.ts#example

<<< @/../examples/angular/src/ui/ListView/component.html#example
<<< @/../examples/angular/src/ui/ListView/component.ts#example
<<< @/../examples/react/src/components/ui/listview.tsx#example
<<< @/../examples/solid/src/ui/listview.tsx#example
<<< @/../examples/svelte/app/components/ui/ListView.svelte#example
<<< @/../examples/vue/src/ui/ListView/component.vue#example

## Examples

### ListView with multiple itemTemplates

Individual items can be rendered using a different template. For example, let's say our items can either be headings or items. In that case, we can define a template for them, and pass in an `itemTemplateSelector` function that will get called before rendering an item.

<<< @/../examples/src/ui/ListView/multiple-templates.xml#example
<<< @/../examples/src/ui/ListView/template.ts#itemTemplateSelector
<<< @/../examples/typescript/src/ui/ListView/multiple-templates.xml#example
<<< @/../examples/typescript/src/ui/ListView/template.ts#itemTemplateSelector

## Props

Expand Down
Loading