akanjs 3.0.0-beta.20 → 3.0.0-beta.21
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/README.ko.md +0 -1
- package/README.md +0 -1
- package/base/baseEnv.ts +40 -3
- package/client/cookie.ts +56 -20
- package/client/device.ts +47 -95
- package/client/frameConfig.ts +2 -2
- package/client/native.ts +44 -0
- package/client/router.ts +11 -1
- package/client/rscNavigation.ts +5 -0
- package/client/storage.ts +68 -39
- package/fetch/client/fetchClient.ts +13 -4
- package/index.ts +47 -46
- package/package.json +6 -87
- package/server/devtools/signalSerializer.ts +1 -2
- package/server/hmr/devHmrController.ts +29 -11
- package/server/resolver/signal.resolver.ts +1 -10
- package/server/routeTreeBuilder.ts +8 -11
- package/server/routing/apiRouter.ts +15 -2
- package/server/rscClient.tsx +1 -2
- package/server/ssrFromRscRenderer.tsx +2 -0
- package/server/webRouter.ts +1 -0
- package/signal/CrossSiteGuard.ts +34 -2
- package/signal/endpoint.ts +12 -7
- package/signal/endpointInfo.ts +13 -0
- package/signal/internal.ts +9 -5
- package/signal/serializer/fetch.serializer.ts +6 -3
- package/signal/slice.ts +34 -24
- package/store/baseSt.ts +0 -1
- package/store/storeInstance.ts +29 -17
- package/types/client/cookie.d.ts +6 -4
- package/types/client/device.d.ts +7 -10
- package/types/client/native.d.ts +26 -0
- package/types/client/rscNavigation.d.ts +4 -0
- package/types/client/storage.d.ts +8 -1
- package/types/index.d.ts +48 -44
- package/types/server/hmr/devHmrController.d.ts +2 -1
- package/types/server/resolver/signal.resolver.d.ts +0 -1
- package/types/server/rscClient.d.ts +0 -3
- package/types/signal/CrossSiteGuard.d.ts +7 -2
- package/types/signal/endpoint.d.ts +1 -1
- package/types/signal/endpointInfo.d.ts +3 -0
- package/types/signal/slice.d.ts +3 -2
- package/types/store/baseSt.d.ts +0 -13
- package/types/vendor/@akanjs/native/packages/cli/src/api.d.ts +182 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/build.d.ts +28 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/compat.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/dev.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/doctor.d.ts +37 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/plugin.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/signing.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/test.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/toolchain.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/commands/update.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/config.d.ts +278 -0
- package/types/vendor/@akanjs/native/packages/cli/src/index.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/acl.d.ts +21 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/apilevel.d.ts +40 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/apk.d.ts +36 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/args.d.ts +9 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/boot.d.ts +32 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/chrome.d.ts +6 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/codegen.d.ts +94 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/compat.d.ts +49 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/configkeys.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/csp.d.ts +51 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/env.d.ts +44 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/exec.d.ts +31 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/googleservices.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/hmr.d.ts +120 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/html.d.ts +20 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/icons.d.ts +44 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/image.d.ts +21 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/iossigning.d.ts +81 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/launch.d.ts +51 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/log.d.ts +42 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/manifestmerge.d.ts +18 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/maven.d.ts +97 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/names.d.ts +45 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/native-plugins.d.ts +67 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/nativeconfig.d.ts +11 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/permissions.d.ts +10 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/plist.d.ts +11 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/png.d.ts +11 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/prepare.d.ts +138 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/privacy.d.ts +13 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +208 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/root.d.ts +1 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/routes.d.ts +1 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/serve.d.ts +17 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/signing.d.ts +14 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/spec.d.ts +96 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/toolchains.d.ts +150 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/updates.d.ts +77 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/vectors.d.ts +13 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/xml.d.ts +13 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/android.d.ts +57 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/desktop-update.d.ts +4 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/desktop.d.ts +40 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/index.d.ts +14 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/ios.d.ts +44 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/linux.d.ts +6 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/macos.d.ts +7 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/targets.d.ts +4 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/web-run.d.ts +15 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/windows.d.ts +8 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms.d.ts +1 -0
- package/types/vendor/@akanjs/native/packages/cli/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/packages/core/src/acl.d.ts +97 -0
- package/types/vendor/@akanjs/native/packages/core/src/boot.d.ts +66 -0
- package/types/vendor/@akanjs/native/packages/core/src/contract.d.ts +35 -0
- package/types/vendor/@akanjs/native/packages/core/src/errors.d.ts +27 -0
- package/types/vendor/@akanjs/native/packages/core/src/files.d.ts +23 -0
- package/types/vendor/@akanjs/native/packages/core/src/index.d.ts +14 -0
- package/types/vendor/@akanjs/native/packages/core/src/kernel.d.ts +112 -0
- package/types/vendor/@akanjs/native/packages/core/src/live.d.ts +12 -0
- package/types/vendor/@akanjs/native/packages/core/src/mime.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/core/src/plugin.d.ts +71 -0
- package/types/vendor/@akanjs/native/packages/core/src/protocol.d.ts +109 -0
- package/types/vendor/@akanjs/native/packages/core/src/runtime.d.ts +66 -0
- package/types/vendor/@akanjs/native/packages/core/src/state.d.ts +28 -0
- package/types/vendor/@akanjs/native/packages/core/src/testing.d.ts +41 -0
- package/types/vendor/@akanjs/native/packages/core/src/version.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/core/src/veto.d.ts +17 -0
- package/types/vendor/@akanjs/native/packages/core/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/deeplinks.d.ts +24 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/delta.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/dispatcher.d.ts +95 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/ffi.d.ts +144 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/host.d.ts +11 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/lifecycle.d.ts +40 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/main.d.ts +4 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/page-veto.d.ts +17 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/paths.d.ts +25 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/plugin.d.ts +179 -0
- package/types/vendor/@akanjs/native/packages/react/src/index.d.ts +8 -0
- package/types/vendor/@akanjs/native/packages/react/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/accessibility/src/announce.d.ts +8 -0
- package/types/vendor/@akanjs/native/plugins/accessibility/src/index.d.ts +47 -0
- package/types/vendor/@akanjs/native/plugins/accessibility/src/web.d.ts +4 -0
- package/types/vendor/@akanjs/native/plugins/accessibility/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/app/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/app/src/index.d.ts +66 -0
- package/types/vendor/@akanjs/native/plugins/app/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/app/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/app-state/src/index.d.ts +19 -0
- package/types/vendor/@akanjs/native/plugins/app-state/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/app-state/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/appearance/src/desktop.d.ts +9 -0
- package/types/vendor/@akanjs/native/plugins/appearance/src/index.d.ts +32 -0
- package/types/vendor/@akanjs/native/plugins/appearance/src/setting.d.ts +6 -0
- package/types/vendor/@akanjs/native/plugins/appearance/src/web.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/appearance/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/auth-session/src/args.d.ts +18 -0
- package/types/vendor/@akanjs/native/plugins/auth-session/src/desktop.d.ts +17 -0
- package/types/vendor/@akanjs/native/plugins/auth-session/src/index.d.ts +41 -0
- package/types/vendor/@akanjs/native/plugins/auth-session/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/autostart/src/desktop.d.ts +44 -0
- package/types/vendor/@akanjs/native/plugins/autostart/src/index.d.ts +44 -0
- package/types/vendor/@akanjs/native/plugins/autostart/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/badge/src/count.d.ts +4 -0
- package/types/vendor/@akanjs/native/plugins/badge/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/badge/src/index.d.ts +37 -0
- package/types/vendor/@akanjs/native/plugins/badge/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/badge/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/biometric/src/index.d.ts +53 -0
- package/types/vendor/@akanjs/native/plugins/biometric/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/browser/src/args.d.ts +8 -0
- package/types/vendor/@akanjs/native/plugins/browser/src/desktop.d.ts +9 -0
- package/types/vendor/@akanjs/native/plugins/browser/src/index.d.ts +36 -0
- package/types/vendor/@akanjs/native/plugins/browser/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/browser/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/camera/src/desktop.d.ts +5 -0
- package/types/vendor/@akanjs/native/plugins/camera/src/index.d.ts +55 -0
- package/types/vendor/@akanjs/native/plugins/camera/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/camera/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/clipboard/src/desktop.d.ts +8 -0
- package/types/vendor/@akanjs/native/plugins/clipboard/src/index.d.ts +40 -0
- package/types/vendor/@akanjs/native/plugins/clipboard/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/clipboard/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/device/src/desktop.d.ts +33 -0
- package/types/vendor/@akanjs/native/plugins/device/src/index.d.ts +55 -0
- package/types/vendor/@akanjs/native/plugins/device/src/web.d.ts +22 -0
- package/types/vendor/@akanjs/native/plugins/device/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/dialog/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/dialog/src/index.d.ts +60 -0
- package/types/vendor/@akanjs/native/plugins/dialog/src/options.d.ts +29 -0
- package/types/vendor/@akanjs/native/plugins/dialog/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/dialog/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/dock/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/dock/src/index.d.ts +46 -0
- package/types/vendor/@akanjs/native/plugins/dock/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/file-picker/src/common.d.ts +33 -0
- package/types/vendor/@akanjs/native/plugins/file-picker/src/desktop.d.ts +9 -0
- package/types/vendor/@akanjs/native/plugins/file-picker/src/index.d.ts +84 -0
- package/types/vendor/@akanjs/native/plugins/file-picker/src/web.d.ts +6 -0
- package/types/vendor/@akanjs/native/plugins/file-picker/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/filesystem/src/common.d.ts +49 -0
- package/types/vendor/@akanjs/native/plugins/filesystem/src/desktop.d.ts +8 -0
- package/types/vendor/@akanjs/native/plugins/filesystem/src/index.d.ts +123 -0
- package/types/vendor/@akanjs/native/plugins/filesystem/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/filesystem/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/geolocation/src/index.d.ts +93 -0
- package/types/vendor/@akanjs/native/plugins/geolocation/src/web.d.ts +11 -0
- package/types/vendor/@akanjs/native/plugins/geolocation/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/global-shortcut/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/global-shortcut/src/index.d.ts +52 -0
- package/types/vendor/@akanjs/native/plugins/global-shortcut/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/haptics/src/index.d.ts +31 -0
- package/types/vendor/@akanjs/native/plugins/haptics/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/haptics/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/http/src/common.d.ts +71 -0
- package/types/vendor/@akanjs/native/plugins/http/src/desktop.d.ts +5 -0
- package/types/vendor/@akanjs/native/plugins/http/src/index.d.ts +104 -0
- package/types/vendor/@akanjs/native/plugins/http/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/http/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/iap/src/index.d.ts +171 -0
- package/types/vendor/@akanjs/native/plugins/iap/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/keep-awake/src/desktop.d.ts +15 -0
- package/types/vendor/@akanjs/native/plugins/keep-awake/src/index.d.ts +33 -0
- package/types/vendor/@akanjs/native/plugins/keep-awake/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/keep-awake/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/keyboard/src/index.d.ts +42 -0
- package/types/vendor/@akanjs/native/plugins/keyboard/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/keyboard/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/local-notifications/src/desktop.d.ts +29 -0
- package/types/vendor/@akanjs/native/plugins/local-notifications/src/index.d.ts +126 -0
- package/types/vendor/@akanjs/native/plugins/local-notifications/src/schedule.d.ts +38 -0
- package/types/vendor/@akanjs/native/plugins/local-notifications/src/timers.d.ts +25 -0
- package/types/vendor/@akanjs/native/plugins/local-notifications/src/web.d.ts +4 -0
- package/types/vendor/@akanjs/native/plugins/local-notifications/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/menu/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/menu/src/index.d.ts +85 -0
- package/types/vendor/@akanjs/native/plugins/menu/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/network/src/index.d.ts +22 -0
- package/types/vendor/@akanjs/native/plugins/network/src/web.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/network/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/opener/src/desktop.d.ts +14 -0
- package/types/vendor/@akanjs/native/plugins/opener/src/index.d.ts +33 -0
- package/types/vendor/@akanjs/native/plugins/opener/src/url.d.ts +16 -0
- package/types/vendor/@akanjs/native/plugins/opener/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/opener/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/preferences/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/preferences/src/index.d.ts +26 -0
- package/types/vendor/@akanjs/native/plugins/preferences/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/preferences/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/push/src/index.d.ts +57 -0
- package/types/vendor/@akanjs/native/plugins/push/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/screen/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/screen/src/index.d.ts +70 -0
- package/types/vendor/@akanjs/native/plugins/screen/src/web.d.ts +18 -0
- package/types/vendor/@akanjs/native/plugins/screen/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/screen-orientation/src/index.d.ts +32 -0
- package/types/vendor/@akanjs/native/plugins/screen-orientation/src/types.d.ts +8 -0
- package/types/vendor/@akanjs/native/plugins/screen-orientation/src/web.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/screen-orientation/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/secure-storage/src/desktop.d.ts +16 -0
- package/types/vendor/@akanjs/native/plugins/secure-storage/src/index.d.ts +39 -0
- package/types/vendor/@akanjs/native/plugins/secure-storage/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/share/src/index.d.ts +55 -0
- package/types/vendor/@akanjs/native/plugins/share/src/options.d.ts +6 -0
- package/types/vendor/@akanjs/native/plugins/share/src/web.d.ts +5 -0
- package/types/vendor/@akanjs/native/plugins/share/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/single-instance/src/desktop.d.ts +8 -0
- package/types/vendor/@akanjs/native/plugins/single-instance/src/index.d.ts +25 -0
- package/types/vendor/@akanjs/native/plugins/single-instance/src/socket.d.ts +46 -0
- package/types/vendor/@akanjs/native/plugins/single-instance/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/splash-screen/src/index.d.ts +19 -0
- package/types/vendor/@akanjs/native/plugins/splash-screen/src/web.d.ts +4 -0
- package/types/vendor/@akanjs/native/plugins/splash-screen/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/sqlite/src/common.d.ts +34 -0
- package/types/vendor/@akanjs/native/plugins/sqlite/src/desktop.d.ts +6 -0
- package/types/vendor/@akanjs/native/plugins/sqlite/src/index.d.ts +115 -0
- package/types/vendor/@akanjs/native/plugins/sqlite/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/toast/src/index.d.ts +30 -0
- package/types/vendor/@akanjs/native/plugins/toast/src/queue.d.ts +23 -0
- package/types/vendor/@akanjs/native/plugins/toast/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/toast/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/tray/src/desktop.d.ts +3 -0
- package/types/vendor/@akanjs/native/plugins/tray/src/index.d.ts +113 -0
- package/types/vendor/@akanjs/native/plugins/tray/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/updates/src/desktop.d.ts +4 -0
- package/types/vendor/@akanjs/native/plugins/updates/src/index.d.ts +68 -0
- package/types/vendor/@akanjs/native/plugins/updates/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/window/src/desktop.d.ts +6 -0
- package/types/vendor/@akanjs/native/plugins/window/src/index.d.ts +185 -0
- package/types/vendor/@akanjs/native/plugins/window/src/web.d.ts +2 -0
- package/types/vendor/@akanjs/native/plugins/window/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/window-state/src/desktop.d.ts +7 -0
- package/types/vendor/@akanjs/native/plugins/window-state/src/index.d.ts +33 -0
- package/types/vendor/@akanjs/native/plugins/window-state/src/state.d.ts +39 -0
- package/types/vendor/@akanjs/native/plugins/window-state/src.d.ts +1 -0
- package/types/webkit/index.d.ts +0 -2
- package/types/webkit/nativeNavigation.d.ts +25 -0
- package/types/webkit/nativePurchase.d.ts +37 -0
- package/types/webkit/useCamera.d.ts +13 -15
- package/types/webkit/useGeoLocation.d.ts +4 -5
- package/types/webkit/usePurchase.d.ts +12 -16
- package/ui/Link/Anchor.tsx +2 -5
- package/ui/System/Client.tsx +2 -6
- package/vendor/@akanjs/native/LICENSE +21 -0
- package/vendor/@akanjs/native/README.ko.md +88 -0
- package/vendor/@akanjs/native/README.md +93 -0
- package/vendor/@akanjs/native/THIRD_PARTY_NOTICES.md +237 -0
- package/vendor/@akanjs/native/native/android/maven.lock.json +1751 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeAcl.kt +243 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +936 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeApplication.kt +189 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeAssetServer.kt +225 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeBridge.kt +444 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeCompat.kt +55 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeContract.kt +99 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeEd25519.kt +100 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeFileProvider.kt +71 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeKernel.kt +324 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativePlugin.kt +361 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeSpec.kt +100 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeUpdates.kt +305 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeVectors.kt +132 -0
- package/vendor/@akanjs/native/native/desktop/Cargo.lock +2565 -0
- package/vendor/@akanjs/native/native/desktop/Cargo.toml +49 -0
- package/vendor/@akanjs/native/native/desktop/build.rs +19 -0
- package/vendor/@akanjs/native/native/desktop/rust-toolchain.toml +7 -0
- package/vendor/@akanjs/native/native/desktop/src/accelerator.rs +466 -0
- package/vendor/@akanjs/native/native/desktop/src/autostart.rs +158 -0
- package/vendor/@akanjs/native/native/desktop/src/camera.rs +53 -0
- package/vendor/@akanjs/native/native/desktop/src/chrome.rs +710 -0
- package/vendor/@akanjs/native/native/desktop/src/contract.rs +105 -0
- package/vendor/@akanjs/native/native/desktop/src/devproxy.rs +234 -0
- package/vendor/@akanjs/native/native/desktop/src/dialog_args.rs +189 -0
- package/vendor/@akanjs/native/native/desktop/src/dock.rs +209 -0
- package/vendor/@akanjs/native/native/desktop/src/hotkey.rs +209 -0
- package/vendor/@akanjs/native/native/desktop/src/js_panels.rs +125 -0
- package/vendor/@akanjs/native/native/desktop/src/json.rs +272 -0
- package/vendor/@akanjs/native/native/desktop/src/keychain.rs +151 -0
- package/vendor/@akanjs/native/native/desktop/src/lib.rs +2185 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/appearance.rs +177 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/camera.rs +11 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/clipboard.rs +48 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/device.rs +9 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/dialogs.rs +348 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/dock.rs +146 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/hotkey.rs +228 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/keychain.rs +243 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/menu.rs +445 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/mod.rs +116 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/notify.rs +211 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/open.rs +79 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/power.rs +155 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/screen.rs +158 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/tray.rs +604 -0
- package/vendor/@akanjs/native/native/desktop/src/menu.rs +517 -0
- package/vendor/@akanjs/native/native/desktop/src/navigation.rs +381 -0
- package/vendor/@akanjs/native/native/desktop/src/notify.rs +411 -0
- package/vendor/@akanjs/native/native/desktop/src/notify_schedule.rs +382 -0
- package/vendor/@akanjs/native/native/desktop/src/page_menu.rs +287 -0
- package/vendor/@akanjs/native/native/desktop/src/panels.rs +333 -0
- package/vendor/@akanjs/native/native/desktop/src/placement.rs +92 -0
- package/vendor/@akanjs/native/native/desktop/src/routes.rs +153 -0
- package/vendor/@akanjs/native/native/desktop/src/screen.rs +190 -0
- package/vendor/@akanjs/native/native/desktop/src/tray.rs +279 -0
- package/vendor/@akanjs/native/native/desktop/src/vectors.rs +126 -0
- package/vendor/@akanjs/native/native/desktop/src/win/appearance.rs +51 -0
- package/vendor/@akanjs/native/native/desktop/src/win/autostart.rs +77 -0
- package/vendor/@akanjs/native/native/desktop/src/win/camera.rs +34 -0
- package/vendor/@akanjs/native/native/desktop/src/win/clipboard.rs +106 -0
- package/vendor/@akanjs/native/native/desktop/src/win/device.rs +80 -0
- package/vendor/@akanjs/native/native/desktop/src/win/dialogs.rs +917 -0
- package/vendor/@akanjs/native/native/desktop/src/win/dock.rs +228 -0
- package/vendor/@akanjs/native/native/desktop/src/win/hotkey.rs +110 -0
- package/vendor/@akanjs/native/native/desktop/src/win/keychain.rs +103 -0
- package/vendor/@akanjs/native/native/desktop/src/win/menu.rs +500 -0
- package/vendor/@akanjs/native/native/desktop/src/win/mod.rs +100 -0
- package/vendor/@akanjs/native/native/desktop/src/win/msgwin.rs +86 -0
- package/vendor/@akanjs/native/native/desktop/src/win/notify.rs +334 -0
- package/vendor/@akanjs/native/native/desktop/src/win/open.rs +127 -0
- package/vendor/@akanjs/native/native/desktop/src/win/power.rs +64 -0
- package/vendor/@akanjs/native/native/desktop/src/win/registry.rs +87 -0
- package/vendor/@akanjs/native/native/desktop/src/win/screen.rs +127 -0
- package/vendor/@akanjs/native/native/desktop/src/win/tray.rs +280 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeAcl.swift +241 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeApp.swift +285 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeBridge.swift +407 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeContract.swift +106 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeKernel.swift +317 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativePlugin.swift +250 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeSchemeHandler.swift +209 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeShell.swift +161 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeSpec.swift +143 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeUpdates.swift +270 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeVectors.swift +155 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeViewController.swift +371 -0
- package/vendor/@akanjs/native/packages/cli/src/api.ts +600 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/build.ts +101 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/compat.ts +53 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/dev.ts +249 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/doctor.ts +536 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/plugin.ts +164 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/signing.ts +32 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/test.ts +130 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/toolchain.ts +143 -0
- package/vendor/@akanjs/native/packages/cli/src/commands/update.ts +168 -0
- package/vendor/@akanjs/native/packages/cli/src/config.ts +257 -0
- package/vendor/@akanjs/native/packages/cli/src/index.ts +77 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/acl.ts +420 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/apilevel.ts +245 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/apk.ts +203 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/args.ts +44 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/boot.ts +73 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/chrome.ts +89 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/codegen.ts +1128 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/compat.ts +185 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/configkeys.ts +91 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/csp.ts +198 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/env.ts +257 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/exec.ts +104 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/googleservices.ts +53 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/hmr.ts +534 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/html.ts +63 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/icons.ts +316 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/image.ts +175 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/iossigning.ts +295 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/launch.ts +98 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/log.ts +105 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/manifestmerge.ts +107 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/maven.ts +244 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/names.ts +202 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/native-plugins.ts +326 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/nativeconfig.ts +68 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/permissions.ts +80 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/plist.ts +139 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/png.ts +240 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/prepare.ts +290 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/privacy.ts +64 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +710 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/root.ts +18 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/routes.ts +3 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/serve.ts +83 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/signing.ts +117 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/spec.ts +521 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/toolchains.ts +579 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/updates.ts +160 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/vectors.ts +121 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/xml.ts +72 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/android.ts +1320 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/desktop-update.ts +78 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/desktop.ts +279 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/index.ts +31 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/ios.ts +801 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/linux.ts +52 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/macos.ts +97 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/targets.ts +12 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/web-run.ts +69 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/web.ts +28 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/windows.ts +82 -0
- package/vendor/@akanjs/native/packages/core/contract.json +96 -0
- package/vendor/@akanjs/native/packages/core/src/acl.ts +272 -0
- package/vendor/@akanjs/native/packages/core/src/boot.ts +97 -0
- package/vendor/@akanjs/native/packages/core/src/contract.ts +100 -0
- package/vendor/@akanjs/native/packages/core/src/errors.ts +95 -0
- package/vendor/@akanjs/native/packages/core/src/files.ts +105 -0
- package/vendor/@akanjs/native/packages/core/src/index.ts +35 -0
- package/vendor/@akanjs/native/packages/core/src/kernel.ts +281 -0
- package/vendor/@akanjs/native/packages/core/src/live.ts +62 -0
- package/vendor/@akanjs/native/packages/core/src/mime.ts +8 -0
- package/vendor/@akanjs/native/packages/core/src/plugin.ts +358 -0
- package/vendor/@akanjs/native/packages/core/src/protocol.ts +194 -0
- package/vendor/@akanjs/native/packages/core/src/runtime.ts +520 -0
- package/vendor/@akanjs/native/packages/core/src/state.ts +46 -0
- package/vendor/@akanjs/native/packages/core/src/testing.ts +176 -0
- package/vendor/@akanjs/native/packages/core/src/version.ts +2 -0
- package/vendor/@akanjs/native/packages/core/src/veto.ts +55 -0
- package/vendor/@akanjs/native/packages/core/vectors/acl.json +57 -0
- package/vendor/@akanjs/native/packages/core/vectors/bridge.json +76 -0
- package/vendor/@akanjs/native/packages/core/vectors/ed25519.json +29 -0
- package/vendor/@akanjs/native/packages/core/vectors/ids.json +73 -0
- package/vendor/@akanjs/native/packages/core/vectors/navigation.json +75 -0
- package/vendor/@akanjs/native/packages/core/vectors/ranges.json +39 -0
- package/vendor/@akanjs/native/packages/core/vectors/retained.json +17 -0
- package/vendor/@akanjs/native/packages/core/vectors/routes.json +66 -0
- package/vendor/@akanjs/native/packages/core/vectors/scope.json +143 -0
- package/vendor/@akanjs/native/packages/desktop/src/deeplinks.ts +143 -0
- package/vendor/@akanjs/native/packages/desktop/src/delta.ts +174 -0
- package/vendor/@akanjs/native/packages/desktop/src/dispatcher.ts +679 -0
- package/vendor/@akanjs/native/packages/desktop/src/ffi.ts +76 -0
- package/vendor/@akanjs/native/packages/desktop/src/host.ts +355 -0
- package/vendor/@akanjs/native/packages/desktop/src/lifecycle.ts +142 -0
- package/vendor/@akanjs/native/packages/desktop/src/main.ts +133 -0
- package/vendor/@akanjs/native/packages/desktop/src/page-veto.ts +103 -0
- package/vendor/@akanjs/native/packages/desktop/src/paths.ts +59 -0
- package/vendor/@akanjs/native/packages/desktop/src/plugin.ts +232 -0
- package/vendor/@akanjs/native/packages/react/src/index.ts +23 -0
- package/vendor/@akanjs/native/plugins/accessibility/android/AccessibilityPlugin.kt +96 -0
- package/vendor/@akanjs/native/plugins/accessibility/ios/AccessibilityPlugin.swift +92 -0
- package/vendor/@akanjs/native/plugins/accessibility/native-plugin.json +21 -0
- package/vendor/@akanjs/native/plugins/accessibility/src/announce.ts +71 -0
- package/vendor/@akanjs/native/plugins/accessibility/src/index.ts +77 -0
- package/vendor/@akanjs/native/plugins/accessibility/src/web.ts +52 -0
- package/vendor/@akanjs/native/plugins/app/android/AppPlugin.kt +72 -0
- package/vendor/@akanjs/native/plugins/app/ios/AppPlugin.swift +52 -0
- package/vendor/@akanjs/native/plugins/app/native-plugin.json +21 -0
- package/vendor/@akanjs/native/plugins/app/src/desktop.ts +64 -0
- package/vendor/@akanjs/native/plugins/app/src/index.ts +77 -0
- package/vendor/@akanjs/native/plugins/app/src/web.ts +12 -0
- package/vendor/@akanjs/native/plugins/app-state/android/AppStatePlugin.kt +54 -0
- package/vendor/@akanjs/native/plugins/app-state/ios/AppStatePlugin.swift +58 -0
- package/vendor/@akanjs/native/plugins/app-state/native-plugin.json +17 -0
- package/vendor/@akanjs/native/plugins/app-state/src/index.ts +42 -0
- package/vendor/@akanjs/native/plugins/app-state/src/web.ts +33 -0
- package/vendor/@akanjs/native/plugins/appearance/android/AppearancePlugin.kt +133 -0
- package/vendor/@akanjs/native/plugins/appearance/ios/AppearancePlugin.swift +109 -0
- package/vendor/@akanjs/native/plugins/appearance/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/appearance/src/desktop.ts +133 -0
- package/vendor/@akanjs/native/plugins/appearance/src/index.ts +62 -0
- package/vendor/@akanjs/native/plugins/appearance/src/setting.ts +18 -0
- package/vendor/@akanjs/native/plugins/appearance/src/web.ts +25 -0
- package/vendor/@akanjs/native/plugins/auth-session/android/AuthSessionPlugin.kt +171 -0
- package/vendor/@akanjs/native/plugins/auth-session/ios/AuthSessionPlugin.swift +112 -0
- package/vendor/@akanjs/native/plugins/auth-session/native-plugin.json +19 -0
- package/vendor/@akanjs/native/plugins/auth-session/src/args.ts +62 -0
- package/vendor/@akanjs/native/plugins/auth-session/src/desktop.ts +133 -0
- package/vendor/@akanjs/native/plugins/auth-session/src/index.ts +39 -0
- package/vendor/@akanjs/native/plugins/autostart/native-plugin.json +10 -0
- package/vendor/@akanjs/native/plugins/autostart/src/desktop.ts +189 -0
- package/vendor/@akanjs/native/plugins/autostart/src/index.ts +51 -0
- package/vendor/@akanjs/native/plugins/badge/ios/BadgePlugin.swift +92 -0
- package/vendor/@akanjs/native/plugins/badge/native-plugin.json +15 -0
- package/vendor/@akanjs/native/plugins/badge/src/count.ts +12 -0
- package/vendor/@akanjs/native/plugins/badge/src/desktop.ts +24 -0
- package/vendor/@akanjs/native/plugins/badge/src/index.ts +40 -0
- package/vendor/@akanjs/native/plugins/badge/src/web.ts +37 -0
- package/vendor/@akanjs/native/plugins/biometric/android/BiometricPlugin.kt +179 -0
- package/vendor/@akanjs/native/plugins/biometric/ios/BiometricPlugin.swift +129 -0
- package/vendor/@akanjs/native/plugins/biometric/native-plugin.json +22 -0
- package/vendor/@akanjs/native/plugins/biometric/src/index.ts +100 -0
- package/vendor/@akanjs/native/plugins/browser/android/BrowserPlugin.kt +178 -0
- package/vendor/@akanjs/native/plugins/browser/ios/BrowserPlugin.swift +63 -0
- package/vendor/@akanjs/native/plugins/browser/native-plugin.json +22 -0
- package/vendor/@akanjs/native/plugins/browser/src/args.ts +34 -0
- package/vendor/@akanjs/native/plugins/browser/src/desktop.ts +40 -0
- package/vendor/@akanjs/native/plugins/browser/src/index.ts +47 -0
- package/vendor/@akanjs/native/plugins/browser/src/web.ts +60 -0
- package/vendor/@akanjs/native/plugins/camera/android/CameraPlugin.kt +365 -0
- package/vendor/@akanjs/native/plugins/camera/ios/CameraPlugin.swift +296 -0
- package/vendor/@akanjs/native/plugins/camera/native-plugin.json +32 -0
- package/vendor/@akanjs/native/plugins/camera/src/desktop.ts +27 -0
- package/vendor/@akanjs/native/plugins/camera/src/index.ts +85 -0
- package/vendor/@akanjs/native/plugins/camera/src/web.ts +267 -0
- package/vendor/@akanjs/native/plugins/clipboard/android/ClipboardPlugin.kt +51 -0
- package/vendor/@akanjs/native/plugins/clipboard/ios/ClipboardPlugin.swift +35 -0
- package/vendor/@akanjs/native/plugins/clipboard/native-plugin.json +17 -0
- package/vendor/@akanjs/native/plugins/clipboard/src/desktop.ts +66 -0
- package/vendor/@akanjs/native/plugins/clipboard/src/index.ts +72 -0
- package/vendor/@akanjs/native/plugins/clipboard/src/web.ts +69 -0
- package/vendor/@akanjs/native/plugins/device/android/DevicePlugin.kt +70 -0
- package/vendor/@akanjs/native/plugins/device/ios/DevicePlugin.swift +80 -0
- package/vendor/@akanjs/native/plugins/device/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/device/src/desktop.ts +276 -0
- package/vendor/@akanjs/native/plugins/device/src/index.ts +72 -0
- package/vendor/@akanjs/native/plugins/device/src/web.ts +162 -0
- package/vendor/@akanjs/native/plugins/dialog/android/DialogPlugin.kt +260 -0
- package/vendor/@akanjs/native/plugins/dialog/ios/DialogPlugin.swift +198 -0
- package/vendor/@akanjs/native/plugins/dialog/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/dialog/src/desktop.ts +80 -0
- package/vendor/@akanjs/native/plugins/dialog/src/index.ts +87 -0
- package/vendor/@akanjs/native/plugins/dialog/src/options.ts +111 -0
- package/vendor/@akanjs/native/plugins/dialog/src/web.ts +296 -0
- package/vendor/@akanjs/native/plugins/dock/native-plugin.json +10 -0
- package/vendor/@akanjs/native/plugins/dock/src/desktop.ts +34 -0
- package/vendor/@akanjs/native/plugins/dock/src/index.ts +46 -0
- package/vendor/@akanjs/native/plugins/file-picker/android/FilePickerPlugin.kt +316 -0
- package/vendor/@akanjs/native/plugins/file-picker/ios/FilePickerPlugin.swift +366 -0
- package/vendor/@akanjs/native/plugins/file-picker/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/file-picker/src/common.ts +125 -0
- package/vendor/@akanjs/native/plugins/file-picker/src/desktop.ts +164 -0
- package/vendor/@akanjs/native/plugins/file-picker/src/index.ts +187 -0
- package/vendor/@akanjs/native/plugins/file-picker/src/web.ts +158 -0
- package/vendor/@akanjs/native/plugins/filesystem/android/FilesystemPlugin.kt +561 -0
- package/vendor/@akanjs/native/plugins/filesystem/ios/FilesystemPlugin.swift +596 -0
- package/vendor/@akanjs/native/plugins/filesystem/native-plugin.json +45 -0
- package/vendor/@akanjs/native/plugins/filesystem/src/common.ts +150 -0
- package/vendor/@akanjs/native/plugins/filesystem/src/desktop.ts +438 -0
- package/vendor/@akanjs/native/plugins/filesystem/src/index.ts +179 -0
- package/vendor/@akanjs/native/plugins/filesystem/src/web.ts +334 -0
- package/vendor/@akanjs/native/plugins/geolocation/android/GeolocationPlugin.kt +360 -0
- package/vendor/@akanjs/native/plugins/geolocation/ios/GeolocationPlugin.swift +284 -0
- package/vendor/@akanjs/native/plugins/geolocation/native-plugin.json +23 -0
- package/vendor/@akanjs/native/plugins/geolocation/src/index.ts +155 -0
- package/vendor/@akanjs/native/plugins/geolocation/src/web.ts +132 -0
- package/vendor/@akanjs/native/plugins/global-shortcut/native-plugin.json +10 -0
- package/vendor/@akanjs/native/plugins/global-shortcut/src/desktop.ts +36 -0
- package/vendor/@akanjs/native/plugins/global-shortcut/src/index.ts +55 -0
- package/vendor/@akanjs/native/plugins/haptics/android/HapticsPlugin.kt +127 -0
- package/vendor/@akanjs/native/plugins/haptics/ios/HapticsPlugin.swift +127 -0
- package/vendor/@akanjs/native/plugins/haptics/native-plugin.json +19 -0
- package/vendor/@akanjs/native/plugins/haptics/src/index.ts +34 -0
- package/vendor/@akanjs/native/plugins/haptics/src/web.ts +53 -0
- package/vendor/@akanjs/native/plugins/http/android/HttpPlugin.kt +234 -0
- package/vendor/@akanjs/native/plugins/http/android/HttpUrl.kt +182 -0
- package/vendor/@akanjs/native/plugins/http/ios/HttpPlugin.swift +228 -0
- package/vendor/@akanjs/native/plugins/http/ios/HttpUrl.swift +166 -0
- package/vendor/@akanjs/native/plugins/http/native-plugin.json +27 -0
- package/vendor/@akanjs/native/plugins/http/src/common.ts +294 -0
- package/vendor/@akanjs/native/plugins/http/src/desktop.ts +69 -0
- package/vendor/@akanjs/native/plugins/http/src/index.ts +181 -0
- package/vendor/@akanjs/native/plugins/http/src/web.ts +40 -0
- package/vendor/@akanjs/native/plugins/iap/android/IapPlugin.kt +358 -0
- package/vendor/@akanjs/native/plugins/iap/ios/IapPlugin.swift +306 -0
- package/vendor/@akanjs/native/plugins/iap/native-plugin.json +28 -0
- package/vendor/@akanjs/native/plugins/iap/src/index.ts +206 -0
- package/vendor/@akanjs/native/plugins/keep-awake/android/KeepAwakePlugin.kt +48 -0
- package/vendor/@akanjs/native/plugins/keep-awake/ios/KeepAwakePlugin.swift +36 -0
- package/vendor/@akanjs/native/plugins/keep-awake/native-plugin.json +17 -0
- package/vendor/@akanjs/native/plugins/keep-awake/src/desktop.ts +127 -0
- package/vendor/@akanjs/native/plugins/keep-awake/src/index.ts +79 -0
- package/vendor/@akanjs/native/plugins/keep-awake/src/web.ts +78 -0
- package/vendor/@akanjs/native/plugins/keyboard/android/KeyboardPlugin.kt +77 -0
- package/vendor/@akanjs/native/plugins/keyboard/ios/KeyboardPlugin.swift +93 -0
- package/vendor/@akanjs/native/plugins/keyboard/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/keyboard/src/index.ts +78 -0
- package/vendor/@akanjs/native/plugins/keyboard/src/web.ts +57 -0
- package/vendor/@akanjs/native/plugins/local-notifications/android/LocalNotificationReceiver.kt +38 -0
- package/vendor/@akanjs/native/plugins/local-notifications/android/LocalNotifications.kt +284 -0
- package/vendor/@akanjs/native/plugins/local-notifications/android/LocalNotificationsPlugin.kt +248 -0
- package/vendor/@akanjs/native/plugins/local-notifications/ios/LocalNotificationsPlugin.swift +279 -0
- package/vendor/@akanjs/native/plugins/local-notifications/native-plugin.json +35 -0
- package/vendor/@akanjs/native/plugins/local-notifications/src/desktop.ts +196 -0
- package/vendor/@akanjs/native/plugins/local-notifications/src/index.ts +174 -0
- package/vendor/@akanjs/native/plugins/local-notifications/src/schedule.ts +164 -0
- package/vendor/@akanjs/native/plugins/local-notifications/src/timers.ts +72 -0
- package/vendor/@akanjs/native/plugins/local-notifications/src/web.ts +158 -0
- package/vendor/@akanjs/native/plugins/menu/native-plugin.json +10 -0
- package/vendor/@akanjs/native/plugins/menu/src/desktop.ts +52 -0
- package/vendor/@akanjs/native/plugins/menu/src/index.ts +107 -0
- package/vendor/@akanjs/native/plugins/network/android/NetworkPlugin.kt +124 -0
- package/vendor/@akanjs/native/plugins/network/ios/NetworkPlugin.swift +82 -0
- package/vendor/@akanjs/native/plugins/network/native-plugin.json +19 -0
- package/vendor/@akanjs/native/plugins/network/src/index.ts +59 -0
- package/vendor/@akanjs/native/plugins/network/src/web.ts +43 -0
- package/vendor/@akanjs/native/plugins/opener/android/OpenerPlugin.kt +81 -0
- package/vendor/@akanjs/native/plugins/opener/ios/OpenerPlugin.swift +83 -0
- package/vendor/@akanjs/native/plugins/opener/native-plugin.json +25 -0
- package/vendor/@akanjs/native/plugins/opener/src/desktop.ts +88 -0
- package/vendor/@akanjs/native/plugins/opener/src/index.ts +35 -0
- package/vendor/@akanjs/native/plugins/opener/src/url.ts +39 -0
- package/vendor/@akanjs/native/plugins/opener/src/web.ts +33 -0
- package/vendor/@akanjs/native/plugins/preferences/android/PreferencesPlugin.kt +44 -0
- package/vendor/@akanjs/native/plugins/preferences/ios/PreferencesPlugin.swift +47 -0
- package/vendor/@akanjs/native/plugins/preferences/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/preferences/src/desktop.ts +59 -0
- package/vendor/@akanjs/native/plugins/preferences/src/index.ts +75 -0
- package/vendor/@akanjs/native/plugins/preferences/src/web.ts +55 -0
- package/vendor/@akanjs/native/plugins/push/android/AkanNativeMessagingService.kt +17 -0
- package/vendor/@akanjs/native/plugins/push/android/PushPlugin.kt +257 -0
- package/vendor/@akanjs/native/plugins/push/ios/PushPlugin.swift +169 -0
- package/vendor/@akanjs/native/plugins/push/native-plugin.json +23 -0
- package/vendor/@akanjs/native/plugins/push/src/index.ts +73 -0
- package/vendor/@akanjs/native/plugins/screen/native-plugin.json +10 -0
- package/vendor/@akanjs/native/plugins/screen/src/desktop.ts +50 -0
- package/vendor/@akanjs/native/plugins/screen/src/index.ts +107 -0
- package/vendor/@akanjs/native/plugins/screen/src/web.ts +92 -0
- package/vendor/@akanjs/native/plugins/screen-orientation/android/ScreenOrientationPlugin.kt +113 -0
- package/vendor/@akanjs/native/plugins/screen-orientation/ios/ScreenOrientationPlugin.swift +150 -0
- package/vendor/@akanjs/native/plugins/screen-orientation/native-plugin.json +17 -0
- package/vendor/@akanjs/native/plugins/screen-orientation/src/index.ts +69 -0
- package/vendor/@akanjs/native/plugins/screen-orientation/src/types.ts +26 -0
- package/vendor/@akanjs/native/plugins/screen-orientation/src/web.ts +67 -0
- package/vendor/@akanjs/native/plugins/secure-storage/android/SecureStoragePlugin.kt +184 -0
- package/vendor/@akanjs/native/plugins/secure-storage/ios/SecureStoragePlugin.swift +145 -0
- package/vendor/@akanjs/native/plugins/secure-storage/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/secure-storage/src/desktop.ts +332 -0
- package/vendor/@akanjs/native/plugins/secure-storage/src/index.ts +33 -0
- package/vendor/@akanjs/native/plugins/share/android/SharePlugin.kt +218 -0
- package/vendor/@akanjs/native/plugins/share/ios/SharePlugin.swift +142 -0
- package/vendor/@akanjs/native/plugins/share/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/share/src/index.ts +87 -0
- package/vendor/@akanjs/native/plugins/share/src/options.ts +43 -0
- package/vendor/@akanjs/native/plugins/share/src/web.ts +116 -0
- package/vendor/@akanjs/native/plugins/single-instance/native-plugin.json +10 -0
- package/vendor/@akanjs/native/plugins/single-instance/src/desktop.ts +63 -0
- package/vendor/@akanjs/native/plugins/single-instance/src/index.ts +32 -0
- package/vendor/@akanjs/native/plugins/single-instance/src/socket.ts +248 -0
- package/vendor/@akanjs/native/plugins/splash-screen/android/SplashScreenPlugin.kt +19 -0
- package/vendor/@akanjs/native/plugins/splash-screen/ios/SplashScreenPlugin.swift +20 -0
- package/vendor/@akanjs/native/plugins/splash-screen/native-plugin.json +17 -0
- package/vendor/@akanjs/native/plugins/splash-screen/src/index.ts +24 -0
- package/vendor/@akanjs/native/plugins/splash-screen/src/web.ts +17 -0
- package/vendor/@akanjs/native/plugins/sqlite/android/SqlStatements.kt +121 -0
- package/vendor/@akanjs/native/plugins/sqlite/android/SqlitePlugin.kt +327 -0
- package/vendor/@akanjs/native/plugins/sqlite/ios/SqlitePlugin.swift +361 -0
- package/vendor/@akanjs/native/plugins/sqlite/native-plugin.json +18 -0
- package/vendor/@akanjs/native/plugins/sqlite/src/common.ts +221 -0
- package/vendor/@akanjs/native/plugins/sqlite/src/desktop.ts +140 -0
- package/vendor/@akanjs/native/plugins/sqlite/src/index.ts +114 -0
- package/vendor/@akanjs/native/plugins/toast/android/ToastPlugin.kt +27 -0
- package/vendor/@akanjs/native/plugins/toast/native-plugin.json +14 -0
- package/vendor/@akanjs/native/plugins/toast/src/index.ts +41 -0
- package/vendor/@akanjs/native/plugins/toast/src/queue.ts +77 -0
- package/vendor/@akanjs/native/plugins/toast/src/web.ts +130 -0
- package/vendor/@akanjs/native/plugins/tray/native-plugin.json +10 -0
- package/vendor/@akanjs/native/plugins/tray/src/desktop.ts +73 -0
- package/vendor/@akanjs/native/plugins/tray/src/index.ts +111 -0
- package/vendor/@akanjs/native/plugins/updates/android/UpdatesPlugin.kt +290 -0
- package/vendor/@akanjs/native/plugins/updates/ios/UpdatesPlugin.swift +292 -0
- package/vendor/@akanjs/native/plugins/updates/native-plugin.json +19 -0
- package/vendor/@akanjs/native/plugins/updates/src/desktop.ts +558 -0
- package/vendor/@akanjs/native/plugins/updates/src/index.ts +95 -0
- package/vendor/@akanjs/native/plugins/window/native-plugin.json +32 -0
- package/vendor/@akanjs/native/plugins/window/src/desktop.ts +170 -0
- package/vendor/@akanjs/native/plugins/window/src/index.ts +342 -0
- package/vendor/@akanjs/native/plugins/window/src/web.ts +43 -0
- package/vendor/@akanjs/native/plugins/window-state/native-plugin.json +10 -0
- package/vendor/@akanjs/native/plugins/window-state/src/desktop.ts +73 -0
- package/vendor/@akanjs/native/plugins/window-state/src/index.ts +35 -0
- package/vendor/@akanjs/native/plugins/window-state/src/state.ts +146 -0
- package/webkit/bootCsr.tsx +26 -14
- package/webkit/index.ts +0 -2
- package/webkit/nativeNavigation.ts +116 -0
- package/webkit/nativePurchase.ts +93 -0
- package/webkit/useCamera.tsx +76 -71
- package/webkit/useCsrValues.ts +10 -124
- package/webkit/useGeoLocation.tsx +11 -13
- package/webkit/usePurchase.tsx +68 -123
- package/capacitor.base.config.ts +0 -140
- package/client/capacitor.ts +0 -252
- package/types/capacitor.base.config.d.ts +0 -3
- package/types/client/capacitor.d.ts +0 -290
- package/types/webkit/useCodepush.d.ts +0 -16
- package/types/webkit/useContact.d.ts +0 -11
- package/webkit/useCodepush.tsx +0 -76
- package/webkit/useContact.tsx +0 -45
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
// Bridge over WKScriptMessageHandlerWithReply (docs/architecture.md §4, docs/research/ios.md §4.2).
|
|
2
|
+
// Messages are JSON text both ways: WebKit's own object conversion mangles Date, typed arrays and
|
|
3
|
+
// undefined (verified), and JSON text behaves the same on every host.
|
|
4
|
+
//
|
|
5
|
+
// Bridge v1.1: requests name their document (one page load). The bridge keeps the current one; a
|
|
6
|
+
// new id or a committed navigation (AkanNativeViewController) ends it, and calls of ended documents are
|
|
7
|
+
// refused. Responses and events of the current document are numbered (`seq`) here, on the main
|
|
8
|
+
// actor, just before they are sent: the reply and callAsyncJavaScript reach the page in either
|
|
9
|
+
// order (an event sent after a reply came first 5961 of 6000 times), and the page sorts them.
|
|
10
|
+
|
|
11
|
+
import UIKit
|
|
12
|
+
import WebKit
|
|
13
|
+
|
|
14
|
+
@MainActor
|
|
15
|
+
final class AkanNativeBridge: NSObject {
|
|
16
|
+
weak var webView: WKWebView?
|
|
17
|
+
weak var viewController: UIViewController?
|
|
18
|
+
private var plugins: [String: AkanNativePlugin] = [:]
|
|
19
|
+
private var listeners: [String: Int] = [:] // "plugin\0event" → count
|
|
20
|
+
/// The app's capabilities (PL-11); nil for builds without an ACL (everything allowed).
|
|
21
|
+
private let acl = AkanNativeAcl.load(AkanNativeResources.json("boot.json"))
|
|
22
|
+
/// boot.json `plugins`: what each plugin declares natively on iOS (the L2 declaration gate).
|
|
23
|
+
private let declarations = AkanNativeResources.json("boot.json")["plugins"] as? [String: Any] ?? [:]
|
|
24
|
+
/// "plugin\0event" of events whose payload is a snapshot (plugins[].coalesce): only the latest of a
|
|
25
|
+
/// burst is sent (architecture review stage 4).
|
|
26
|
+
private lazy var coalescing: Set<String> = {
|
|
27
|
+
var keys: Set<String> = ["$host\u{0}tick"]
|
|
28
|
+
for (plugin, decl) in declarations {
|
|
29
|
+
for event in (decl as? [String: Any])?["coalesce"] as? [String] ?? [] { keys.insert("\(plugin)\u{0}\(event)") }
|
|
30
|
+
}
|
|
31
|
+
return keys
|
|
32
|
+
}()
|
|
33
|
+
/// Dev builds: the self-test's $host methods.
|
|
34
|
+
var dev = false
|
|
35
|
+
/// Dev builds: $host.hang calls still open, and how many were cancelled.
|
|
36
|
+
private var hanging: [AkanNativeCall] = []
|
|
37
|
+
private var hangCancels = 0
|
|
38
|
+
private var document: AkanNativeDocument?
|
|
39
|
+
/// Ended documents, so their late calls are refused.
|
|
40
|
+
private var ended: [String] = []
|
|
41
|
+
|
|
42
|
+
func register(_ entries: [(id: String, type: AkanNativePlugin.Type)]) {
|
|
43
|
+
for entry in entries {
|
|
44
|
+
plugins[entry.id] = entry.type.init(context: AkanNativePluginContext(pluginId: entry.id, bridge: self))
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// JS: await webkit.messageHandlers.akanNative.postMessage(JSON.stringify(request)) → JSON text
|
|
49
|
+
func receive(_ message: WKScriptMessage, reply: @escaping @MainActor (Any?, String?) -> Void) {
|
|
50
|
+
// SEC-1: the handler is exposed to every frame (iframes too, verified): accept the app
|
|
51
|
+
// origin's main frame only. The error argument is used for this refusal only.
|
|
52
|
+
let origin = message.frameInfo.securityOrigin
|
|
53
|
+
guard origin.protocol == "app", origin.host == "localhost", origin.port == 0, message.frameInfo.isMainFrame else {
|
|
54
|
+
AkanNativeLog.info("bridge: refused a message from \(origin.protocol)://\(origin.host) mainFrame=\(message.frameInfo.isMainFrame)")
|
|
55
|
+
return reply(nil, "akan-native: forbidden origin")
|
|
56
|
+
}
|
|
57
|
+
guard let text = message.body as? String, let data = text.data(using: .utf8),
|
|
58
|
+
let parsed = try? JSONSerialization.jsonObject(with: data, options: [.fragmentsAllowed]) else {
|
|
59
|
+
return reply(Self.encode(["v": 1, "id": -1, "ok": false, "error": ["code": "INVALID_ARGS", "message": "request is not JSON text"]]), nil)
|
|
60
|
+
}
|
|
61
|
+
// SEC-3: the shape of the request, checked like every host does (AkanNativeKernel, shared vectors).
|
|
62
|
+
if let problem = AkanNativeKernel.validateRequest(parsed) {
|
|
63
|
+
let id = ((parsed as? [String: Any])?["id"] as? NSNumber).map { $0.doubleValue == $0.doubleValue.rounded() ? $0.int64Value : 0 } ?? 0
|
|
64
|
+
return reply(Self.encode(["v": 1, "id": id, "ok": false, "error": ["code": "INVALID_ARGS", "message": problem]]), nil)
|
|
65
|
+
}
|
|
66
|
+
let request = parsed as! [String: Any]
|
|
67
|
+
let id = (request["id"] as! NSNumber).int64Value
|
|
68
|
+
let pluginId = request["plugin"] as! String
|
|
69
|
+
let method = request["method"] as! String
|
|
70
|
+
// Bridge v1.1: which document the request belongs to (AkanNativeKernel.admitDocument).
|
|
71
|
+
let docId = request["doc"] as? String
|
|
72
|
+
let doc: AkanNativeDocument
|
|
73
|
+
switch AkanNativeKernel.admitDocument(current: document?.id, ended: ended, requested: docId) {
|
|
74
|
+
case .current:
|
|
75
|
+
doc = document!
|
|
76
|
+
case .new:
|
|
77
|
+
endDocument()
|
|
78
|
+
doc = AkanNativeDocument(id: docId ?? "")
|
|
79
|
+
document = doc
|
|
80
|
+
case .ended:
|
|
81
|
+
return reply(Self.encode(["v": 1, "id": id, "ok": false, "error": ["code": "INTERNAL", "message": "the page that made this call is gone"]]), nil)
|
|
82
|
+
case .noDoc:
|
|
83
|
+
// Its answer would take a number the page runtime never sees, and its id would be spent
|
|
84
|
+
// for the runtime's own request with that id.
|
|
85
|
+
return reply(Self.encode(["v": 1, "id": id, "ok": false, "error": ["code": "INVALID_ARGS", "message": "request has no document id"]]), nil)
|
|
86
|
+
}
|
|
87
|
+
// v1.1 `once`. A repeat is answered under another id: the page's call waits for the first answer.
|
|
88
|
+
guard doc.id.isEmpty || doc.ids.accept(id) else {
|
|
89
|
+
return reply(Self.encode(["v": 1, "id": -1, "ok": false, "error": ["code": "INVALID_ARGS", "message": "request \(id) was already received"]]), nil)
|
|
90
|
+
}
|
|
91
|
+
let args = request["args"] as? [String: Any] ?? [:]
|
|
92
|
+
let call = AkanNativeCall(method: method, args: args) { [weak self] body in
|
|
93
|
+
doc.running[id] = nil
|
|
94
|
+
var response = body
|
|
95
|
+
response["v"] = 1
|
|
96
|
+
response["id"] = id
|
|
97
|
+
self?.flushOutbox(doc) // what waits goes first, so the page sees it in order
|
|
98
|
+
self?.stamp(&response, doc)
|
|
99
|
+
var fallback: [String: Any] = ["v": 1, "id": id, "ok": false, "error": ["code": "INTERNAL", "message": "\(pluginId).\(method) returned a value that is not JSON"]]
|
|
100
|
+
fallback["doc"] = response["doc"]
|
|
101
|
+
fallback["seq"] = response["seq"]
|
|
102
|
+
reply(Self.encode(response) ?? Self.encode(fallback), nil)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if pluginId == "$bridge" { return bridgeOp(call, args, doc) }
|
|
106
|
+
doc.running[id] = AkanNativeWeakCall(call)
|
|
107
|
+
call.document = doc
|
|
108
|
+
if pluginId == "$console" { // dev builds: page console forwarding (WV-3)
|
|
109
|
+
AkanNativeLog.page(method, args["message"] as? String ?? "")
|
|
110
|
+
return call.resolve()
|
|
111
|
+
}
|
|
112
|
+
if pluginId == "$host" { return host(call, args) }
|
|
113
|
+
guard let plugin = plugins[pluginId] else { return call.reject(.notFound, "plugin \(pluginId) is not registered") }
|
|
114
|
+
// L2: an undeclared method or event never reaches the plugin, whatever its code handles.
|
|
115
|
+
let subscription = method == "$listen" || method == "$unlisten"
|
|
116
|
+
guard AkanNativeKernel.declares(declarations[pluginId], method: method, event: subscription ? args["event"] as? String : nil) else {
|
|
117
|
+
return call.reject(.notFound, subscription ? "event \(pluginId).\(args["event"] as? String ?? "") is not declared" : "method \(pluginId).\(method) is not declared")
|
|
118
|
+
}
|
|
119
|
+
// PL-11 / plugins.md C7: checked before the plugin sees the call. $unlisten always passes.
|
|
120
|
+
if method != "$unlisten", let acl {
|
|
121
|
+
let event = args["event"] as? String ?? ""
|
|
122
|
+
let access = acl.check(plugin: pluginId, item: method == "$listen" ? "listen:\(event)" : method)
|
|
123
|
+
guard access.allowed else {
|
|
124
|
+
let what = method == "$listen" ? "\(event) events" : "\(method)()"
|
|
125
|
+
return call.reject(.notAllowed, "\(pluginId).\(what) is not allowed by the app's capabilities")
|
|
126
|
+
}
|
|
127
|
+
call.scope = access.scope
|
|
128
|
+
}
|
|
129
|
+
if method == "$listen" || method == "$unlisten" {
|
|
130
|
+
guard let event = args["event"] as? String else { return call.reject(.invalidArgs, "\(method) requires args.event") }
|
|
131
|
+
let key = "\(pluginId)\u{0}\(event)"
|
|
132
|
+
let before = listeners[key] ?? 0
|
|
133
|
+
let after = max(0, before + (method == "$listen" ? 1 : -1))
|
|
134
|
+
listeners[key] = after
|
|
135
|
+
if before == 0 && after == 1 { plugin.startListening(event) }
|
|
136
|
+
if before > 0 && after == 0 { plugin.stopListening(event) }
|
|
137
|
+
return call.resolve()
|
|
138
|
+
}
|
|
139
|
+
plugin.handle(call)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/// JSONSerialization raises an uncatchable ObjC exception for non-JSON values (e.g. Date):
|
|
143
|
+
/// validate first (docs/research/ios.md §1.2 #3).
|
|
144
|
+
static func encode(_ value: [String: Any]) -> String? {
|
|
145
|
+
guard JSONSerialization.isValidJSONObject(value),
|
|
146
|
+
let data = try? JSONSerialization.data(withJSONObject: value, options: [.withoutEscapingSlashes]) else { return nil }
|
|
147
|
+
return String(decoding: data, as: UTF8.self)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
func emit(plugin: String, event: String, data: Any?) {
|
|
151
|
+
guard (listeners["\(plugin)\u{0}\(event)"] ?? 0) > 0 else { return }
|
|
152
|
+
send(plugin: plugin, event: event, data: data)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/// An event for the current document, numbered once it is known to be JSON.
|
|
156
|
+
private func send(plugin: String, event: String, data: Any?) {
|
|
157
|
+
guard let doc = document else { return }
|
|
158
|
+
var message: [String: Any] = ["v": 1, "plugin": plugin, "event": event]
|
|
159
|
+
if let data { message["data"] = data }
|
|
160
|
+
guard JSONSerialization.isValidJSONObject(message) else {
|
|
161
|
+
return AkanNativeLog.info("emit \(plugin).\(event): data is not JSON, dropped")
|
|
162
|
+
}
|
|
163
|
+
let key = "\(plugin)\u{0}\(event)"
|
|
164
|
+
guard coalescing.contains(key) else {
|
|
165
|
+
flushOutbox(doc)
|
|
166
|
+
return deliver(message, doc)
|
|
167
|
+
}
|
|
168
|
+
// The last waiting entry is replaced when it is the same event; otherwise it queues behind.
|
|
169
|
+
if doc.outbox.last?.key == key { doc.outbox[doc.outbox.count - 1].message = message } else { doc.outbox.append((key, message)) }
|
|
170
|
+
if !doc.outboxScheduled {
|
|
171
|
+
doc.outboxScheduled = true
|
|
172
|
+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self, weak doc] in
|
|
173
|
+
MainActor.assumeIsolated { if let doc { self?.flushOutbox(doc) } }
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/// Sends the document's waiting coalesced events, in order (numbered now, when they go).
|
|
179
|
+
private func flushOutbox(_ doc: AkanNativeDocument) {
|
|
180
|
+
doc.outboxScheduled = false
|
|
181
|
+
guard !doc.outbox.isEmpty, document === doc else { return doc.outbox.removeAll() }
|
|
182
|
+
let waiting = doc.outbox
|
|
183
|
+
doc.outbox.removeAll()
|
|
184
|
+
for (_, message) in waiting { deliver(message, doc) }
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/// Numbers an event of the current document and hands it to the page.
|
|
188
|
+
private func deliver(_ message: [String: Any], _ doc: AkanNativeDocument) {
|
|
189
|
+
guard let webView else { return }
|
|
190
|
+
var message = message
|
|
191
|
+
let plugin = message["plugin"] as? String ?? "", event = message["event"] as? String ?? ""
|
|
192
|
+
stamp(&message, doc)
|
|
193
|
+
guard let text = Self.encode(message) else {
|
|
194
|
+
return AkanNativeLog.info("emit \(plugin).\(event): data is not JSON, dropped")
|
|
195
|
+
}
|
|
196
|
+
// Arguments go in as values, so no JS string escaping is involved.
|
|
197
|
+
webView.callAsyncJavaScript("window.__AKAN_NATIVE__ && window.__AKAN_NATIVE__.receive(m)", arguments: ["m": text], in: nil, in: .page) { result in
|
|
198
|
+
if case .failure(let error) = result { AkanNativeLog.info("emit \(plugin).\(event) failed: \(error)") }
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// MARK: documents (bridge v1.1)
|
|
203
|
+
|
|
204
|
+
/// Numbers a message of `doc` while it is the current document; its later answers carry only its id.
|
|
205
|
+
private func stamp(_ message: inout [String: Any], _ doc: AkanNativeDocument) {
|
|
206
|
+
guard !doc.id.isEmpty else { return }
|
|
207
|
+
message["doc"] = doc.id
|
|
208
|
+
guard document === doc else { return }
|
|
209
|
+
doc.seq += 1
|
|
210
|
+
message["seq"] = doc.seq
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/// $bridge operations (v1.1 `cancel`): follow-ups on what this document's own calls handed out,
|
|
214
|
+
/// so they need no ACL entry. Messages come in order here, so a cancel never overtakes its call.
|
|
215
|
+
private func bridgeOp(_ call: AkanNativeCall, _ args: [String: Any], _ doc: AkanNativeDocument) {
|
|
216
|
+
switch call.method {
|
|
217
|
+
case "cancel":
|
|
218
|
+
let target = (args["id"] as! NSNumber).int64Value
|
|
219
|
+
guard let running = doc.running[target]?.call else { return call.resolve(["cancelled": false]) }
|
|
220
|
+
doc.running[target] = nil
|
|
221
|
+
let timeout = args["reason"] as? String == "timeout"
|
|
222
|
+
running.cancel(timeout ? .timeout : .cancelled, timeout ? "the page's time limit for this call ran out" : "cancelled by the page")
|
|
223
|
+
call.resolve(["cancelled": true])
|
|
224
|
+
default: // release
|
|
225
|
+
var path = args["url"] as! String
|
|
226
|
+
if path.hasPrefix("app://localhost") { path.removeFirst("app://localhost".count) }
|
|
227
|
+
let released = path.hasPrefix("/__akan_native/file/") && AkanNativeFiles.shared.release(String(path.dropFirst("/__akan_native/file/".count)))
|
|
228
|
+
call.resolve(["released": released])
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/// The page's document ended (a navigation committed, another document called, or the window
|
|
233
|
+
/// is gone). In this order, done by the host without asking the page: its calls end (their
|
|
234
|
+
/// plugins' onCancel handlers run), its subscriptions stop, what its calls own is closed (last
|
|
235
|
+
/// first), then the plugins' documentEnded hooks run. Calling it again does nothing.
|
|
236
|
+
func endDocument() {
|
|
237
|
+
guard let doc = document else { return }
|
|
238
|
+
document = nil
|
|
239
|
+
if !doc.id.isEmpty { ended = Array((ended + [doc.id]).suffix(16)) }
|
|
240
|
+
let running = doc.running.values.compactMap(\.call)
|
|
241
|
+
doc.running.removeAll()
|
|
242
|
+
for call in running { call.cancel(.cancelled, "the page that made this call is gone") }
|
|
243
|
+
for (key, count) in listeners where count > 0 {
|
|
244
|
+
let parts = key.split(separator: "\u{0}", maxSplits: 1).map(String.init)
|
|
245
|
+
if parts.count == 2 { plugins[parts[0]]?.stopListening(parts[1]) }
|
|
246
|
+
}
|
|
247
|
+
listeners.removeAll()
|
|
248
|
+
for dispose in doc.end() { dispose() }
|
|
249
|
+
for plugin in plugins.values { plugin.documentEnded(doc.id) }
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/// The window is gone (scene disconnected, $host.recreate): its document ends and the App
|
|
253
|
+
/// services forget its plugins' listeners.
|
|
254
|
+
func windowEnded() {
|
|
255
|
+
endDocument()
|
|
256
|
+
let owner = ObjectIdentifier(self)
|
|
257
|
+
AkanNativeLinks.shared.removeAll(owner: owner)
|
|
258
|
+
AkanNativeNotifications.shared.removeAll(owner: owner)
|
|
259
|
+
AkanNativeRemoteNotifications.shared.removeAll(owner: owner)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/// Table sizes for the document churn check (K13, dev $host.info).
|
|
263
|
+
private var stats: [String: Int] {
|
|
264
|
+
[
|
|
265
|
+
"documents": document == nil ? 0 : 1,
|
|
266
|
+
"ended": ended.count,
|
|
267
|
+
"subscriptions": listeners.values.reduce(0, +),
|
|
268
|
+
"running": document?.running.count ?? 0,
|
|
269
|
+
"resources": document?.resourceCount ?? 0,
|
|
270
|
+
"files": AkanNativeFiles.shared.count,
|
|
271
|
+
"linkListeners": AkanNativeLinks.shared.listenerCount,
|
|
272
|
+
"notificationHandlers": AkanNativeNotifications.shared.handlerCount,
|
|
273
|
+
"remoteListeners": AkanNativeRemoteNotifications.shared.listenerCount,
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/// Shell built-ins the page runtime calls. Dev builds only: the self-test's bridge checks.
|
|
278
|
+
private func host(_ call: AkanNativeCall, _ args: [String: Any]) {
|
|
279
|
+
guard dev else { return call.reject(.notFound, "unknown host method \(call.method)") }
|
|
280
|
+
// Compiled into dev builds only (-D AKAN_NATIVE_DEV): release builds have no self-test methods.
|
|
281
|
+
#if AKAN_NATIVE_DEV
|
|
282
|
+
switch call.method {
|
|
283
|
+
case "echo": // answers, then sends an event right after the answer (the order check)
|
|
284
|
+
call.resolve(args)
|
|
285
|
+
send(plugin: "$host", event: "echo", data: args)
|
|
286
|
+
case "info":
|
|
287
|
+
let app = AkanNativeAppServices.shared
|
|
288
|
+
call.resolve(["instance": app.instance, "bundleSelections": app.bundleSelections, "windows": app.windows, "stats": stats, "cancels": hangCancels])
|
|
289
|
+
case "burst": // coalescing $host.tick events, then the answer (the coalesce check)
|
|
290
|
+
let count = (args["count"] as? NSNumber)?.intValue ?? 0
|
|
291
|
+
for n in 0..<max(0, count) { send(plugin: "$host", event: "tick", data: ["n": n]) }
|
|
292
|
+
call.resolve(["sent": count])
|
|
293
|
+
case "hang": // never answers by itself; counts its cancellation (v1.1 cancel check)
|
|
294
|
+
hanging.append(call)
|
|
295
|
+
call.onCancel { [weak self, weak call] in
|
|
296
|
+
self?.hangCancels += 1
|
|
297
|
+
self?.hanging.removeAll { $0 === call }
|
|
298
|
+
}
|
|
299
|
+
case "vectors": // the shared vectors against this device's kernel (AkanNativeVectors)
|
|
300
|
+
let result = AkanNativeVectors.run()
|
|
301
|
+
call.resolve(["passed": result.passed, "expected": AkanNativeVectors.expected, "failures": Array(result.failures.prefix(20))])
|
|
302
|
+
case "recreate": // a new window in this process, as when a scene connects again
|
|
303
|
+
call.resolve()
|
|
304
|
+
let scene = viewController?.view.window?.windowScene
|
|
305
|
+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
|
|
306
|
+
MainActor.assumeIsolated { (scene?.delegate as? AkanNativeSceneDelegate)?.recreate() }
|
|
307
|
+
}
|
|
308
|
+
default:
|
|
309
|
+
call.reject(.notFound, "unknown host method \(call.method)")
|
|
310
|
+
}
|
|
311
|
+
#else
|
|
312
|
+
call.reject(.notFound, "unknown host method \(call.method)")
|
|
313
|
+
#endif
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/// One page load (bridge v1.1 `doc`): the numbering of what it is sent, and its request ids.
|
|
318
|
+
@MainActor
|
|
319
|
+
final class AkanNativeDocument {
|
|
320
|
+
let id: String
|
|
321
|
+
var seq = 0
|
|
322
|
+
var ids = AkanNativeCallIds()
|
|
323
|
+
/// Calls not answered yet (v1.1 `cancel`). Weak: a call a plugin drops must still reach its
|
|
324
|
+
/// deinit, which answers it.
|
|
325
|
+
var running: [Int64: AkanNativeWeakCall] = [:]
|
|
326
|
+
/// Coalescing events not sent yet, in order (AkanNativeBridge.send).
|
|
327
|
+
var outbox: [(key: String, message: [String: Any])] = []
|
|
328
|
+
var outboxScheduled = false
|
|
329
|
+
/// Set when it ends: owning a resource then closes it at once.
|
|
330
|
+
private(set) var ended = false
|
|
331
|
+
private var resources: [(token: Int, dispose: @MainActor () -> Void)] = []
|
|
332
|
+
private var nextToken = 0
|
|
333
|
+
|
|
334
|
+
/// Ties a resource to this page (architecture §3.7 Document scope): `dispose` runs when the page
|
|
335
|
+
/// ends, the last owned first, or right away if it already has (a call that finished after its
|
|
336
|
+
/// page left). Returns a token for `disown`, when the resource was closed on request.
|
|
337
|
+
@discardableResult
|
|
338
|
+
func own(_ dispose: @escaping @MainActor () -> Void) -> Int {
|
|
339
|
+
guard !ended else {
|
|
340
|
+
dispose()
|
|
341
|
+
return 0
|
|
342
|
+
}
|
|
343
|
+
nextToken += 1
|
|
344
|
+
resources.append((nextToken, dispose))
|
|
345
|
+
return nextToken
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
func disown(_ token: Int) {
|
|
349
|
+
resources.removeAll { $0.token == token }
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
var resourceCount: Int { resources.count }
|
|
353
|
+
|
|
354
|
+
/// Marks it ended and hands over its disposers, last owned first.
|
|
355
|
+
func end() -> [@MainActor () -> Void] {
|
|
356
|
+
ended = true
|
|
357
|
+
let all = resources.reversed().map(\.dispose)
|
|
358
|
+
resources = []
|
|
359
|
+
return all
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
init(id: String) {
|
|
363
|
+
self.id = id
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
final class AkanNativeWeakCall {
|
|
368
|
+
weak var call: AkanNativeCall?
|
|
369
|
+
|
|
370
|
+
init(_ call: AkanNativeCall) {
|
|
371
|
+
self.call = call
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/// A document's request ids (v1.1 `once`): each is accepted once. Ids grow within a document;
|
|
376
|
+
/// recent ones are kept in a set and older ones covered by a floor (CallIds in @akanjs/native/desktop).
|
|
377
|
+
struct AkanNativeCallIds {
|
|
378
|
+
private var floor = Int64.min
|
|
379
|
+
private var seen = Set<Int64>()
|
|
380
|
+
|
|
381
|
+
mutating func accept(_ id: Int64) -> Bool {
|
|
382
|
+
if id <= floor || seen.contains(id) { return false }
|
|
383
|
+
seen.insert(id)
|
|
384
|
+
if seen.count > 1024 {
|
|
385
|
+
let oldest = seen.sorted().prefix(512)
|
|
386
|
+
for old in oldest { seen.remove(old) }
|
|
387
|
+
floor = oldest.last ?? floor
|
|
388
|
+
}
|
|
389
|
+
return true
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/// WKUserContentController retains its handlers; this proxy breaks the cycle with the bridge.
|
|
394
|
+
final class AkanNativeScriptHandler: NSObject, WKScriptMessageHandlerWithReply {
|
|
395
|
+
weak var bridge: AkanNativeBridge?
|
|
396
|
+
|
|
397
|
+
init(_ bridge: AkanNativeBridge) {
|
|
398
|
+
self.bridge = bridge
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
func userContentController(_ controller: WKUserContentController, didReceive message: WKScriptMessage, replyHandler: @escaping @MainActor (Any?, String?) -> Void) {
|
|
402
|
+
MainActor.assumeIsolated {
|
|
403
|
+
guard let bridge else { return replyHandler(nil, "akan-native: bridge gone") }
|
|
404
|
+
bridge.receive(message, reply: replyHandler)
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// Generated by scripts/contract.ts from packages/core/contract.json. Do not edit.
|
|
2
|
+
|
|
3
|
+
/// An id grammar: allowed characters, length, and an optional extension after the first dot.
|
|
4
|
+
struct AkanNativeIdSpec: Sendable {
|
|
5
|
+
let chars: String
|
|
6
|
+
let first: String
|
|
7
|
+
let notFirst: String
|
|
8
|
+
let min: Int
|
|
9
|
+
let max: Int
|
|
10
|
+
let extChars: String
|
|
11
|
+
let extMax: Int
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
enum AkanNativeContract {
|
|
15
|
+
static let errorCodes: [String] = ["UNSUPPORTED", "PERMISSION_DENIED", "CANCELLED", "TIMEOUT", "INVALID_ARGS", "NOT_FOUND", "NOT_ALLOWED", "INTERNAL"]
|
|
16
|
+
|
|
17
|
+
/// File name extension → MIME type (assets and FileRefs).
|
|
18
|
+
static let mime: [String: String] = [
|
|
19
|
+
"html": "text/html",
|
|
20
|
+
"htm": "text/html",
|
|
21
|
+
"js": "text/javascript",
|
|
22
|
+
"mjs": "text/javascript",
|
|
23
|
+
"css": "text/css",
|
|
24
|
+
"json": "application/json",
|
|
25
|
+
"map": "application/json",
|
|
26
|
+
"webmanifest": "application/manifest+json",
|
|
27
|
+
"txt": "text/plain",
|
|
28
|
+
"text": "text/plain",
|
|
29
|
+
"log": "text/plain",
|
|
30
|
+
"md": "text/markdown",
|
|
31
|
+
"csv": "text/csv",
|
|
32
|
+
"tsv": "text/tab-separated-values",
|
|
33
|
+
"xml": "application/xml",
|
|
34
|
+
"yaml": "application/yaml",
|
|
35
|
+
"yml": "application/yaml",
|
|
36
|
+
"ics": "text/calendar",
|
|
37
|
+
"vcf": "text/vcard",
|
|
38
|
+
"pdf": "application/pdf",
|
|
39
|
+
"rtf": "application/rtf",
|
|
40
|
+
"zip": "application/zip",
|
|
41
|
+
"gz": "application/gzip",
|
|
42
|
+
"tar": "application/x-tar",
|
|
43
|
+
"wasm": "application/wasm",
|
|
44
|
+
"epub": "application/epub+zip",
|
|
45
|
+
"doc": "application/msword",
|
|
46
|
+
"docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
47
|
+
"xls": "application/vnd.ms-excel",
|
|
48
|
+
"xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
49
|
+
"ppt": "application/vnd.ms-powerpoint",
|
|
50
|
+
"pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
51
|
+
"png": "image/png",
|
|
52
|
+
"jpg": "image/jpeg",
|
|
53
|
+
"jpeg": "image/jpeg",
|
|
54
|
+
"gif": "image/gif",
|
|
55
|
+
"webp": "image/webp",
|
|
56
|
+
"avif": "image/avif",
|
|
57
|
+
"heic": "image/heic",
|
|
58
|
+
"heif": "image/heif",
|
|
59
|
+
"bmp": "image/bmp",
|
|
60
|
+
"svg": "image/svg+xml",
|
|
61
|
+
"ico": "image/x-icon",
|
|
62
|
+
"tif": "image/tiff",
|
|
63
|
+
"tiff": "image/tiff",
|
|
64
|
+
"mp3": "audio/mpeg",
|
|
65
|
+
"m4a": "audio/mp4",
|
|
66
|
+
"aac": "audio/aac",
|
|
67
|
+
"wav": "audio/wav",
|
|
68
|
+
"ogg": "audio/ogg",
|
|
69
|
+
"flac": "audio/flac",
|
|
70
|
+
"mp4": "video/mp4",
|
|
71
|
+
"m4v": "video/mp4",
|
|
72
|
+
"mov": "video/quicktime",
|
|
73
|
+
"webm": "video/webm",
|
|
74
|
+
"ttf": "font/ttf",
|
|
75
|
+
"otf": "font/otf",
|
|
76
|
+
"woff": "font/woff",
|
|
77
|
+
"woff2": "font/woff2",
|
|
78
|
+
"glb": "model/gltf-binary",
|
|
79
|
+
"gltf": "model/gltf+json",
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
/// Besides text/*, the asset types served with charset=utf-8.
|
|
83
|
+
static let mimeUtf8: Set<String> = ["application/json", "application/manifest+json", "application/xml", "application/yaml", "image/svg+xml", "model/gltf+json"]
|
|
84
|
+
|
|
85
|
+
static let idFileRef = AkanNativeIdSpec(chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-", first: "", notFirst: "", min: 1, max: 128, extChars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", extMax: 8)
|
|
86
|
+
static let idBundle = AkanNativeIdSpec(chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-", first: "", notFirst: ".", min: 1, max: 80, extChars: "", extMax: 0)
|
|
87
|
+
static let idDocument = AkanNativeIdSpec(chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-", first: "", notFirst: "", min: 8, max: 64, extChars: "", extMax: 0)
|
|
88
|
+
static let idName = AkanNativeIdSpec(chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-", first: "$ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", notFirst: "", min: 1, max: 64, extChars: "", extMax: 0)
|
|
89
|
+
|
|
90
|
+
static let externalSchemes: [String] = ["http", "https", "mailto", "tel"]
|
|
91
|
+
static let frameSchemes: [String] = ["http", "https", "data", "blob", "about"]
|
|
92
|
+
/// Schemes an app can never add to the external list.
|
|
93
|
+
static let neverExternalSchemes: [String] = ["javascript", "vbscript", "file", "data", "blob", "about", "content", "intent", "app"]
|
|
94
|
+
|
|
95
|
+
static let routeRoot = "__akan_native"
|
|
96
|
+
static let routeInit = "init.js"
|
|
97
|
+
static let routeIpc = "ipc"
|
|
98
|
+
static let routeHello = "hello"
|
|
99
|
+
static let routeFile = "file"
|
|
100
|
+
|
|
101
|
+
static let initPrefix = "window.__AKAN_NATIVE__=(function(o,b,e){for(var k in b)o[k]=b[k];o.env=e;return o})(window.__AKAN_NATIVE__||{},"
|
|
102
|
+
static let initSuffix = ");\n"
|
|
103
|
+
static let maxRangeBytes = 1024000
|
|
104
|
+
static let externalOpensPerSecond = 1
|
|
105
|
+
static let maxRetainedEvents = 16
|
|
106
|
+
}
|