@ateam-ai-mobile/plugin-runtime 0.1.0 → 0.1.1
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/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +1707 -1669
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1756 -1719
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/bridge/native.ts +1 -1
- package/src/bundles/bundleManager.ts +14 -1
- package/src/host.ts +45 -1
- package/src/index.ts +1 -0
- package/src/sdk/usePluginTheme.ts +7 -2
package/dist/index.d.mts
CHANGED
|
@@ -500,6 +500,16 @@ declare function getHaptics(): HapticsAPI | null;
|
|
|
500
500
|
* `props.native`. The host owns the native modules. */
|
|
501
501
|
declare function setPluginNativeProvider(native: PluginNative): void;
|
|
502
502
|
declare function getPluginNative(): PluginNative;
|
|
503
|
+
/**
|
|
504
|
+
* Gate a PluginNative by the capabilities a plugin's manifest declares.
|
|
505
|
+
* Undeclared capabilities become warn-and-ignore proxies, so a plugin can
|
|
506
|
+
* only touch device APIs it asked for (per-plugin security model, preserved
|
|
507
|
+
* from the reference app). Connectivity is always allowed.
|
|
508
|
+
*
|
|
509
|
+
* Flag mapping mirrors the manifest contract: `storage` is gated by
|
|
510
|
+
* `offline` (offline data ⇒ local storage).
|
|
511
|
+
*/
|
|
512
|
+
declare function gatePluginNative(native: PluginNative, declared?: NativeCapabilities$1): PluginNative;
|
|
503
513
|
type PluginResolver = RegisteredPlugin | (() => Promise<RegisteredPlugin | null>);
|
|
504
514
|
declare function registerNativePlugin(id: string, plugin: PluginResolver): void;
|
|
505
515
|
declare function unregisterNativePlugin(id: string): void;
|
|
@@ -1126,4 +1136,4 @@ declare function isInlineSurface(m: SurfaceManifest): m is InlineSurfaceManifest
|
|
|
1126
1136
|
|
|
1127
1137
|
declare function SurfaceDispatcher(): react_jsx_runtime.JSX.Element;
|
|
1128
1138
|
|
|
1129
|
-
export { ActionButton, AdaOrb, type AdaOrbState, Badge, type BiometricsAPI, type BiometricsAPIv2, type Bridge, type BundleCacheEntry, type BundleStorage, type CameraAPI, Card, type ConnectivityAPI, type CookiesAPI, EmptyState, ErrorState, type FileSystemAPI, type HapticsAPI, type InlineSurfaceManifest, ListItem, LoadingState, type LocationAPI, MemoryBundleStorage, type MountSurfaceManifest, type NativeCapabilities$1 as NativeCapabilities, type NfcAPI, type NotificationsAPI, type PluginManifest as PlatformPluginManifest, type PluginBridge, type PluginContext, type PluginHooks$1 as PluginHooks, type PluginManifest$1 as PluginManifest, type PluginNative, type PluginProps, PluginSDK, type PluginSummary, type PluginSurfaceMeta, type RegisteredPlugin, type RegisteredServicePlugin, type RegisteredUIPlugin, type RemotePlugin, type RenderMode, type ScannerAPI, SearchBar, type SharingAPI, type StorageAPI, SurfaceCard, type SurfaceCardProps, SurfaceDispatcher, SurfaceDrawer, type SurfaceDrawerProps, SurfaceFullscreen, type SurfaceFullscreenProps, type SurfaceManifest, type SurfacePlacement, type SurfaceType, type SurfaceVisibility, TabBar, type ThemeTokens, bundleManager, createNativeBridge, getHaptics, getNativeBundleHash, getNativeBundleUrl, getNativeComponentId, getPlugin, getPluginNative, isInlineSurface, isMountSurface, listPlugins, nativePluginRegistry, register, registerBundleModules, registerNativePlugin, registerService, resolvePluginUrl, setBundleStorage, setHapticsProvider, setPluginNativeProvider, setPluginThemeColors, supportsNative, supportsWebView, unregisterNativePlugin, useApi, useNativeBridge, usePlugin, usePluginTheme, useRemotePlugins, useSurfaceStore };
|
|
1139
|
+
export { ActionButton, AdaOrb, type AdaOrbState, Badge, type BiometricsAPI, type BiometricsAPIv2, type Bridge, type BundleCacheEntry, type BundleStorage, type CameraAPI, Card, type ConnectivityAPI, type CookiesAPI, EmptyState, ErrorState, type FileSystemAPI, type HapticsAPI, type InlineSurfaceManifest, ListItem, LoadingState, type LocationAPI, MemoryBundleStorage, type MountSurfaceManifest, type NativeCapabilities$1 as NativeCapabilities, type NfcAPI, type NotificationsAPI, type PluginManifest as PlatformPluginManifest, type PluginBridge, type PluginContext, type PluginHooks$1 as PluginHooks, type PluginManifest$1 as PluginManifest, type PluginNative, type PluginProps, PluginSDK, type PluginSummary, type PluginSurfaceMeta, type RegisteredPlugin, type RegisteredServicePlugin, type RegisteredUIPlugin, type RemotePlugin, type RenderMode, type ScannerAPI, SearchBar, type SharingAPI, type StorageAPI, SurfaceCard, type SurfaceCardProps, SurfaceDispatcher, SurfaceDrawer, type SurfaceDrawerProps, SurfaceFullscreen, type SurfaceFullscreenProps, type SurfaceManifest, type SurfacePlacement, type SurfaceType, type SurfaceVisibility, TabBar, type ThemeTokens, bundleManager, createNativeBridge, gatePluginNative, getHaptics, getNativeBundleHash, getNativeBundleUrl, getNativeComponentId, getPlugin, getPluginNative, isInlineSurface, isMountSurface, listPlugins, nativePluginRegistry, register, registerBundleModules, registerNativePlugin, registerService, resolvePluginUrl, setBundleStorage, setHapticsProvider, setPluginNativeProvider, setPluginThemeColors, supportsNative, supportsWebView, unregisterNativePlugin, useApi, useNativeBridge, usePlugin, usePluginTheme, useRemotePlugins, useSurfaceStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -500,6 +500,16 @@ declare function getHaptics(): HapticsAPI | null;
|
|
|
500
500
|
* `props.native`. The host owns the native modules. */
|
|
501
501
|
declare function setPluginNativeProvider(native: PluginNative): void;
|
|
502
502
|
declare function getPluginNative(): PluginNative;
|
|
503
|
+
/**
|
|
504
|
+
* Gate a PluginNative by the capabilities a plugin's manifest declares.
|
|
505
|
+
* Undeclared capabilities become warn-and-ignore proxies, so a plugin can
|
|
506
|
+
* only touch device APIs it asked for (per-plugin security model, preserved
|
|
507
|
+
* from the reference app). Connectivity is always allowed.
|
|
508
|
+
*
|
|
509
|
+
* Flag mapping mirrors the manifest contract: `storage` is gated by
|
|
510
|
+
* `offline` (offline data ⇒ local storage).
|
|
511
|
+
*/
|
|
512
|
+
declare function gatePluginNative(native: PluginNative, declared?: NativeCapabilities$1): PluginNative;
|
|
503
513
|
type PluginResolver = RegisteredPlugin | (() => Promise<RegisteredPlugin | null>);
|
|
504
514
|
declare function registerNativePlugin(id: string, plugin: PluginResolver): void;
|
|
505
515
|
declare function unregisterNativePlugin(id: string): void;
|
|
@@ -1126,4 +1136,4 @@ declare function isInlineSurface(m: SurfaceManifest): m is InlineSurfaceManifest
|
|
|
1126
1136
|
|
|
1127
1137
|
declare function SurfaceDispatcher(): react_jsx_runtime.JSX.Element;
|
|
1128
1138
|
|
|
1129
|
-
export { ActionButton, AdaOrb, type AdaOrbState, Badge, type BiometricsAPI, type BiometricsAPIv2, type Bridge, type BundleCacheEntry, type BundleStorage, type CameraAPI, Card, type ConnectivityAPI, type CookiesAPI, EmptyState, ErrorState, type FileSystemAPI, type HapticsAPI, type InlineSurfaceManifest, ListItem, LoadingState, type LocationAPI, MemoryBundleStorage, type MountSurfaceManifest, type NativeCapabilities$1 as NativeCapabilities, type NfcAPI, type NotificationsAPI, type PluginManifest as PlatformPluginManifest, type PluginBridge, type PluginContext, type PluginHooks$1 as PluginHooks, type PluginManifest$1 as PluginManifest, type PluginNative, type PluginProps, PluginSDK, type PluginSummary, type PluginSurfaceMeta, type RegisteredPlugin, type RegisteredServicePlugin, type RegisteredUIPlugin, type RemotePlugin, type RenderMode, type ScannerAPI, SearchBar, type SharingAPI, type StorageAPI, SurfaceCard, type SurfaceCardProps, SurfaceDispatcher, SurfaceDrawer, type SurfaceDrawerProps, SurfaceFullscreen, type SurfaceFullscreenProps, type SurfaceManifest, type SurfacePlacement, type SurfaceType, type SurfaceVisibility, TabBar, type ThemeTokens, bundleManager, createNativeBridge, getHaptics, getNativeBundleHash, getNativeBundleUrl, getNativeComponentId, getPlugin, getPluginNative, isInlineSurface, isMountSurface, listPlugins, nativePluginRegistry, register, registerBundleModules, registerNativePlugin, registerService, resolvePluginUrl, setBundleStorage, setHapticsProvider, setPluginNativeProvider, setPluginThemeColors, supportsNative, supportsWebView, unregisterNativePlugin, useApi, useNativeBridge, usePlugin, usePluginTheme, useRemotePlugins, useSurfaceStore };
|
|
1139
|
+
export { ActionButton, AdaOrb, type AdaOrbState, Badge, type BiometricsAPI, type BiometricsAPIv2, type Bridge, type BundleCacheEntry, type BundleStorage, type CameraAPI, Card, type ConnectivityAPI, type CookiesAPI, EmptyState, ErrorState, type FileSystemAPI, type HapticsAPI, type InlineSurfaceManifest, ListItem, LoadingState, type LocationAPI, MemoryBundleStorage, type MountSurfaceManifest, type NativeCapabilities$1 as NativeCapabilities, type NfcAPI, type NotificationsAPI, type PluginManifest as PlatformPluginManifest, type PluginBridge, type PluginContext, type PluginHooks$1 as PluginHooks, type PluginManifest$1 as PluginManifest, type PluginNative, type PluginProps, PluginSDK, type PluginSummary, type PluginSurfaceMeta, type RegisteredPlugin, type RegisteredServicePlugin, type RegisteredUIPlugin, type RemotePlugin, type RenderMode, type ScannerAPI, SearchBar, type SharingAPI, type StorageAPI, SurfaceCard, type SurfaceCardProps, SurfaceDispatcher, SurfaceDrawer, type SurfaceDrawerProps, SurfaceFullscreen, type SurfaceFullscreenProps, type SurfaceManifest, type SurfacePlacement, type SurfaceType, type SurfaceVisibility, TabBar, type ThemeTokens, bundleManager, createNativeBridge, gatePluginNative, getHaptics, getNativeBundleHash, getNativeBundleUrl, getNativeComponentId, getPlugin, getPluginNative, isInlineSurface, isMountSurface, listPlugins, nativePluginRegistry, register, registerBundleModules, registerNativePlugin, registerService, resolvePluginUrl, setBundleStorage, setHapticsProvider, setPluginNativeProvider, setPluginThemeColors, supportsNative, supportsWebView, unregisterNativePlugin, useApi, useNativeBridge, usePlugin, usePluginTheme, useRemotePlugins, useSurfaceStore };
|