Skip to content

Commit 5c01fef

Browse files
committed
chore: migration to community svelte-native
1 parent 57d663e commit 5c01fef

Some content is hidden

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

41 files changed

+155
-123
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ yarn-error.log*
4343
.gradle
4444
.env*
4545
!.env.ci
46-
.yarn
46+
.yarn/install-state.gz
4747
tmp/
4848
._.DS_Store
4949

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/dist/src/index.js b/dist/src/index.js
2+
index c1fec75564269073307b822427aec9565de396f4..907e8b76896721993469570fc3486cd1e5bb6959 100644
3+
--- a/dist/src/index.js
4+
+++ b/dist/src/index.js
5+
@@ -108096,7 +108096,7 @@ async function createLanguageService(tsconfigPath, workspacePath, docContext) {
6+
if (!compilerOptions.jsxFactory || !compilerOptions.jsxFactory.startsWith('svelte')) {
7+
if (workspacePath) {
8+
try {
9+
- const svelteNativePkgInfo = (0, importPackage_1$3.getPackageInfo)('svelte-native', workspacePath);
10+
+ const svelteNativePkgInfo = (0, importPackage_1$3.getPackageInfo)('@nativescript-community/svelte-native', workspacePath) || (0, importPackage_1$3.getPackageInfo)('svelte-native', workspacePath);
11+
if (svelteNativePkgInfo.path) {
12+
parsedConfig.raw.svelteOptions = parsedConfig.raw.svelteOptions || {};
13+
parsedConfig.raw.svelteOptions.namespace = 'svelteNative.JSX';

app.webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ module.exports = (env, params = {}) => {
193193
}
194194
Object.assign(config.resolve.alias, {
195195
'@shared': resolve(__dirname, 'tools/app'),
196+
'svelte-native': '@nativescript-community/svelte-native',
196197
'kiss-orm': '@akylas/kiss-orm'
197198
});
198199
let appVersion;

app/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { Application, ApplicationSettings, Frame, NavigatedData, Page, Trace } f
1515
import { startSentry } from '@shared/utils/sentry';
1616
import { showError } from '@shared/utils/showError';
1717
import { CropView } from 'plugin-nativeprocessor/CropView';
18-
import { FrameElement, PageElement, createElement, navigate, registerElement, registerNativeViewElement } from 'svelte-native/dom';
18+
import { FrameElement, PageElement, createElement, navigate, registerElement, registerNativeViewElement } from '@nativescript-community/svelte-native/dom';
1919
import { NestedScrollView } from '@shared/components/NestedScrollView';
2020
import { getCurrentISO3Language, lc } from '~/helpers/locale';
2121
import { start as startThemeHelper } from '~/helpers/theme';

app/components/FullScreenImageViewer.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import { Pager } from '@nativescript-community/ui-pager';
33
import { Application, OrientationChangedEventData } from '@nativescript/core';
44
import { onDestroy, onMount } from 'svelte';
5-
import { Template } from 'svelte-native/components';
6-
import { NativeViewElementNode } from 'svelte-native/dom';
5+
import { Template } from '@nativescript-community/svelte-native/components';
6+
import { NativeViewElementNode } from '@nativescript-community/svelte-native/dom';
77
import CActionBar from '~/components/common/CActionBar.svelte';
88
import RotableImageView from '~/components/common/RotableImageView.svelte';
99
import { isEInk } from '~/helpers/theme';

app/components/ModalImportImages.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import { Pager } from '@nativescript-community/ui-pager';
33
import { AndroidActivityBackPressedEventData, Application, GridLayout, Page } from '@nativescript/core';
44
import { onDestroy, onMount } from 'svelte';
5-
import { closeModal } from 'svelte-native';
6-
import { Template } from 'svelte-native/components';
7-
import { NativeViewElementNode } from 'svelte-native/dom';
5+
import { closeModal } from '@nativescript-community/svelte-native';
6+
import { Template } from '@nativescript-community/svelte-native/components';
7+
import { NativeViewElementNode } from '@nativescript-community/svelte-native/dom';
88
import CActionBar from '~/components/common/CActionBar.svelte';
99
import CropView from '~/components/common/CropView.svelte';
1010
import { lc } from '~/helpers/locale';

app/components/camera/Camera.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import { createAutoScanHandler, createQRCodeCallback } from 'plugin-nativeprocessor';
1313
import { CropView } from 'plugin-nativeprocessor/CropView';
1414
import { onDestroy, onMount } from 'svelte';
15-
import { closeModal } from 'svelte-native';
16-
import { NativeViewElementNode } from 'svelte-native/dom';
15+
import { closeModal } from '@nativescript-community/svelte-native';
16+
import { NativeViewElementNode } from '@nativescript-community/svelte-native/dom';
1717
import { get, writable } from 'svelte/store';
1818
import CActionBar from '~/components/common/CActionBar.svelte';
1919
import IconButton from '~/components/common/IconButton.svelte';

app/components/common/CropView.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { debounce } from '@nativescript/core/utils';
55
import { QRCodeData, QuadPoint, Quads } from 'plugin-nativeprocessor';
66
import { onDestroy } from 'svelte';
7-
import { NativeViewElementNode } from 'svelte-native/dom';
7+
import { NativeViewElementNode } from '@nativescript-community/svelte-native/dom';
88
import { MAGNIFIER_SENSITIVITY, SETTINGS_MAGNIFIER_SENSITIVITY } from '~/utils/constants';
99
import { loadImage, recycleImages } from '~/utils/images';
1010
import { showError } from '@shared/utils/showError';

app/components/common/EditNameActionBar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { NativeViewElementNode } from 'svelte-native/dom';
2+
import { NativeViewElementNode } from '@nativescript-community/svelte-native/dom';
33
import CActionBar from './CActionBar.svelte';
44
import { TextField } from '@nativescript-community/ui-material-textfield';
55
import { DocFolder, OCRDocument } from '~/models/OCRDocument';

app/components/common/IconButton.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script context="module" lang="ts">
22
import { Align, Canvas, CanvasView, LayoutAlignment, Paint, StaticLayout } from '@nativescript-community/ui-canvas';
3-
import { NativeViewElementNode } from 'svelte-native/dom';
3+
import { NativeViewElementNode } from '@nativescript-community/svelte-native/dom';
44
import { conditionalEvent } from '@shared/utils/svelte/ui';
55
import { showToolTip } from '~/utils/ui';
66
import { actionBarButtonHeight, colors, fonts } from '~/variables';

0 commit comments

Comments
 (0)