@tailor-cms/tce-preview-runtime 0.4.0 → 0.5.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 +7 -0
- package/package.json +16 -15
- package/src/App.vue +2 -2
- package/src/components/AppBar.vue +28 -27
- package/src/components/BottomPanel.vue +14 -14
- package/src/components/MutationList.vue +12 -14
- package/src/components/SplashLoader.vue +5 -1
- package/vite.config.ts +0 -4
package/CHANGELOG.md
ADDED
package/package.json
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-cms/tce-preview-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@lukeed/uuid": "^2.0.1",
|
|
6
|
-
"@mdi/font": "7.
|
|
7
|
-
"@vitejs/plugin-vue": "
|
|
8
|
-
"@vueuse/core": "
|
|
9
|
-
"date-fns": "^
|
|
10
|
-
"ky": "1.
|
|
6
|
+
"@mdi/font": "7.4.47",
|
|
7
|
+
"@vitejs/plugin-vue": "5.2.1",
|
|
8
|
+
"@vueuse/core": "12.5.0",
|
|
9
|
+
"date-fns": "^4.1.0",
|
|
10
|
+
"ky": "1.7.4",
|
|
11
11
|
"lodash": "^4.17.21",
|
|
12
|
-
"sass": "1.
|
|
12
|
+
"sass": "1.84.0",
|
|
13
13
|
"split.js": "1.6.5",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"vite
|
|
18
|
-
"
|
|
19
|
-
"vue
|
|
20
|
-
"
|
|
21
|
-
"vuetify": "3.
|
|
14
|
+
"stringify-object": "^5.0.0",
|
|
15
|
+
"typescript": "5.7.3",
|
|
16
|
+
"universal-cookie": "^7.2.2",
|
|
17
|
+
"vite": "6.1.0",
|
|
18
|
+
"vite-plugin-vuetify": "2.1.0",
|
|
19
|
+
"vue": "3.5.13",
|
|
20
|
+
"vue-tsc": "2.2.0",
|
|
21
|
+
"vuetify": "3.7.11"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
"@types/stringify-object": "^4.0.5",
|
|
24
25
|
"@tailor-cms/eslint-config": "0.0.2"
|
|
25
26
|
},
|
|
26
27
|
"publishConfig": {
|
package/src/App.vue
CHANGED
|
@@ -70,7 +70,7 @@ async function resetState() {
|
|
|
70
70
|
</script>
|
|
71
71
|
|
|
72
72
|
<template>
|
|
73
|
-
<
|
|
73
|
+
<VApp>
|
|
74
74
|
<AppBar />
|
|
75
75
|
<MainLayout
|
|
76
76
|
:element="element"
|
|
@@ -79,7 +79,7 @@ async function resetState() {
|
|
|
79
79
|
@reset-element="resetElement"
|
|
80
80
|
@reset-state="resetState"
|
|
81
81
|
/>
|
|
82
|
-
</
|
|
82
|
+
</VApp>
|
|
83
83
|
</template>
|
|
84
84
|
|
|
85
85
|
<style>
|
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import logoUrl from '../assets/logo.png';
|
|
3
3
|
import { useGlobalState } from '../state';
|
|
4
|
+
import { version } from './../../package.json';
|
|
4
5
|
|
|
5
6
|
const { showEdit, showDisplay, showBothComponents } = useGlobalState();
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
<
|
|
10
|
+
<VAppBar color="blue-grey-darken-4" elevation="6">
|
|
10
11
|
<template #prepend>
|
|
11
|
-
<
|
|
12
|
+
<VAppBarNavIcon class="ml-2">
|
|
12
13
|
<img :src="logoUrl" alt="Tailor logo" width="36" />
|
|
13
|
-
</
|
|
14
|
+
</VAppBarNavIcon>
|
|
14
15
|
</template>
|
|
15
|
-
<
|
|
16
|
+
<VAppBarTitle class="ml-2">
|
|
16
17
|
Content Element Kit
|
|
17
|
-
<
|
|
18
|
+
<VChip
|
|
18
19
|
class="ml-3 mb-1 text-body-2"
|
|
19
20
|
color="#23F48B"
|
|
20
21
|
density="compact"
|
|
21
22
|
variant="tonal"
|
|
22
23
|
>
|
|
23
|
-
|
|
24
|
-
</
|
|
25
|
-
</
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
<
|
|
24
|
+
{{ version }}
|
|
25
|
+
</VChip>
|
|
26
|
+
</VAppBarTitle>
|
|
27
|
+
<VSpacer />
|
|
28
|
+
<VBtnToggle class="mr-4" density="compact">
|
|
29
|
+
<VBtn @click="showEdit">
|
|
29
30
|
<span>Authoring</span>
|
|
30
|
-
<
|
|
31
|
-
</
|
|
32
|
-
<
|
|
31
|
+
<VIcon end>mdi-pencil</VIcon>
|
|
32
|
+
</VBtn>
|
|
33
|
+
<VBtn @click="showDisplay">
|
|
33
34
|
<span>End-user</span>
|
|
34
|
-
<
|
|
35
|
-
</
|
|
36
|
-
<
|
|
35
|
+
<VIcon end>mdi-fullscreen</VIcon>
|
|
36
|
+
</VBtn>
|
|
37
|
+
<VBtn @click="showBothComponents">
|
|
37
38
|
<span>Both</span>
|
|
38
|
-
<
|
|
39
|
-
</
|
|
40
|
-
</
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
</
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
</
|
|
47
|
-
</
|
|
39
|
+
<VIcon end>mdi-math-norm-box</VIcon>
|
|
40
|
+
</VBtn>
|
|
41
|
+
</VBtnToggle>
|
|
42
|
+
<VBtn href="https://github.com/tailor-cms/tce-template" icon>
|
|
43
|
+
<VIcon>mdi-github</VIcon>
|
|
44
|
+
</VBtn>
|
|
45
|
+
<VBtn href="https://tailor-cms.github.io/xt/" icon>
|
|
46
|
+
<VIcon>mdi-book-outline</VIcon>
|
|
47
|
+
</VBtn>
|
|
48
|
+
</VAppBar>
|
|
48
49
|
</template>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-show="isLoaded">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
3
|
+
<VTabs v-model="state.selectedTab">
|
|
4
|
+
<VTab :value="1">
|
|
5
5
|
<VChip append-icon="mdi-pen" class="mr-2" color="indigo" size="small">
|
|
6
6
|
{{ state.elementHistory.length }}
|
|
7
7
|
</VChip>
|
|
8
8
|
Authoring history
|
|
9
|
-
</
|
|
10
|
-
<
|
|
9
|
+
</VTab>
|
|
10
|
+
<VTab :value="2">
|
|
11
11
|
<VChip
|
|
12
12
|
append-icon="mdi-account"
|
|
13
13
|
class="mr-2"
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
{{ state.userInteractions.length }}
|
|
18
18
|
</VChip>
|
|
19
19
|
End-User state history
|
|
20
|
-
</
|
|
21
|
-
</
|
|
20
|
+
</VTab>
|
|
21
|
+
</VTabs>
|
|
22
22
|
<div class="pa-6">
|
|
23
|
-
<
|
|
24
|
-
<
|
|
23
|
+
<VWindow v-model="state.selectedTab">
|
|
24
|
+
<VWindowItem :value="1">
|
|
25
25
|
<VBtn
|
|
26
26
|
class="mb-4"
|
|
27
|
-
color="
|
|
27
|
+
color="indigoDarken4"
|
|
28
28
|
variant="tonal"
|
|
29
29
|
@click="$emit('resetElement')"
|
|
30
30
|
>
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
Reset content element
|
|
33
33
|
</VBtn>
|
|
34
34
|
<MutationList :changes="state.elementHistory" />
|
|
35
|
-
</
|
|
36
|
-
<
|
|
35
|
+
</VWindowItem>
|
|
36
|
+
<VWindowItem :value="2">
|
|
37
37
|
<VBtn
|
|
38
38
|
class="mb-4"
|
|
39
|
-
color="
|
|
39
|
+
color="indigoDarken4"
|
|
40
40
|
variant="tonal"
|
|
41
41
|
@click="$emit('resetState')"
|
|
42
42
|
>
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
Reset state context
|
|
45
45
|
</VBtn>
|
|
46
46
|
<MutationList :changes="state.userInteractions" />
|
|
47
|
-
</
|
|
48
|
-
</
|
|
47
|
+
</VWindowItem>
|
|
48
|
+
</VWindow>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
</template>
|
|
@@ -2,32 +2,30 @@
|
|
|
2
2
|
<VDataIterator :items="changes" :items-per-page="50" expand-on-click>
|
|
3
3
|
<template #default="{ items, isExpanded, toggleExpand }">
|
|
4
4
|
<template v-for="(item, index) in items" :key="item.raw.id">
|
|
5
|
-
<
|
|
5
|
+
<VCard
|
|
6
6
|
:disabled="index === 0"
|
|
7
7
|
:ripple="false"
|
|
8
8
|
class="mb-1"
|
|
9
|
-
@click="toggleExpand(item)"
|
|
9
|
+
@click="toggleExpand(item as any)"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
11
|
+
<VCardTitle class="d-flex align-center">
|
|
12
12
|
<v-icon color="orange-darken-3" icon="mdi-update" size="18" start />
|
|
13
13
|
<div class="text-body-1">{{ item.raw.title }}</div>
|
|
14
|
-
</
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</v-card-text>
|
|
23
|
-
</v-card>
|
|
14
|
+
</VCardTitle>
|
|
15
|
+
<VCardText
|
|
16
|
+
v-show="isExpanded(item as any) || index === 0"
|
|
17
|
+
class="text-indigo-darken-4 bg-blue-grey-lighten-5 py-2 ma-3"
|
|
18
|
+
>
|
|
19
|
+
<pre>{{ stringifyObject(item.raw.data, { indent: ' ' }) }}</pre>
|
|
20
|
+
</VCardText>
|
|
21
|
+
</VCard>
|
|
24
22
|
</template>
|
|
25
23
|
</template>
|
|
26
24
|
</VDataIterator>
|
|
27
25
|
</template>
|
|
28
26
|
|
|
29
27
|
<script setup lang="ts">
|
|
30
|
-
import
|
|
28
|
+
import stringifyObject from 'stringify-object';
|
|
31
29
|
|
|
32
30
|
defineProps<{ changes: any[] }>();
|
|
33
31
|
</script>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:model-value="progress"
|
|
13
13
|
class="my-3"
|
|
14
14
|
/>
|
|
15
|
-
<div class="font-weight-bold">Beta preview
|
|
15
|
+
<div class="font-weight-bold">Beta preview v{{ version }}</div>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import logoUrl from '../assets/logo.png';
|
|
24
|
+
import { version } from './../../package.json';
|
|
24
25
|
|
|
25
26
|
export default {
|
|
26
27
|
props: {
|
|
@@ -49,6 +50,9 @@ export default {
|
|
|
49
50
|
interval: 0,
|
|
50
51
|
progress: 0,
|
|
51
52
|
}),
|
|
53
|
+
computed: {
|
|
54
|
+
version: () => version,
|
|
55
|
+
},
|
|
52
56
|
mounted() {
|
|
53
57
|
this.setColor();
|
|
54
58
|
if (!this.isFirstBoot) return;
|
package/vite.config.ts
CHANGED