@forge/bridge 2.2.0 → 2.3.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/out/events/events.d.ts +6 -0
- package/out/events/events.d.ts.map +1 -0
- package/out/events/events.js +15 -0
- package/out/events/index.d.ts +2 -0
- package/out/events/index.d.ts.map +1 -0
- package/out/events/index.js +4 -0
- package/out/index.d.ts +1 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -0
- package/out/types.d.ts +3 -0
- package/out/types.d.ts.map +1 -1
- package/out/view/createHistory.d.ts.map +1 -1
- package/out/view/createHistory.js +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @forge/bridge
|
|
2
2
|
|
|
3
|
+
## 2.3.0-next.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d307c8f: Add on and emit methods to Events API
|
|
8
|
+
|
|
9
|
+
## 2.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 97ce1f3: update history.location in bridge when route changes
|
|
14
|
+
|
|
15
|
+
## 2.2.1-next.0
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 97ce1f3: update history.location in bridge when route changes
|
|
20
|
+
|
|
3
21
|
## 2.2.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/events/events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAYxC,eAAO,MAAM,MAAM;kBARE,MAAM,YAAY,GAAG,KAAG,OAAO,CAAC,IAAI,CAAC;gBAIvC,MAAM,uBAAuB,GAAG,KAAK,GAAG,KAAG,OAAO,CAAC,YAAY,CAAC;CAOlF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.events = void 0;
|
|
4
|
+
const bridge_1 = require("../bridge");
|
|
5
|
+
const callBridge = bridge_1.getCallBridge();
|
|
6
|
+
const emit = (event, payload) => {
|
|
7
|
+
return callBridge('emit', { event, payload });
|
|
8
|
+
};
|
|
9
|
+
const on = (event, callback) => {
|
|
10
|
+
return callBridge('on', { event, callback });
|
|
11
|
+
};
|
|
12
|
+
exports.events = {
|
|
13
|
+
emit,
|
|
14
|
+
on
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
package/out/index.d.ts
CHANGED
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
package/out/index.js
CHANGED
package/out/types.d.ts
CHANGED
|
@@ -6,4 +6,7 @@ export declare type ProductFetchResponse = {
|
|
|
6
6
|
body?: string;
|
|
7
7
|
} & Pick<ResponseInit, 'headers' | 'status' | 'statusText'>;
|
|
8
8
|
export declare type FullContext = {};
|
|
9
|
+
export declare type Subscription = {
|
|
10
|
+
unsubscribe: () => void;
|
|
11
|
+
};
|
|
9
12
|
//# sourceMappingURL=types.d.ts.map
|
package/out/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa,GAAG;KACzB,GAAG,IAAI,MAAM,GAAG,MAAM,GAAG,GAAG;CAC9B,CAAC;AAEF,oBAAY,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC;AAE/G,oBAAY,WAAW,GAAG,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa,GAAG;KACzB,GAAG,IAAI,MAAM,GAAG,MAAM,GAAG,GAAG;CAC9B,CAAC;AAEF,oBAAY,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC;AAE/G,oBAAY,WAAW,GAAG,EAAE,CAAC;AAE7B,oBAAY,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createHistory.d.ts","sourceRoot":"","sources":["../../src/view/createHistory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"createHistory.d.ts","sourceRoot":"","sources":["../../src/view/createHistory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,OAAO,CAOrD,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createHistory = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const bridge_1 = require("../bridge");
|
|
5
6
|
const callBridge = bridge_1.getCallBridge();
|
|
6
|
-
exports.createHistory = () => {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
exports.createHistory = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
const history = yield callBridge('createHistory');
|
|
9
|
+
history.listen((location) => {
|
|
10
|
+
history.location = location;
|
|
11
|
+
});
|
|
12
|
+
return history;
|
|
13
|
+
});
|