@forge/dashboards-bridge 0.0.1-experimental-97e4b11

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 ADDED
@@ -0,0 +1 @@
1
+ # @forge/dashboards-bridge
package/LICENSE.txt ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2025 Atlassian
2
+ Permission is hereby granted to use this software in accordance with the terms
3
+ and conditions outlined in the Atlassian Developer Terms, which can be found
4
+ at the following URL:
5
+ https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
6
+ By using this software, you agree to comply with these terms and conditions.
7
+ If you do not agree with these terms, you are not permitted to use this software.
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # Forge Dashboards Bridge API
2
+
3
+ This package provides bridge APIs for Forge applications to integrate with Atlassian Home Dashboards.
4
+
5
+ ## Changes
6
+ See [CHANGELOG.md](CHANGELOG.md)
@@ -0,0 +1,2 @@
1
+ export declare const getCallBridge: () => Window['__bridge']['callBridge'];
2
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAO,MAAM,CAAC,UAAU,CAAC,CAAC,YAAY,CAE/D,CAAC"}
package/out/bridge.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCallBridge = void 0;
4
+ const getCallBridge = () => {
5
+ return window.__bridge.callBridge;
6
+ };
7
+ exports.getCallBridge = getCallBridge;
@@ -0,0 +1,3 @@
1
+ export declare class BridgeAPIError extends Error {
2
+ }
3
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAe,SAAQ,KAAK;CAAG"}
package/out/errors.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BridgeAPIError = void 0;
4
+ class BridgeAPIError extends Error {
5
+ }
6
+ exports.BridgeAPIError = BridgeAPIError;
package/out/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './widgets';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
package/out/index.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./widgets"), exports);
@@ -0,0 +1,5 @@
1
+ export { setOnSave } from './setOnSave';
2
+ export { setPreviewData } from './setPreviewData';
3
+ export { updateData } from './updateData';
4
+ export type { WidgetData, OnSave } from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateData = exports.setPreviewData = exports.setOnSave = void 0;
4
+ var setOnSave_1 = require("./setOnSave");
5
+ Object.defineProperty(exports, "setOnSave", { enumerable: true, get: function () { return setOnSave_1.setOnSave; } });
6
+ var setPreviewData_1 = require("./setPreviewData");
7
+ Object.defineProperty(exports, "setPreviewData", { enumerable: true, get: function () { return setPreviewData_1.setPreviewData; } });
8
+ var updateData_1 = require("./updateData");
9
+ Object.defineProperty(exports, "updateData", { enumerable: true, get: function () { return updateData_1.updateData; } });
@@ -0,0 +1,3 @@
1
+ import { OnSave } from './types';
2
+ export declare function setOnSave(onSave: OnSave): Promise<void>;
3
+ //# sourceMappingURL=setOnSave.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setOnSave.d.ts","sourceRoot":"","sources":["../../src/widgets/setOnSave.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,wBAAsB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ7D"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setOnSave = void 0;
4
+ const errors_1 = require("../errors");
5
+ const bridge_1 = require("../bridge");
6
+ async function setOnSave(onSave) {
7
+ const callBridge = (0, bridge_1.getCallBridge)();
8
+ try {
9
+ await callBridge('setOnSave', onSave);
10
+ }
11
+ catch (err) {
12
+ throw new errors_1.BridgeAPIError('Unable to set save action: ' + err.message);
13
+ }
14
+ }
15
+ exports.setOnSave = setOnSave;
@@ -0,0 +1,3 @@
1
+ import { WidgetData } from './types';
2
+ export declare function setPreviewData(previewData: WidgetData): Promise<void>;
3
+ //# sourceMappingURL=setPreviewData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setPreviewData.d.ts","sourceRoot":"","sources":["../../src/widgets/setPreviewData.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,wBAAsB,cAAc,CAAC,WAAW,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ3E"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setPreviewData = void 0;
4
+ const errors_1 = require("../errors");
5
+ const bridge_1 = require("../bridge");
6
+ async function setPreviewData(previewData) {
7
+ const callBridge = (0, bridge_1.getCallBridge)();
8
+ try {
9
+ await callBridge('setPreviewData', previewData);
10
+ }
11
+ catch (err) {
12
+ throw new errors_1.BridgeAPIError('Unable to set preview data: ' + err.message);
13
+ }
14
+ }
15
+ exports.setPreviewData = setPreviewData;
@@ -0,0 +1,3 @@
1
+ export declare type WidgetData = Record<string, unknown>;
2
+ export declare type OnSave = (extensionData: WidgetData, widgetId: string) => Promise<WidgetData | null | undefined>;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/widgets/types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjD,oBAAY,MAAM,GAAG,CAAC,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import type { WidgetData } from './types';
2
+ export declare function updateData(data: WidgetData): Promise<void>;
3
+ //# sourceMappingURL=updateData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateData.d.ts","sourceRoot":"","sources":["../../src/widgets/updateData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAsB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAQhE"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateData = void 0;
4
+ const errors_1 = require("../errors");
5
+ const bridge_1 = require("../bridge");
6
+ async function updateData(data) {
7
+ const callBridge = (0, bridge_1.getCallBridge)();
8
+ try {
9
+ await callBridge('updateData', data);
10
+ }
11
+ catch (err) {
12
+ throw new errors_1.BridgeAPIError('Unable to update data: ' + err.message);
13
+ }
14
+ }
15
+ exports.updateData = updateData;
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@forge/dashboards-bridge",
3
+ "version": "0.0.1-experimental-97e4b11",
4
+ "description": "Forge Dashboards custom bridge API",
5
+ "author": "Atlassian",
6
+ "license": "SEE LICENSE IN LICENSE.txt",
7
+ "browser": "out/index.js",
8
+ "types": "out/index.d.ts",
9
+ "scripts": {
10
+ "build": "yarn run clean && yarn run compile",
11
+ "clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo",
12
+ "compile": "tsc -b -v"
13
+ },
14
+ "publishConfig": {
15
+ "registry": "https://packages.atlassian.com/api/npm/npm-public/"
16
+ }
17
+ }