cec-nuxt-lib 0.3.7 → 0.3.8
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/dist/module.json
CHANGED
|
@@ -3,23 +3,14 @@ import { onMounted } from 'vue';
|
|
|
3
3
|
import { useState } from '#app';
|
|
4
4
|
|
|
5
5
|
import { createRenderer, text } from '@contensis/canvas-html';
|
|
6
|
-
|
|
7
6
|
import type { Block } from '@contensis/canvas-html';
|
|
8
|
-
|
|
9
|
-
const sizeString = (n) => {
|
|
10
|
-
if (n < 1000) {
|
|
11
|
-
return `${n}B`;
|
|
12
|
-
} else if (n < 1000 * 1000) {
|
|
13
|
-
return `${(n / 1000).toFixed(2)}KB`;
|
|
14
|
-
} else {
|
|
15
|
-
return `${(n / 1000 / 1000).toFixed(2)}MB`;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
7
|
+
const getCanvas = (data: Block[]) => renderer({ data });
|
|
18
8
|
|
|
19
9
|
const baseUrl = useState('baseUrl');
|
|
20
|
-
const getCanvas = (data: Block[]) => renderer({ data });
|
|
21
10
|
const listItems = useState('listItems');
|
|
11
|
+
const path = useState('path');
|
|
22
12
|
const questions = useState('questions', () => []);
|
|
13
|
+
const title = useState('title');
|
|
23
14
|
let canvasHtml;
|
|
24
15
|
|
|
25
16
|
const props = defineProps({
|
|
@@ -31,6 +22,16 @@ const props = defineProps({
|
|
|
31
22
|
|
|
32
23
|
const { canvas } = props;
|
|
33
24
|
|
|
25
|
+
const sizeString = (n) => {
|
|
26
|
+
if (n < 1000) {
|
|
27
|
+
return `${n}B`;
|
|
28
|
+
} else if (n < 1000 * 1000) {
|
|
29
|
+
return `${(n / 1000).toFixed(2)}KB`;
|
|
30
|
+
} else {
|
|
31
|
+
return `${(n / 1000 / 1000).toFixed(2)}MB`;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
34
35
|
const regex =
|
|
35
36
|
/^https:\/\/digital-core\.cheshireeast\.gov\.uk(?!.*(?:&pagePath|&pageTitle|login)).*$/;
|
|
36
37
|
|
package/package.json
CHANGED