├── .github ├── issue_template.md └── pull_request_template.md ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── demo ├── .gitignore ├── .npmrc ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── app.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-ldpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-mdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-nodpi │ │ │ │ └── splash_screen.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── values-v21 │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ └── iOS │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon-29.png │ │ │ │ ├── icon-29@2x.png │ │ │ │ ├── icon-29@3x.png │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-40@3x.png │ │ │ │ ├── icon-50.png │ │ │ │ ├── icon-50@2x.png │ │ │ │ ├── icon-57.png │ │ │ │ ├── icon-57@2x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-60@3x.png │ │ │ │ ├── icon-72.png │ │ │ │ ├── icon-72@2x.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ └── icon-83.5@2x.png │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.launchimage │ │ │ │ ├── Contents.json │ │ │ │ ├── Default-568h@2x.png │ │ │ │ ├── Default-667h@2x.png │ │ │ │ ├── Default-736h@3x.png │ │ │ │ ├── Default-Landscape.png │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ ├── Default-Portrait.png │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ ├── Default.png │ │ │ │ └── Default@2x.png │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── build.xcconfig │ ├── app-root.xml │ ├── app.css │ ├── app.ts │ ├── main-page.ts │ ├── main-page.xml │ ├── main-view-model.ts │ └── tests │ │ └── tests.js ├── karma.conf.js ├── nativescript.config.ts ├── package.json ├── references.d.ts ├── tsconfig.json └── webpack.config.js ├── demo_angular ├── .editorconfig ├── .gitignore ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── values-v29 │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── LaunchScreen-Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── build.xcconfig ├── LICENSE ├── angular.json ├── nsconfig.json ├── package-lock.json ├── package.json ├── src │ ├── app.css │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ └── markdown │ │ │ ├── markdown.component.html │ │ │ └── markdown.component.ts │ ├── main.ts │ └── package.json ├── tsconfig.json ├── tsconfig.tns.json ├── tsfmt.json └── webpack.config.js ├── publish ├── pack.sh ├── package-lock.json ├── package.json ├── prepare.sh └── publish.sh ├── src-angular ├── dist │ ├── index.d.ts │ ├── nativescript-markdown-view-angular.d.ts │ ├── nativescript-markdown-view-angular.metadata.json │ └── package.json ├── index.ts ├── package-lock.json └── package.json ├── src ├── .npmignore ├── angular │ ├── index.d.ts │ ├── nativescript-markdown-view-angular.d.ts │ ├── nativescript-markdown-view-angular.metadata.json │ └── package.json ├── index.d.ts ├── markdown-view.android.ts ├── markdown-view.common.ts ├── markdown-view.ios.ts ├── package.json ├── platforms │ ├── android │ │ └── include.gradle │ └── ios │ │ └── Podfile ├── references.d.ts ├── tsconfig.json └── typings │ └── TSMarkdownParser.d.ts └── tslint.json /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | ### Make sure to check the demo app(s) for sample usage 2 | 3 | ### Make sure to check the existing issues in this repository 4 | 5 | ### If the demo apps cannot help and there is no issue for your problem, tell us about it 6 | Please, ensure your title is less than 63 characters long and starts with a capital 7 | letter. 8 | 9 | ### Which platform(s) does your issue occur on? 10 | - iOS/Android/Both 11 | - iOS/Android versions 12 | - emulator or device. What type of device? 13 | 14 | ### Please, provide the following version numbers that your issue occurs with: 15 | 16 | - CLI: (run `tns --version` to fetch it) 17 | - Cross-platform modules: (check the 'version' attribute in the 18 | `node_modules/tns-core-modules/package.json` file in your project) 19 | - Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project) 20 | - Plugin(s): (look for the version numbers in the `package.json` file of your 21 | project and paste your dependencies and devDependencies here) 22 | 23 | ### Please, tell us how to recreate the issue in as much detail as possible. 24 | Describe the steps to reproduce it. 25 | 26 | ### Is there any code involved? 27 | - provide a code example to recreate the problem 28 | - (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible. 29 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | ## PR Checklist 11 | 12 | - [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. 13 | - [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. 14 | - [ ] All existing tests are passing 15 | - [ ] Tests for the changes are included 16 | 17 | ## What is the current behavior? 18 | 19 | 20 | ## What is the new behavior? 21 | 22 | 23 | Fixes/Implements/Closes #[Issue Number]. 24 | 25 | 26 | 27 | 36 | 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .idea 3 | .DS_Store 4 | *.esm.json 5 | *.js 6 | *.js.map 7 | *.log 8 | src/*.d.ts 9 | !src/index.d.ts 10 | !src/references.d.ts 11 | !src/scripts/*.js 12 | !seed-tests/*.js 13 | seed-tests/seed-copy/**/*.* 14 | seed-tests/seed-copy-new-git-repo/**/*.* 15 | !demo/karma.conf.js 16 | !demo/app/tests/*.js 17 | demo/*.d.ts 18 | !demo/references.d.ts 19 | demo/lib 20 | demo/platforms 21 | node_modules 22 | publish/src 23 | publish/package 24 | demo/report/report.html 25 | demo/report/stats.json 26 | !demo-vue/app/app.js -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | if: (branch = master AND commit_message !~ /(release:)/) OR tag IS present OR type = pull_request 2 | 3 | stages: 4 | - lint 5 | - build 6 | - name: deploy 7 | if: tag IS present 8 | 9 | matrix: 10 | include: 11 | - stage: lint 12 | language: node_js 13 | os: linux 14 | node_js: '10' 15 | script: 16 | - cd src && npm run ci.tslint 17 | - cd ../demo && npm run ci.tslint 18 | - stage: build 19 | language: android 20 | env: 21 | - BuildAndroid="28" 22 | os: linux 23 | jdk: oraclejdk8 24 | before_install: nvm install 10 25 | script: 26 | - cd src && npm i && npm run tsc && cd ../demo && tns build android && cd ../demo_angular && tns build android 27 | - os: osx 28 | env: 29 | - BuildiOS="12" 30 | - Xcode="10.2" 31 | osx_image: xcode10.2 32 | language: node_js 33 | node_js: '10' 34 | jdk: oraclejdk8 35 | script: 36 | - pod repo update && cd src && npm i && npm run tsc && cd ../demo && tns build ios && cd ../demo_angular && tns build ios 37 | - stage: deploy 38 | language: node_js 39 | os: linux 40 | node_js: '10' 41 | script: 42 | - ls 43 | - cd publish 44 | - ./prepare.sh 45 | - cd src 46 | deploy: 47 | skip_cleanup: true 48 | provider: npm 49 | email: florian@rocketloop.de 50 | api_key: 51 | secure: xAqgDxIPtklRhrSTvm8v0cw8eR6wIeSghgQwZm/usiAfnjjL9bESSccNk6P1KjkQUg5npMln4uZhNerSv9KZ/1T8Hs/ZWegJ6eGkIz45grpM1SOcUKypjlOQBxg7Pp6DH4C7oPE6cIioSIfamzEyGD7jhu7T6LD+i5sw5+8tbBCfe1NDgXEI8VoPlQJjgE6w246ACRSFrBDnywszo5YkR0AByntUS56kBRHjccvxFdhmSqShOsDQsI0ZCwimofLPv7oFFgXeE6nLGQdxiQlfuGMJbJP+B4rw4VTmGoE1zrOaQf2nrPMAa3N/JDxWIkwM1aKyerJ/5nEA2+A0pxJjua6TFRdO/oOTj2JcJHmWJsvJnws1fbEJup40yXHlwt4DeOhUchUmw6iCc9deKDjD2cJE8k4TiKaOyZPZ2wimAHb7tJivSThzoa1GLnAhnd/OGBnl5WSdhvZ7N4PkN6PpRtoWqa/dufUj/YiZls5L85u1IGOoEKnKb283wHppKkvYWor41jWCJNLLZEPJvlY90ILR00IRhGTre2QNkjaCAGzRIxAvSgI5WT34ewZpQvcFiDoILOacgEZPAcavdGrZgYKmtPw1xFpbM25zO47ntfBo0KCxzLUpDumYbF8N7SbIl9poh55Th8TPZGSJP89WnfR1JlXtqv0Qe+/tXEKERWA= 52 | on: 53 | tags: true 54 | android: 55 | components: 56 | - tools 57 | - platform-tools 58 | - build-tools-28.0.3 59 | - android-28 60 | - extra-android-m2repository 61 | - sys-img-armeabi-v7a-android-21 62 | before_install: 63 | - sudo pip install --upgrade pip 64 | - sudo pip install six 65 | install: 66 | - echo no | npm install -g nativescript 67 | - tns usage-reporting disable 68 | - tns error-reporting disable 69 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.4.1 (2019-12-03) 2 | 3 | ### Bug Fixes 4 | 5 | - Fixes issue with text view scrolling on iOS 6 | 7 | # 1.4.0 (2019-11-11) 8 | 9 | ### Features 10 | 11 | - Adds base font size property on Android (#8) 12 | 13 | ## 1.3.1 (2019-11-08) 14 | 15 | ### Features 16 | 17 | - Adds automatic deployment from travis ci 18 | 19 | # 1.3.0 (2019-11-07) 20 | 21 | ### Features 22 | 23 | - Updates the plugin for NativeScript 6 compatibility 24 | - Adds `fontSize` property that controls the base font size, closes #6. (Currently only working on iOS) 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Florian Reifschneider 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NativeScript Markdown View 2 | 3 | [![npm version](https://badge.fury.io/js/nativescript-markdown-view.svg)](http://badge.fury.io/js/nativescript-markdown-view) 4 | [![Build Status](https://travis-ci.com/flore2003/nativescript-markdown-view.svg?branch=master)](https://travis-ci.com/flore2003/nativescript-markdown-view) 5 | 6 | [![NPM](https://nodei.co/npm/nativescript-markdown-view.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/nativescript-markdown-view/) 7 | 8 | A NativeScript plugin that provides a natively rendered markdown view. 9 | 10 | Uses [Markwon](https://github.com/noties/Markwon) on Android and [TSMarkdownParser](https://github.com/laptobbe/TSMarkdownParser) on iOS. 11 | 12 | ## Installation 13 | 14 | Run the following command from the root of your project: 15 | 16 | 17 | ```javascript 18 | tns plugin add nativescript-markdown-view 19 | ``` 20 | 21 | Note: Use nativescript-markdown-view@2.x for {N} 6 and below 22 | 23 | This command automatically installs the necessary files, as well as stores nativescript-markdown-view as a dependency in your project's package.json file. 24 | 25 | ## Usage 26 | 27 | You need to add `xmlns:mv="nativescript-markdown-view"` to your page tag, and then simply use `` in order to add the widget to your page. 28 | 29 | ```xml 30 | 31 | 32 | 33 | 34 | 35 | 36 | ``` 37 | 38 | ## API 39 | 40 | | Property | Default | Description | 41 | | --- | --- | --- | 42 | | markdown | "" | The markdown to be rendered on screen | 43 | 44 | ## License 45 | 46 | MIT License, see LICENSE file 47 | -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !webpack.config.js 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | 18 | # General 19 | .DS_Store 20 | .AppleDouble 21 | .LSOverride 22 | .idea 23 | .cloud 24 | .project 25 | tmp/ 26 | typings/ 27 | 28 | # Visual Studio Code 29 | .vscode/* 30 | !.vscode/settings.json 31 | !.vscode/tasks.json 32 | !.vscode/launch.json 33 | !.vscode/extensions.json 34 | -------------------------------------------------------------------------------- /demo/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // compile 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | android { 9 | defaultConfig { 10 | generatedDensities = [] 11 | } 12 | aaptOptions { 13 | additionalParameters "--no-version-vectors" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "icon-57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "icon-57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "29x29", 59 | "idiom" : "ipad", 60 | "filename" : "icon-29.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "icon-29@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "40x40", 71 | "idiom" : "ipad", 72 | "filename" : "icon-40.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "icon-40@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "50x50", 83 | "idiom" : "ipad", 84 | "filename" : "icon-50.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "50x50", 89 | "idiom" : "ipad", 90 | "filename" : "icon-50@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "72x72", 95 | "idiom" : "ipad", 96 | "filename" : "icon-72.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "72x72", 101 | "idiom" : "ipad", 102 | "filename" : "icon-72@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "76x76", 107 | "idiom" : "ipad", 108 | "filename" : "icon-76.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "76x76", 113 | "idiom" : "ipad", 114 | "filename" : "icon-76@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "83.5x83.5", 119 | "idiom" : "ipad", 120 | "filename" : "icon-83.5@2x.png", 121 | "scale" : "2x" 122 | } 123 | ], 124 | "info" : { 125 | "version" : 1, 126 | "author" : "xcode" 127 | } 128 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-736h@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "Default-Landscape@3x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "Default-667h@2x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "filename" : "Default@2x.png", 34 | "extent" : "full-screen", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "Default-568h@2x.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "filename" : "Default-Portrait.png", 51 | "extent" : "full-screen", 52 | "minimum-system-version" : "7.0", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "orientation" : "landscape", 57 | "idiom" : "ipad", 58 | "filename" : "Default-Landscape.png", 59 | "extent" : "full-screen", 60 | "minimum-system-version" : "7.0", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "orientation" : "portrait", 65 | "idiom" : "ipad", 66 | "filename" : "Default-Portrait@2x.png", 67 | "extent" : "full-screen", 68 | "minimum-system-version" : "7.0", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "landscape", 73 | "idiom" : "ipad", 74 | "filename" : "Default-Landscape@2x.png", 75 | "extent" : "full-screen", 76 | "minimum-system-version" : "7.0", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "orientation" : "portrait", 81 | "idiom" : "iphone", 82 | "filename" : "Default.png", 83 | "extent" : "full-screen", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "orientation" : "portrait", 88 | "idiom" : "iphone", 89 | "filename" : "Default@2x.png", 90 | "extent" : "full-screen", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "iphone", 96 | "filename" : "Default-568h@2x.png", 97 | "extent" : "full-screen", 98 | "subtype" : "retina4", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "extent" : "to-status-bar", 105 | "scale" : "1x" 106 | }, 107 | { 108 | "orientation" : "portrait", 109 | "idiom" : "ipad", 110 | "filename" : "Default-Portrait.png", 111 | "extent" : "full-screen", 112 | "scale" : "1x" 113 | }, 114 | { 115 | "orientation" : "landscape", 116 | "idiom" : "ipad", 117 | "extent" : "to-status-bar", 118 | "scale" : "1x" 119 | }, 120 | { 121 | "orientation" : "landscape", 122 | "idiom" : "ipad", 123 | "filename" : "Default-Landscape.png", 124 | "extent" : "full-screen", 125 | "scale" : "1x" 126 | }, 127 | { 128 | "orientation" : "portrait", 129 | "idiom" : "ipad", 130 | "extent" : "to-status-bar", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "ipad", 136 | "filename" : "Default-Portrait@2x.png", 137 | "extent" : "full-screen", 138 | "scale" : "2x" 139 | }, 140 | { 141 | "orientation" : "landscape", 142 | "idiom" : "ipad", 143 | "extent" : "to-status-bar", 144 | "scale" : "2x" 145 | }, 146 | { 147 | "orientation" : "landscape", 148 | "idiom" : "ipad", 149 | "filename" : "Default-Landscape@2x.png", 150 | "extent" : "full-screen", 151 | "scale" : "2x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 6 | -------------------------------------------------------------------------------- /demo/app/app-root.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /demo/app/app.css: -------------------------------------------------------------------------------- 1 | @import '~@nativescript/theme/css/core.css'; 2 | 3 | .large { 4 | font-size: 18; 5 | } 6 | 7 | .small { 8 | font-size: 12; 9 | } 10 | 11 | MarkdownView { 12 | background-color: transparent; 13 | color: black; 14 | } 15 | 16 | .ns-light MarkdownView { 17 | color: black; 18 | } 19 | 20 | .ns-dark MarkdownView { 21 | color: white; 22 | } -------------------------------------------------------------------------------- /demo/app/app.ts: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.ts file is the entry point to your application. 3 | You can use this file to perform app-level initialization, but the primary 4 | purpose of the file is to pass control to the app’s first module. 5 | */ 6 | 7 | import * as app from "@nativescript/core/application"; 8 | 9 | app.run({ moduleName: "app-root" }); 10 | 11 | /* 12 | Do not place any code after the application has been started as it will not 13 | be executed on iOS. 14 | */ 15 | -------------------------------------------------------------------------------- /demo/app/main-page.ts: -------------------------------------------------------------------------------- 1 | import * as observable from '@nativescript/core/data/observable'; 2 | import * as pages from '@nativescript/core/ui/page'; 3 | import { HelloWorldModel } from './main-view-model'; 4 | 5 | // Event handler for Page 'loaded' event attached in main-page.xml 6 | export function pageLoaded(args: observable.EventData) { 7 | // Get the event sender 8 | let page = args.object; 9 | page.bindingContext = new HelloWorldModel(); 10 | } 11 | -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /demo/app/main-view-model.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from '@nativescript/core/data/observable'; 2 | 3 | export class HelloWorldModel extends Observable { 4 | 5 | text: string; 6 | headings: string; 7 | emphasis: string; 8 | lists: string; 9 | link: string; 10 | quote: string; 11 | code: string; 12 | img; 13 | constructor() { 14 | super(); 15 | this.text = "This is a sample text"; 16 | this.headings = "# H1\n## H2\n### H3\n#### H4\n##### H5\n###### H6"; 17 | this.emphasis = "**bold** or __bold__\n*italic* or _italic_"; 18 | this.lists = "* First\n* Second\n1. Third\n4. Fourth"; 19 | this.link = "[Sample link](https://github.com/flore2003/nativescript-markdown-view)"; 20 | this.quote = "> Quote\n>> Quote"; 21 | this.code = "`private doSomething(): Something[]`"; 22 | this.img = '![nativescript date range](https://raw.githubusercontent.com/dudipsh/nativescript-ngx-date-range/master/screenshots/calendar_ios.png)'; 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/app/tests/tests.js: -------------------------------------------------------------------------------- 1 | var MarkdownView = require("nativescript-markdown-view").MarkdownView; 2 | var markdownView = new MarkdownView(); 3 | 4 | describe("greet function", function() { 5 | it("exists", function() { 6 | expect(markdownView.greet).toBeDefined(); 7 | }); 8 | 9 | it("returns a string", function() { 10 | expect(markdownView.greet()).toEqual("Hello, NS"); 11 | }); 12 | }); -------------------------------------------------------------------------------- /demo/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function (config) { 2 | const options = { 3 | 4 | // base path that will be used to resolve all patterns (eg. files, exclude) 5 | basePath: '', 6 | 7 | 8 | // frameworks to use 9 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 10 | frameworks: ['jasmine'], 11 | 12 | 13 | // list of files / patterns to load in the browser 14 | files: ['app/tests/**/*.*'], 15 | 16 | 17 | // list of files to exclude 18 | exclude: [ 19 | ], 20 | 21 | 22 | // preprocess matching files before serving them to the browser 23 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 24 | preprocessors: { 25 | }, 26 | 27 | 28 | // test results reporter to use 29 | // possible values: 'dots', 'progress' 30 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 31 | reporters: ['progress'], 32 | 33 | 34 | // web server port 35 | port: 9876, 36 | 37 | 38 | // enable / disable colors in the output (reporters and logs) 39 | colors: true, 40 | 41 | 42 | // level of logging 43 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 44 | logLevel: config.LOG_INFO, 45 | 46 | 47 | // enable / disable watching file and executing tests whenever any file changes 48 | autoWatch: true, 49 | 50 | 51 | // start these browsers 52 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 53 | browsers: [], 54 | 55 | customLaunchers: { 56 | android: { 57 | base: 'NS', 58 | platform: 'android' 59 | }, 60 | ios: { 61 | base: 'NS', 62 | platform: 'ios' 63 | }, 64 | ios_simulator: { 65 | base: 'NS', 66 | platform: 'ios', 67 | arguments: ['--emulator'] 68 | } 69 | }, 70 | 71 | // Continuous Integration mode 72 | // if true, Karma captures browsers, runs the tests and exits 73 | singleRun: false 74 | }; 75 | 76 | setWebpackPreprocessor(config, options); 77 | setWebpack(config, options); 78 | 79 | config.set(options); 80 | } 81 | 82 | function setWebpackPreprocessor(config, options) { 83 | if (config && config.bundle) { 84 | if (!options.preprocessors) { 85 | options.preprocessors = {}; 86 | } 87 | 88 | options.files.forEach(file => { 89 | if (!options.preprocessors[file]) { 90 | options.preprocessors[file] = []; 91 | } 92 | options.preprocessors[file].push('webpack'); 93 | }); 94 | } 95 | } 96 | 97 | function setWebpack(config, options) { 98 | if (config && config.bundle) { 99 | const env = {}; 100 | env[config.platform] = true; 101 | env.sourceMap = config.debugBrk; 102 | options.webpack = require('./webpack.config')(env); 103 | delete options.webpack.entry; 104 | delete options.webpack.output.libraryTarget; 105 | const invalidPluginsForUnitTesting = ["GenerateBundleStarterPlugin", "GenerateNativeScriptEntryPointsPlugin"]; 106 | options.webpack.plugins = options.webpack.plugins.filter(p => !invalidPluginsForUnitTesting.includes(p.constructor.name)); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /demo/nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core' 2 | 3 | export default { 4 | id: 'org.nativescript.demo', 5 | appResourcesPath: 'app/App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none', 9 | requireModules: { 10 | 0: 'nativescript-markdown-view', 11 | }, 12 | }, 13 | appPath: 'app', 14 | } as NativeScriptConfig 15 | -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@nativescript/core": "7.0.0", 4 | "@nativescript/theme": "~2.2.0", 5 | "nativescript": "^6.5.0", 6 | "nativescript-markdown-view": "file:../src", 7 | "tns-android": "^6.5.0", 8 | "tns-ios": "^6.5.0", 9 | "@nativescript/webpack": "3.0.0" 10 | }, 11 | "devDependencies": { 12 | "@nativescript/android": "7.0.1", 13 | "nativescript-unit-test-runner": "^0.7.0", 14 | "tslint": "~5.12.1", 15 | "typescript": "^3.9.3" 16 | }, 17 | "scripts": { 18 | "build.plugin": "cd ../src && npm i && npm run build", 19 | "ci.tslint": "npm i && tslint --config '../tslint.json' 'app/**/*.ts' --exclude '**/node_modules/**' --exclude '**/platforms/**'" 20 | }, 21 | "main": "app.js" 22 | } 23 | -------------------------------------------------------------------------------- /demo/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /demo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "esnext", 5 | "declaration": false, 6 | "removeComments": false, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "lib": [ 11 | "es6", 12 | "dom", 13 | "es2017" 14 | ], 15 | "pretty": true, 16 | "allowUnreachableCode": false, 17 | "allowUnusedLabels": false, 18 | "noEmitHelpers": true, 19 | "noEmitOnError": false, 20 | "noImplicitAny": false, 21 | "noImplicitReturns": true, 22 | "noImplicitUseStrict": false, 23 | "noFallthroughCasesInSwitch": true, 24 | "baseUrl": ".", 25 | "paths": { 26 | "*": [ 27 | "./node_modules/*" 28 | ], 29 | "~/*": [ 30 | "app/*" 31 | ] 32 | }, 33 | "moduleResolution": "node" 34 | }, 35 | "include": [ 36 | "../src", 37 | "**/*" 38 | ], 39 | "exclude": [ 40 | "../src/node_modules", 41 | "node_modules", 42 | "platforms" 43 | ], 44 | "compileOnSave": false 45 | } -------------------------------------------------------------------------------- /demo/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { join, relative, resolve, sep } = require("path"); 2 | const fs = require('fs'); 3 | 4 | const webpack = require("webpack"); 5 | const nsWebpack = require("@nativescript/webpack"); 6 | const nativescriptTarget = require("@nativescript/webpack/nativescript-target"); 7 | const { getNoEmitOnErrorFromTSConfig } = require("@nativescript/webpack/utils/tsconfig-utils"); 8 | const { CleanWebpackPlugin } = require("clean-webpack-plugin"); 9 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 10 | const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); 11 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 12 | const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); 13 | const TerserPlugin = require("terser-webpack-plugin"); 14 | const hashSalt = Date.now().toString(); 15 | 16 | module.exports = env => { 17 | // Add your custom Activities, Services and other Android app components here. 18 | const appComponents = env.appComponents || []; 19 | appComponents.push(...[ 20 | "@nativescript/core/ui/frame", 21 | "@nativescript/core/ui/frame/activity", 22 | ]); 23 | 24 | const platform = env && (env.android && "android" || env.ios && "ios" || env.platform); 25 | if (!platform) { 26 | throw new Error("You need to provide a target platform!"); 27 | } 28 | 29 | const platforms = ["ios", "android"]; 30 | const projectRoot = __dirname; 31 | 32 | if (env.platform) { 33 | platforms.push(env.platform); 34 | } 35 | 36 | // Default destination inside platforms//... 37 | const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); 38 | 39 | const { 40 | // The 'appPath' and 'appResourcesPath' values are fetched from 41 | // the nsconfig.json configuration file. 42 | appPath = "src", 43 | appResourcesPath = "App_Resources", 44 | 45 | // You can provide the following flags when running 'tns run android|ios' 46 | snapshot, // --env.snapshot 47 | production, // --env.production 48 | uglify, // --env.uglify 49 | report, // --env.report 50 | sourceMap, // --env.sourceMap 51 | hiddenSourceMap, // --env.hiddenSourceMap 52 | hmr, // --env.hmr, 53 | unitTesting, // --env.unitTesting, 54 | testing, // --env.testing 55 | verbose, // --env.verbose 56 | snapshotInDocker, // --env.snapshotInDocker 57 | skipSnapshotTools, // --env.skipSnapshotTools 58 | compileSnapshot // --env.compileSnapshot 59 | } = env; 60 | 61 | const useLibs = compileSnapshot; 62 | const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap; 63 | const externals = nsWebpack.getConvertedExternals(env.externals); 64 | 65 | let appFullPath = resolve(projectRoot, appPath); 66 | if (!fs.existsSync(appFullPath)) { 67 | // some apps use 'app' directory 68 | appFullPath = resolve(projectRoot, 'app'); 69 | } 70 | const hasRootLevelScopedModules = nsWebpack.hasRootLevelScopedModules({ projectDir: projectRoot }); 71 | let coreModulesPackageName = "tns-core-modules"; 72 | const alias = env.alias || {}; 73 | alias['~/package.json'] = resolve(projectRoot, 'package.json'); 74 | alias['~'] = appFullPath; 75 | 76 | if (hasRootLevelScopedModules) { 77 | coreModulesPackageName = "@nativescript/core"; 78 | alias["tns-core-modules"] = coreModulesPackageName; 79 | } 80 | const appResourcesFullPath = resolve(projectRoot, appResourcesPath); 81 | 82 | const copyIgnore = { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }; 83 | 84 | const entryModule = nsWebpack.getEntryModule(appFullPath, platform); 85 | const entryPath = `.${sep}${entryModule}.ts`; 86 | const entries = env.entries || {}; 87 | entries.bundle = entryPath; 88 | 89 | const tsConfigPath = resolve(projectRoot, "tsconfig.json"); 90 | 91 | const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("@nativescript") > -1); 92 | if (platform === "ios" && !areCoreModulesExternal && !testing) { 93 | entries["tns_modules/@nativescript/core/inspector_modules"] = "inspector_modules"; 94 | }; 95 | 96 | let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist); 97 | 98 | const itemsToClean = [`${dist}/**/*`]; 99 | if (platform === "android") { 100 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`); 101 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); 102 | } 103 | 104 | const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(tsConfigPath); 105 | 106 | nsWebpack.processAppComponents(appComponents, platform); 107 | const config = { 108 | mode: production ? "production" : "development", 109 | context: appFullPath, 110 | externals, 111 | watchOptions: { 112 | ignored: [ 113 | appResourcesFullPath, 114 | // Don't watch hidden files 115 | "**/.*", 116 | ] 117 | }, 118 | target: nativescriptTarget, 119 | entry: entries, 120 | output: { 121 | pathinfo: false, 122 | path: dist, 123 | sourceMapFilename, 124 | libraryTarget: "commonjs2", 125 | filename: "[name].js", 126 | globalObject: "global", 127 | hashSalt 128 | }, 129 | resolve: { 130 | extensions: [".ts", ".js", ".scss", ".css"], 131 | // Resolve {N} system modules from @nativescript/core 132 | modules: [ 133 | resolve(__dirname, `node_modules/${coreModulesPackageName}`), 134 | resolve(__dirname, "node_modules"), 135 | `node_modules/${coreModulesPackageName}`, 136 | "node_modules", 137 | ], 138 | alias, 139 | // resolve symlinks to symlinked modules 140 | symlinks: true 141 | }, 142 | resolveLoader: { 143 | // don't resolve symlinks to symlinked loaders 144 | symlinks: false 145 | }, 146 | node: { 147 | // Disable node shims that conflict with NativeScript 148 | "http": false, 149 | "timers": false, 150 | "setImmediate": false, 151 | "fs": "empty", 152 | "__dirname": false, 153 | }, 154 | devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"), 155 | optimization: { 156 | runtimeChunk: "single", 157 | noEmitOnErrors: noEmitOnErrorFromTSConfig, 158 | splitChunks: { 159 | cacheGroups: { 160 | vendor: { 161 | name: "vendor", 162 | chunks: "all", 163 | test: (module, chunks) => { 164 | const moduleName = module.nameForCondition ? module.nameForCondition() : ''; 165 | return /[\\/]node_modules[\\/]/.test(moduleName) || 166 | appComponents.some(comp => comp === moduleName); 167 | 168 | }, 169 | enforce: true, 170 | }, 171 | } 172 | }, 173 | minimize: !!uglify, 174 | minimizer: [ 175 | new TerserPlugin({ 176 | parallel: true, 177 | cache: true, 178 | sourceMap: isAnySourceMapEnabled, 179 | terserOptions: { 180 | output: { 181 | comments: false, 182 | semicolons: !isAnySourceMapEnabled 183 | }, 184 | compress: { 185 | // The Android SBG has problems parsing the output 186 | // when these options are enabled 187 | 'collapse_vars': platform !== "android", 188 | sequences: platform !== "android", 189 | } 190 | } 191 | }) 192 | ], 193 | }, 194 | module: { 195 | rules: [ 196 | { 197 | include: join(appFullPath, entryPath), 198 | use: [ 199 | // Require all Android app components 200 | platform === "android" && { 201 | loader: "@nativescript/webpack/helpers/android-app-components-loader", 202 | options: { modules: appComponents } 203 | }, 204 | 205 | { 206 | loader: "@nativescript/webpack/bundle-config-loader", 207 | options: { 208 | loadCss: !snapshot, // load the application css if in debug mode 209 | unitTesting, 210 | appFullPath, 211 | projectRoot, 212 | ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform) 213 | } 214 | }, 215 | ].filter(loader => !!loader) 216 | }, 217 | 218 | { 219 | test: /\.(ts|css|scss|html|xml)$/, 220 | use: "@nativescript/webpack/hmr/hot-loader" 221 | }, 222 | 223 | { test: /\.(html|xml)$/, use: "@nativescript/webpack/helpers/xml-namespace-loader" }, 224 | 225 | { 226 | test: /\.css$/, 227 | use: "@nativescript/webpack/helpers/css2json-loader" 228 | }, 229 | 230 | { 231 | test: /\.scss$/, 232 | use: [ 233 | "@nativescript/webpack/helpers/css2json-loader", 234 | "sass-loader" 235 | ] 236 | }, 237 | 238 | { 239 | test: /\.ts$/, 240 | use: { 241 | loader: "ts-loader", 242 | options: { 243 | configFile: tsConfigPath, 244 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds 245 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement 246 | transpileOnly: true, 247 | allowTsInNodeModules: true, 248 | compilerOptions: { 249 | sourceMap: isAnySourceMapEnabled, 250 | declaration: false 251 | }, 252 | getCustomTransformers: (program) => ({ 253 | before: [ 254 | require("@nativescript/webpack/transformers/ns-transform-native-classes").default 255 | ] 256 | }) 257 | }, 258 | } 259 | }, 260 | ] 261 | }, 262 | plugins: [ 263 | // Define useful constants like TNS_WEBPACK 264 | new webpack.DefinePlugin({ 265 | "global.TNS_WEBPACK": "true", 266 | "global.isAndroid": platform === 'android', 267 | "global.isIOS": platform === 'ios', 268 | "process": "global.process", 269 | }), 270 | // Remove all files from the out dir. 271 | new CleanWebpackPlugin({ 272 | cleanOnceBeforeBuildPatterns: itemsToClean, 273 | verbose: !!verbose 274 | }), 275 | // Copy assets 276 | new CopyWebpackPlugin({ 277 | patterns: [ 278 | { from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 279 | { from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 280 | { from: '**/*.jpg', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 281 | { from: '**/*.png', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 282 | ], 283 | }), 284 | new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), 285 | // For instructions on how to set up workers with webpack 286 | // check out https://github.com/nativescript/worker-loader 287 | new NativeScriptWorkerPlugin(), 288 | new nsWebpack.PlatformFSPlugin({ 289 | platform, 290 | platforms, 291 | }), 292 | // Does IPC communication with the {N} CLI to notify events when running in watch mode. 293 | new nsWebpack.WatchStateLoggerPlugin(), 294 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds 295 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement 296 | new ForkTsCheckerWebpackPlugin({ 297 | async: false, 298 | typescript: { 299 | configFile: tsConfigPath, 300 | memoryLimit: 4096, 301 | diagnosticOptions: { 302 | syntactic: true, 303 | semantic: true 304 | } 305 | } 306 | }) 307 | ], 308 | }; 309 | 310 | if (report) { 311 | // Generate report files for bundles content 312 | config.plugins.push(new BundleAnalyzerPlugin({ 313 | analyzerMode: "static", 314 | openAnalyzer: false, 315 | generateStatsFile: true, 316 | reportFilename: resolve(projectRoot, "report", `report.html`), 317 | statsFilename: resolve(projectRoot, "report", `stats.json`), 318 | })); 319 | } 320 | 321 | if (snapshot) { 322 | config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({ 323 | chunk: "vendor", 324 | requireModules: [ 325 | "@nativescript/core/bundle-entry-points", 326 | ], 327 | projectRoot, 328 | webpackConfig: config, 329 | snapshotInDocker, 330 | skipSnapshotTools, 331 | useLibs 332 | })); 333 | } 334 | 335 | if (hmr) { 336 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 337 | } 338 | 339 | return config; 340 | }; 341 | -------------------------------------------------------------------------------- /demo_angular/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.ts] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /demo_angular/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !webpack.config.js 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | 18 | # General 19 | .DS_Store 20 | .AppleDouble 21 | .LSOverride 22 | .idea 23 | .cloud 24 | .project 25 | tmp/ 26 | typings/ 27 | 28 | # Visual Studio Code 29 | .vscode/* 30 | !.vscode/settings.json 31 | !.vscode/tasks.json 32 | !.vscode/launch.json 33 | !.vscode/extensions.json 34 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | minSdkVersion 17 15 | generatedDensities = [] 16 | } 17 | aaptOptions { 18 | additionalParameters "--no-version-vectors" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 28 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "icon-20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "icon-20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "icon-29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "icon-29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "icon-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "icon-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "icon-83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "icon-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flore2003/nativescript-markdown-view/f9c38d23c752d1821adbed7dc59571061f87ed1d/demo_angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /demo_angular/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /demo_angular/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2015-2019 Progress Software Corporation 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /demo_angular/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "cli": { 6 | "defaultCollection": "@nativescript/schematics" 7 | }, 8 | "projects": { 9 | "hello-world": { 10 | "root": "", 11 | "sourceRoot": "src", 12 | "projectType": "application", 13 | "prefix": "ns" 14 | } 15 | }, 16 | "defaultProject": "hello-world" 17 | } 18 | -------------------------------------------------------------------------------- /demo_angular/nsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "appResourcesPath": "App_Resources", 3 | "appPath": "src" 4 | } 5 | -------------------------------------------------------------------------------- /demo_angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "nativescript": { 3 | "id": "org.nativescript.demoangular", 4 | "tns-android": { 5 | "version": "6.4.1" 6 | }, 7 | "tns-ios": { 8 | "version": "6.4.0" 9 | } 10 | }, 11 | "description": "NativeScript Application", 12 | "license": "SEE LICENSE IN ", 13 | "repository": "", 14 | "dependencies": { 15 | "@angular/animations": "~8.2.0", 16 | "@angular/common": "~8.2.0", 17 | "@angular/compiler": "~8.2.0", 18 | "@angular/core": "~8.2.0", 19 | "@angular/forms": "~8.2.0", 20 | "@angular/platform-browser": "~8.2.0", 21 | "@angular/platform-browser-dynamic": "~8.2.0", 22 | "@angular/router": "~8.2.0", 23 | "@nativescript/theme": "~2.3.0", 24 | "nativescript-angular": "~8.21.0", 25 | "nativescript-markdown-view": "file:../src", 26 | "reflect-metadata": "~0.1.12", 27 | "rxjs": "^6.4.0", 28 | "tns-core-modules": "~6.4.0", 29 | "zone.js": "~0.9.1" 30 | }, 31 | "devDependencies": { 32 | "@angular/compiler-cli": "~8.2.0", 33 | "@ngtools/webpack": "~8.2.0", 34 | "nativescript-dev-webpack": "~1.5.0", 35 | "typescript": "~3.5.3" 36 | }, 37 | "gitHead": "d8bdf0799a219051f28f8abd7c258d2bf2fce6e1", 38 | "readme": "NativeScript Application" 39 | } 40 | -------------------------------------------------------------------------------- /demo_angular/src/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | In many cases you may want to use the NativeScript core theme instead 9 | of writing your own CSS rules. You can learn more about the 10 | NativeScript core theme at https://github.com/nativescript/theme 11 | The imported CSS rules must precede all other types of rules. 12 | */ 13 | @import "~@nativescript/theme/css/core.css"; 14 | @import "~@nativescript/theme/css/default.css"; 15 | 16 | /* Place any CSS rules you want to apply on both iOS and Android here. 17 | This is where the vast majority of your CSS code goes. */ 18 | 19 | /* 20 | The following CSS rule changes the font size of all Buttons that have the 21 | "-primary" class modifier. 22 | */ 23 | Button.-primary { 24 | font-size: 18; 25 | } 26 | -------------------------------------------------------------------------------- /demo_angular/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { NativeScriptRouterModule } from "nativescript-angular/router"; 3 | import { Routes } from "@angular/router"; 4 | 5 | import { MarkdownComponent } from "./markdown/markdown.component"; 6 | 7 | const routes: Routes = [ 8 | { path: "", redirectTo: "/markdown", pathMatch: "full" }, 9 | { path: "markdown", component: MarkdownComponent} 10 | ]; 11 | 12 | @NgModule({ 13 | imports: [NativeScriptRouterModule.forRoot(routes)], 14 | exports: [NativeScriptRouterModule] 15 | }) 16 | export class AppRoutingModule { } 17 | -------------------------------------------------------------------------------- /demo_angular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /demo_angular/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | 3 | @Component({ 4 | selector: "ns-app", 5 | templateUrl: "./app.component.html" 6 | }) 7 | export class AppComponent { } 8 | -------------------------------------------------------------------------------- /demo_angular/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module"; 3 | 4 | import { AppRoutingModule } from "./app-routing.module"; 5 | import { AppComponent } from "./app.component"; 6 | import { MarkdownComponent } from "./markdown/markdown.component"; 7 | 8 | import { MarkdownViewModule } from "nativescript-markdown-view/angular"; 9 | 10 | // Uncomment and add to NgModule imports if you need to use two-way binding 11 | // import { NativeScriptFormsModule } from "nativescript-angular/forms"; 12 | 13 | // Uncomment and add to NgModule imports if you need to use the HttpClient wrapper 14 | // import { NativeScriptHttpClientModule } from "nativescript-angular/http-client"; 15 | 16 | @NgModule({ 17 | bootstrap: [ 18 | AppComponent 19 | ], 20 | imports: [ 21 | NativeScriptModule, 22 | AppRoutingModule, 23 | MarkdownViewModule 24 | ], 25 | declarations: [ 26 | AppComponent, 27 | MarkdownComponent 28 | ], 29 | providers: [], 30 | schemas: [ 31 | NO_ERRORS_SCHEMA 32 | ] 33 | }) 34 | /* 35 | Pass your application module to the bootstrapModule function located in main.ts to start your app 36 | */ 37 | export class AppModule { } 38 | -------------------------------------------------------------------------------- /demo_angular/src/app/markdown/markdown.component.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | 14 | 15 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /demo_angular/src/app/markdown/markdown.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from "@angular/core"; 2 | 3 | 4 | @Component({ 5 | selector: "markdown", 6 | templateUrl: "./markdown.component.html" 7 | }) 8 | export class MarkdownComponent implements OnInit { 9 | text = "This is a sample text"; 10 | headings = "# H1\n## H2\n### H3\n#### H4\n##### H5\n###### H6"; 11 | emphasis = "**bold** or __bold__\n*italic* or _italic_"; 12 | lists = "* First\n* Second\n1. Third\n4. Fourth"; 13 | link = "[Sample link](https://github.com/flore2003/nativescript-markdown-view)"; 14 | quote = "> Quote\n>> Quote"; 15 | code = "`private doSomething(): Something[]`"; 16 | 17 | constructor() { } 18 | 19 | ngOnInit(): void { 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /demo_angular/src/main.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform"; 3 | 4 | import { AppModule } from "./app/app.module"; 5 | 6 | // A traditional NativeScript application starts by initializing global objects, 7 | // setting up global CSS rules, creating, and navigating to the main page. 8 | // Angular applications need to take care of their own initialization: 9 | // modules, components, directives, routes, DI providers. 10 | // A NativeScript Angular app needs to make both paradigms work together, 11 | // so we provide a wrapper platform object, platformNativeScriptDynamic, 12 | // that sets up a NativeScript application and can bootstrap the Angular framework. 13 | platformNativeScriptDynamic().bootstrapModule(AppModule); 14 | -------------------------------------------------------------------------------- /demo_angular/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "main.js", 3 | "android": { 4 | "v8Flags": "--expose_gc", 5 | "markingMode": "none" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /demo_angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "noEmitHelpers": true, 8 | "noEmitOnError": true, 9 | "skipLibCheck": true, 10 | "lib": [ 11 | "es6", 12 | "dom", 13 | "es2015.iterable" 14 | ], 15 | "baseUrl": ".", 16 | "paths": { 17 | "~/*": [ 18 | "src/*" 19 | ], 20 | "*": [ 21 | "./node_modules/*" 22 | ] 23 | } 24 | }, 25 | "exclude": [ 26 | "node_modules", 27 | "platforms", 28 | "../src/node_modules" 29 | ], 30 | "include": [ 31 | "../src", 32 | "**/*" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /demo_angular/tsconfig.tns.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "module": "esNext", 5 | "moduleResolution": "node" 6 | } 7 | } -------------------------------------------------------------------------------- /demo_angular/tsfmt.json: -------------------------------------------------------------------------------- 1 | { 2 | "indentSize": 4, 3 | "tabSize": 4 4 | } 5 | -------------------------------------------------------------------------------- /demo_angular/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { join, relative, resolve, sep, dirname } = require("path"); 2 | 3 | const webpack = require("webpack"); 4 | const nsWebpack = require("nativescript-dev-webpack"); 5 | const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target"); 6 | const { nsReplaceBootstrap } = require("nativescript-dev-webpack/transformers/ns-replace-bootstrap"); 7 | const { nsReplaceLazyLoader } = require("nativescript-dev-webpack/transformers/ns-replace-lazy-loader"); 8 | const { nsSupportHmrNg } = require("nativescript-dev-webpack/transformers/ns-support-hmr-ng"); 9 | const { getMainModulePath } = require("nativescript-dev-webpack/utils/ast-utils"); 10 | const { getNoEmitOnErrorFromTSConfig, getCompilerOptionsFromTSConfig } = require("nativescript-dev-webpack/utils/tsconfig-utils"); 11 | const CleanWebpackPlugin = require("clean-webpack-plugin"); 12 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 13 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 14 | const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); 15 | const TerserPlugin = require("terser-webpack-plugin"); 16 | const { getAngularCompilerPlugin } = require("nativescript-dev-webpack/plugins/NativeScriptAngularCompilerPlugin"); 17 | const hashSalt = Date.now().toString(); 18 | 19 | module.exports = env => { 20 | // Add your custom Activities, Services and other Android app components here. 21 | const appComponents = env.appComponents || []; 22 | appComponents.push(...[ 23 | "tns-core-modules/ui/frame", 24 | "tns-core-modules/ui/frame/activity", 25 | ]); 26 | 27 | const platform = env && (env.android && "android" || env.ios && "ios" || env.platform); 28 | if (!platform) { 29 | throw new Error("You need to provide a target platform!"); 30 | } 31 | 32 | const AngularCompilerPlugin = getAngularCompilerPlugin(platform); 33 | const projectRoot = __dirname; 34 | 35 | // Default destination inside platforms//... 36 | const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); 37 | 38 | const { 39 | // The 'appPath' and 'appResourcesPath' values are fetched from 40 | // the nsconfig.json configuration file. 41 | appPath = "src", 42 | appResourcesPath = "App_Resources", 43 | 44 | // You can provide the following flags when running 'tns run android|ios' 45 | aot, // --env.aot 46 | snapshot, // --env.snapshot, 47 | production, // --env.production 48 | uglify, // --env.uglify 49 | report, // --env.report 50 | sourceMap, // --env.sourceMap 51 | hiddenSourceMap, // --env.hiddenSourceMap 52 | hmr, // --env.hmr, 53 | unitTesting, // --env.unitTesting 54 | verbose, // --env.verbose 55 | snapshotInDocker, // --env.snapshotInDocker 56 | skipSnapshotTools, // --env.skipSnapshotTools 57 | compileSnapshot // --env.compileSnapshot 58 | } = env; 59 | 60 | const useLibs = compileSnapshot; 61 | const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap; 62 | const externals = nsWebpack.getConvertedExternals(env.externals); 63 | const appFullPath = resolve(projectRoot, appPath); 64 | const tsConfigName = "tsconfig.tns.json"; 65 | const tsConfigPath = join(__dirname, tsConfigName); 66 | const hasRootLevelScopedModules = nsWebpack.hasRootLevelScopedModules({ projectDir: projectRoot }); 67 | const hasRootLevelScopedAngular = nsWebpack.hasRootLevelScopedAngular({ projectDir: projectRoot }); 68 | let coreModulesPackageName = "tns-core-modules"; 69 | const alias = env.alias || {}; 70 | alias['~'] = appFullPath; 71 | 72 | const compilerOptions = getCompilerOptionsFromTSConfig(tsConfigPath); 73 | if (hasRootLevelScopedModules) { 74 | coreModulesPackageName = "@nativescript/core"; 75 | alias["tns-core-modules"] = coreModulesPackageName; 76 | nsWebpack.processTsPathsForScopedModules({ compilerOptions }); 77 | } 78 | 79 | if (hasRootLevelScopedAngular) { 80 | alias["nativescript-angular"] = "@nativescript/angular"; 81 | nsWebpack.processTsPathsForScopedAngular({ compilerOptions }); 82 | } 83 | 84 | const appResourcesFullPath = resolve(projectRoot, appResourcesPath); 85 | const entryModule = `${nsWebpack.getEntryModule(appFullPath, platform)}.ts`; 86 | const entryPath = `.${sep}${entryModule}`; 87 | const entries = env.entries || {}; 88 | entries.bundle = entryPath; 89 | 90 | const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1); 91 | if (platform === "ios" && !areCoreModulesExternal) { 92 | entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules"; 93 | }; 94 | 95 | const ngCompilerTransformers = []; 96 | const additionalLazyModuleResources = []; 97 | if (aot) { 98 | ngCompilerTransformers.push(nsReplaceBootstrap); 99 | } 100 | 101 | if (hmr) { 102 | ngCompilerTransformers.push(nsSupportHmrNg); 103 | } 104 | 105 | // when "@angular/core" is external, it's not included in the bundles. In this way, it will be used 106 | // directly from node_modules and the Angular modules loader won't be able to resolve the lazy routes 107 | // fixes https://github.com/NativeScript/nativescript-cli/issues/4024 108 | if (env.externals && env.externals.indexOf("@angular/core") > -1) { 109 | const appModuleRelativePath = getMainModulePath(resolve(appFullPath, entryModule), tsConfigName); 110 | if (appModuleRelativePath) { 111 | const appModuleFolderPath = dirname(resolve(appFullPath, appModuleRelativePath)); 112 | // include the lazy loader inside app module 113 | ngCompilerTransformers.push(nsReplaceLazyLoader); 114 | // include the new lazy loader path in the allowed ones 115 | additionalLazyModuleResources.push(appModuleFolderPath); 116 | } 117 | } 118 | 119 | const ngCompilerPlugin = new AngularCompilerPlugin({ 120 | hostReplacementPaths: nsWebpack.getResolver([platform, "tns"]), 121 | platformTransformers: ngCompilerTransformers.map(t => t(() => ngCompilerPlugin, resolve(appFullPath, entryModule), projectRoot)), 122 | mainPath: join(appFullPath, entryModule), 123 | tsConfigPath, 124 | skipCodeGeneration: !aot, 125 | sourceMap: !!isAnySourceMapEnabled, 126 | additionalLazyModuleResources: additionalLazyModuleResources, 127 | compilerOptions: { paths: compilerOptions.paths } 128 | }); 129 | 130 | let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist); 131 | 132 | const itemsToClean = [`${dist}/**/*`]; 133 | if (platform === "android") { 134 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`); 135 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); 136 | } 137 | 138 | const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(join(projectRoot, tsConfigName)); 139 | 140 | nsWebpack.processAppComponents(appComponents, platform); 141 | const config = { 142 | mode: production ? "production" : "development", 143 | context: appFullPath, 144 | externals, 145 | watchOptions: { 146 | ignored: [ 147 | appResourcesFullPath, 148 | // Don't watch hidden files 149 | "**/.*", 150 | ] 151 | }, 152 | target: nativescriptTarget, 153 | entry: entries, 154 | output: { 155 | pathinfo: false, 156 | path: dist, 157 | sourceMapFilename, 158 | libraryTarget: "commonjs2", 159 | filename: "[name].js", 160 | globalObject: "global", 161 | hashSalt 162 | }, 163 | resolve: { 164 | extensions: [".ts", ".js", ".scss", ".css"], 165 | // Resolve {N} system modules from tns-core-modules 166 | modules: [ 167 | resolve(__dirname, `node_modules/${coreModulesPackageName}`), 168 | resolve(__dirname, "node_modules"), 169 | `node_modules/${coreModulesPackageName}`, 170 | "node_modules", 171 | ], 172 | alias, 173 | symlinks: true 174 | }, 175 | resolveLoader: { 176 | symlinks: false 177 | }, 178 | node: { 179 | // Disable node shims that conflict with NativeScript 180 | "http": false, 181 | "timers": false, 182 | "setImmediate": false, 183 | "fs": "empty", 184 | "__dirname": false, 185 | }, 186 | devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"), 187 | optimization: { 188 | runtimeChunk: "single", 189 | noEmitOnErrors: noEmitOnErrorFromTSConfig, 190 | splitChunks: { 191 | cacheGroups: { 192 | vendor: { 193 | name: "vendor", 194 | chunks: "all", 195 | test: (module, chunks) => { 196 | const moduleName = module.nameForCondition ? module.nameForCondition() : ''; 197 | return /[\\/]node_modules[\\/]/.test(moduleName) || 198 | appComponents.some(comp => comp === moduleName); 199 | }, 200 | enforce: true, 201 | }, 202 | } 203 | }, 204 | minimize: !!uglify, 205 | minimizer: [ 206 | new TerserPlugin({ 207 | parallel: true, 208 | cache: true, 209 | sourceMap: isAnySourceMapEnabled, 210 | terserOptions: { 211 | output: { 212 | comments: false, 213 | semicolons: !isAnySourceMapEnabled 214 | }, 215 | compress: { 216 | // The Android SBG has problems parsing the output 217 | // when these options are enabled 218 | 'collapse_vars': platform !== "android", 219 | sequences: platform !== "android", 220 | } 221 | } 222 | }) 223 | ], 224 | }, 225 | module: { 226 | rules: [ 227 | { 228 | include: join(appFullPath, entryPath), 229 | use: [ 230 | // Require all Android app components 231 | platform === "android" && { 232 | loader: "nativescript-dev-webpack/android-app-components-loader", 233 | options: { modules: appComponents } 234 | }, 235 | 236 | { 237 | loader: "nativescript-dev-webpack/bundle-config-loader", 238 | options: { 239 | angular: true, 240 | loadCss: !snapshot, // load the application css if in debug mode 241 | unitTesting, 242 | appFullPath, 243 | projectRoot, 244 | ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform) 245 | } 246 | }, 247 | ].filter(loader => !!loader) 248 | }, 249 | 250 | { test: /\.html$|\.xml$/, use: "raw-loader" }, 251 | 252 | { 253 | test: /[\/|\\]app\.css$/, 254 | use: [ 255 | "nativescript-dev-webpack/style-hot-loader", 256 | { 257 | loader: "nativescript-dev-webpack/css2json-loader", 258 | options: { useForImports: true } 259 | } 260 | ] 261 | }, 262 | { 263 | test: /[\/|\\]app\.scss$/, 264 | use: [ 265 | "nativescript-dev-webpack/style-hot-loader", 266 | { 267 | loader: "nativescript-dev-webpack/css2json-loader", 268 | options: { useForImports: true } 269 | }, 270 | "sass-loader" 271 | ] 272 | }, 273 | 274 | // Angular components reference css files and their imports using raw-loader 275 | { test: /\.css$/, exclude: /[\/|\\]app\.css$/, use: "raw-loader" }, 276 | { test: /\.scss$/, exclude: /[\/|\\]app\.scss$/, use: ["raw-loader", "resolve-url-loader", "sass-loader"] }, 277 | 278 | { 279 | test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, 280 | use: [ 281 | "nativescript-dev-webpack/moduleid-compat-loader", 282 | "nativescript-dev-webpack/lazy-ngmodule-hot-loader", 283 | "@ngtools/webpack", 284 | ] 285 | }, 286 | 287 | // Mark files inside `@angular/core` as using SystemJS style dynamic imports. 288 | // Removing this will cause deprecation warnings to appear. 289 | { 290 | test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/, 291 | parser: { system: true }, 292 | }, 293 | ], 294 | }, 295 | plugins: [ 296 | // Define useful constants like TNS_WEBPACK 297 | new webpack.DefinePlugin({ 298 | "global.TNS_WEBPACK": "true", 299 | "process": "global.process", 300 | }), 301 | // Remove all files from the out dir. 302 | new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }), 303 | // Copy assets to out dir. Add your own globs as needed. 304 | new CopyWebpackPlugin([ 305 | { from: { glob: "fonts/**" } }, 306 | { from: { glob: "**/*.jpg" } }, 307 | { from: { glob: "**/*.png" } }, 308 | ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }), 309 | new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), 310 | // For instructions on how to set up workers with webpack 311 | // check out https://github.com/nativescript/worker-loader 312 | new NativeScriptWorkerPlugin(), 313 | ngCompilerPlugin, 314 | // Does IPC communication with the {N} CLI to notify events when running in watch mode. 315 | new nsWebpack.WatchStateLoggerPlugin(), 316 | ], 317 | }; 318 | 319 | if (report) { 320 | // Generate report files for bundles content 321 | config.plugins.push(new BundleAnalyzerPlugin({ 322 | analyzerMode: "static", 323 | openAnalyzer: false, 324 | generateStatsFile: true, 325 | reportFilename: resolve(projectRoot, "report", `report.html`), 326 | statsFilename: resolve(projectRoot, "report", `stats.json`), 327 | })); 328 | } 329 | 330 | if (snapshot) { 331 | config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({ 332 | chunk: "vendor", 333 | angular: true, 334 | requireModules: [ 335 | "reflect-metadata", 336 | "@angular/platform-browser", 337 | "@angular/core", 338 | "@angular/common", 339 | "@angular/router", 340 | "nativescript-angular/platform-static", 341 | "nativescript-angular/router", 342 | ], 343 | projectRoot, 344 | webpackConfig: config, 345 | snapshotInDocker, 346 | skipSnapshotTools, 347 | useLibs 348 | })); 349 | } 350 | 351 | if (hmr) { 352 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 353 | } 354 | 355 | return config; 356 | }; 357 | -------------------------------------------------------------------------------- /publish/pack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCE_DIR=../src; 4 | TO_SOURCE_DIR=src; 5 | PACK_DIR=package; 6 | ROOT_DIR=..; 7 | PUBLISH=--publish 8 | 9 | install(){ 10 | npm i 11 | } 12 | 13 | pack() { 14 | 15 | echo 'Clearing /src and /package...' 16 | node_modules/.bin/rimraf "$TO_SOURCE_DIR" 17 | node_modules/.bin/rimraf "$PACK_DIR" 18 | 19 | # copy src 20 | echo 'Copying src...' 21 | node_modules/.bin/ncp "$SOURCE_DIR" "$TO_SOURCE_DIR" 22 | 23 | # copy README & LICENSE to src 24 | echo 'Copying README and LICENSE to /src...' 25 | node_modules/.bin/ncp "$ROOT_DIR"/LICENSE "$TO_SOURCE_DIR"/LICENSE 26 | node_modules/.bin/ncp "$ROOT_DIR"/README.md "$TO_SOURCE_DIR"/README.md 27 | 28 | # compile package and copy files required by npm 29 | echo 'Building /src...' 30 | cd "$TO_SOURCE_DIR" 31 | npm run build 32 | cd .. 33 | 34 | echo 'Creating package...' 35 | # create package dir 36 | mkdir "$PACK_DIR" 37 | 38 | # create the package 39 | cd "$PACK_DIR" 40 | npm pack ../"$TO_SOURCE_DIR" 41 | 42 | # delete source directory used to create the package 43 | cd .. 44 | node_modules/.bin/rimraf "$TO_SOURCE_DIR" 45 | } 46 | 47 | install && pack 48 | -------------------------------------------------------------------------------- /publish/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-publish", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "balanced-match": { 8 | "version": "1.0.0", 9 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 10 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 11 | "dev": true 12 | }, 13 | "brace-expansion": { 14 | "version": "1.1.11", 15 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 16 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 17 | "dev": true, 18 | "requires": { 19 | "balanced-match": "^1.0.0", 20 | "concat-map": "0.0.1" 21 | } 22 | }, 23 | "concat-map": { 24 | "version": "0.0.1", 25 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 26 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 27 | "dev": true 28 | }, 29 | "fs.realpath": { 30 | "version": "1.0.0", 31 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 32 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 33 | "dev": true 34 | }, 35 | "glob": { 36 | "version": "7.1.4", 37 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", 38 | "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", 39 | "dev": true, 40 | "requires": { 41 | "fs.realpath": "^1.0.0", 42 | "inflight": "^1.0.4", 43 | "inherits": "2", 44 | "minimatch": "^3.0.4", 45 | "once": "^1.3.0", 46 | "path-is-absolute": "^1.0.0" 47 | } 48 | }, 49 | "inflight": { 50 | "version": "1.0.6", 51 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 52 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 53 | "dev": true, 54 | "requires": { 55 | "once": "^1.3.0", 56 | "wrappy": "1" 57 | } 58 | }, 59 | "inherits": { 60 | "version": "2.0.3", 61 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 62 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 63 | "dev": true 64 | }, 65 | "minimatch": { 66 | "version": "3.0.4", 67 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 68 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 69 | "dev": true, 70 | "requires": { 71 | "brace-expansion": "^1.1.7" 72 | } 73 | }, 74 | "ncp": { 75 | "version": "2.0.0", 76 | "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", 77 | "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", 78 | "dev": true 79 | }, 80 | "once": { 81 | "version": "1.4.0", 82 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 83 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 84 | "dev": true, 85 | "requires": { 86 | "wrappy": "1" 87 | } 88 | }, 89 | "path-is-absolute": { 90 | "version": "1.0.1", 91 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 92 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 93 | "dev": true 94 | }, 95 | "rimraf": { 96 | "version": "2.6.3", 97 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", 98 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", 99 | "dev": true, 100 | "requires": { 101 | "glob": "^7.1.3" 102 | } 103 | }, 104 | "wrappy": { 105 | "version": "1.0.2", 106 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 107 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 108 | "dev": true 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /publish/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-publish", 3 | "version": "1.0.0", 4 | "description": "Publish helper", 5 | "devDependencies": { 6 | "ncp": "^2.0.0", 7 | "rimraf": "^2.5.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /publish/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCE_DIR=../src; 4 | TO_SOURCE_DIR=src; 5 | ROOT_DIR=..; 6 | 7 | install() { 8 | npm i 9 | } 10 | 11 | prepare() { 12 | 13 | echo 'Clearing /src and /package...' 14 | node_modules/.bin/rimraf "$TO_SOURCE_DIR" 15 | 16 | # copy src 17 | echo 'Copying src...' 18 | node_modules/.bin/ncp "$SOURCE_DIR" "$TO_SOURCE_DIR" 19 | 20 | # copy README & LICENSE to src 21 | echo 'Copying README and LICENSE to /src...' 22 | node_modules/.bin/ncp "$ROOT_DIR"/LICENSE "$TO_SOURCE_DIR"/LICENSE 23 | node_modules/.bin/ncp "$ROOT_DIR"/README.md "$TO_SOURCE_DIR"/README.md 24 | 25 | echo 'Installing dependencies in /src...' 26 | cd "$TO_SOURCE_DIR" 27 | npm i 28 | 29 | # compile package and copy files required by npm 30 | echo 'Building /src...' 31 | npm run build 32 | cd .. 33 | } 34 | 35 | install && prepare 36 | -------------------------------------------------------------------------------- /publish/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PACK_DIR=package; 4 | 5 | publish() { 6 | cd $PACK_DIR 7 | echo 'Publishing to npm...' 8 | npm publish *.tgz 9 | } 10 | 11 | ./pack.sh && publish -------------------------------------------------------------------------------- /src-angular/dist/index.d.ts: -------------------------------------------------------------------------------- 1 | export declare class MarkdownViewDirective { 2 | } 3 | export declare class MarkdownViewModule { 4 | } 5 | -------------------------------------------------------------------------------- /src-angular/dist/nativescript-markdown-view-angular.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated bundle index. Do not edit. 3 | */ 4 | export * from './index'; 5 | -------------------------------------------------------------------------------- /src-angular/dist/nativescript-markdown-view-angular.metadata.json: -------------------------------------------------------------------------------- 1 | {"__symbolic":"module","version":4,"metadata":{"MarkdownViewDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"MarkdownView"}]}],"members":{}},"MarkdownViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MarkdownViewDirective"}],"exports":[{"__symbolic":"reference","name":"MarkdownViewDirective"}]}]}],"members":{}}},"origins":{"MarkdownViewDirective":"./index","MarkdownViewModule":"./index"},"importAs":"nativescript-markdown-view-angular"} -------------------------------------------------------------------------------- /src-angular/dist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-markdown-view-angular", 3 | "main": "bundles/nativescript-markdown-view-angular.umd.js", 4 | "module": "fesm2015/nativescript-markdown-view-angular.js", 5 | "es2015": "fesm2015/nativescript-markdown-view-angular.js", 6 | "esm2015": "esm2015/nativescript-markdown-view-angular.js", 7 | "fesm2015": "fesm2015/nativescript-markdown-view-angular.js", 8 | "typings": "nativescript-markdown-view-angular.d.ts", 9 | "metadata": "nativescript-markdown-view-angular.metadata.json", 10 | "sideEffects": false, 11 | "dependencies": { 12 | "tslib": "^2.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src-angular/index.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, Directive } from '@angular/core'; 2 | import { registerElement } from '@nativescript/angular'; 3 | import { MarkdownView } from 'nativescript-markdown-view'; 4 | 5 | registerElement('MarkdownView', () => MarkdownView); 6 | 7 | @Directive({ 8 | selector: 'MarkdownView' 9 | }) 10 | export class MarkdownViewDirective { } 11 | 12 | @NgModule({ 13 | declarations: [MarkdownViewDirective], 14 | exports: [MarkdownViewDirective], 15 | }) 16 | export class MarkdownViewModule { } -------------------------------------------------------------------------------- /src-angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-markdown-view-angular", 3 | "ngPackage": { 4 | "lib": { 5 | "entryFile": "index.ts", 6 | "umdModuleIds": { 7 | "@nativescript/core": "ns-core", 8 | "@nativescript/angular": "ns-angular", 9 | "nativescript-markdown-view": "ns-ui-charts" 10 | } 11 | }, 12 | "whitelistedNonPeerDependencies": [ 13 | "." 14 | ] 15 | }, 16 | "scripts": { 17 | "build": "npm i && ng-packagr -p package.json && cd dist && cpy '**/*' '../../src/angular' --parents" 18 | }, 19 | "devDependencies": { 20 | "@angular/animations": "~10.0.0", 21 | "@angular/common": "~10.0.0", 22 | "@angular/compiler": "~10.0.0", 23 | "@angular/compiler-cli": "~10.0.0", 24 | "@angular/core": "~10.0.0", 25 | "@angular/forms": "~10.0.0", 26 | "@angular/platform-browser": "~10.0.0", 27 | "@angular/platform-browser-dynamic": "~10.0.0", 28 | "@angular/router": "~10.0.0", 29 | "@nativescript/angular": "~10.0.0", 30 | "@nativescript/core": "^7.0.0", 31 | "nativescript-markdown-view": "latest", 32 | "@nativescript/webpack": "~4.1.0", 33 | "cpy-cli": "~3.1.1", 34 | "ng-packagr": "~10.0.0", 35 | "rxjs": "^6.6.0", 36 | "typescript": "~3.9.0", 37 | "zone.js": "^0.10.3" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/.npmignore: -------------------------------------------------------------------------------- 1 | *.map 2 | *.ts 3 | !*.d.ts 4 | tsconfig.json 5 | scripts/* 6 | platforms/android/* 7 | !platforms/android/include.gradle 8 | !platforms/android/*.aar 9 | !platforms/android/*.jar -------------------------------------------------------------------------------- /src/angular/index.d.ts: -------------------------------------------------------------------------------- 1 | export declare class MarkdownViewDirective { 2 | } 3 | export declare class MarkdownViewModule { 4 | } 5 | -------------------------------------------------------------------------------- /src/angular/nativescript-markdown-view-angular.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated bundle index. Do not edit. 3 | */ 4 | export * from './index'; 5 | -------------------------------------------------------------------------------- /src/angular/nativescript-markdown-view-angular.metadata.json: -------------------------------------------------------------------------------- 1 | {"__symbolic":"module","version":4,"metadata":{"MarkdownViewDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"MarkdownView"}]}],"members":{}},"MarkdownViewModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MarkdownViewDirective"}],"exports":[{"__symbolic":"reference","name":"MarkdownViewDirective"}]}]}],"members":{}}},"origins":{"MarkdownViewDirective":"./index","MarkdownViewModule":"./index"},"importAs":"nativescript-markdown-view-angular"} -------------------------------------------------------------------------------- /src/angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-markdown-view-angular", 3 | "main": "bundles/nativescript-markdown-view-angular.umd.js", 4 | "module": "fesm2015/nativescript-markdown-view-angular.js", 5 | "es2015": "fesm2015/nativescript-markdown-view-angular.js", 6 | "esm2015": "esm2015/nativescript-markdown-view-angular.js", 7 | "fesm2015": "fesm2015/nativescript-markdown-view-angular.js", 8 | "typings": "nativescript-markdown-view-angular.d.ts", 9 | "metadata": "nativescript-markdown-view-angular.metadata.json", 10 | "sideEffects": false, 11 | "dependencies": { 12 | "tslib": "^2.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/index.d.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownViewBase } from './markdown-view.common'; 2 | export declare class MarkdownView extends MarkdownViewBase { 3 | // define your typings manually 4 | // or.. 5 | // take the ios or android .d.ts files and copy/paste them here 6 | } -------------------------------------------------------------------------------- /src/markdown-view.android.ts: -------------------------------------------------------------------------------- 1 | import {markdownProperty, MarkdownViewBase} from './markdown-view.common'; 2 | import InputType = android.text.InputType; 3 | import {fontSizeProperty} from '@nativescript/core/ui/styling/style-properties'; 4 | 5 | ​ 6 | declare var io: any; 7 | ​const md = io.noties.markwon; 8 | 9 | export class MarkdownView extends MarkdownViewBase { 10 | ​ 11 | _android: any = null; // android.widget.TextView 12 | ​ 13 | markwon: any; 14 | ​​ 15 | 16 | constructor() { 17 | super(); 18 | } 19 | 20 | ​ 21 | 22 | get android(): android.widget.TextView { 23 | return this._android; 24 | } 25 | 26 | public createNativeView() { 27 | const img = io.noties.markwon.image; 28 | this.markwon = md.Markwon.builder(this._context) 29 | .usePlugin(img.ImagesPlugin.create()) 30 | .build(); 31 | 32 | this._android = new android.widget.TextView(this._context); 33 | this._android.setInputType(InputType.TYPE_NULL); 34 | return this._android; 35 | } 36 | 37 | [fontSizeProperty.setNative](fontSize: number) { 38 | this._android.setTextSize(Number(fontSize)); 39 | } 40 | 41 | [markdownProperty.setNative](markdown: string) { 42 | this.markwon.setMarkdown(this.nativeView, markdown); 43 | } 44 | 45 | ​ 46 | } 47 | -------------------------------------------------------------------------------- /src/markdown-view.common.ts: -------------------------------------------------------------------------------- 1 | import { CSSType, Property } from '@nativescript/core/ui/core/view'; 2 | import { TextView } from '@nativescript/core/ui/text-view'; 3 | 4 | @CSSType('MarkdownView') 5 | export class MarkdownViewBase extends TextView { 6 | 7 | /** 8 | * Gets the native [android widget](http://developer.android.com/reference/android/widget/TextView.html) that represents the user interface for this component. Valid only when running on Android OS. 9 | */ 10 | android: any /* android.widget.TextView */; 11 | 12 | /** 13 | * Gets the native UITextView that represents the user interface for this component. Valid only when running on iOS. 14 | */ 15 | ios: any /* UITextView */; 16 | 17 | } 18 | 19 | export const markdownProperty = new Property({ 20 | name: "markdown", 21 | defaultValue: "", 22 | affectsLayout: true 23 | }); 24 | 25 | markdownProperty.register(MarkdownViewBase); 26 | -------------------------------------------------------------------------------- /src/markdown-view.ios.ts: -------------------------------------------------------------------------------- 1 | import { markdownProperty, MarkdownViewBase } from './markdown-view.common'; 2 | import { fontSizeProperty, colorProperty } from '@nativescript/core/ui/styling/style-properties'; 3 | import { Color } from '@nativescript/core'; 4 | 5 | export class MarkdownView extends MarkdownViewBase { 6 | 7 | _ios: UITextView; 8 | 9 | mdParser: TSMarkdownParser; 10 | 11 | _currentMarkdown: string; 12 | 13 | _fontSize: number; 14 | 15 | _color: UIColor; 16 | 17 | constructor() { 18 | super(); 19 | 20 | this.mdParser = TSMarkdownParser.standardParser(); 21 | } 22 | 23 | public createNativeView() { 24 | this._ios = super.createNativeView() as UITextView; 25 | this._ios.editable = false; 26 | this._ios.selectable = true; 27 | this._ios.scrollEnabled = false; 28 | return this._ios; 29 | } 30 | 31 | [fontSizeProperty.setNative](fontSize: number) { 32 | this._fontSize = fontSize; 33 | this._updateStyling(); 34 | } 35 | 36 | [colorProperty.setNative](value: Color | UIColor) { 37 | this._color = value instanceof Color ? value.ios : value; 38 | this._updateStyling(); 39 | } 40 | 41 | [markdownProperty.setNative](markdown: string) { 42 | this._currentMarkdown = markdown; 43 | this._updateMarkdown(); 44 | } 45 | 46 | private _updateMarkdown() { 47 | if (this._currentMarkdown) { 48 | this._ios.attributedText = this.mdParser.attributedStringFromMarkdown(this._currentMarkdown); 49 | } else { 50 | this._ios.text = ''; 51 | } 52 | } 53 | 54 | private _updateStyling() { 55 | const defaultAttributes = 56 | NSDictionary.dictionaryWithObjectsForKeys( 57 | [ 58 | UIFont.systemFontOfSize(this._fontSize), 59 | this._color 60 | ], [ 61 | NSFontAttributeName, 62 | NSForegroundColorAttributeName 63 | ]); 64 | const emphasisAttributes = 65 | NSDictionary.dictionaryWithObjectsForKeys([UIFont.italicSystemFontOfSize(this._fontSize)], [NSFontAttributeName]); 66 | const strongAttributes = 67 | NSDictionary.dictionaryWithObjectsForKeys([UIFont.boldSystemFontOfSize(this._fontSize)], [NSFontAttributeName]); 68 | 69 | this.mdParser.defaultAttributes = defaultAttributes; 70 | this.mdParser.emphasisAttributes = emphasisAttributes; 71 | this.mdParser.strongAttributes = strongAttributes; 72 | this._updateMarkdown(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-markdown-view", 3 | "version": "3.0.0", 4 | "description": "A NativeScript plugin that provides a natively rendered markdown view", 5 | "main": "markdown-view", 6 | "typings": "index.d.ts", 7 | "nativescript": { 8 | "platforms": { 9 | "android": "6.3.1", 10 | "ios": "6.3.0" 11 | } 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/flore2003/nativescript-markdown-view.git" 16 | }, 17 | "scripts": { 18 | "setup": "npm i && ts-patch install", 19 | "tsc": "tsc", 20 | "build": "npm run tsc && npm run build.angular && mv \"$(npm pack | tail -n 1)\" nativescript-markdown-view.tgz", 21 | "build.angular": "cd ../src-angular && npm run build", 22 | "postclone": "npm i && node scripts/postclone.js && cd ../demo && npm i && npx rimraf -- package-lock.json && cd ../src", 23 | "test.android": "npm run tsc && npm run tslint && cd ../demo && tns build android && tns test android --justlaunch", 24 | "test.ios": "npm run tsc && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch", 25 | "tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"", 26 | "plugin.tscwatch": "npm run tsc -- -w", 27 | "demo.ios": "npm run tsc && cd ../demo && tns run ios --emulator", 28 | "demo.android": "npm run tsc && cd ../demo && tns run android --emulator", 29 | "demo.reset": "cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json", 30 | "plugin.prepare": "npm run build && cd ../demo && tns plugin remove nativescript-markdown-view && tns plugin add ../src", 31 | "clean": "npm run demo.reset && npx rimraf -- node_modules package-lock.json && npm i", 32 | "ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**'" 33 | }, 34 | "keywords": [ 35 | "NativeScript", 36 | "JavaScript", 37 | "Android", 38 | "iOS" 39 | ], 40 | "author": { 41 | "name": "Florian Reifschneider", 42 | "email": "florian@rocketloop.de" 43 | }, 44 | "bugs": { 45 | "url": "https://github.com/flore2003/nativescript-markdown-view/issues" 46 | }, 47 | "license": "MIT", 48 | "homepage": "https://github.com/flore2003/nativescript-markdown-view", 49 | "readmeFilename": "README.md", 50 | "devDependencies": { 51 | "@angular/core": "^9.1.9", 52 | "@nativescript/core": "~7.0.0", 53 | "@nativescript/types": "~7.0.0", 54 | "@nativescript/webpack": "~3.0.0", 55 | "nativescript-angular": "^8.21.0", 56 | "ng-packagr": "^12.1.0", 57 | "prompt": "^1.0.0", 58 | "rimraf": "^2.6.3", 59 | "semver": "^5.6.0", 60 | "ts-node": "^10.0.0", 61 | "ts-patch": "^1.3.4", 62 | "tslint": "^5.12.1", 63 | "typescript": "~3.9.0" 64 | }, 65 | "dependencies": {}, 66 | "bootstrapper": "nativescript-plugin-seed" 67 | } 68 | -------------------------------------------------------------------------------- /src/platforms/android/include.gradle: -------------------------------------------------------------------------------- 1 | /* Include.gradle configuration: http://docs.nativescript.org/plugins/plugins#includegradle-specification */ 2 | 3 | android { 4 | 5 | } 6 | 7 | dependencies { 8 | final def markwonVersion = '4.5.1' 9 | implementation "io.noties.markwon:core:$markwonVersion" 10 | implementation "io.noties.markwon:image:$markwonVersion" 11 | } 12 | -------------------------------------------------------------------------------- /src/platforms/ios/Podfile: -------------------------------------------------------------------------------- 1 | 2 | post_install do |installer| 3 | installer.pods_project.targets.each do |target| 4 | target.build_configurations.each do |config| 5 | config.build_settings['SWIFT_SWIFT3_OBJC_INFERENCE'] = 'On' 6 | end 7 | end 8 | end 9 | 10 | pod 'TSMarkdownParser' 11 | -------------------------------------------------------------------------------- /src/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "declaration": true, 7 | "removeComments": true, 8 | "noLib": false, 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "skipLibCheck": true, 12 | "lib": ["es6", "dom"], 13 | "sourceMap": true, 14 | "pretty": true, 15 | "allowUnreachableCode": false, 16 | "allowUnusedLabels": false, 17 | "noEmitHelpers": true, 18 | "noEmitOnError": false, 19 | "noImplicitAny": false, 20 | "noImplicitReturns": true, 21 | "noImplicitUseStrict": false, 22 | "noFallthroughCasesInSwitch": true, 23 | "plugins": [{ 24 | "transform": "@nativescript/webpack/transformers/ns-transform-native-classes", 25 | "type": "raw" 26 | }] 27 | }, 28 | "exclude": [ 29 | "node_modules" 30 | ], 31 | "compileOnSave": false 32 | } 33 | -------------------------------------------------------------------------------- /src/typings/TSMarkdownParser.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare class TSBaseParser extends NSObject { 3 | 4 | static alloc(): TSBaseParser; // inherited from NSObject 5 | 6 | static new(): TSBaseParser; // inherited from NSObject 7 | 8 | defaultAttributes: NSDictionary; 9 | 10 | addParsingRuleWithRegularExpressionBlock(regularExpression: NSRegularExpression, block: (p1: NSTextCheckingResult, p2: NSMutableAttributedString) => void): void; 11 | 12 | attributedStringFromAttributedMarkdownString(attributedString: NSAttributedString): NSAttributedString; 13 | 14 | attributedStringFromMarkdown(markdown: string): NSAttributedString; 15 | 16 | attributedStringFromMarkdownAttributes(markdown: string, attributes: NSDictionary): NSAttributedString; 17 | } 18 | 19 | declare class TSMarkdownParser extends TSBaseParser { 20 | 21 | static alloc(): TSMarkdownParser; // inherited from NSObject 22 | 23 | static new(): TSMarkdownParser; // inherited from NSObject 24 | 25 | static standardParser(): TSMarkdownParser; 26 | 27 | emphasisAttributes: NSDictionary; 28 | 29 | headerAttributes: NSArray>; 30 | 31 | imageAttributes: NSDictionary; 32 | 33 | linkAttributes: NSDictionary; 34 | 35 | listAttributes: NSArray>; 36 | 37 | monospaceAttributes: NSDictionary; 38 | 39 | quoteAttributes: NSArray>; 40 | 41 | skipLinkAttribute: boolean; 42 | 43 | strongAttributes: NSDictionary; 44 | 45 | addCodeEscapingParsing(): void; 46 | 47 | addCodeUnescapingParsingWithFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange) => void): void; 48 | 49 | addEmphasisParsingWithFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange) => void): void; 50 | 51 | addEscapingParsing(): void; 52 | 53 | addHeaderParsingWithMaxLevelLeadFormattingBlockTextFormattingBlock(maxLevel: number, leadFormattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void, formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void): void; 54 | 55 | addImageParsingWithImageFormattingBlockAlternativeTextFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange) => void, alternativeFormattingBlock: (p1: NSMutableAttributedString, p2: NSRange) => void): void; 56 | 57 | addImageParsingWithLinkFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: string) => void): void; 58 | 59 | addLinkDetectionWithFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange) => void): void; 60 | 61 | addLinkDetectionWithLinkFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: string) => void): void; 62 | 63 | addLinkParsingWithFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange) => void): void; 64 | 65 | addLinkParsingWithLinkFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: string) => void): void; 66 | 67 | addListParsingWithMaxLevelLeadFormattingBlockTextFormattingBlock(maxLevel: number, leadFormattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void, formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void): void; 68 | 69 | addMonospacedParsingWithFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange) => void): void; 70 | 71 | addQuoteParsingWithMaxLevelLeadFormattingBlockTextFormattingBlock(maxLevel: number, leadFormattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void, formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void): void; 72 | 73 | addShortHeaderParsingWithMaxLevelLeadFormattingBlockTextFormattingBlock(maxLevel: number, leadFormattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void, formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void): void; 74 | 75 | addShortListParsingWithMaxLevelLeadFormattingBlockTextFormattingBlock(maxLevel: number, leadFormattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void, formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void): void; 76 | 77 | addShortQuoteParsingWithMaxLevelLeadFormattingBlockTextFormattingBlock(maxLevel: number, leadFormattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void, formattingBlock: (p1: NSMutableAttributedString, p2: NSRange, p3: number) => void): void; 78 | 79 | addStrongParsingWithFormattingBlock(formattingBlock: (p1: NSMutableAttributedString, p2: NSRange) => void): void; 80 | 81 | addUnescapingParsing(): void; 82 | } 83 | 84 | declare var TSMarkdownParserVersionNumber: number; 85 | 86 | declare var TSMarkdownParserVersionString: interop.Reference; 87 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "class-name": true, 4 | "comment-format": [ 5 | true, 6 | "check-space" 7 | ], 8 | "indent": [ 9 | true, 10 | "spaces" 11 | ], 12 | "no-duplicate-variable": true, 13 | "no-eval": true, 14 | "no-internal-module": true, 15 | "no-trailing-whitespace": true, 16 | "no-var-keyword": true, 17 | "one-line": [ 18 | true, 19 | "check-open-brace", 20 | "check-whitespace" 21 | ], 22 | "quotemark": [ 23 | false, 24 | "double" 25 | ], 26 | "semicolon": [ 27 | true, 28 | "always" 29 | ], 30 | "triple-equals": [ 31 | true, 32 | "allow-null-check" 33 | ], 34 | "typedef-whitespace": [ 35 | true, 36 | { 37 | "call-signature": "nospace", 38 | "index-signature": "nospace", 39 | "parameter": "nospace", 40 | "property-declaration": "nospace", 41 | "variable-declaration": "nospace" 42 | } 43 | ], 44 | "variable-name": [ 45 | true, 46 | "ban-keywords" 47 | ], 48 | "whitespace": [ 49 | true, 50 | "check-branch", 51 | "check-decl", 52 | "check-operator", 53 | "check-separator", 54 | "check-type" 55 | ] 56 | } 57 | } --------------------------------------------------------------------------------