@forge/confluence-bridge 3.0.2 → 3.0.3-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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @forge/confluence-bridge
2
2
 
3
+ ## 3.0.3-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 4454464: Add setMacroViewportHeight function to confluence-bridge
8
+
3
9
  ## 3.0.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -7,3 +7,5 @@ Custom bridge methods for extensions to get or modify Confluence editor data.
7
7
  - getMacroContent(): Gets current ADF of the current macro
8
8
 
9
9
  - updateMacro(macroADF): Updates the current macro with new macro ADF passed in
10
+
11
+ - setMacroViewportHeight(height): Sets the current macro to the viewport height passed in
@@ -1,4 +1,5 @@
1
1
  export { getEditorContent } from './getEditorContent';
2
2
  export { updateMacro } from './updateMacro';
3
3
  export { getMacroContent } from './getMacroContent';
4
+ export { setMacroViewportHeight } from './setMacroViewportHeight';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMacroContent = exports.updateMacro = exports.getEditorContent = void 0;
3
+ exports.setMacroViewportHeight = exports.getMacroContent = exports.updateMacro = exports.getEditorContent = void 0;
4
4
  var getEditorContent_1 = require("./getEditorContent");
5
5
  Object.defineProperty(exports, "getEditorContent", { enumerable: true, get: function () { return getEditorContent_1.getEditorContent; } });
6
6
  var updateMacro_1 = require("./updateMacro");
7
7
  Object.defineProperty(exports, "updateMacro", { enumerable: true, get: function () { return updateMacro_1.updateMacro; } });
8
8
  var getMacroContent_1 = require("./getMacroContent");
9
9
  Object.defineProperty(exports, "getMacroContent", { enumerable: true, get: function () { return getMacroContent_1.getMacroContent; } });
10
+ var setMacroViewportHeight_1 = require("./setMacroViewportHeight");
11
+ Object.defineProperty(exports, "setMacroViewportHeight", { enumerable: true, get: function () { return setMacroViewportHeight_1.setMacroViewportHeight; } });
@@ -0,0 +1,3 @@
1
+ export declare const INVALID_HEIGHT_ERROR_MESSAGE = "Height argument must be a positive integer and greater than 0";
2
+ export declare function setMacroViewportHeight(height: string): Promise<boolean>;
3
+ //# sourceMappingURL=setMacroViewportHeight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setMacroViewportHeight.d.ts","sourceRoot":"","sources":["../../src/content/setMacroViewportHeight.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,4BAA4B,kEAAkE,CAAC;AAE5G,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAe7E"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setMacroViewportHeight = exports.INVALID_HEIGHT_ERROR_MESSAGE = void 0;
4
+ const errors_1 = require("../errors");
5
+ const bridge_1 = require("../bridge");
6
+ exports.INVALID_HEIGHT_ERROR_MESSAGE = 'Height argument must be a positive integer and greater than 0';
7
+ async function setMacroViewportHeight(height) {
8
+ const callBridge = (0, bridge_1.getCallBridge)();
9
+ const heightAsNum = Number(height);
10
+ if (!Number.isInteger(heightAsNum) || heightAsNum <= 0) {
11
+ throw new errors_1.BridgeAPIError(exports.INVALID_HEIGHT_ERROR_MESSAGE);
12
+ }
13
+ try {
14
+ const result = await callBridge('setMacroViewportHeight', height);
15
+ return result;
16
+ }
17
+ catch (err) {
18
+ throw new errors_1.BridgeAPIError('Unable to set macro viewport height: ' + err.message);
19
+ }
20
+ }
21
+ exports.setMacroViewportHeight = setMacroViewportHeight;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/confluence-bridge",
3
- "version": "3.0.2",
3
+ "version": "3.0.3-next.0",
4
4
  "description": "Forge Confluence custom bridge API",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",