rimelight-components 2.1.17 → 2.1.18

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.
Files changed (126) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/components/app/Footer.d.vue.ts +5 -1
  4. package/dist/runtime/components/app/Footer.vue +20 -12
  5. package/dist/runtime/components/app/Footer.vue.d.ts +5 -1
  6. package/dist/runtime/components/app/Header.d.vue.ts +5 -1
  7. package/dist/runtime/components/app/Header.vue +4 -2
  8. package/dist/runtime/components/app/Header.vue.d.ts +5 -1
  9. package/dist/runtime/components/app/HeaderLayer.d.vue.ts +5 -3
  10. package/dist/runtime/components/app/HeaderLayer.vue +11 -2
  11. package/dist/runtime/components/app/HeaderLayer.vue.d.ts +5 -3
  12. package/dist/runtime/components/app/Image.d.vue.ts +6 -4
  13. package/dist/runtime/components/app/Image.vue +27 -12
  14. package/dist/runtime/components/app/Image.vue.d.ts +6 -4
  15. package/dist/runtime/components/app/Logo.d.vue.ts +5 -3
  16. package/dist/runtime/components/app/Logo.vue +9 -1
  17. package/dist/runtime/components/app/Logo.vue.d.ts +5 -3
  18. package/dist/runtime/components/app/NewsletterSignup.d.vue.ts +5 -3
  19. package/dist/runtime/components/app/NewsletterSignup.vue +9 -1
  20. package/dist/runtime/components/app/NewsletterSignup.vue.d.ts +5 -3
  21. package/dist/runtime/components/app/ScrollToTop.d.vue.ts +4 -2
  22. package/dist/runtime/components/app/ScrollToTop.vue +17 -9
  23. package/dist/runtime/components/app/ScrollToTop.vue.d.ts +4 -2
  24. package/dist/runtime/components/blocks/Block.d.vue.ts +5 -3
  25. package/dist/runtime/components/blocks/Block.vue +16 -7
  26. package/dist/runtime/components/blocks/Block.vue.d.ts +5 -3
  27. package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +5 -3
  28. package/dist/runtime/components/blocks/BlockEditRenderer.vue +9 -1
  29. package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +5 -3
  30. package/dist/runtime/components/blocks/BlockEditor.vue +4 -33
  31. package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +5 -3
  32. package/dist/runtime/components/blocks/BlockViewRenderer.vue +9 -1
  33. package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +5 -3
  34. package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +5 -3
  35. package/dist/runtime/components/blocks/TextRenderer.vue +8 -0
  36. package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +5 -3
  37. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +5 -1
  38. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +8 -0
  39. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +5 -1
  40. package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +5 -1
  41. package/dist/runtime/components/blocks/editor/CardBlockEditor.vue +9 -1
  42. package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +5 -1
  43. package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +11 -3
  44. package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue +21 -9
  45. package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +11 -3
  46. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +5 -3
  47. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +11 -7
  48. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +5 -3
  49. package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +5 -3
  50. package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +15 -5
  51. package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +5 -3
  52. package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +5 -3
  53. package/dist/runtime/components/blocks/editor/TestBlockEditor.vue +11 -3
  54. package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +5 -3
  55. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +5 -1
  56. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue +8 -0
  57. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +5 -1
  58. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +5 -1
  59. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue +9 -1
  60. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +5 -1
  61. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +5 -1
  62. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue +13 -3
  63. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +5 -1
  64. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +5 -1
  65. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue +8 -0
  66. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +5 -1
  67. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +5 -1
  68. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue +8 -0
  69. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +5 -1
  70. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +5 -1
  71. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue +8 -0
  72. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +5 -1
  73. package/dist/runtime/components/cards/TeamCard.d.vue.ts +5 -3
  74. package/dist/runtime/components/cards/TeamCard.vue +24 -6
  75. package/dist/runtime/components/cards/TeamCard.vue.d.ts +5 -3
  76. package/dist/runtime/components/content/Callout.d.vue.ts +5 -3
  77. package/dist/runtime/components/content/Callout.vue +11 -2
  78. package/dist/runtime/components/content/Callout.vue.d.ts +5 -3
  79. package/dist/runtime/components/content/Section.d.vue.ts +5 -3
  80. package/dist/runtime/components/content/Section.vue +87 -86
  81. package/dist/runtime/components/content/Section.vue.d.ts +5 -3
  82. package/dist/runtime/components/content/Test.d.vue.ts +5 -3
  83. package/dist/runtime/components/content/Test.vue +9 -1
  84. package/dist/runtime/components/content/Test.vue.d.ts +5 -3
  85. package/dist/runtime/components/nodes/LinkNode.d.vue.ts +5 -3
  86. package/dist/runtime/components/nodes/LinkNode.vue +11 -1
  87. package/dist/runtime/components/nodes/LinkNode.vue.d.ts +5 -3
  88. package/dist/runtime/components/nodes/TextNode.d.vue.ts +5 -3
  89. package/dist/runtime/components/nodes/TextNode.vue +9 -1
  90. package/dist/runtime/components/nodes/TextNode.vue.d.ts +5 -3
  91. package/dist/runtime/components/page/PageEditor.d.vue.ts +4 -1
  92. package/dist/runtime/components/page/PageEditor.vue +65 -28
  93. package/dist/runtime/components/page/PageEditor.vue.d.ts +4 -1
  94. package/dist/runtime/components/page/PageMention.d.vue.ts +3 -1
  95. package/dist/runtime/components/page/PageMention.vue +15 -4
  96. package/dist/runtime/components/page/PageMention.vue.d.ts +3 -1
  97. package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +8 -2
  98. package/dist/runtime/components/page/PagePropertiesEditor.vue +50 -17
  99. package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +8 -2
  100. package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +8 -2
  101. package/dist/runtime/components/page/PagePropertiesRenderer.vue +67 -20
  102. package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +8 -2
  103. package/dist/runtime/components/page/PageRenderer.d.vue.ts +3 -1
  104. package/dist/runtime/components/page/PageRenderer.vue +50 -16
  105. package/dist/runtime/components/page/PageRenderer.vue.d.ts +3 -1
  106. package/dist/runtime/components/page/PageSurround.d.vue.ts +5 -3
  107. package/dist/runtime/components/page/PageSurround.vue +54 -24
  108. package/dist/runtime/components/page/PageSurround.vue.d.ts +5 -3
  109. package/dist/runtime/components/page/PageTOC.d.vue.ts +5 -3
  110. package/dist/runtime/components/page/PageTOC.vue +17 -7
  111. package/dist/runtime/components/page/PageTOC.vue.d.ts +5 -3
  112. package/dist/runtime/components/page/modals/CreatePageModal.vue +27 -21
  113. package/dist/runtime/components/page/modals/DeletePageModal.vue +23 -6
  114. package/dist/runtime/components/swatches/ColorSwatch.d.vue.ts +5 -3
  115. package/dist/runtime/components/swatches/ColorSwatch.vue +25 -11
  116. package/dist/runtime/components/swatches/ColorSwatch.vue.d.ts +5 -3
  117. package/dist/runtime/components/swatches/FontSwatch.d.vue.ts +5 -3
  118. package/dist/runtime/components/swatches/FontSwatch.vue +23 -10
  119. package/dist/runtime/components/swatches/FontSwatch.vue.d.ts +5 -3
  120. package/dist/runtime/components/swatches/ImageSwatch.d.vue.ts +5 -3
  121. package/dist/runtime/components/swatches/ImageSwatch.vue +23 -10
  122. package/dist/runtime/components/swatches/ImageSwatch.vue.d.ts +5 -3
  123. package/dist/runtime/components/utilities/Placeholder.d.vue.ts +5 -1
  124. package/dist/runtime/components/utilities/Placeholder.vue +14 -5
  125. package/dist/runtime/components/utilities/Placeholder.vue.d.ts +5 -1
  126. package/package.json +1 -1
@@ -1,9 +1,17 @@
1
1
  <script setup>
2
2
  import {} from "vue";
3
3
  import { getBlockEditorComponent } from "../../internal/blockMapper";
4
+ import { tv } from "tailwind-variants";
4
5
  const { blocks } = defineProps({
5
6
  blocks: { type: Array, required: true }
6
7
  });
8
+ const emit = defineEmits([]);
9
+ const blockEditRendererStyles = tv({
10
+ slots: {
11
+ root: "flex flex-col gap-lg w-full"
12
+ }
13
+ });
14
+ const { root } = blockEditRendererStyles();
7
15
  const getComponent = (block) => {
8
16
  if (!block || !block.type || block.type.length === 0) {
9
17
  console.error("Block object is missing the critical 'type' field.");
@@ -19,7 +27,7 @@ const getComponent = (block) => {
19
27
  </script>
20
28
 
21
29
  <template>
22
- <div class="flex flex-col gap-lg w-full">
30
+ <div :class="root()">
23
31
  <UEmpty
24
32
  v-if="!blocks || blocks.length === 0"
25
33
  variant="naked"
@@ -1,7 +1,9 @@
1
1
  import type { Block } from "../../types/index.js";
2
- type __VLS_Props = {
2
+ export interface BlockEditRendererProps {
3
3
  blocks: Block[];
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface BlockEditRendererEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<BlockEditRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockEditRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,11 +1,13 @@
1
1
  <script setup>
2
- import { provide, ref, computed } from "vue";
2
+ import { provide } from "vue";
3
3
  import { useBlockEditor } from "../../composables";
4
- const blocks = defineModel({ type: Array, ...{ required: true } });
4
+ import { tv } from "tailwind-variants";
5
5
  const { historyLimit } = defineProps({
6
6
  historyLimit: { type: Number, required: false }
7
7
  });
8
8
  const emit = defineEmits(["save"]);
9
+ const blocks = defineModel({ type: Array, ...{ required: true } });
10
+ const blockEditorStyles = tv({});
9
11
  const {
10
12
  removeBlock,
11
13
  moveBlock,
@@ -29,37 +31,6 @@ provide("block-editor-api", {
29
31
  redo
30
32
  });
31
33
  defineExpose({ undo, redo, canUndo, canRedo });
32
- const handleSave = () => {
33
- emit("save");
34
- };
35
- const showPreview = ref(false);
36
- const gridClass = computed(() => ({
37
- // The base grid: transitions enable smooth resizing
38
- "grid transition-[grid-template-columns] duration-300 ease-out": true,
39
- // When hidden, use a single column (Editor takes full width)
40
- "grid-cols-1": !showPreview.value,
41
- // When visible, use two equal columns (Editor + Preview)
42
- "grid-cols-2 gap-xl": showPreview.value
43
- }));
44
- const editorPanelClass = computed(() => ({
45
- // When preview is visible, both editor/preview share 1/2 span.
46
- "col-span-1 w-full": showPreview.value,
47
- // When preview is hidden, the editor uses the full grid space.
48
- "col-span-2 w-full": !showPreview.value
49
- }));
50
- const togglePreview = () => {
51
- showPreview.value = !showPreview.value;
52
- };
53
- const undoAction = () => {
54
- if (canUndo.value) {
55
- undo();
56
- }
57
- };
58
- const redoAction = () => {
59
- if (canRedo.value) {
60
- redo();
61
- }
62
- };
63
34
  </script>
64
35
 
65
36
  <template>
@@ -1,7 +1,9 @@
1
1
  import type { Block } from "../../types/index.js";
2
- type __VLS_Props = {
2
+ export interface BlockViewRendererProps {
3
3
  blocks: Block[];
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface BlockViewRendererEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<BlockViewRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockViewRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,9 +1,17 @@
1
1
  <script setup>
2
2
  import {} from "vue";
3
3
  import { getBlockRendererComponent } from "../../internal/blockMapper";
4
+ import { tv } from "tailwind-variants";
4
5
  const { blocks } = defineProps({
5
6
  blocks: { type: Array, required: true }
6
7
  });
8
+ const emit = defineEmits([]);
9
+ const blockViewRendererStyles = tv({
10
+ slots: {
11
+ root: "flex flex-col gap-lg"
12
+ }
13
+ });
14
+ const { root } = blockViewRendererStyles();
7
15
  const getComponent = (block) => {
8
16
  if (!block || !block.type || block.type.length === 0) {
9
17
  console.error("Block object is missing the critical 'type' field.");
@@ -19,7 +27,7 @@ const getComponent = (block) => {
19
27
  </script>
20
28
 
21
29
  <template>
22
- <div class="flex flex-col gap-lg">
30
+ <div :class="root()">
23
31
  <UEmpty
24
32
  v-if="!blocks || blocks.length === 0"
25
33
  variant="naked"
@@ -1,7 +1,9 @@
1
1
  import type { Block } from "../../types/index.js";
2
- type __VLS_Props = {
2
+ export interface BlockViewRendererProps {
3
3
  blocks: Block[];
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface BlockViewRendererEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<BlockViewRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockViewRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,7 +1,9 @@
1
1
  import { type RichTextContent } from "../../types/index.js";
2
- type __VLS_Props = {
2
+ export interface TextRendererProps {
3
3
  content: RichTextContent;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface TextRendererEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<TextRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -4,12 +4,20 @@ 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 "tailwind-variants";
7
8
  defineOptions({
8
9
  name: "TextRenderer"
9
10
  });
10
11
  const { content } = defineProps({
11
12
  content: { type: Array, required: true }
12
13
  });
14
+ const emit = defineEmits([]);
15
+ const textRendererStyles = tv({
16
+ slots: {
17
+ root: ""
18
+ }
19
+ });
20
+ const { root } = textRendererStyles();
13
21
  const getTag = (item) => {
14
22
  switch (item.type) {
15
23
  case "text":
@@ -1,7 +1,9 @@
1
1
  import { type RichTextContent } from "../../types/index.js";
2
- type __VLS_Props = {
2
+ export interface TextRendererProps {
3
3
  content: RichTextContent;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface TextRendererEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<TextRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,4 +1,8 @@
1
1
  import type { CalloutBlockProps } from "../../../types/index.js";
2
- declare const __VLS_export: import("vue").DefineComponent<CalloutBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ export interface CalloutBlockEditorProps extends CalloutBlockProps {
3
+ }
4
+ export interface CalloutBlockEditorEmits {
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<CalloutBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
7
  declare const _default: typeof __VLS_export;
4
8
  export default _default;
@@ -1,10 +1,18 @@
1
1
  <script setup>
2
+ import { tv } from "tailwind-variants";
2
3
  const { variant, children, to, target } = defineProps({
3
4
  variant: { type: String, required: true },
4
5
  children: { type: Array, required: true },
5
6
  to: { type: String, required: false },
6
7
  target: { type: String, required: false }
7
8
  });
9
+ const emit = defineEmits([]);
10
+ const calloutBlockEditorStyles = tv({
11
+ slots: {
12
+ root: ""
13
+ }
14
+ });
15
+ const { root } = calloutBlockEditorStyles();
8
16
  </script>
9
17
 
10
18
  <template>
@@ -1,4 +1,8 @@
1
1
  import type { CalloutBlockProps } from "../../../types/index.js";
2
- declare const __VLS_export: import("vue").DefineComponent<CalloutBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ export interface CalloutBlockEditorProps extends CalloutBlockProps {
3
+ }
4
+ export interface CalloutBlockEditorEmits {
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<CalloutBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
7
  declare const _default: typeof __VLS_export;
4
8
  export default _default;
@@ -1,4 +1,8 @@
1
1
  import type { CardBlockProps } from "../../../types/index.js";
2
- declare const __VLS_export: import("vue").DefineComponent<CardBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ export interface CardBlockEditorProps extends CardBlockProps {
3
+ }
4
+ export interface CardBlockEditorEmits {
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<CardBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
7
  declare const _default: typeof __VLS_export;
4
8
  export default _default;
@@ -1,4 +1,5 @@
1
1
  <script setup>
2
+ import { tv } from "tailwind-variants";
2
3
  const { title, to, target, children } = defineProps({
3
4
  title: { type: String, required: true },
4
5
  to: { type: String, required: false },
@@ -6,11 +7,18 @@ const { title, to, target, children } = defineProps({
6
7
  description: { type: String, required: false },
7
8
  children: { type: Array, required: true }
8
9
  });
10
+ const emit = defineEmits([]);
11
+ const cardBlockEditorStyles = tv({
12
+ slots: {
13
+ card: "flex h-full flex-col"
14
+ }
15
+ });
16
+ const { card } = cardBlockEditorStyles();
9
17
  </script>
10
18
 
11
19
  <template>
12
20
  <NuxtLink :to="to" :target="target">
13
- <UCard class="flex h-full flex-col">
21
+ <UCard :class="card()">
14
22
  <h3>{{ title }}</h3>
15
23
  <RCBlockEditRenderer :blocks="children" />
16
24
  </UCard>
@@ -1,4 +1,8 @@
1
1
  import type { CardBlockProps } from "../../../types/index.js";
2
- declare const __VLS_export: import("vue").DefineComponent<CardBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ export interface CardBlockEditorProps extends CardBlockProps {
3
+ }
4
+ export interface CardBlockEditorEmits {
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<CardBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
7
  declare const _default: typeof __VLS_export;
4
8
  export default _default;
@@ -1,10 +1,18 @@
1
- import type { ImageBlockProps } from "../../../types/index.js";
2
- declare const __VLS_export: import("vue").DefineComponent<ImageBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
1
+ import { type ImageBlockProps } from "../../../types/index.js";
2
+ export interface ImageBlockEditorProps extends ImageBlockProps {
3
+ }
4
+ export interface ImageBlockEditorEmits {
5
+ (e: "update:src", value: string | null): void;
6
+ (e: "update:alt", value: string): void;
7
+ (e: "update:caption", value: string | null): void;
8
+ (e: "update:file", value: File | null): void;
9
+ }
10
+ declare const __VLS_export: import("vue").DefineComponent<ImageBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
3
11
  "update:src": (value: string | null) => any;
4
12
  "update:alt": (value: string) => any;
5
13
  "update:caption": (value: string | null) => any;
6
14
  "update:file": (value: File | null) => any;
7
- }, string, import("vue").PublicProps, Readonly<ImageBlockProps> & Readonly<{
15
+ }, string, import("vue").PublicProps, Readonly<ImageBlockEditorProps> & Readonly<{
8
16
  "onUpdate:src"?: ((value: string | null) => any) | undefined;
9
17
  "onUpdate:alt"?: ((value: string) => any) | undefined;
10
18
  "onUpdate:caption"?: ((value: string | null) => any) | undefined;
@@ -1,18 +1,30 @@
1
1
  <script setup>
2
2
  import { ref, watch, computed } from "vue";
3
+ import { tv } from "tailwind-variants";
4
+ import {} from "../../../types";
3
5
  import { useObjectUrl } from "@vueuse/core";
4
- const props = defineProps({
6
+ const { src, alt, caption } = defineProps({
5
7
  src: { type: String, required: true },
6
8
  alt: { type: String, required: true },
7
9
  caption: { type: String, required: false }
8
10
  });
9
11
  const emit = defineEmits(["update:src", "update:alt", "update:caption", "update:file"]);
12
+ const imageBlockEditorStyles = tv({
13
+ slots: {
14
+ root: "mx-auto space-y-4 flex flex-col gap-xs w-full",
15
+ upload: "min-h-48 w-full",
16
+ previewContainer: "w-full relative rounded-lg border border-default overflow-hidden",
17
+ previewImage: "w-full h-auto object-contain transition-opacity duration-300",
18
+ emptyPreview: "w-full h-48 flex items-center justify-center bg-elevated/25"
19
+ }
20
+ });
21
+ const { root, upload, previewContainer, previewImage, emptyPreview } = imageBlockEditorStyles();
10
22
  const fileToUpload = ref(null);
11
- const localAlt = ref(props.alt || "");
12
- const localCaption = ref(props.caption || "");
23
+ const localAlt = ref(alt || "");
24
+ const localCaption = ref(caption || "");
13
25
  const filePreviewUrl = useObjectUrl(fileToUpload);
14
26
  const previewSrc = computed(() => {
15
- return fileToUpload.value ? filePreviewUrl.value : props.src;
27
+ return fileToUpload.value ? filePreviewUrl.value : src;
16
28
  });
17
29
  const removeFile = () => {
18
30
  fileToUpload.value = null;
@@ -31,26 +43,26 @@ watch(fileToUpload, (newFile) => {
31
43
  </script>
32
44
 
33
45
  <template>
34
- <figure class="mx-auto space-y-4 flex flex-col gap-xs w-full">
46
+ <figure :class="root()">
35
47
  <UFileUpload
36
48
  v-slot="{ open }"
37
49
  v-model="fileToUpload"
38
50
  accept="image/*"
39
- class="min-h-48 w-full"
51
+ :class="upload()"
40
52
  variant="area"
41
53
  color="neutral"
42
54
  label="Drop image here"
43
55
  description="JPG, PNG, GIF or WEBP. Click to select."
44
56
  >
45
57
  <div class="flex flex-col items-center justify-center space-y-3 p-4">
46
- <div class="w-full relative rounded-lg border border-default overflow-hidden">
58
+ <div :class="previewContainer()">
47
59
  <img
48
60
  v-if="previewSrc"
49
61
  :src="previewSrc"
50
62
  :alt="localAlt || 'Image preview'"
51
- class="w-full h-auto object-contain transition-opacity duration-300"
63
+ :class="previewImage()"
52
64
  />
53
- <div v-else class="w-full h-48 flex items-center justify-center bg-elevated/25">
65
+ <div v-else :class="emptyPreview()">
54
66
  <UIcon name="i-lucide-image" class="w-10 h-10 text-muted" />
55
67
  </div>
56
68
 
@@ -1,10 +1,18 @@
1
- import type { ImageBlockProps } from "../../../types/index.js";
2
- declare const __VLS_export: import("vue").DefineComponent<ImageBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
1
+ import { type ImageBlockProps } from "../../../types/index.js";
2
+ export interface ImageBlockEditorProps extends ImageBlockProps {
3
+ }
4
+ export interface ImageBlockEditorEmits {
5
+ (e: "update:src", value: string | null): void;
6
+ (e: "update:alt", value: string): void;
7
+ (e: "update:caption", value: string | null): void;
8
+ (e: "update:file", value: File | null): void;
9
+ }
10
+ declare const __VLS_export: import("vue").DefineComponent<ImageBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
3
11
  "update:src": (value: string | null) => any;
4
12
  "update:alt": (value: string) => any;
5
13
  "update:caption": (value: string | null) => any;
6
14
  "update:file": (value: File | null) => any;
7
- }, string, import("vue").PublicProps, Readonly<ImageBlockProps> & Readonly<{
15
+ }, string, import("vue").PublicProps, Readonly<ImageBlockEditorProps> & Readonly<{
8
16
  "onUpdate:src"?: ((value: string | null) => any) | undefined;
9
17
  "onUpdate:alt"?: ((value: string) => any) | undefined;
10
18
  "onUpdate:caption"?: ((value: string | null) => any) | undefined;
@@ -1,7 +1,9 @@
1
1
  import type { ParagraphBlockProps } from "../../../types/index.js";
2
- type __VLS_Props = ParagraphBlockProps & {
2
+ export interface ParagraphBlockEditorProps extends ParagraphBlockProps {
3
3
  id: string;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface ParagraphBlockEditorEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<ParagraphBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ParagraphBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,11 +1,19 @@
1
1
  <script setup>
2
2
  import { inject, ref, watch, onMounted, nextTick } from "vue";
3
+ import { tv } from "tailwind-variants";
3
4
  import { richTextToHtml, parseHtmlToRichText } from "../../../utils";
4
5
  const editorApi = inject("block-editor-api");
5
6
  const props = defineProps({
6
- text: { type: Array, required: true },
7
- id: { type: String, required: true }
7
+ id: { type: String, required: true },
8
+ text: { type: Array, required: true }
8
9
  });
10
+ const emit = defineEmits([]);
11
+ const paragraphBlockEditorStyles = tv({
12
+ slots: {
13
+ root: "p-2 outline-none min-h-6 focus:ring-2 focus:ring-blue-500 rounded-md transition duration-150 text-base"
14
+ }
15
+ });
16
+ const { root } = paragraphBlockEditorStyles();
9
17
  const editorRef = ref(null);
10
18
  const localHtml = ref(richTextToHtml(props.text));
11
19
  const isContentChanging = ref(false);
@@ -49,10 +57,6 @@ onMounted(() => {
49
57
  ref="editorRef"
50
58
  contenteditable="true"
51
59
  @blur="commitContentOnBlur"
52
- :class="[
53
- 'p-2 outline-none min-h-6',
54
- 'focus:ring-2 focus:ring-blue-500 rounded-md transition duration-150',
55
- 'text-base'
56
- ]"
60
+ :class="root()"
57
61
  ></div>
58
62
  </template>
@@ -1,7 +1,9 @@
1
1
  import type { ParagraphBlockProps } from "../../../types/index.js";
2
- type __VLS_Props = ParagraphBlockProps & {
2
+ export interface ParagraphBlockEditorProps extends ParagraphBlockProps {
3
3
  id: string;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface ParagraphBlockEditorEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<ParagraphBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ParagraphBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,7 +1,9 @@
1
1
  import { type SectionBlockProps } from "../../../types/index.js";
2
- type __VLS_Props = SectionBlockProps & {
2
+ export interface SectionBlockEditorProps extends SectionBlockProps {
3
3
  id: string;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface SectionBlockEditorEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<SectionBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -2,13 +2,23 @@
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 "tailwind-variants";
5
6
  const { level, title, description, children, id } = defineProps({
7
+ id: { type: String, required: true },
6
8
  level: { type: Number, required: true },
7
9
  title: { type: String, required: true },
8
10
  description: { type: String, required: false },
9
- children: { type: Array, required: true },
10
- id: { type: String, required: true }
11
+ children: { type: Array, required: true }
11
12
  });
13
+ const emit = defineEmits([]);
14
+ const sectionBlockEditorStyles = tv({
15
+ slots: {
16
+ root: "flex flex-col gap-sm",
17
+ headerContainer: "flex flex-row gap-xs",
18
+ titleInput: "w-full"
19
+ }
20
+ });
21
+ const { root, headerContainer, titleInput } = sectionBlockEditorStyles();
12
22
  const hasChildren = computed(() => children && children.length > 0);
13
23
  const editorApi = inject("block-editor-api");
14
24
  const localLevel = ref(level);
@@ -67,10 +77,10 @@ watch(
67
77
  </script>
68
78
 
69
79
  <template>
70
- <div class="flex flex-col gap-sm">
80
+ <div :class="root()">
71
81
  <RCSection :level="localLevel" :title="localTitle" :description="description" is-editing>
72
82
  <template #title>
73
- <div class="flex flex-row gap-xs">
83
+ <div :class="headerContainer()">
74
84
  <USelect
75
85
  v-model="localLevel"
76
86
  :items="levelItems"
@@ -87,7 +97,7 @@ watch(
87
97
  placeholder="Section Title..."
88
98
  @input="updateLocalTitle"
89
99
  @blur="commitTitleOnBlur"
90
- class="w-full"
100
+ :class="titleInput()"
91
101
  />
92
102
  </div>
93
103
  </template>
@@ -1,7 +1,9 @@
1
1
  import { type SectionBlockProps } from "../../../types/index.js";
2
- type __VLS_Props = SectionBlockProps & {
2
+ export interface SectionBlockEditorProps extends SectionBlockProps {
3
3
  id: string;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface SectionBlockEditorEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<SectionBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,7 +1,9 @@
1
1
  import type { TestBlockProps } from "../../../types/index.js";
2
- type __VLS_Props = TestBlockProps & {
2
+ export interface TestBlockEditorProps extends TestBlockProps {
3
3
  id: string;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface TestBlockEditorEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<TestBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TestBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,9 +1,17 @@
1
1
  <script setup>
2
2
  import { inject, ref, watch } from "vue";
3
+ import { tv } from "tailwind-variants";
3
4
  const { text, id } = defineProps({
4
- text: { type: String, required: true },
5
- id: { type: String, required: true }
5
+ id: { type: String, required: true },
6
+ text: { type: String, required: true }
6
7
  });
8
+ const emit = defineEmits([]);
9
+ const testBlockEditorStyles = tv({
10
+ slots: {
11
+ input: "w-full"
12
+ }
13
+ });
14
+ const { input } = testBlockEditorStyles();
7
15
  const editorApi = inject("block-editor-api");
8
16
  const localText = ref(text);
9
17
  const updateLocalText = (e) => {
@@ -36,7 +44,7 @@ watch(
36
44
  placeholder="Type here..."
37
45
  @input="updateLocalText"
38
46
  @blur="commitOnBlur"
39
- class="w-full"
47
+ :class="input()"
40
48
  />
41
49
  </template>
42
50
  </RCTest>
@@ -1,7 +1,9 @@
1
1
  import type { TestBlockProps } from "../../../types/index.js";
2
- type __VLS_Props = TestBlockProps & {
2
+ export interface TestBlockEditorProps extends TestBlockProps {
3
3
  id: string;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ }
5
+ export interface TestBlockEditorEmits {
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<TestBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TestBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  declare const _default: typeof __VLS_export;
7
9
  export default _default;
@@ -1,4 +1,8 @@
1
1
  import type { CalloutBlockProps } from "../../../types/index.js";
2
- declare const __VLS_export: import("vue").DefineComponent<CalloutBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ export interface CalloutBlockRendererProps extends CalloutBlockProps {
3
+ }
4
+ export interface CalloutBlockRendererEmits {
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<CalloutBlockRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
7
  declare const _default: typeof __VLS_export;
4
8
  export default _default;