rimelight-components 2.1.19 → 2.1.21
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/app/Footer.vue +1 -1
- package/dist/runtime/components/app/Header.vue +1 -1
- package/dist/runtime/components/app/HeaderLayer.vue +1 -1
- package/dist/runtime/components/app/Image.vue +1 -1
- package/dist/runtime/components/app/Logo.vue +1 -1
- package/dist/runtime/components/app/NewsletterSignup.vue +1 -1
- package/dist/runtime/components/app/ScrollToTop.vue +1 -1
- package/dist/runtime/components/blocks/Block.vue +1 -1
- package/dist/runtime/components/blocks/BlockEditRenderer.vue +1 -1
- package/dist/runtime/components/blocks/BlockEditor.vue +1 -1
- package/dist/runtime/components/blocks/BlockViewRenderer.vue +1 -1
- package/dist/runtime/components/blocks/TextRenderer.vue +1 -1
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +2 -2
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue +2 -2
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue +2 -2
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +2 -2
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +2 -2
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue +2 -2
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue +2 -2
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue +2 -2
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue +2 -2
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue +2 -2
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue +2 -2
- package/dist/runtime/components/cards/TeamCard.vue +1 -1
- package/dist/runtime/components/content/Callout.vue +1 -1
- package/dist/runtime/components/content/Section.vue +5 -2
- package/dist/runtime/components/content/Test.vue +1 -1
- package/dist/runtime/components/nodes/LinkNode.vue +1 -1
- package/dist/runtime/components/nodes/TextNode.vue +1 -1
- package/dist/runtime/components/page/PageEditor.vue +1 -1
- package/dist/runtime/components/page/PageMention.vue +1 -1
- package/dist/runtime/components/page/PagePropertiesEditor.vue +1 -1
- package/dist/runtime/components/page/PagePropertiesRenderer.vue +1 -1
- package/dist/runtime/components/page/PageRenderer.vue +1 -1
- package/dist/runtime/components/page/PageSurround.vue +1 -1
- package/dist/runtime/components/page/PageTOC.vue +1 -1
- package/dist/runtime/components/page/modals/CreatePageModal.vue +2 -2
- package/dist/runtime/components/page/modals/DeletePageModal.vue +2 -2
- package/dist/runtime/components/swatches/ColorSwatch.vue +1 -1
- package/dist/runtime/components/swatches/FontSwatch.vue +1 -1
- package/dist/runtime/components/swatches/ImageSwatch.vue +1 -1
- package/dist/runtime/components/utilities/Placeholder.vue +1 -1
- package/dist/runtime/utils/index.d.ts +0 -1
- package/dist/runtime/utils/index.js +0 -1
- package/dist/runtime/utils/index.mjs +0 -1
- package/package.json +1 -1
- package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +0 -21
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue +0 -55
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +0 -21
- /package/dist/runtime/{utils → internal}/tv.d.ts +0 -0
- /package/dist/runtime/{utils → internal}/tv.js +0 -0
- /package/dist/runtime/{utils → internal}/tv.mjs +0 -0
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { readdirSync } from 'node:fs';
|
|
|
4
4
|
import { basename } from 'node:path';
|
|
5
5
|
|
|
6
6
|
const name = "rimelight-components";
|
|
7
|
-
const version = "2.1.
|
|
7
|
+
const version = "2.1.21";
|
|
8
8
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
9
|
|
|
10
10
|
const defaultOptions = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ref, onMounted, onUnmounted, watch, computed, nextTick } from "vue";
|
|
3
3
|
import { useHeaderStack, useRC } from "../../composables";
|
|
4
4
|
import { useWindowScroll } from "@vueuse/core";
|
|
5
|
-
import { tv } from "../../
|
|
5
|
+
import { tv } from "../../internal/tv";
|
|
6
6
|
const { id, order, hideOnScroll = false, rc: rcProp } = defineProps({
|
|
7
7
|
id: { type: String, required: true },
|
|
8
8
|
order: { type: Number, required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useAppConfig } from "nuxt/app";
|
|
3
3
|
import { computed } from "#imports";
|
|
4
|
-
import { tv } from "../../
|
|
4
|
+
import { tv } from "../../internal/tv";
|
|
5
5
|
import { useRC } from "../../composables/useRC";
|
|
6
6
|
const { variant = "mark", rc: rcProp } = defineProps({
|
|
7
7
|
variant: { type: String, required: false },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { inject, ref } from "vue";
|
|
3
|
-
import { tv } from "../../
|
|
3
|
+
import { tv } from "../../internal/tv";
|
|
4
4
|
import { useRC } from "../../composables/useRC";
|
|
5
5
|
const { id, type, rc: rcProp } = defineProps({
|
|
6
6
|
id: { type: String, required: true },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import {} from "vue";
|
|
3
3
|
import { getBlockEditorComponent } from "../../internal/blockMapper";
|
|
4
|
-
import { tv } from "../../
|
|
4
|
+
import { tv } from "../../internal/tv";
|
|
5
5
|
import { useRC } from "../../composables/useRC";
|
|
6
6
|
const { blocks, rc: rcProp } = defineProps({
|
|
7
7
|
blocks: { type: Array, required: true },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { provide } from "vue";
|
|
3
3
|
import { useBlockEditor } from "../../composables";
|
|
4
|
-
import { tv } from "../../
|
|
4
|
+
import { tv } from "../../internal/tv";
|
|
5
5
|
import { useRC } from "../../composables/useRC";
|
|
6
6
|
const { historyLimit, rc: rcProp } = defineProps({
|
|
7
7
|
historyLimit: { type: Number, required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import {} from "vue";
|
|
3
3
|
import { getBlockRendererComponent } from "../../internal/blockMapper";
|
|
4
|
-
import { tv } from "../../
|
|
4
|
+
import { tv } from "../../internal/tv";
|
|
5
5
|
import { useRC } from "../../composables/useRC";
|
|
6
6
|
const { blocks, rc: rcProp } = defineProps({
|
|
7
7
|
blocks: { type: Array, required: true },
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import TextNode from "../nodes/TextNode.vue";
|
|
5
5
|
import LinkNode from "../nodes/LinkNode.vue";
|
|
6
6
|
import PageMention from "../page/PageMention.vue";
|
|
7
|
-
import { tv } from "../../
|
|
7
|
+
import { tv } from "../../internal/tv";
|
|
8
8
|
import { useRC } from "../../composables/useRC";
|
|
9
9
|
defineOptions({
|
|
10
10
|
name: "TextRenderer"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "../../../
|
|
3
|
-
import { useRC } from "
|
|
2
|
+
import { tv } from "../../../internal/tv";
|
|
3
|
+
import { useRC } from "~/src/runtime/composables";
|
|
4
4
|
const { variant, children, to, target, rc: rcProp } = defineProps({
|
|
5
5
|
rc: { type: Object, required: false },
|
|
6
6
|
variant: { type: String, required: true },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "../../../
|
|
3
|
-
import { useRC } from "
|
|
2
|
+
import { tv } from "../../../internal/tv";
|
|
3
|
+
import { useRC } from "~/src/runtime/composables";
|
|
4
4
|
const { title, to, target, children, rc: rcProp } = defineProps({
|
|
5
5
|
rc: { type: Object, required: false },
|
|
6
6
|
title: { type: String, required: true },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, watch, computed } from "vue";
|
|
3
|
-
import { tv } from "../../../
|
|
4
|
-
import { useRC } from "
|
|
3
|
+
import { tv } from "../../../internal/tv";
|
|
4
|
+
import { useRC } from "~/src/runtime/composables";
|
|
5
5
|
import {} from "../../../types";
|
|
6
6
|
import { useObjectUrl } from "@vueuse/core";
|
|
7
7
|
const { src, alt, caption, rc: rcProp } = defineProps({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { inject, ref, watch, onMounted, nextTick } from "vue";
|
|
3
|
-
import { tv } from "../../../
|
|
4
|
-
import { useRC } from "
|
|
3
|
+
import { tv } from "../../../internal/tv";
|
|
4
|
+
import { useRC } from "~/src/runtime/composables";
|
|
5
5
|
import { richTextToHtml, parseHtmlToRichText } from "../../../utils";
|
|
6
6
|
const { id, text, rc: rcProp } = defineProps({
|
|
7
7
|
id: { type: String, required: true },
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { inject, ref, computed, watch } from "vue";
|
|
3
3
|
import {} from "../../../types";
|
|
4
4
|
import {} from "@nuxt/ui/components/Select.vue";
|
|
5
|
-
import { tv } from "../../../
|
|
6
|
-
import { useRC } from "
|
|
5
|
+
import { tv } from "../../../internal/tv";
|
|
6
|
+
import { useRC } from "~/src/runtime/composables";
|
|
7
7
|
const { level, title, description, children, id, rc: rcProp } = defineProps({
|
|
8
8
|
id: { type: String, required: true },
|
|
9
9
|
rc: { type: Object, required: false },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "../../../
|
|
3
|
-
import { useRC } from "
|
|
2
|
+
import { tv } from "../../../internal/tv";
|
|
3
|
+
import { useRC } from "~/src/runtime/composables";
|
|
4
4
|
const { variant, children, to, target, rc: rcProp } = defineProps({
|
|
5
5
|
rc: { type: Object, required: false },
|
|
6
6
|
variant: { type: String, required: true },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "../../../
|
|
3
|
-
import { useRC } from "
|
|
2
|
+
import { tv } from "../../../internal/tv";
|
|
3
|
+
import { useRC } from "~/src/runtime/composables";
|
|
4
4
|
const { title, to, target, children, rc: rcProp } = defineProps({
|
|
5
5
|
rc: { type: Object, required: false },
|
|
6
6
|
title: { type: String, required: true },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "../../../
|
|
3
|
-
import { useRC } from "
|
|
2
|
+
import { tv } from "../../../internal/tv";
|
|
3
|
+
import { useRC } from "~/src/runtime/composables";
|
|
4
4
|
const { src, alt, caption, rc: rcProp } = defineProps({
|
|
5
5
|
rc: { type: Object, required: false },
|
|
6
6
|
src: { type: String, required: true },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "../../../
|
|
3
|
-
import { useRC } from "
|
|
2
|
+
import { tv } from "../../../internal/tv";
|
|
3
|
+
import { useRC } from "~/src/runtime/composables";
|
|
4
4
|
const { text, rc: rcProp } = defineProps({
|
|
5
5
|
rc: { type: Object, required: false },
|
|
6
6
|
text: { type: Array, required: true }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { slugify } from "../../../utils";
|
|
4
|
-
import { tv } from "../../../
|
|
5
|
-
import { useRC } from "
|
|
4
|
+
import { tv } from "../../../internal/tv";
|
|
5
|
+
import { useRC } from "~/src/runtime/composables";
|
|
6
6
|
const { level, title, description, children, rc: rcProp } = defineProps({
|
|
7
7
|
rc: { type: Object, required: false },
|
|
8
8
|
level: { type: Number, required: true },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "../../../
|
|
3
|
-
import { useRC } from "
|
|
2
|
+
import { tv } from "../../../internal/tv";
|
|
3
|
+
import { useRC } from "~/src/runtime/composables";
|
|
4
4
|
const { text, rc: rcProp } = defineProps({
|
|
5
5
|
rc: { type: Object, required: false },
|
|
6
6
|
text: { type: String, required: true }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useAppConfig } from "#imports";
|
|
3
3
|
import { computed } from "#imports";
|
|
4
4
|
import { useI18n } from "vue-i18n";
|
|
5
|
-
import { tv } from "../../
|
|
5
|
+
import { tv } from "../../internal/tv";
|
|
6
6
|
import { useRC } from "../../composables/useRC";
|
|
7
7
|
const { variant, to, target, rc: rcProp } = defineProps({
|
|
8
8
|
variant: { type: String, required: true },
|
|
@@ -3,9 +3,12 @@ import { useRoute } from "#imports";
|
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
import { useClipboard } from "@vueuse/core";
|
|
5
5
|
import { useToast } from "@nuxt/ui/composables";
|
|
6
|
-
import { tv } from "../../
|
|
6
|
+
import { tv } from "../../internal/tv";
|
|
7
7
|
import { useRC } from "../../composables/useRC";
|
|
8
8
|
import { slugify } from "../../utils";
|
|
9
|
+
defineOptions({
|
|
10
|
+
name: "SectionComponent"
|
|
11
|
+
});
|
|
9
12
|
const {
|
|
10
13
|
level = 1,
|
|
11
14
|
title,
|
|
@@ -121,7 +124,7 @@ const fullSectionUrl = computed(() => {
|
|
|
121
124
|
|
|
122
125
|
<template>
|
|
123
126
|
<section :id="sectionId" :class="section({ class: rc.section })" v-bind="$attrs">
|
|
124
|
-
<component :id="sectionId" :is="`h${level}`" :class="heading({ class: rc.heading })">
|
|
127
|
+
<component :id="`${sectionId}-heading`" :is="`h${level}`" :class="heading({ class: rc.heading })">
|
|
125
128
|
<NuxtLink
|
|
126
129
|
v-if="!isEditing"
|
|
127
130
|
:href="`#${sectionId}`"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
import { tv } from "../../
|
|
3
|
+
import { tv } from "../../internal/tv";
|
|
4
4
|
import { useRC } from "../../composables/useRC";
|
|
5
5
|
const { href, target, content, rc: rcProp } = defineProps({
|
|
6
6
|
href: { type: String, required: true },
|
|
@@ -4,7 +4,7 @@ import {} from "../../types";
|
|
|
4
4
|
import { usePageEditor, usePageRegistry, useRC } from "../../composables";
|
|
5
5
|
import { getLocalizedContent } from "../../utils";
|
|
6
6
|
import { useI18n } from "vue-i18n";
|
|
7
|
-
import { tv } from "../../
|
|
7
|
+
import { tv } from "../../internal/tv";
|
|
8
8
|
const {
|
|
9
9
|
isSaving,
|
|
10
10
|
useSurround = false,
|
|
@@ -4,7 +4,7 @@ import { getLocalizedContent } from "../../utils";
|
|
|
4
4
|
import { useI18n } from "vue-i18n";
|
|
5
5
|
import {} from "../../types";
|
|
6
6
|
import { useAsyncData } from "#imports";
|
|
7
|
-
import { tv } from "../../
|
|
7
|
+
import { tv } from "../../internal/tv";
|
|
8
8
|
import { useRC } from "../../composables/useRC";
|
|
9
9
|
const { pageId, rc: rcProp } = defineProps({
|
|
10
10
|
pageId: { type: String, required: true },
|
|
@@ -5,7 +5,7 @@ import { usePageRegistry, useInfobox, useRC } from "../../composables";
|
|
|
5
5
|
import { getLocalizedContent } from "../../utils";
|
|
6
6
|
import {} from "@nuxt/ui/components/Tabs.vue";
|
|
7
7
|
import {} from "../../types";
|
|
8
|
-
import { tv } from "../../
|
|
8
|
+
import { tv } from "../../internal/tv";
|
|
9
9
|
const { rc: rcProp } = defineProps({
|
|
10
10
|
rc: { type: Object, required: false }
|
|
11
11
|
});
|
|
@@ -7,7 +7,7 @@ import {} from "@nuxt/ui/components/Tabs.vue";
|
|
|
7
7
|
import { useI18n } from "vue-i18n";
|
|
8
8
|
import { useShare, useClipboard } from "@vueuse/core";
|
|
9
9
|
import {} from "../../types";
|
|
10
|
-
import { tv } from "../../
|
|
10
|
+
import { tv } from "../../internal/tv";
|
|
11
11
|
const { rc: rcProp } = defineProps({
|
|
12
12
|
rc: { type: Object, required: false }
|
|
13
13
|
});
|
|
@@ -4,7 +4,7 @@ import {} from "../../types";
|
|
|
4
4
|
import { getLocalizedContent } from "../../utils";
|
|
5
5
|
import { useI18n } from "vue-i18n";
|
|
6
6
|
import { usePageRegistry, useRC } from "../../composables";
|
|
7
|
-
import { tv } from "../../
|
|
7
|
+
import { tv } from "../../internal/tv";
|
|
8
8
|
const {
|
|
9
9
|
useSurround = false,
|
|
10
10
|
surroundStatus = "idle",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { computed, ref, onMounted, watch } from "vue";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
4
|
import { useIntersectionObserver } from "@vueuse/core";
|
|
5
|
-
import { tv } from "../../
|
|
5
|
+
import { tv } from "../../internal/tv";
|
|
6
6
|
import { useRC } from "../../composables/useRC";
|
|
7
7
|
import { slugify } from "../../utils";
|
|
8
8
|
const props = defineProps({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, computed, watch } from "vue";
|
|
3
3
|
import {} from "../../../types";
|
|
4
|
-
import { tv } from "../../../
|
|
5
|
-
import { useRC } from "
|
|
4
|
+
import { tv } from "../../../internal/tv";
|
|
5
|
+
import { useRC } from "~/src/runtime/composables";
|
|
6
6
|
import { useI18n } from "vue-i18n";
|
|
7
7
|
const { isOpen, loading, definitions, rc: rcProp } = defineProps({
|
|
8
8
|
isOpen: { type: Boolean, required: true },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, watch } from "vue";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
|
-
import { tv } from "../../../
|
|
5
|
-
import { useRC } from "
|
|
4
|
+
import { tv } from "../../../internal/tv";
|
|
5
|
+
import { useRC } from "~/src/runtime/composables";
|
|
6
6
|
const { isOpen, loading, pageTitle, rc: rcProp } = defineProps({
|
|
7
7
|
isOpen: { type: Boolean, required: true },
|
|
8
8
|
loading: { type: Boolean, required: false },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { useClipboard } from "@vueuse/core";
|
|
4
4
|
import { useToast } from "@nuxt/ui/composables";
|
|
5
|
-
import { tv } from "../../
|
|
5
|
+
import { tv } from "../../internal/tv";
|
|
6
6
|
import { useRC } from "../../composables/useRC";
|
|
7
7
|
const { name, hex, rgb, hsl, oklch, cmyk, rc: rcProp } = defineProps({
|
|
8
8
|
name: { type: String, required: false },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
import { tv } from "../../
|
|
3
|
+
import { tv } from "../../internal/tv";
|
|
4
4
|
import { useRC } from "../../composables/useRC";
|
|
5
5
|
const { name, jpg, png, webp, svg, rc: rcProp } = defineProps({
|
|
6
6
|
name: { type: String, required: false },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
import { tv } from "../../
|
|
3
|
+
import { tv } from "../../internal/tv";
|
|
4
4
|
import { useRC } from "../../composables/useRC";
|
|
5
5
|
const { name, jpg, png, webp, svg, rc: rcProp } = defineProps({
|
|
6
6
|
name: { type: String, required: false },
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { TestBlockProps } from "../../../types/index.js";
|
|
2
|
-
export interface TestBlockEditorProps extends TestBlockProps {
|
|
3
|
-
id: string;
|
|
4
|
-
rc?: {
|
|
5
|
-
input?: string;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export interface TestBlockEditorEmits {
|
|
9
|
-
}
|
|
10
|
-
export interface TestBlockEditorSlots {
|
|
11
|
-
}
|
|
12
|
-
type __VLS_Slots = TestBlockEditorSlots;
|
|
13
|
-
declare const __VLS_base: import("vue").DefineComponent<TestBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TestBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
-
declare const _default: typeof __VLS_export;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
-
new (): {
|
|
19
|
-
$slots: S;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { inject, ref, watch } from "vue";
|
|
3
|
-
import { tv } from "../../../utils/tv";
|
|
4
|
-
import { useRC } from "../../../composables/useRC";
|
|
5
|
-
const { text, id, rc: rcProp } = defineProps({
|
|
6
|
-
id: { type: String, required: true },
|
|
7
|
-
rc: { type: Object, required: false },
|
|
8
|
-
text: { type: String, required: true }
|
|
9
|
-
});
|
|
10
|
-
const emit = defineEmits([]);
|
|
11
|
-
const slots = defineSlots();
|
|
12
|
-
const { rc } = useRC("TestBlockEditor", rcProp);
|
|
13
|
-
const testBlockEditorStyles = tv({
|
|
14
|
-
slots: {
|
|
15
|
-
input: "w-full"
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
const { input } = testBlockEditorStyles();
|
|
19
|
-
const editorApi = inject("block-editor-api");
|
|
20
|
-
const localText = ref(text);
|
|
21
|
-
const updateLocalText = (e) => {
|
|
22
|
-
localText.value = e.target.value;
|
|
23
|
-
};
|
|
24
|
-
const commitOnBlur = () => {
|
|
25
|
-
if (editorApi && id) {
|
|
26
|
-
if (localText.value !== text) {
|
|
27
|
-
editorApi.updateBlockProps(id, { text: localText.value });
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
watch(
|
|
32
|
-
() => text,
|
|
33
|
-
(newVal) => {
|
|
34
|
-
if (newVal !== localText.value) {
|
|
35
|
-
localText.value = newVal;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
// Ensure the initial state is set correctly
|
|
39
|
-
{ immediate: true }
|
|
40
|
-
);
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<template>
|
|
44
|
-
<RCTest :text="localText">
|
|
45
|
-
<template #content>
|
|
46
|
-
<UInput
|
|
47
|
-
:model-value="localText"
|
|
48
|
-
placeholder="Type here..."
|
|
49
|
-
@input="updateLocalText"
|
|
50
|
-
@blur="commitOnBlur"
|
|
51
|
-
:class="input({ class: rc.input })"
|
|
52
|
-
/>
|
|
53
|
-
</template>
|
|
54
|
-
</RCTest>
|
|
55
|
-
</template>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { TestBlockProps } from "../../../types/index.js";
|
|
2
|
-
export interface TestBlockEditorProps extends TestBlockProps {
|
|
3
|
-
id: string;
|
|
4
|
-
rc?: {
|
|
5
|
-
input?: string;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export interface TestBlockEditorEmits {
|
|
9
|
-
}
|
|
10
|
-
export interface TestBlockEditorSlots {
|
|
11
|
-
}
|
|
12
|
-
type __VLS_Slots = TestBlockEditorSlots;
|
|
13
|
-
declare const __VLS_base: import("vue").DefineComponent<TestBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TestBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
-
declare const _default: typeof __VLS_export;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
-
new (): {
|
|
19
|
-
$slots: S;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|