@jtl-software/cloud-apps-core 0.17.1 → 0.18.0-beta

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 (2) hide show
  1. package/README.md +12 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ![JTL logo](https://avatars.githubusercontent.com/u/31404730?s=25&v=4) JTL-Platform Plugins Core SDK
1
+ # ![JTL logo](https://avatars.githubusercontent.com/u/31404730?s=25&v=4) JTL-Platform Apps Core SDK
2
2
 
3
3
  A lightweight, type-safe communication bridge for JTL Platform apps.
4
4
 
@@ -16,7 +16,7 @@ yarn add @jtl-software/cloud-apps-core
16
16
 
17
17
  ## 🔍 Overview
18
18
 
19
- The JTL Platform Plugins Core SDK provides a robust communication bridge between apps and the JTL Platform host application. It enables:
19
+ The JTL Platform Apps Core SDK provides a robust communication bridge between apps and the JTL Platform host application. It enables:
20
20
 
21
21
  - Bidirectional method calling between apps and host
22
22
  - Event-based publish/subscribe communication
@@ -27,25 +27,25 @@ This package is the foundation for building apps that integrate seamlessly with
27
27
 
28
28
  ## 🚀 Usage
29
29
 
30
- ### Creating a Plugin Bridge
30
+ ### Creating a App Bridge
31
31
 
32
- To use the PluginBridge in your React components, you'll need to initialize it and maintain its instance in your component's state. Typically, this is done within a useEffect hook:
32
+ To use the AppBridge in your React components, you'll need to initialize it and maintain its instance in your component's state. Typically, this is done within a useEffect hook:
33
33
 
34
34
  ```typescript
35
- import { createPluginBridge, PluginBridge } from '@jtl-software/cloud-apps-core';
35
+ import { createAppBridge, AppBridge } from '@jtl-software/cloud-apps-core';
36
36
  import { useState, useEffect } from 'react';
37
37
 
38
- function YourPluginComponent() {
39
- // Store the PluginBridge instance in component state
40
- const [appBridge, setPluginBridge] = useState<PluginBridge | undefined>(undefined);
38
+ function YourAppComponent() {
39
+ // Store the AppBridge instance in component state
40
+ const [appBridge, setAppBridge] = useState<AppBridge | undefined>(undefined);
41
41
 
42
42
  useEffect((): void => {
43
43
  console.info('Creating bridge...');
44
- createPluginBridge().then(bridge => {
44
+ createAppBridge().then(bridge => {
45
45
  console.log('Bridge created!');
46
46
 
47
47
  // Store the bridge instance in state for use throughout your component
48
- setPluginBridge(bridge);
48
+ setAppBridge(bridge);
49
49
  });
50
50
  }, []);
51
51
 
@@ -113,7 +113,7 @@ const orderDetails = await appBridge.callMethod('getOrderDetails', 'ORD-5678');
113
113
 
114
114
  ## 📚 API Reference
115
115
 
116
- ### PluginBridge
116
+ ### AppBridge
117
117
 
118
118
  The main class that handles communication between the app and host, it provides the following methods.
119
119
 
@@ -188,7 +188,7 @@ Calls a method provided by the host environment and returns the result.
188
188
 
189
189
  ### Factories
190
190
 
191
- - `createPluginBridge()`: Creates and initializes a PluginBridge instance
191
+ - `createAppBridge()`: Creates and initializes a AppBridge instance
192
192
 
193
193
  ## 📦 Dependencies
194
194
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jtl-software/cloud-apps-core",
3
3
  "private": false,
4
- "version": "0.17.1",
4
+ "version": "0.18.0-beta",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"