@media-quest/builder 0.0.6 → 0.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@media-quest/builder",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Builder library for Media-quest schemas",
5
5
  "main": "dist/public-api.js",
6
6
  "module": "dist/public-api.mjs",
@@ -13,6 +13,6 @@
13
13
  "prepublishOnly": "npm run build"
14
14
  },
15
15
  "dependencies": {
16
- "@media-quest/engine": "0.0.6"
16
+ "@media-quest/engine": "0.0.7"
17
17
  }
18
18
  }
@@ -122,11 +122,11 @@ export const DefaultTheme: IDefaultTheme = {
122
122
  text: {
123
123
  css: {
124
124
  w: 80,
125
- y: 27,
125
+ y: 65,
126
126
  x: 10,
127
127
  textAlign: "center",
128
128
  textColor: "black",
129
- fontSize: { _unit: "px", value: 30 },
129
+ fontSize: { _unit: "px", value: 40 },
130
130
  },
131
131
  cssDisabled: {},
132
132
  cssEnabled: {},
@@ -148,11 +148,12 @@ export class DefaultThemeCompiler extends AbstractThemeCompiler<IDefaultTheme> {
148
148
  const nextBtnElement: DElementDto = this.compileButton(id, nextButton, {
149
149
  kind: "next-button",
150
150
  });
151
+ const textStyle = mainMedia ? DefaultTheme.mainText.withMedia.text.css : DefaultTheme.mainText.noMedia.text.css;
151
152
  const element: DElementDto = {
152
153
  text: infoText,
153
154
  _tag: "p",
154
155
  id: generateElementId(),
155
- style: DefaultTheme.mainText.withMedia.text.css,
156
+ style: textStyle,
156
157
  };
157
158
  elements.push(element);
158
159
  elements.push(nextBtnElement);
@@ -161,6 +162,7 @@ export class DefaultThemeCompiler extends AbstractThemeCompiler<IDefaultTheme> {
161
162
  const mainImageElement = this.compileImage(mainMedia);
162
163
  elements.push(mainImageElement);
163
164
  }
165
+
164
166
  if (mainMedia && mainMedia.kind === "main-video") {
165
167
  const videoOutput = this.compileVideo(mainMedia);
166
168
  mainVideo = videoOutput.videoDto;
@@ -343,7 +345,9 @@ export class DefaultThemeCompiler extends AbstractThemeCompiler<IDefaultTheme> {
343
345
  // console.log(page);
344
346
  const q = page.defaultQuestion;
345
347
  const text = page.mainText.text;
346
-
348
+ const questionStyle = page.mainMedia
349
+ ? DefaultTheme.mainText.withMedia.text.css
350
+ : DefaultTheme.mainText.noMedia.text.css;
347
351
  const question: DTextDto = {
348
352
  _tag: "p",
349
353
  text,
@@ -351,7 +355,7 @@ export class DefaultThemeCompiler extends AbstractThemeCompiler<IDefaultTheme> {
351
355
  id: U.randomString(30),
352
356
  onClick: [],
353
357
  onStateChange: [],
354
- style: DefaultTheme.mainText.withMedia.text.css,
358
+ style: questionStyle,
355
359
  };
356
360
  const buttons = q.options.map((o) => {
357
361
  const btns = this.compileButton(pageId, o, {