despia-native 1.0.2 → 1.0.4

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.
Files changed (3) hide show
  1. package/README.md +10 -9
  2. package/index.d.ts +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Despia SDK
2
2
 
3
- JavaScript SDK for [Despia](https://docs.despia.com) native integrations with command queuing and variable watching capabilities.
3
+ JavaScript SDK for [Despia](https://despia.com) that enables your web app to access native device capabilities through Despia's runtime. This npm package provides command queuing and variable watching capabilities for seamless integration with over 23 native device features.
4
4
 
5
5
  ## About Despia
6
6
 
7
- Despia provides native device capabilities to web applications through a simple protocol system. Access features like:
7
+ Despia is a platform that transforms web applications into fully native mobile apps for iOS and Android. It bridges the gap between web and native functionalities, allowing you to access native device capabilities directly from your web codebase without requiring extensive native development experience. Access features like:
8
8
  - App Links & Deep Linking
9
9
  - Native Widgets & App Clips
10
10
  - In-App Purchases & Subscriptions
@@ -17,7 +17,7 @@ Despia provides native device capabilities to web applications through a simple
17
17
  ## Installation
18
18
 
19
19
  ```bash
20
- npm install despia
20
+ npm install despia-native
21
21
  ```
22
22
 
23
23
  ## Usage
@@ -25,7 +25,7 @@ npm install despia
25
25
  ### Basic Despia Command Execution
26
26
 
27
27
  ```javascript
28
- import despia from 'despia';
28
+ import despia from 'despia-native';
29
29
 
30
30
  // Execute a Despia protocol command (no response needed)
31
31
  despia('lighthaptic://');
@@ -403,7 +403,7 @@ Your app can access these native features:
403
403
  Full TypeScript definitions are included:
404
404
 
405
405
  ```typescript
406
- import despia from 'despia';
406
+ import despia from 'despia-native';
407
407
 
408
408
  // Type-safe usage with Despia commands
409
409
  const result: { versionNumber: string; bundleNumber: string } = await despia(
@@ -417,16 +417,17 @@ const deviceInfo: any = despia.deviceInfo;
417
417
 
418
418
  ## Integration with Despia
419
419
 
420
- This SDK is designed to work with [Despia's native integration system](https://docs.despia.com/docs/native-integrations/getting-started). The SDK provides:
420
+ Despia operates through a streamlined protocol handler system, allowing you to invoke native features using the global `window.despia` object. This npm package is the JavaScript SDK that makes your web app communicate with Despia's native runtime. The SDK provides:
421
421
 
422
422
  - **Command Queuing** - Sequential execution of Despia commands via `window.despia` setter
423
423
  - **Variable Watching** - Async monitoring of response variables
424
- - **iOS Web View Compatible** - Works with Despia's iOS web view wrapper
424
+ - **Hybrid Framework Compatible** - Works with Despia's hybrid app framework
425
425
  - **Direct Access** - Proxy-based access to window variables
426
426
 
427
427
  ### How It Works
428
428
 
429
- The SDK uses the setter pattern to execute commands:
429
+ Despia's protocol handler system eliminates the need for complex libraries or dependencies, making it compatible across various frameworks and platforms. The SDK uses the setter pattern to execute commands:
430
+
430
431
  ```javascript
431
432
  // When you call:
432
433
  despia('lighthaptic://');
@@ -435,7 +436,7 @@ despia('lighthaptic://');
435
436
  window.despia = 'lighthaptic://';
436
437
  ```
437
438
 
438
- This triggers the iOS web view wrapper's setter function to handle the native command.
439
+ This streamlined approach triggers Despia's native runtime to handle the native command, providing seamless access to device capabilities directly from your web codebase.
439
440
 
440
441
  ## License
441
442
 
package/index.d.ts CHANGED
@@ -103,7 +103,7 @@ interface DespiaFunction {
103
103
  *
104
104
  * @example
105
105
  * ```typescript
106
- * import despia from 'despia';
106
+ * import despia from 'despia-native';
107
107
  *
108
108
  * // Execute Despia protocol commands
109
109
  * await despia('applinks://open?url=https://maps.apple.com');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "despia-native",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "JavaScript SDK for Despia native integrations with command queuing and variable watching",
5
5
  "main": "index.js",
6
6
  "module": "index.js",