@lowdefy/shell 3.23.3 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +183 -183
- package/README.md +364 -2
- package/app/(t0,t1,t2,t3,t4)/[...path].js +38 -0
- package/app/(t0,t1,t2,t3,t4)/_layout.js +48 -0
- package/app/(t0,t1,t2,t3,t4)/index.js +38 -0
- package/app/+native-intent.js +39 -0
- package/app/_layout.js +36 -0
- package/app.config.ts +183 -0
- package/appLinks.js +65 -0
- package/applyShellPlugins.js +43 -0
- package/authCallbackIntentFilters.js +46 -0
- package/babel.config.js +25 -0
- package/checkShellConfig.js +172 -0
- package/checkShellPlugins.js +74 -0
- package/getPrivacyManifest.js +39 -0
- package/metro.config.js +73 -0
- package/native/LowdefyAppShortcuts.swift.template +84 -0
- package/native/withAppShortcuts.js +60 -0
- package/native-fingerprint.json +16 -0
- package/package.json +120 -40
- package/profiles.js +607 -0
- package/readShellConfig.js +36 -0
- package/resolveShellPlugins.js +109 -0
- package/runtimeVersion.js +112 -0
- package/scripts/checkReleaseBundle.mjs +358 -0
- package/scripts/createDayjsLocales.mjs +67 -0
- package/scripts/createShellAssets.mjs +54 -0
- package/scripts/createShellVersion.mjs +83 -0
- package/scripts/createTypeManifest.mjs +205 -0
- package/shell.dev.json +11 -0
- package/shellVariant.js +126 -0
- package/src/ShellContext.js +32 -0
- package/src/actions/CopyToClipboard.js +29 -0
- package/src/actions/CopyToClipboard.test.js +33 -0
- package/src/actions/GeolocationCurrentPosition.js +61 -0
- package/src/actions/GeolocationCurrentPosition.test.js +79 -0
- package/src/actions/GetLocalStorage.js +36 -0
- package/src/actions/RemoveLocalStorage.js +31 -0
- package/src/actions/ScrollTo.js +66 -0
- package/src/actions/ScrollTo.test.js +83 -0
- package/src/actions/SetFocus.js +33 -0
- package/src/actions/SetFocus.test.js +49 -0
- package/src/actions/SetLocalStorage.js +34 -0
- package/src/actions/localStorage.test.js +68 -0
- package/src/actions/measureInScrollView.js +36 -0
- package/src/actions/nativeActions.js +41 -0
- package/src/auth/AuthButton.js +44 -0
- package/src/auth/AuthGate.js +57 -0
- package/src/auth/AuthLink.js +43 -0
- package/src/auth/LockScreen.js +67 -0
- package/src/auth/LockScreen.test.js +37 -0
- package/src/auth/SignInScreen.js +268 -0
- package/src/auth/SignInScreen.test.js +187 -0
- package/src/auth/createAppAuth.js +325 -0
- package/src/auth/createAppAuth.test.js +424 -0
- package/src/auth/createAuthApi.js +115 -0
- package/src/auth/createAuthApi.test.js +138 -0
- package/src/auth/createCoreAuth.js +96 -0
- package/src/auth/createCoreAuth.test.js +188 -0
- package/src/auth/createDeviceKey.js +62 -0
- package/src/auth/createDeviceKey.test.js +54 -0
- package/src/auth/createSessionStores.js +45 -0
- package/src/auth/createTokenStore.js +103 -0
- package/src/auth/createTokenStore.test.js +116 -0
- package/src/auth/getAuthSettings.js +24 -0
- package/src/auth/getAuthView.js +39 -0
- package/src/auth/getAuthView.test.js +52 -0
- package/src/auth/getSheetReturnUrl.js +35 -0
- package/src/auth/getTokenStoreOptions.js +46 -0
- package/src/auth/isBackgroundShell.js +26 -0
- package/src/auth/isSheetReturnLink.js +35 -0
- package/src/auth/parseQuery.js +39 -0
- package/src/auth/purgeAppData.js +80 -0
- package/src/auth/purgeAppData.test.js +104 -0
- package/src/auth/shouldLock.js +26 -0
- package/src/auth/signInWithSheet.js +97 -0
- package/src/auth/signInWithSheet.test.js +205 -0
- package/src/auth/styles.js +78 -0
- package/src/auth/unregisterPushToken.js +62 -0
- package/src/auth/unregisterPushToken.test.js +67 -0
- package/src/auth/usesBiometricUnlock.js +23 -0
- package/src/auth/watchSession.js +47 -0
- package/src/auth/withoutCookies.js +26 -0
- package/src/cache/createSqliteCacheStore.js +113 -0
- package/src/cache/createSqliteCacheStore.test.js +93 -0
- package/src/cache/getCacheKey.js +25 -0
- package/src/cache/getLastCacheKeyName.js +22 -0
- package/src/components/AppProvider.js +118 -0
- package/src/components/Frame.js +116 -0
- package/src/components/Frame.test.js +101 -0
- package/src/components/LoadingScreen.js +35 -0
- package/src/components/MenuButton.js +121 -0
- package/src/components/MenuButton.test.js +74 -0
- package/src/components/MessageScreen.js +51 -0
- package/src/components/NavigationTheme.js +33 -0
- package/src/components/NoConnectionBanner.js +51 -0
- package/src/components/NoConnectionBanner.test.js +73 -0
- package/src/components/OtherPageScreen.js +95 -0
- package/src/components/OtherPageScreen.test.js +74 -0
- package/src/components/PageScreen.js +254 -0
- package/src/components/PageScreen.test.js +492 -0
- package/src/components/RouteErrorScreen.js +47 -0
- package/src/components/ShellRoot.js +34 -0
- package/src/components/ShellRoot.test.js +62 -0
- package/src/components/ShellThemeProvider.js +45 -0
- package/src/components/SwitchToTab.js +36 -0
- package/src/components/SwitchToTab.test.js +63 -0
- package/src/components/TabIconImages.js +72 -0
- package/src/components/UpdateScreen.js +40 -0
- package/src/components/getNavigationTheme.js +44 -0
- package/src/components/getNavigationTheme.test.js +41 -0
- package/src/components/styles.js +50 -0
- package/src/components/useSurfaceTokens.js +47 -0
- package/src/config/getAppApiBase.js +34 -0
- package/src/config/getShellConfig.js +37 -0
- package/src/config/getShellConfig.test.js +80 -0
- package/src/createShellApp.js +126 -0
- package/src/dev/DevShell.js +239 -0
- package/src/dev/DevShell.test.js +233 -0
- package/src/dev/connect/ConfirmSheet.js +71 -0
- package/src/dev/connect/ConnectScreen.js +117 -0
- package/src/dev/connect/QrScanner.js +89 -0
- package/src/dev/connection/createDevShellConfig.js +47 -0
- package/src/dev/connection/createDevTransport.js +51 -0
- package/src/dev/connection/createDevTransport.test.js +87 -0
- package/src/dev/connection/createServerList.js +48 -0
- package/src/dev/connection/isLoopbackHost.js +25 -0
- package/src/dev/connection/pairedShellApp.test.js +104 -0
- package/src/dev/connection/parseDevLink.js +66 -0
- package/src/dev/connection/parseDevLink.test.js +97 -0
- package/src/dev/connection/parseQuery.js +33 -0
- package/src/dev/connection/parseServerInput.js +40 -0
- package/src/dev/connection/parseServerUrl.js +45 -0
- package/src/dev/devStyles.js +97 -0
- package/src/dev/index.js +21 -0
- package/src/dev/inject/createDeviceInjections.js +188 -0
- package/src/dev/inject/createDeviceInjections.test.js +224 -0
- package/src/dev/inject/createOfflineFetch.js +35 -0
- package/src/dev/inject/createOfflineFetch.test.js +68 -0
- package/src/dev/inject/injectPush.js +60 -0
- package/src/dev/inject/injectShare.js +55 -0
- package/src/dev/inject/withInjectedDevice.js +98 -0
- package/src/dev/menu/BlockGallery.js +33 -0
- package/src/dev/menu/DevMenu.js +121 -0
- package/src/dev/menu/createLogBuffer.js +83 -0
- package/src/dev/menu/watchShake.js +52 -0
- package/src/dev/menu/watchShake.test.js +61 -0
- package/src/dev/recorder/createNativeRecorder.js +204 -0
- package/src/dev/recorder/createNativeRecorder.test.js +307 -0
- package/src/dev/redirectDevLink.js +30 -0
- package/src/dev/redirectDevLink.test.js +49 -0
- package/src/dev/steps/createStepRunner.js +184 -0
- package/src/dev/steps/createStepRunner.test.js +262 -0
- package/src/dev/steps/findBlock.js +78 -0
- package/src/dev/steps/isContextSettled.js +37 -0
- package/src/dev/steps/waitForSettle.js +39 -0
- package/src/dev/steps/waitUntil.js +40 -0
- package/src/dev/tab/DevTabClient.js +97 -0
- package/src/dev/tab/answerEval.js +39 -0
- package/src/dev/tab/answerInspect.js +45 -0
- package/src/dev/tab/createDevTabClient.js +272 -0
- package/src/dev/tab/createDevTabClient.test.js +317 -0
- package/src/dev/tab/describeTabError.js +35 -0
- package/src/dev/tab/devClientMarker.js +22 -0
- package/src/dev/tab/devClientMarker.test.js +23 -0
- package/src/dev/tab/findPageContext.js +43 -0
- package/src/dev/tab/getShownPage.js +42 -0
- package/src/dev/tab/readEventStream.js +68 -0
- package/src/dev/tab/reloadApp.js +42 -0
- package/src/dev/tab/reloadApp.test.js +115 -0
- package/src/device/DeviceHosts.js +32 -0
- package/src/device/basic/createFilesFeature.js +41 -0
- package/src/device/basic/createHapticsFeature.js +46 -0
- package/src/device/basic/createKeepAwakeFeature.js +37 -0
- package/src/device/basic/createPhotosFeature.js +40 -0
- package/src/device/basic/createRequestQueueFeature.js +37 -0
- package/src/device/basic/createShareFeature.js +63 -0
- package/src/device/basic/createShareFeature.test.js +47 -0
- package/src/device/basic/createSpeechFeature.js +43 -0
- package/src/device/basic/createUploadFeature.js +41 -0
- package/src/device/basic/toImagePickerOptions.js +41 -0
- package/src/device/basic/toPickedFile.js +54 -0
- package/src/device/calendar/index.js +68 -0
- package/src/device/contacts/index.js +67 -0
- package/src/device/createDevice.js +65 -0
- package/src/device/device.js +27 -0
- package/src/device/field/MapView.js +93 -0
- package/src/device/field/ScanCodeSheet.js +86 -0
- package/src/device/field/ScannerView.js +52 -0
- package/src/device/field/createAudioFeature.js +70 -0
- package/src/device/field/createBrightnessFeature.js +40 -0
- package/src/device/field/createCameraFeature.js +56 -0
- package/src/device/field/createDocumentScannerFeature.js +51 -0
- package/src/device/field/createLocationFeature.js +39 -0
- package/src/device/field/createScanRequests.js +55 -0
- package/src/device/field/index.js +39 -0
- package/src/device/field/scanRequests.js +22 -0
- package/src/device/injected.js +60 -0
- package/src/device/injected.test.js +39 -0
- package/src/device/nfc/index.js +89 -0
- package/src/device/nfc/toNfcRecord.js +44 -0
- package/src/device/nfc/toNfcRecord.test.js +48 -0
- package/src/device/tracking/createBacklog.js +63 -0
- package/src/device/tracking/createBacklog.test.js +47 -0
- package/src/device/tracking/index.js +211 -0
- package/src/device/tracking/index.test.js +110 -0
- package/src/host/createDeviceStore.js +32 -0
- package/src/host/createMemoryStore.js +32 -0
- package/src/host/createNetworkStatus.js +94 -0
- package/src/host/createNetworkStatus.test.js +94 -0
- package/src/host/createRouterAdapter.js +33 -0
- package/src/host/createShellFetch.js +62 -0
- package/src/host/createShellFetch.test.js +165 -0
- package/src/host/createShellGlobals.js +62 -0
- package/src/host/createShellHost.js +83 -0
- package/src/host/createShellHost.test.js +36 -0
- package/src/host/getOrigin.js +31 -0
- package/src/host/isNetworkError.js +24 -0
- package/src/host/isOnline.js +22 -0
- package/src/host/networkStatus.js +24 -0
- package/src/host/readServerError.js +45 -0
- package/src/host/readServerError.test.js +85 -0
- package/src/host/reportShellError.js +47 -0
- package/src/host/reportShellError.test.js +79 -0
- package/src/host/withNetworkErrors.js +38 -0
- package/src/host/withNetworkErrors.test.js +61 -0
- package/src/host/withShellHeader.js +25 -0
- package/src/host/withShellHeader.test.js +28 -0
- package/src/js/evaluateJsEntries.js +43 -0
- package/src/js/evaluateJsEntries.test.js +48 -0
- package/src/locale/createShellLocale.js +112 -0
- package/src/locale/createShellLocale.test.js +74 -0
- package/src/locale/dayjsLocales.js +165 -0
- package/src/locale/getDeviceLocales.js +23 -0
- package/src/locale/loadDayjsLocale.js +32 -0
- package/src/locale/resolveActiveLocale.js +46 -0
- package/src/locale/resolveActiveLocale.test.js +40 -0
- package/src/native/backgroundFetch.js +97 -0
- package/src/native/callEndpoint.js +63 -0
- package/src/native/createAppEventTrigger.js +70 -0
- package/src/native/currentApp.js +49 -0
- package/src/native/getPagePath.js +32 -0
- package/src/native/openPath.js +55 -0
- package/src/native/openPath.test.js +39 -0
- package/src/native/parseShellLink.js +38 -0
- package/src/native/parseShellLink.test.js +29 -0
- package/src/native/startAppServices.js +94 -0
- package/src/native/startAppServices.test.js +97 -0
- package/src/native/startShareIn.js +59 -0
- package/src/native/startShortcuts.js +88 -0
- package/src/native/startShortcuts.test.js +59 -0
- package/src/native/toSharePayload.js +47 -0
- package/src/native/toSharePayload.test.js +47 -0
- package/src/native/whenAppReady.js +48 -0
- package/src/navigation/SlotContext.js +24 -0
- package/src/navigation/frameSlots.js +27 -0
- package/src/navigation/getFrame.js +30 -0
- package/src/navigation/getInitialScreenOptions.js +63 -0
- package/src/navigation/getInitialScreenOptions.test.js +66 -0
- package/src/navigation/getPresentation.js +28 -0
- package/src/navigation/getSlotRootPath.js +27 -0
- package/src/navigation/getStackOptions.js +185 -0
- package/src/navigation/getTabHref.js +45 -0
- package/src/navigation/getTabIcons.js +43 -0
- package/src/navigation/isPageUnderHeader.js +46 -0
- package/src/navigation/navigation.test.js +342 -0
- package/src/navigation/toAppLinkPath.js +43 -0
- package/src/navigation/toAppLinkPath.test.js +53 -0
- package/src/navigation/toRouterHref.js +29 -0
- package/src/notifications/createNotificationsFeature.js +61 -0
- package/src/notifications/getCategoryAction.js +31 -0
- package/src/notifications/handleNotificationResponse.js +82 -0
- package/src/notifications/registerPushToken.js +71 -0
- package/src/notifications/startNotifications.js +114 -0
- package/src/notifications/toCategoryActions.js +42 -0
- package/src/notifications/toNotificationEvent.js +36 -0
- package/src/notifications/toScheduleRequest.js +62 -0
- package/src/plugins/appTypes.js +28 -0
- package/src/plugins/prefixTypes.js +28 -0
- package/src/plugins/shellPlugins.json +15 -0
- package/src/plugins/typeManifest.js +789 -0
- package/src/plugins/types.js +64 -0
- package/src/plugins/types.test.js +173 -0
- package/src/polyfills/installGetRandomValues.js +28 -0
- package/src/queue/createRequestQueue.js +198 -0
- package/src/queue/createRequestQueue.test.js +215 -0
- package/src/queue/createSqliteQueueStore.js +121 -0
- package/src/queue/summarizeQueue.js +39 -0
- package/src/session/createAppSession.js +323 -0
- package/src/session/createAppSession.test.js +391 -0
- package/src/session/getPageView.js +59 -0
- package/src/session/getPageView.test.js +137 -0
- package/src/sync/encodePagePath.js +27 -0
- package/src/sync/fetchPage.js +72 -0
- package/src/sync/fetchPage.test.js +84 -0
- package/src/sync/fetchRoot.js +43 -0
- package/src/sync/fetchUser.js +33 -0
- package/src/sync/runLimited.js +36 -0
- package/src/sync/toRootConfig.js +35 -0
- package/src/test/createFakeNetwork.js +40 -0
- package/src/test/createFakeSecureStore.js +40 -0
- package/src/test/createFakeServer.js +98 -0
- package/src/test/createMemoryCacheStore.js +59 -0
- package/src/test/createNetworkError.js +24 -0
- package/src/test/expoImage.js +42 -0
- package/src/test/expoNotifications.js +40 -0
- package/src/test/expoQuickActions.js +22 -0
- package/src/test/expoSpeechRecognition.js +31 -0
- package/src/test/expoTaskManager.js +25 -0
- package/src/test/expoUi.js +55 -0
- package/src/test/expoUiBottomSheet.js +64 -0
- package/src/test/expoUiDateTimePicker.js +26 -0
- package/src/test/expoUiMenu.js +46 -0
- package/src/test/expoUiSegmentedControl.js +47 -0
- package/src/test/expoUiSwiftUi.js +62 -0
- package/src/test/expoUiSwiftUiModifiers.js +23 -0
- package/src/test/expoWebBrowser.js +23 -0
- package/src/test/fixtures.js +98 -0
- package/src/test/nativeModule.js +33 -0
- package/src/test/renderPageScreen.js +109 -0
- package/src/types/checkTypeSet.js +39 -0
- package/src/types/collectPageTypes.js +49 -0
- package/src/types/collectPageTypes.test.js +90 -0
- package/src/types/findMissingPageTypes.js +40 -0
- package/src/version/compareVersions.js +38 -0
- package/src/version/isShellTooOld.js +30 -0
- package/src/version/shellVersion.js +21 -0
- package/src/version/shellVersion.test.js +32 -0
- package/src/widgets/fetchWidgetData.js +59 -0
- package/src/widgets/index.js +156 -0
- package/src/widgets/refreshWidgets.js +31 -0
- package/withExcludedNativeModules.js +93 -0
- package/dist/location.js +0 -33
- package/dist/public/apple-touch-icon.png +0 -0
- package/dist/public/icon-32.png +0 -0
- package/dist/public/icon-512.png +0 -0
- package/dist/public/icon.svg +0 -17
- package/dist/public/logo-dark-theme.png +0 -0
- package/dist/public/logo-light-theme.png +0 -0
- package/dist/public/logo-square-dark-theme.png +0 -0
- package/dist/public/logo-square-light-theme.png +0 -0
- package/dist/public/manifest.webmanifest +0 -16
- package/dist/shell/246.93432ff68186aae6c87b.js +0 -2
- package/dist/shell/246.93432ff68186aae6c87b.js.LICENSE.txt +0 -8
- package/dist/shell/454.b597ca21366afda000af.js +0 -2
- package/dist/shell/454.b597ca21366afda000af.js.LICENSE.txt +0 -14
- package/dist/shell/484.d645e6c09079f45ce044.js +0 -1
- package/dist/shell/706.a66931e02a549fd269bd.js +0 -2
- package/dist/shell/706.a66931e02a549fd269bd.js.LICENSE.txt +0 -8
- package/dist/shell/9.78be8c1b6c3986f404fc.js +0 -2
- package/dist/shell/9.78be8c1b6c3986f404fc.js.LICENSE.txt +0 -45
- package/dist/shell/922.43b7a3ebe22ef05b3049.js +0 -2
- package/dist/shell/922.43b7a3ebe22ef05b3049.js.LICENSE.txt +0 -14
- package/dist/shell/index.html +0 -57
- package/dist/shell/main.f01501a75909f38ccc32.js +0 -1
- package/dist/shell/runtime.e50f6c3a5f7c74a0a717.js +0 -1
package/metro.config.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const fs = require('node:fs');
|
|
18
|
+
const path = require('node:path');
|
|
19
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
20
|
+
|
|
21
|
+
const readShellConfig = require('./readShellConfig.js');
|
|
22
|
+
const { getExclusions, getShellVariant } = require('./shellVariant.js');
|
|
23
|
+
|
|
24
|
+
const projectRoot = __dirname;
|
|
25
|
+
|
|
26
|
+
function findWorkspaceRoot(directory) {
|
|
27
|
+
if (fs.existsSync(path.join(directory, 'pnpm-workspace.yaml'))) {
|
|
28
|
+
return directory;
|
|
29
|
+
}
|
|
30
|
+
const parent = path.dirname(directory);
|
|
31
|
+
return parent === directory ? null : findWorkspaceRoot(parent);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const config = getDefaultConfig(projectRoot);
|
|
35
|
+
config.resolver.unstable_enableSymlinks = true;
|
|
36
|
+
|
|
37
|
+
// A shell resolves the feature modules its capability profile leaves out to empty ones
|
|
38
|
+
// (getExclusions in shellVariant.js). A release shell (LOWDEFY_SHELL_VARIANT=release, the default
|
|
39
|
+
// for every shell but Lowdefy Dev) leaves out the developer features: the dev-tab client, connect
|
|
40
|
+
// flow and shake menu are not in its bundle (scripts/checkReleaseBundle.mjs checks it).
|
|
41
|
+
const excludedEntries = new Set(
|
|
42
|
+
getExclusions({ shell: readShellConfig().shell, variant: getShellVariant() }).jsEntries
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// Lowdefy packages shared with the server import a few Node built-ins in code the client never
|
|
46
|
+
// runs (@lowdefy/errors reads build maps with `path`). The web client's bundler leaves them empty
|
|
47
|
+
// in the browser; Metro does the same here.
|
|
48
|
+
const SERVER_ONLY_BUILTINS = new Set(['path']);
|
|
49
|
+
const resolveDefault = config.resolver.resolveRequest;
|
|
50
|
+
config.resolver.resolveRequest = (context, moduleName, platform) => {
|
|
51
|
+
if (SERVER_ONLY_BUILTINS.has(moduleName)) {
|
|
52
|
+
return { type: 'empty' };
|
|
53
|
+
}
|
|
54
|
+
const resolution = (resolveDefault ?? context.resolveRequest)(context, moduleName, platform);
|
|
55
|
+
if (resolution.type === 'sourceFile' && excludedEntries.has(resolution.filePath)) {
|
|
56
|
+
return { type: 'empty' };
|
|
57
|
+
}
|
|
58
|
+
return resolution;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// In a pnpm workspace (the Lowdefy monorepo) the shell's Lowdefy packages are symlinks to their
|
|
62
|
+
// workspace folders: Metro watches the whole workspace and resolves from the shell's own
|
|
63
|
+
// node_modules before the workspace root's.
|
|
64
|
+
const workspaceRoot = findWorkspaceRoot(path.dirname(projectRoot));
|
|
65
|
+
if (workspaceRoot !== null) {
|
|
66
|
+
config.watchFolders = [workspaceRoot];
|
|
67
|
+
config.resolver.nodeModulesPaths = [
|
|
68
|
+
path.join(projectRoot, 'node_modules'),
|
|
69
|
+
path.join(workspaceRoot, 'node_modules'),
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
module.exports = config;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Copyright 2020-2026 Lowdefy, Inc
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
// Generated by @lowdefy/shell native/withAppShortcuts.js. Do not edit.
|
|
16
|
+
//
|
|
17
|
+
// One App Intent for the app's shortcuts (mobile.shortcuts): Siri, Spotlight and the Shortcuts
|
|
18
|
+
// app offer "Open <shortcut> in <app>". The shortcuts are the app icon quick actions the shell sets
|
|
19
|
+
// from the app's server (expo-quick-actions), so this file holds no app data. Running one opens
|
|
20
|
+
// __SCHEME__://shortcut/<id>, which the shell routes like a quick action.
|
|
21
|
+
|
|
22
|
+
import AppIntents
|
|
23
|
+
import UIKit
|
|
24
|
+
|
|
25
|
+
@available(iOS 18.0, *)
|
|
26
|
+
struct LowdefyShortcutEntity: AppEntity {
|
|
27
|
+
static var typeDisplayRepresentation: TypeDisplayRepresentation = "Shortcut"
|
|
28
|
+
static var defaultQuery = LowdefyShortcutQuery()
|
|
29
|
+
|
|
30
|
+
var id: String
|
|
31
|
+
var title: String
|
|
32
|
+
|
|
33
|
+
var displayRepresentation: DisplayRepresentation {
|
|
34
|
+
DisplayRepresentation(title: "\(title)")
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@available(iOS 18.0, *)
|
|
39
|
+
struct LowdefyShortcutQuery: EntityQuery {
|
|
40
|
+
@MainActor
|
|
41
|
+
func entities(for identifiers: [String]) async throws -> [LowdefyShortcutEntity] {
|
|
42
|
+
try await suggestedEntities().filter { identifiers.contains($0.id) }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@MainActor
|
|
46
|
+
func suggestedEntities() async throws -> [LowdefyShortcutEntity] {
|
|
47
|
+
(UIApplication.shared.shortcutItems ?? []).map {
|
|
48
|
+
LowdefyShortcutEntity(id: $0.type, title: $0.localizedTitle)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@available(iOS 18.0, *)
|
|
54
|
+
struct OpenLowdefyShortcutIntent: AppIntent {
|
|
55
|
+
static var title: LocalizedStringResource = "Open Shortcut"
|
|
56
|
+
static var openAppWhenRun = true
|
|
57
|
+
|
|
58
|
+
@Parameter(title: "Shortcut")
|
|
59
|
+
var shortcut: LowdefyShortcutEntity
|
|
60
|
+
|
|
61
|
+
@MainActor
|
|
62
|
+
func perform() async throws -> some IntentResult & OpensIntent {
|
|
63
|
+
var components = URLComponents()
|
|
64
|
+
components.scheme = "__SCHEME__"
|
|
65
|
+
components.host = "shortcut"
|
|
66
|
+
components.path = "/\(shortcut.id)"
|
|
67
|
+
return .result(opensIntent: OpenURLIntent(components.url!))
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@available(iOS 18.0, *)
|
|
72
|
+
struct LowdefyAppShortcuts: AppShortcutsProvider {
|
|
73
|
+
static var appShortcuts: [AppShortcut] {
|
|
74
|
+
AppShortcut(
|
|
75
|
+
intent: OpenLowdefyShortcutIntent(),
|
|
76
|
+
phrases: [
|
|
77
|
+
"Open \(\.$shortcut) in \(.applicationName)",
|
|
78
|
+
"\(.applicationName) \(\.$shortcut)",
|
|
79
|
+
],
|
|
80
|
+
shortTitle: "Open",
|
|
81
|
+
systemImageName: "arrow.up.forward.app"
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const fs = require('node:fs');
|
|
18
|
+
const path = require('node:path');
|
|
19
|
+
const { IOSConfig, withDangerousMod, withXcodeProject } = require('expo/config-plugins');
|
|
20
|
+
|
|
21
|
+
const FILE_NAME = 'LowdefyAppShortcuts.swift';
|
|
22
|
+
|
|
23
|
+
// Adds the shell's App Shortcuts intent (LowdefyAppShortcuts.swift.template) to the iOS app target:
|
|
24
|
+
// Siri, Spotlight and the Shortcuts app open the app's shortcuts by name. App Intents must be
|
|
25
|
+
// compiled into the app itself, so the file is written beside the app's sources with the shell's
|
|
26
|
+
// scheme and added to the target. Android's long-press shortcuts come from expo-quick-actions alone.
|
|
27
|
+
function withAppShortcuts(config) {
|
|
28
|
+
if (typeof config.scheme !== 'string') {
|
|
29
|
+
return config;
|
|
30
|
+
}
|
|
31
|
+
const scheme = config.scheme;
|
|
32
|
+
config = withDangerousMod(config, [
|
|
33
|
+
'ios',
|
|
34
|
+
(modConfig) => {
|
|
35
|
+
const projectName = IOSConfig.XcodeUtils.getProjectName(modConfig.modRequest.projectRoot);
|
|
36
|
+
const source = fs
|
|
37
|
+
.readFileSync(path.join(__dirname, `${FILE_NAME}.template`), 'utf8')
|
|
38
|
+
.replaceAll('__SCHEME__', scheme);
|
|
39
|
+
fs.writeFileSync(
|
|
40
|
+
path.join(modConfig.modRequest.platformProjectRoot, projectName, FILE_NAME),
|
|
41
|
+
source
|
|
42
|
+
);
|
|
43
|
+
return modConfig;
|
|
44
|
+
},
|
|
45
|
+
]);
|
|
46
|
+
return withXcodeProject(config, (modConfig) => {
|
|
47
|
+
const projectName = IOSConfig.XcodeUtils.getProjectName(modConfig.modRequest.projectRoot);
|
|
48
|
+
const filepath = `${projectName}/${FILE_NAME}`;
|
|
49
|
+
if (!modConfig.modResults.hasFile(filepath)) {
|
|
50
|
+
IOSConfig.XcodeUtils.addBuildSourceFileToGroup({
|
|
51
|
+
filepath,
|
|
52
|
+
groupName: projectName,
|
|
53
|
+
project: modConfig.modResults,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return modConfig;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
module.exports = withAppShortcuts;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nativeVersion": 4,
|
|
3
|
+
"hash": "7e1c995f3bdbbc6a41e5bb457b80485fe4e6fa94",
|
|
4
|
+
"profiles": {
|
|
5
|
+
"basic": "3d4862c094f031bcede19615f6544735394b3ffd",
|
|
6
|
+
"field": "e40b727ee83be623cc3fbd7d6f924b7fc76da7f9",
|
|
7
|
+
"field-nfc": "6342397ca9e29c2dbbe09cf5c6ff4b5f5ce8b90e",
|
|
8
|
+
"field-tracking": "7fd10ca1ad84d518add4710fbc43e5a45b112423",
|
|
9
|
+
"dev": "03e6bfa70243a3916a158c5f5d600ca55c1ff9a3",
|
|
10
|
+
"development": "03e6bfa70243a3916a158c5f5d600ca55c1ff9a3",
|
|
11
|
+
"basic+share": "6916d64313fcf05bfb807b4459762d207b66fe8d",
|
|
12
|
+
"basic+widgets": "2119db77c31fadbaae3038be75c969f0a13add3f",
|
|
13
|
+
"basic+contacts": "da05a4b9a74032d3b6fe662a490ce7b28a4f2ebc",
|
|
14
|
+
"basic+calendar": "f63399c18343e99107d0b6bbd4378cd62437fe82"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/shell",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"description": "",
|
|
5
|
+
"description": "Lowdefy Shell - the Expo app every Lowdefy phone app is built from",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"lowdefy",
|
|
9
|
-
"
|
|
9
|
+
"react native",
|
|
10
|
+
"expo"
|
|
10
11
|
],
|
|
11
12
|
"bugs": {
|
|
12
13
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
@@ -25,49 +26,128 @@
|
|
|
25
26
|
"type": "git",
|
|
26
27
|
"url": "https://github.com/lowdefy/lowdefy.git"
|
|
27
28
|
},
|
|
28
|
-
"main": "
|
|
29
|
+
"main": "expo-router/entry",
|
|
30
|
+
"nativeVersion": 4,
|
|
29
31
|
"files": [
|
|
30
|
-
"
|
|
32
|
+
"app/*",
|
|
33
|
+
"scripts/*",
|
|
34
|
+
"src/*",
|
|
35
|
+
"native/*",
|
|
36
|
+
"app.config.ts",
|
|
37
|
+
"appLinks.js",
|
|
38
|
+
"applyShellPlugins.js",
|
|
39
|
+
"authCallbackIntentFilters.js",
|
|
40
|
+
"babel.config.js",
|
|
41
|
+
"checkShellConfig.js",
|
|
42
|
+
"checkShellPlugins.js",
|
|
43
|
+
"getPrivacyManifest.js",
|
|
44
|
+
"metro.config.js",
|
|
45
|
+
"native-fingerprint.json",
|
|
46
|
+
"profiles.js",
|
|
47
|
+
"readShellConfig.js",
|
|
48
|
+
"resolveShellPlugins.js",
|
|
49
|
+
"runtimeVersion.js",
|
|
50
|
+
"shell.dev.json",
|
|
51
|
+
"shellVariant.js",
|
|
52
|
+
"withExcludedNativeModules.js",
|
|
53
|
+
"!**/*.test.*",
|
|
54
|
+
"!scripts/checkNativeVersion.mjs"
|
|
31
55
|
],
|
|
32
|
-
"scripts": {
|
|
33
|
-
"babel": "babel src/location.js --out-dir dist",
|
|
34
|
-
"build": "yarn webpack && yarn babel",
|
|
35
|
-
"build:dev": "NODE_ENV=development yarn webpack && yarn babel",
|
|
36
|
-
"clean": "rm -rf dist",
|
|
37
|
-
"prepare": "yarn build",
|
|
38
|
-
"webpack": "webpack --config webpack.config.js"
|
|
39
|
-
},
|
|
40
56
|
"dependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"@lowdefy/
|
|
43
|
-
"@lowdefy/
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
57
|
+
"@expo/ui": "58.0.20",
|
|
58
|
+
"@lowdefy/actions-core": "7.2.0",
|
|
59
|
+
"@lowdefy/blocks-native": "7.2.0",
|
|
60
|
+
"@lowdefy/client-core": "7.2.0",
|
|
61
|
+
"@lowdefy/client-native": "7.2.0",
|
|
62
|
+
"@lowdefy/engine": "7.2.0",
|
|
63
|
+
"@lowdefy/errors": "7.2.0",
|
|
64
|
+
"@lowdefy/helpers": "7.2.0",
|
|
65
|
+
"@lowdefy/node-utils": "7.2.0",
|
|
66
|
+
"@lowdefy/operators-change-case": "7.2.0",
|
|
67
|
+
"@lowdefy/operators-cron": "7.2.0",
|
|
68
|
+
"@lowdefy/operators-dayjs": "7.2.0",
|
|
69
|
+
"@lowdefy/operators-diff": "7.2.0",
|
|
70
|
+
"@lowdefy/operators-js": "7.2.0",
|
|
71
|
+
"@lowdefy/operators-jsonata": "7.2.0",
|
|
72
|
+
"@lowdefy/operators-mql": "7.2.0",
|
|
73
|
+
"@lowdefy/operators-nunjucks": "7.2.0",
|
|
74
|
+
"@lowdefy/operators-uuid": "7.2.0",
|
|
75
|
+
"@lowdefy/operators-yaml": "7.2.0",
|
|
76
|
+
"dayjs": "1.11.20",
|
|
77
|
+
"expo": "58.0.14",
|
|
78
|
+
"expo-audio": "58.0.9",
|
|
79
|
+
"expo-background-task": "58.0.11",
|
|
80
|
+
"expo-brightness": "58.0.2",
|
|
81
|
+
"expo-calendar": "58.0.6",
|
|
82
|
+
"expo-camera": "58.0.10",
|
|
83
|
+
"expo-clipboard": "58.0.3",
|
|
84
|
+
"expo-constants": "58.0.12",
|
|
85
|
+
"expo-contacts": "58.0.8",
|
|
86
|
+
"expo-crypto": "58.0.7",
|
|
87
|
+
"expo-dev-client": "58.0.14",
|
|
88
|
+
"expo-document-picker": "58.0.4",
|
|
89
|
+
"expo-file-system": "58.0.9",
|
|
90
|
+
"expo-font": "58.0.8",
|
|
91
|
+
"expo-haptics": "58.0.7",
|
|
92
|
+
"expo-image": "58.0.15",
|
|
93
|
+
"expo-image-picker": "58.0.10",
|
|
94
|
+
"expo-keep-awake": "58.0.3",
|
|
95
|
+
"expo-linking": "58.0.13",
|
|
96
|
+
"expo-local-authentication": "58.0.2",
|
|
97
|
+
"expo-location": "58.0.18",
|
|
98
|
+
"expo-maps": "58.0.10",
|
|
99
|
+
"expo-network": "58.0.3",
|
|
100
|
+
"expo-notifications": "58.1.5",
|
|
101
|
+
"expo-quick-actions": "6.0.2",
|
|
102
|
+
"expo-router": "58.0.23",
|
|
103
|
+
"expo-secure-store": "58.0.2",
|
|
104
|
+
"expo-sensors": "58.0.4",
|
|
105
|
+
"expo-sharing": "58.0.19",
|
|
106
|
+
"expo-speech": "58.0.3",
|
|
107
|
+
"expo-speech-recognition": "58.0.0",
|
|
108
|
+
"expo-splash-screen": "58.0.10",
|
|
109
|
+
"expo-sqlite": "58.0.13",
|
|
110
|
+
"expo-task-manager": "58.0.12",
|
|
111
|
+
"expo-updates": "58.0.17",
|
|
112
|
+
"expo-web-browser": "58.0.6",
|
|
113
|
+
"expo-widgets": "58.0.20",
|
|
114
|
+
"jimp-compact": "0.16.1",
|
|
115
|
+
"react": "19.3.0",
|
|
116
|
+
"react-native": "0.88.0",
|
|
117
|
+
"react-native-document-scanner-plugin": "2.0.4",
|
|
118
|
+
"react-native-nfc-manager": "4.0.0",
|
|
119
|
+
"react-native-safe-area-context": "5.10.1",
|
|
120
|
+
"react-native-screens": "4.30.0",
|
|
121
|
+
"react-native-svg": "15.16.0",
|
|
122
|
+
"react-native-view-shot": "6.1.1"
|
|
48
123
|
},
|
|
49
124
|
"devDependencies": {
|
|
50
|
-
"@babel/
|
|
51
|
-
"@babel/
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@lowdefy/
|
|
55
|
-
"
|
|
56
|
-
"babel-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"jest": "
|
|
62
|
-
"
|
|
63
|
-
"react": "17.0.2",
|
|
64
|
-
"react-dom": "17.0.2",
|
|
65
|
-
"style-loader": "2.0.0",
|
|
66
|
-
"webpack": "5.38.1",
|
|
67
|
-
"webpack-cli": "4.7.0"
|
|
125
|
+
"@babel/core": "7.29.6",
|
|
126
|
+
"@babel/plugin-transform-class-static-block": "7.29.7",
|
|
127
|
+
"@expo/fingerprint": "0.21.5",
|
|
128
|
+
"@jest/globals": "29.7.0",
|
|
129
|
+
"@lowdefy/build": "7.2.0",
|
|
130
|
+
"@lowdefy/logger": "7.2.0",
|
|
131
|
+
"@react-native/babel-preset": "0.88.0",
|
|
132
|
+
"@react-native/jest-preset": "0.88.0",
|
|
133
|
+
"@testing-library/react-native": "14.1.0",
|
|
134
|
+
"babel-jest": "29.7.0",
|
|
135
|
+
"babel-preset-expo": "58.0.17",
|
|
136
|
+
"jest": "29.7.0",
|
|
137
|
+
"test-renderer": "1.3.1"
|
|
68
138
|
},
|
|
69
139
|
"publishConfig": {
|
|
70
140
|
"access": "public"
|
|
71
141
|
},
|
|
72
|
-
"
|
|
73
|
-
|
|
142
|
+
"scripts": {
|
|
143
|
+
"dayjs-locales": "node scripts/createDayjsLocales.mjs",
|
|
144
|
+
"check:native-version": "node scripts/checkNativeVersion.mjs",
|
|
145
|
+
"check:release-bundle": "node scripts/checkReleaseBundle.mjs",
|
|
146
|
+
"export:android": "expo export --platform android --output-dir dist/android",
|
|
147
|
+
"export:ios": "expo export --platform ios --output-dir dist/ios",
|
|
148
|
+
"start": "expo start",
|
|
149
|
+
"test": "jest && node --test fixtures/hello.test.mjs scripts/createDayjsLocales.test.mjs checkShellConfig.test.mjs checkShellPlugins.test.mjs profiles.test.mjs resolveShellPlugins.test.mjs runtimeVersion.test.mjs shellVariant.test.mjs storeCompliance.test.mjs authCallbackIntentFilters.test.mjs appLinks.test.mjs scripts/checkNativeVersion.test.mjs scripts/createTypeManifest.test.mjs",
|
|
150
|
+
"shell-version": "node scripts/createShellVersion.mjs --write && prettier --config ../../.prettierrc --write src/version/shellVersion.js",
|
|
151
|
+
"type-manifest": "node scripts/createTypeManifest.mjs --write && prettier --config ../../.prettierrc --write src/plugins/typeManifest.js"
|
|
152
|
+
}
|
|
153
|
+
}
|