qumra-engine 2.0.76 → 2.0.77

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.
@@ -5,6 +5,6 @@ declare const _default: {
5
5
  run({ ctx, env }: {
6
6
  ctx: any;
7
7
  env: nunjucks.Environment;
8
- }, templateKey: string): nunjucks.runtime.SafeString;
8
+ }, templateKey: string): "" | nunjucks.runtime.SafeString;
9
9
  };
10
10
  export default _default;
@@ -16,6 +16,10 @@ exports.default = new (class WidgetExtension {
16
16
  return new nodes.CallExtension(this, "run", args);
17
17
  }
18
18
  run({ ctx, env }, templateKey) {
19
+ const widgetPreview = env.getGlobal("widget");
20
+ if (widgetPreview) {
21
+ return '';
22
+ }
19
23
  if (templateKey === "main") {
20
24
  return new nunjucks_1.default.runtime.SafeString(`
21
25
  <div style="padding: 12px; background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 4px; margin: 8px 0;">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qumra-engine",
3
- "version": "2.0.76",
3
+ "version": "2.0.77",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {