@tailor-cms/tce-preview-runtime 2.0.0-beta.9 → 2.0.1

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,19 +1,20 @@
1
1
  # @tailor-cms/tce-preview-runtime
2
2
 
3
- ## 2.0.0-beta.4
3
+ ## 2.0.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Pass initConfig to initState.
7
+ - Fix resetState to include prompt for isQuestion condition.
8
8
  - Updated dependencies
9
- - @tailor-cms/cek-common@2.0.0-beta.4
9
+ - @tailor-cms/cek-common@2.0.1
10
10
 
11
11
  ## 2.0.0
12
12
 
13
13
  ### Major Changes
14
14
 
15
- - Vuetify 4 migration with vite-plugin-vuetify.
15
+ - Uses `vite-plugin-vuetify` for Vuetify tree-shaking in the preview shell.
16
16
  - ThemeDialog integration for edit and display panels.
17
+ - Propagates `initConfig` through edit and display panels.
17
18
 
18
19
  ### Patch Changes
19
20
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tailor-cms/tce-preview-runtime",
3
3
  "description": "Preview content element client side runtime",
4
4
  "author": "Studion <info@gostudion.com>",
5
- "version": "2.0.0-beta.9",
5
+ "version": "2.0.1",
6
6
  "type": "module",
7
7
  "dependencies": {
8
8
  "@mdi/font": "^7.4.47",
@@ -14,16 +14,16 @@
14
14
  "split.js": "^1.6.5",
15
15
  "stringify-object": "^6.0.0",
16
16
  "typescript": "^6.0.3",
17
- "vite": "^8.0.8",
17
+ "vite": "^8.0.10",
18
18
  "vite-plugin-vuetify": "^2.1.3",
19
- "vue": "^3.5.32",
20
- "vuetify": "^4.0.5",
21
- "@tailor-cms/cek-common": "^2.0.0-beta.9"
19
+ "vue": "^3.5.33",
20
+ "vuetify": "^4.0.6",
21
+ "@tailor-cms/cek-common": "^2.0.1"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/lodash-es": "^4.17.12",
25
25
  "@types/stringify-object": "^4.0.5",
26
- "@tailor-cms/eslint-config": "^2.0.0-beta.9"
26
+ "@tailor-cms/eslint-config": "^2.0.1"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"
package/src/App.vue CHANGED
@@ -1,3 +1,16 @@
1
+ <template>
2
+ <VApp>
3
+ <AppBar />
4
+ <MainLayout
5
+ :element="element"
6
+ :user-state="userState"
7
+ class="mt-14"
8
+ @reset-element="element && resetElement(element)"
9
+ @reset-state="element && api.resetState(element.uid)"
10
+ />
11
+ </VApp>
12
+ </template>
13
+
1
14
  <script setup lang="ts">
2
15
  import {
3
16
  getApiClient,
@@ -33,9 +46,9 @@ async function load(id: string): Promise<any> {
33
46
  }
34
47
  }
35
48
 
36
- async function resetElement(id: string) {
37
- await api.resetState(id);
38
- return api.resetElement(id);
49
+ async function resetElement(element: Element) {
50
+ await api.resetState(element.uid);
51
+ return api.resetElement(element.uid, { isGradable: element.data.isGradable });
39
52
  }
40
53
 
41
54
  onMounted(async () => {
@@ -49,19 +62,6 @@ onMounted(async () => {
49
62
  });
50
63
  </script>
51
64
 
52
- <template>
53
- <VApp>
54
- <AppBar />
55
- <MainLayout
56
- :element="element"
57
- :user-state="userState"
58
- class="mt-14"
59
- @reset-element="element && resetElement(element.uid)"
60
- @reset-state="element && api.resetState(element.uid)"
61
- />
62
- </VApp>
63
- </template>
64
-
65
65
  <style>
66
66
  body {
67
67
  --nav-height: 4.2rem;
package/src/main.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import '@mdi/font/css/materialdesignicons.css';
2
2
  import 'vuetify/styles';
3
+ import './reset.css';
3
4
 
4
5
  import { createApp } from 'vue';
5
6
  import { createVuetify } from 'vuetify';
package/src/reset.css ADDED
@@ -0,0 +1,8 @@
1
+ /* Vuetify 4's reset no longer zeroes browser-default margins on typographic
2
+ elements (h1-h6, p). Authored HTML rendered inside content elements relies
3
+ on that baseline. Re-augment Vuetify's reset layer to restore it. */
4
+ @layer vuetify-core.reset {
5
+ h1, h2, h3, h4, h5, h6, p, blockquote, figure {
6
+ margin: 0;
7
+ }
8
+ }