@tailor-cms/tce-preview-runtime 2.0.0-beta.9 → 2.0.0
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 +2 -9
- package/package.json +6 -6
- package/src/App.vue +16 -16
- package/src/main.ts +1 -0
- package/src/reset.css +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
# @tailor-cms/tce-preview-runtime
|
|
2
2
|
|
|
3
|
-
## 2.0.0-beta.4
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Pass initConfig to initState.
|
|
8
|
-
- Updated dependencies
|
|
9
|
-
- @tailor-cms/cek-common@2.0.0-beta.4
|
|
10
|
-
|
|
11
3
|
## 2.0.0
|
|
12
4
|
|
|
13
5
|
### Major Changes
|
|
14
6
|
|
|
15
|
-
-
|
|
7
|
+
- Uses `vite-plugin-vuetify` for Vuetify tree-shaking in the preview shell.
|
|
16
8
|
- ThemeDialog integration for edit and display panels.
|
|
9
|
+
- Propagates `initConfig` through edit and display panels.
|
|
17
10
|
|
|
18
11
|
### Patch Changes
|
|
19
12
|
|
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
|
|
5
|
+
"version": "2.0.0",
|
|
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.
|
|
17
|
+
"vite": "^8.0.10",
|
|
18
18
|
"vite-plugin-vuetify": "^2.1.3",
|
|
19
|
-
"vue": "^3.5.
|
|
20
|
-
"vuetify": "^4.0.
|
|
21
|
-
"@tailor-cms/cek-common": "^2.0.0
|
|
19
|
+
"vue": "^3.5.33",
|
|
20
|
+
"vuetify": "^4.0.6",
|
|
21
|
+
"@tailor-cms/cek-common": "^2.0.0"
|
|
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
|
|
26
|
+
"@tailor-cms/eslint-config": "^2.0.0"
|
|
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(
|
|
37
|
-
await api.resetState(
|
|
38
|
-
return api.resetElement(
|
|
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
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
|
+
}
|