@forge/confluence-bridge 3.0.2 → 3.0.3-next.0-experimental-90687cf
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 +12 -0
- package/README.md +2 -0
- package/out/content/index.d.ts +1 -0
- package/out/content/index.d.ts.map +1 -1
- package/out/content/index.js +3 -1
- package/out/content/setMacroViewportHeight.d.ts +3 -0
- package/out/content/setMacroViewportHeight.d.ts.map +1 -0
- package/out/content/setMacroViewportHeight.js +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @forge/confluence-bridge
|
|
2
2
|
|
|
3
|
+
## 3.0.3-next.0-experimental-90687cf
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4454464: Add setMacroViewportHeight function to confluence-bridge
|
|
8
|
+
|
|
9
|
+
## 3.0.3-next.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 4454464: Add setMacroViewportHeight function to confluence-bridge
|
|
14
|
+
|
|
3
15
|
## 3.0.2
|
|
4
16
|
|
|
5
17
|
### 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
|
package/out/content/index.d.ts
CHANGED
|
@@ -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"}
|
package/out/content/index.js
CHANGED
|
@@ -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 @@
|
|
|
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;
|