@hywax/cms 3.1.0 → 3.2.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/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/EditorFull.d.vue.ts +1 -0
- package/dist/runtime/components/EditorFull.vue +17 -3
- package/dist/runtime/components/EditorFull.vue.d.ts +1 -0
- package/dist/runtime/components/TablePreviewLink.vue +3 -3
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { pascalCase, kebabCase } from 'scule';
|
|
|
7
7
|
import { globSync } from 'tinyglobby';
|
|
8
8
|
|
|
9
9
|
const name = "@hywax/cms";
|
|
10
|
-
const version = "3.1
|
|
10
|
+
const version = "3.2.1";
|
|
11
11
|
|
|
12
12
|
function createContext(options, nuxt) {
|
|
13
13
|
const { resolve } = createResolver(import.meta.url);
|
|
@@ -2,6 +2,7 @@ import type { EditorCustomHandlers, EditorEmits, EditorProps } from '@nuxt/ui';
|
|
|
2
2
|
import type { HTMLContent } from '@tiptap/vue-3';
|
|
3
3
|
export interface EditorFullProps extends Omit<EditorProps<HTMLContent>, 'autofocus' | 'contentType' | 'placeholder'> {
|
|
4
4
|
customHandlers?: EditorCustomHandlers;
|
|
5
|
+
madeRaw?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export interface EditorFullEmits extends EditorEmits<HTMLContent> {
|
|
7
8
|
}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<UTextarea
|
|
3
|
+
v-if="madeRaw"
|
|
4
|
+
v-bind="forwardedTextarea"
|
|
5
|
+
:ui="{
|
|
6
|
+
root: 'w-full px-6',
|
|
7
|
+
base: 'text-md text-default min-h-screen'
|
|
8
|
+
}"
|
|
9
|
+
variant="none"
|
|
10
|
+
placeholder="Введите текст..."
|
|
11
|
+
autoresize
|
|
12
|
+
/>
|
|
2
13
|
<UEditor
|
|
14
|
+
v-else
|
|
3
15
|
v-slot="{ editor, handlers }"
|
|
4
|
-
v-bind="
|
|
16
|
+
v-bind="forwardedEditor"
|
|
5
17
|
class="min-h-screen"
|
|
6
18
|
content-type="markdown"
|
|
7
19
|
placeholder="Введите '/' для выбора блока..."
|
|
@@ -74,7 +86,7 @@
|
|
|
74
86
|
|
|
75
87
|
<script>
|
|
76
88
|
import { useAppConfig } from "#imports";
|
|
77
|
-
import { reactiveOmit } from "@vueuse/core";
|
|
89
|
+
import { reactiveOmit, reactivePick } from "@vueuse/core";
|
|
78
90
|
import { useForwardPropsEmits } from "reka-ui";
|
|
79
91
|
import { computed } from "vue";
|
|
80
92
|
import { useEditorDragHandle } from "../composables/useEditorDragHandle";
|
|
@@ -87,6 +99,7 @@ import EditorLinkPopover from "./EditorLinkPopover.vue";
|
|
|
87
99
|
<script setup>
|
|
88
100
|
const props = defineProps({
|
|
89
101
|
customHandlers: { type: Object, required: false },
|
|
102
|
+
madeRaw: { type: Boolean, required: false },
|
|
90
103
|
as: { type: null, required: false },
|
|
91
104
|
modelValue: { type: String, required: false },
|
|
92
105
|
starterKit: { type: Object, required: false },
|
|
@@ -125,7 +138,8 @@ const props = defineProps({
|
|
|
125
138
|
onDelete: { type: Function, required: false }
|
|
126
139
|
});
|
|
127
140
|
const emit = defineEmits(["update:modelValue"]);
|
|
128
|
-
const
|
|
141
|
+
const forwardedEditor = useForwardPropsEmits(reactiveOmit(props, "extensions", "customHandlers", "handlers", "madeRaw"), emit);
|
|
142
|
+
const forwardedTextarea = useForwardPropsEmits(reactivePick(props, "modelValue"), emit);
|
|
129
143
|
const appConfig = useAppConfig();
|
|
130
144
|
const extensions = computed(() => [
|
|
131
145
|
UploraImageExtension,
|
|
@@ -2,6 +2,7 @@ import type { EditorCustomHandlers, EditorEmits, EditorProps } from '@nuxt/ui';
|
|
|
2
2
|
import type { HTMLContent } from '@tiptap/vue-3';
|
|
3
3
|
export interface EditorFullProps extends Omit<EditorProps<HTMLContent>, 'autofocus' | 'contentType' | 'placeholder'> {
|
|
4
4
|
customHandlers?: EditorCustomHandlers;
|
|
5
|
+
madeRaw?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export interface EditorFullEmits extends EditorEmits<HTMLContent> {
|
|
7
8
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative flex items-center gap-2">
|
|
3
|
-
<div v-if="image" class="overflow-hidden rounded-lg">
|
|
3
|
+
<div v-if="image" class="overflow-hidden rounded-lg shrink-0">
|
|
4
4
|
<UploraImage
|
|
5
5
|
v-bind="image"
|
|
6
6
|
:sizes="[{ width: 32, height: 32, descriptor: '1x' }]"
|
|
7
7
|
:ui="{ picture: 'aspect-square' }"
|
|
8
8
|
/>
|
|
9
9
|
</div>
|
|
10
|
-
<div>
|
|
10
|
+
<div class="flex-1 truncate max-w-100">
|
|
11
11
|
<ULink
|
|
12
12
|
v-if="to"
|
|
13
13
|
:to="to"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<p v-else class="font-medium text-highlighted text-sm">
|
|
20
20
|
{{ label }}
|
|
21
21
|
</p>
|
|
22
|
-
<p v-if="description" class="text-muted text-xs">
|
|
22
|
+
<p v-if="description" class="text-muted text-xs truncate">
|
|
23
23
|
{{ description }}
|
|
24
24
|
</p>
|
|
25
25
|
</div>
|