@vigilkids/section-renderer-vue 0.0.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.
Files changed (140) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +88 -0
  3. package/dist/assets/images/article/arrow.svg +3 -0
  4. package/dist/assets/images/article/hot.svg +3 -0
  5. package/dist/assets/images/article/notice-info-icon.svg +5 -0
  6. package/dist/assets/images/article/notice-info.svg +3 -0
  7. package/dist/assets/images/article/notice-warning-icon.svg +5 -0
  8. package/dist/assets/images/article/notice-warning.svg +10 -0
  9. package/dist/assets/images/article/question.svg +10 -0
  10. package/dist/composables/useInlineEdit.d.ts +30 -0
  11. package/dist/composables/useInlineEdit.mjs +94 -0
  12. package/dist/composables/useLazyRender.d.ts +18 -0
  13. package/dist/composables/useLazyRender.mjs +33 -0
  14. package/dist/composables/useRegistry.d.ts +38 -0
  15. package/dist/composables/useRegistry.mjs +60 -0
  16. package/dist/composables/useSectionSEO.d.ts +26 -0
  17. package/dist/composables/useSectionSEO.mjs +122 -0
  18. package/dist/composables/useSectionStyle.d.ts +23 -0
  19. package/dist/composables/useSectionStyle.mjs +111 -0
  20. package/dist/editor.d.ts +4 -0
  21. package/dist/editor.mjs +9 -0
  22. package/dist/index.d.ts +18 -0
  23. package/dist/index.mjs +14 -0
  24. package/dist/plugin.d.ts +6 -0
  25. package/dist/plugin.mjs +14 -0
  26. package/dist/preview/createPreviewApp.d.ts +20 -0
  27. package/dist/preview/createPreviewApp.mjs +161 -0
  28. package/dist/renderer/FallbackSection.d.vue.ts +8 -0
  29. package/dist/renderer/FallbackSection.vue +17 -0
  30. package/dist/renderer/FallbackSection.vue.d.ts +8 -0
  31. package/dist/renderer/LazySection.d.vue.ts +60 -0
  32. package/dist/renderer/LazySection.vue +115 -0
  33. package/dist/renderer/LazySection.vue.d.ts +60 -0
  34. package/dist/renderer/SectionErrorBoundary.d.vue.ts +16 -0
  35. package/dist/renderer/SectionErrorBoundary.vue +38 -0
  36. package/dist/renderer/SectionErrorBoundary.vue.d.ts +16 -0
  37. package/dist/renderer/SectionRenderer.d.vue.ts +29 -0
  38. package/dist/renderer/SectionRenderer.vue +99 -0
  39. package/dist/renderer/SectionRenderer.vue.d.ts +29 -0
  40. package/dist/renderer/SectionWrapper.d.vue.ts +24 -0
  41. package/dist/renderer/SectionWrapper.vue +52 -0
  42. package/dist/renderer/SectionWrapper.vue.d.ts +24 -0
  43. package/dist/sections/RichTextSection.d.vue.ts +9 -0
  44. package/dist/sections/RichTextSection.vue +135 -0
  45. package/dist/sections/RichTextSection.vue.d.ts +9 -0
  46. package/dist/sections/article/index.d.ts +2 -0
  47. package/dist/sections/article/index.mjs +174 -0
  48. package/dist/sections/article/prosemirror.d.ts +2 -0
  49. package/dist/sections/article/prosemirror.mjs +65 -0
  50. package/dist/sections/article/shared/ArticleCustomHtml.d.vue.ts +9 -0
  51. package/dist/sections/article/shared/ArticleCustomHtml.vue +32 -0
  52. package/dist/sections/article/shared/ArticleCustomHtml.vue.d.ts +9 -0
  53. package/dist/sections/article/shared/ArticleImage.d.vue.ts +21 -0
  54. package/dist/sections/article/shared/ArticleImage.vue +53 -0
  55. package/dist/sections/article/shared/ArticleImage.vue.d.ts +21 -0
  56. package/dist/sections/article/vigilkids/ArticleBulletList.d.vue.ts +21 -0
  57. package/dist/sections/article/vigilkids/ArticleBulletList.vue +48 -0
  58. package/dist/sections/article/vigilkids/ArticleBulletList.vue.d.ts +21 -0
  59. package/dist/sections/article/vigilkids/ArticleCta.d.vue.ts +21 -0
  60. package/dist/sections/article/vigilkids/ArticleCta.vue +126 -0
  61. package/dist/sections/article/vigilkids/ArticleCta.vue.d.ts +21 -0
  62. package/dist/sections/article/vigilkids/ArticleFaq.d.vue.ts +21 -0
  63. package/dist/sections/article/vigilkids/ArticleFaq.vue +62 -0
  64. package/dist/sections/article/vigilkids/ArticleFaq.vue.d.ts +21 -0
  65. package/dist/sections/article/vigilkids/ArticleFaqItem.d.vue.ts +5 -0
  66. package/dist/sections/article/vigilkids/ArticleFaqItem.vue +24 -0
  67. package/dist/sections/article/vigilkids/ArticleFaqItem.vue.d.ts +5 -0
  68. package/dist/sections/article/vigilkids/ArticleFeature.d.vue.ts +21 -0
  69. package/dist/sections/article/vigilkids/ArticleFeature.vue +77 -0
  70. package/dist/sections/article/vigilkids/ArticleFeature.vue.d.ts +21 -0
  71. package/dist/sections/article/vigilkids/ArticleHeading.d.vue.ts +21 -0
  72. package/dist/sections/article/vigilkids/ArticleHeading.vue +53 -0
  73. package/dist/sections/article/vigilkids/ArticleHeading.vue.d.ts +21 -0
  74. package/dist/sections/article/vigilkids/ArticleNotice.d.vue.ts +21 -0
  75. package/dist/sections/article/vigilkids/ArticleNotice.vue +81 -0
  76. package/dist/sections/article/vigilkids/ArticleNotice.vue.d.ts +21 -0
  77. package/dist/sections/article/vigilkids/ArticleProsCons.d.vue.ts +21 -0
  78. package/dist/sections/article/vigilkids/ArticleProsCons.vue +74 -0
  79. package/dist/sections/article/vigilkids/ArticleProsCons.vue.d.ts +21 -0
  80. package/dist/sections/article/vigilkids/ArticleQuestion.d.vue.ts +21 -0
  81. package/dist/sections/article/vigilkids/ArticleQuestion.vue +58 -0
  82. package/dist/sections/article/vigilkids/ArticleQuestion.vue.d.ts +21 -0
  83. package/dist/sections/article/vigilkids/ArticleQuote.d.vue.ts +21 -0
  84. package/dist/sections/article/vigilkids/ArticleQuote.vue +50 -0
  85. package/dist/sections/article/vigilkids/ArticleQuote.vue.d.ts +21 -0
  86. package/dist/sections/article/vigilkids/ArticleStepList.d.vue.ts +21 -0
  87. package/dist/sections/article/vigilkids/ArticleStepList.vue +49 -0
  88. package/dist/sections/article/vigilkids/ArticleStepList.vue.d.ts +21 -0
  89. package/dist/sections/article/vigilkids/ArticleSubheading.d.vue.ts +21 -0
  90. package/dist/sections/article/vigilkids/ArticleSubheading.vue +56 -0
  91. package/dist/sections/article/vigilkids/ArticleSubheading.vue.d.ts +21 -0
  92. package/dist/sections/article/vigilkids/ArticleTable.d.vue.ts +9 -0
  93. package/dist/sections/article/vigilkids/ArticleTable.vue +75 -0
  94. package/dist/sections/article/vigilkids/ArticleTable.vue.d.ts +9 -0
  95. package/dist/sections/article/vigilkids/ArticleToc.d.vue.ts +21 -0
  96. package/dist/sections/article/vigilkids/ArticleToc.vue +102 -0
  97. package/dist/sections/article/vigilkids/ArticleToc.vue.d.ts +21 -0
  98. package/dist/sections/article/visiva/ArticleBulletList.d.vue.ts +21 -0
  99. package/dist/sections/article/visiva/ArticleBulletList.vue +48 -0
  100. package/dist/sections/article/visiva/ArticleBulletList.vue.d.ts +21 -0
  101. package/dist/sections/article/visiva/ArticleCta.d.vue.ts +21 -0
  102. package/dist/sections/article/visiva/ArticleCta.vue +148 -0
  103. package/dist/sections/article/visiva/ArticleCta.vue.d.ts +21 -0
  104. package/dist/sections/article/visiva/ArticleFaq.d.vue.ts +21 -0
  105. package/dist/sections/article/visiva/ArticleFaq.vue +76 -0
  106. package/dist/sections/article/visiva/ArticleFaq.vue.d.ts +21 -0
  107. package/dist/sections/article/visiva/ArticleFeature.d.vue.ts +21 -0
  108. package/dist/sections/article/visiva/ArticleFeature.vue +79 -0
  109. package/dist/sections/article/visiva/ArticleFeature.vue.d.ts +21 -0
  110. package/dist/sections/article/visiva/ArticleHeading.d.vue.ts +21 -0
  111. package/dist/sections/article/visiva/ArticleHeading.vue +61 -0
  112. package/dist/sections/article/visiva/ArticleHeading.vue.d.ts +21 -0
  113. package/dist/sections/article/visiva/ArticleNotice.d.vue.ts +21 -0
  114. package/dist/sections/article/visiva/ArticleNotice.vue +102 -0
  115. package/dist/sections/article/visiva/ArticleNotice.vue.d.ts +21 -0
  116. package/dist/sections/article/visiva/ArticleProsCons.d.vue.ts +21 -0
  117. package/dist/sections/article/visiva/ArticleProsCons.vue +98 -0
  118. package/dist/sections/article/visiva/ArticleProsCons.vue.d.ts +21 -0
  119. package/dist/sections/article/visiva/ArticleQuestion.d.vue.ts +21 -0
  120. package/dist/sections/article/visiva/ArticleQuestion.vue +80 -0
  121. package/dist/sections/article/visiva/ArticleQuestion.vue.d.ts +21 -0
  122. package/dist/sections/article/visiva/ArticleQuote.d.vue.ts +21 -0
  123. package/dist/sections/article/visiva/ArticleQuote.vue +50 -0
  124. package/dist/sections/article/visiva/ArticleQuote.vue.d.ts +21 -0
  125. package/dist/sections/article/visiva/ArticleStepList.d.vue.ts +21 -0
  126. package/dist/sections/article/visiva/ArticleStepList.vue +48 -0
  127. package/dist/sections/article/visiva/ArticleStepList.vue.d.ts +21 -0
  128. package/dist/sections/article/visiva/ArticleSubheading.d.vue.ts +21 -0
  129. package/dist/sections/article/visiva/ArticleSubheading.vue +91 -0
  130. package/dist/sections/article/visiva/ArticleSubheading.vue.d.ts +21 -0
  131. package/dist/sections/article/visiva/ArticleTable.d.vue.ts +9 -0
  132. package/dist/sections/article/visiva/ArticleTable.vue +140 -0
  133. package/dist/sections/article/visiva/ArticleTable.vue.d.ts +9 -0
  134. package/dist/sections/article/visiva/ArticleToc.d.vue.ts +21 -0
  135. package/dist/sections/article/visiva/ArticleToc.vue +116 -0
  136. package/dist/sections/article/visiva/ArticleToc.vue.d.ts +21 -0
  137. package/dist/shims-css.d.ts +4 -0
  138. package/dist/styles/products/vigilkids.css +1 -0
  139. package/dist/styles/products/visiva.css +1 -0
  140. package/package.json +43 -0
@@ -0,0 +1,102 @@
1
+ <script setup lang="ts">
2
+ import type { BlockData } from '@vigilkids/section-core'
3
+
4
+ import { computed } from 'vue'
5
+
6
+ import { useInlineEdit } from '../../../composables/useInlineEdit'
7
+
8
+ const props = defineProps<{
9
+ blockOrder: string[]
10
+ blocks: Record<string, BlockData>
11
+ editorMode?: boolean
12
+ settings: Record<string, unknown>
13
+ }>()
14
+
15
+ const emit = defineEmits<{
16
+ (e: 'update:setting', key: string, value: unknown): void
17
+ (e: 'update:block-setting', blockId: string, key: string, value: unknown): void
18
+ (e: 'inline-edit-start', key: string): void
19
+ (e: 'inline-edit-end'): void
20
+ (e: 'undo-redo', action: 'redo' | 'undo'): void
21
+ }>()
22
+
23
+ const s = computed(() => props.settings)
24
+ const variant = computed(() => (s.value.variant as string) || 'tips')
25
+ const title = computed(() => (s.value.title as string) || '')
26
+
27
+ const { editableAttrs, blockEditableAttrs } = useInlineEdit({
28
+ editorMode: () => !!props.editorMode,
29
+ onSettingUpdate: (key, value) => emit('update:setting', key, value),
30
+ onBlockSettingUpdate: (blockId, key, value) => emit('update:block-setting', blockId, key, value),
31
+ onEditStart: (key) => emit('inline-edit-start', key),
32
+ onEditEnd: () => emit('inline-edit-end'),
33
+ onUndoRedo: (action) => emit('undo-redo', action),
34
+ })
35
+ </script>
36
+
37
+ <template>
38
+ <!-- tips 变体: blog-note-style -->
39
+ <div
40
+ v-if="variant === 'tips'"
41
+ class="blog-note-style"
42
+ >
43
+ <div class="blog-note-style-badge">
44
+ <img src="https://cdn.visiva.ai/blog/temp/idea.png" alt="Lightbulb" class="blog-note-style-badge-icon">
45
+ <span class="blog-note-style-badge-text">Tips</span>
46
+ </div>
47
+ <p
48
+ v-for="id in blockOrder"
49
+ :key="id"
50
+ class="blog-note-style-text"
51
+ v-bind="blockEditableAttrs(id, 'text')"
52
+ >
53
+ {{ (blocks[id]?.settings as Record<string, unknown>)?.text ?? '' }}
54
+ </p>
55
+ </div>
56
+
57
+ <!-- note 变体: blog-note-style2 -->
58
+ <div
59
+ v-else-if="variant === 'note'"
60
+ class="blog-note-style2"
61
+ >
62
+ <div class="blog-note-style-badge">
63
+ <img src="https://cdn.visiva.ai/blog/temp/note.png" alt="Note" class="blog-note-style-badge-icon">
64
+ <span class="blog-note-style-badge-text">{{ title || 'Tips' }}</span>
65
+ </div>
66
+ <p
67
+ v-for="id in blockOrder"
68
+ :key="id"
69
+ class="blog-note-style-text"
70
+ v-bind="blockEditableAttrs(id, 'text')"
71
+ >
72
+ {{ (blocks[id]?.settings as Record<string, unknown>)?.text ?? '' }}
73
+ </p>
74
+ </div>
75
+
76
+ <!-- info 变体: blog-note-style3 -->
77
+ <div
78
+ v-else-if="variant === 'info'"
79
+ class="blog-note-style3"
80
+ >
81
+ <div class="blog-note-style3-header">
82
+ <!-- #info -->
83
+ <svg class="blog-note-style3-icon" width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
84
+ <path d="M11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11C0.5 5.20101 5.20101 0.5 11 0.5Z" fill="white" stroke="#CDD2D7"/>
85
+ <path d="M12.5847 7.37917C12.9571 7.39087 13.3202 7.27513 13.5986 7.05598C13.8657 6.84097 14 6.5525 14 6.19058C14 5.82733 13.8657 5.53887 13.5986 5.32386C13.3242 5.10586 12.9653 4.99007 12.5968 5.00067C12.2282 4.99007 11.8693 5.10586 11.5949 5.32386C11.3278 5.53887 11.1935 5.82733 11.1935 6.18925C11.1935 6.5525 11.3278 6.84097 11.5949 7.05598C11.8654 7.27259 12.22 7.38837 12.5847 7.37917ZM12.8684 14.8913C12.8684 14.8071 12.8759 14.6963 12.891 14.5574C12.9061 14.4185 12.9061 14.2863 12.891 14.1608L11.6416 15.4335C11.5164 15.559 11.3851 15.6565 11.2524 15.7259C11.1181 15.7954 11.0049 15.8168 10.9114 15.7887C10.7695 15.7326 10.7061 15.6351 10.7227 15.4962L12.7974 9.71627C12.8744 9.3263 12.805 8.99243 12.5847 8.71465C12.3644 8.43687 12.0113 8.26993 11.524 8.21384C10.9732 8.2272 10.3727 8.43286 9.71935 8.8295C9.06752 9.22614 8.49717 9.73096 8.01132 10.3426V10.6551C7.99623 10.7953 7.99623 10.9276 8.01132 11.0531L9.25915 9.77903C9.38589 9.65483 9.51565 9.55734 9.64843 9.48656C9.78423 9.41712 9.88985 9.39708 9.96831 9.42513C10.1252 9.49324 10.1796 9.60542 10.1328 9.759L8.08072 15.5176C8.02381 15.673 8.00918 15.838 8.03802 15.9993C8.06686 16.1606 8.13837 16.3136 8.2467 16.4458C8.46699 16.7182 8.85175 16.9025 9.40249 17C10.1871 16.9866 10.848 16.7837 11.3821 16.3937C11.9593 15.9612 12.4603 15.4548 12.8684 14.8913Z" fill="#121212"/>
86
+ </svg>
87
+ <h3 class="blog-note-style3-title" v-bind="editableAttrs('title')">{{ title || 'Note' }}</h3>
88
+ </div>
89
+ <p
90
+ v-for="id in blockOrder"
91
+ :key="id"
92
+ class="blog-note-style3-text"
93
+ v-bind="blockEditableAttrs(id, 'text')"
94
+ >
95
+ {{ (blocks[id]?.settings as Record<string, unknown>)?.text ?? '' }}
96
+ </p>
97
+ </div>
98
+ </template>
99
+
100
+ <style scoped>
101
+ .blog-note-style{padding:36px 16px 20px}.blog-note-style,.blog-note-style2{background:#f7f8fa;border-radius:0 0 5px 5px;margin-top:40px;position:relative}.blog-note-style2{padding:36px 12px 20px}.blog-note-style-badge{align-items:center;background:#02a967;border-radius:5px 0 10px 0;display:flex;gap:4px;height:24px;left:0;padding:0 8px;position:absolute;top:0}.blog-note-style-badge-icon{height:14px;width:14px}.blog-note-style-badge-text{color:#fff;font-size:14px;font-weight:700}.blog-note-style-text{color:#666262;font-size:14px;font-weight:300;line-height:1.625;margin:0}.blog-note-style3{background:#f7f8fa;border-radius:10px;margin-top:40px;padding:20px 16px}.blog-note-style3-header{align-items:center;display:flex;gap:12px;margin-bottom:14px}.blog-note-style3-icon{flex-shrink:0;height:22px;width:22px}.blog-note-style3-title{color:#000;font-weight:600;margin:0}.blog-note-style3-text{color:#666262;font-size:14px;font-weight:300;line-height:1.625;margin:0}@media (min-width:768px){.blog-note-style,.blog-note-style2{padding:36px 16px 20px}.blog-note-style-text{font-size:16px}.blog-note-style3{border-radius:15px;padding:24px}.blog-note-style3-text{font-size:16px}}
102
+ </style>
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,98 @@
1
+ <script setup lang="ts">
2
+ import type { BlockData } from '@vigilkids/section-core'
3
+
4
+ import { computed } from 'vue'
5
+
6
+ import { useInlineEdit } from '../../../composables/useInlineEdit'
7
+
8
+ const props = defineProps<{
9
+ blockOrder: string[]
10
+ blocks: Record<string, BlockData>
11
+ editorMode?: boolean
12
+ settings: Record<string, unknown>
13
+ }>()
14
+
15
+ const emit = defineEmits<{
16
+ (e: 'update:setting', key: string, value: unknown): void
17
+ (e: 'update:block-setting', blockId: string, key: string, value: unknown): void
18
+ (e: 'inline-edit-start', key: string): void
19
+ (e: 'inline-edit-end'): void
20
+ (e: 'undo-redo', action: 'redo' | 'undo'): void
21
+ }>()
22
+
23
+ const prosTitle = computed(
24
+ () => (props.settings.pros_title as string) || 'Pros',
25
+ )
26
+ const consTitle = computed(
27
+ () => (props.settings.cons_title as string) || 'Cons',
28
+ )
29
+
30
+ const prosBlocks = computed(() =>
31
+ props.blockOrder.filter((id) => props.blocks[id]?.type === 'pro'),
32
+ )
33
+ const consBlocks = computed(() =>
34
+ props.blockOrder.filter((id) => props.blocks[id]?.type === 'con'),
35
+ )
36
+
37
+ const { editableAttrs, blockEditableAttrs } = useInlineEdit({
38
+ editorMode: () => !!props.editorMode,
39
+ onSettingUpdate: (key, value) => emit('update:setting', key, value),
40
+ onBlockSettingUpdate: (blockId, key, value) => emit('update:block-setting', blockId, key, value),
41
+ onEditStart: (key) => emit('inline-edit-start', key),
42
+ onEditEnd: () => emit('inline-edit-end'),
43
+ onUndoRedo: (action) => emit('undo-redo', action),
44
+ })
45
+ </script>
46
+
47
+ <template>
48
+ <div class="blog-pros-cons">
49
+ <!-- Pros -->
50
+ <div v-if="prosBlocks.length > 0" class="blog-pros-cons-card">
51
+ <div class="blog-pros-cons-header">
52
+ <!-- #like -->
53
+ <svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
54
+ <circle cx="14" cy="14" r="13" fill="#02A967"/>
55
+ <path d="M8.70457 11.3571C8.8854 11.3571 9.05883 11.4324 9.1867 11.5664C9.31456 11.7003 9.3864 11.882 9.3864 12.0714V20.2857C9.3864 20.4752 9.31456 20.6568 9.1867 20.7908C9.05883 20.9247 8.8854 21 8.70457 21H8.1932C7.87674 21 7.57325 20.8683 7.34948 20.6339C7.12571 20.3995 7 20.0815 7 19.75V12.6071C7 12.2756 7.12571 11.9577 7.34948 11.7233C7.57325 11.4888 7.87674 11.3571 8.1932 11.3571H8.70457ZM15.1871 6C15.5491 6 15.8963 6.15066 16.1523 6.41884C16.4083 6.68701 16.5521 7.05074 16.5521 7.43V10.6429C16.5521 10.8323 16.6239 11.014 16.7518 11.1479C16.8796 11.2819 17.0531 11.3571 17.2339 11.3571H19.9527C20.2711 11.357 20.5852 11.4347 20.8699 11.5841C21.1546 11.7334 21.4021 11.9503 21.5927 12.2175C21.7833 12.4847 21.9118 12.7948 21.968 13.1232C22.0241 13.4515 22.0063 13.789 21.916 14.1089L20.399 19.4661C20.2733 19.9092 20.0143 20.298 19.6605 20.5744C19.3068 20.8509 18.8773 21.0001 18.436 21H11.0917C11.0021 21 10.9134 20.9816 10.8306 20.9457C10.7478 20.9099 10.6726 20.8573 10.6092 20.7909C10.5458 20.7246 10.4955 20.6459 10.4612 20.5592C10.4269 20.4725 10.4092 20.3796 10.4091 20.2857V12.0714C10.4091 11.882 10.481 11.7003 10.6088 11.5664C10.7367 11.4324 10.9101 11.3571 11.091 11.3571H11.4329C11.7266 11.3572 12.0121 11.2556 12.245 11.0681C12.4779 10.8807 12.6452 10.618 12.7209 10.3207L13.4699 7.38143C13.5709 6.98517 13.794 6.63495 14.1045 6.38515C14.415 6.13535 14.7956 5.99996 15.1871 6Z" fill="white"/>
56
+ </svg>
57
+ <h3 class="blog-pros-cons-title" v-bind="editableAttrs('pros_title')">{{ prosTitle }}</h3>
58
+ </div>
59
+ <ul class="blog-pros-cons-list">
60
+ <template v-for="blockId in prosBlocks" :key="blockId">
61
+ <li v-if="blocks[blockId]" v-bind="blockEditableAttrs(blockId, 'text')">
62
+ {{ blocks[blockId]!.settings.text }}
63
+ </li>
64
+ </template>
65
+ </ul>
66
+ </div>
67
+
68
+ <!-- Cons -->
69
+ <div v-if="consBlocks.length > 0" class="blog-pros-cons-card">
70
+ <div class="blog-pros-cons-header">
71
+ <!-- #unlike -->
72
+ <svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
73
+ <g clip-path="url(#unlike-clip0)">
74
+ <circle cx="14" cy="14" r="13" fill="#F3455C"/>
75
+ <path d="M8.70457 16.6429C8.8854 16.6429 9.05883 16.5676 9.1867 16.4336C9.31456 16.2997 9.3864 16.118 9.3864 15.9286V7.71429C9.3864 7.52485 9.31456 7.34317 9.1867 7.20921C9.05883 7.07526 8.8854 7 8.70457 7H8.1932C7.87674 7 7.57325 7.1317 7.34948 7.36612C7.12571 7.60054 7 7.91848 7 8.25V15.3929C7 15.7244 7.12571 16.0423 7.34948 16.2767C7.57325 16.5112 7.87674 16.6429 8.1932 16.6429H8.70457ZM15.1871 22C15.5491 22 15.8963 21.8493 16.1523 21.5812C16.4083 21.313 16.5521 20.9493 16.5521 20.57V17.3571C16.5521 17.1677 16.6239 16.986 16.7518 16.8521C16.8796 16.7181 17.0531 16.6429 17.2339 16.6429H19.9527C20.2711 16.643 20.5852 16.5653 20.8699 16.4159C21.1546 16.2666 21.4021 16.0497 21.5927 15.7825C21.7833 15.5153 21.9118 15.2052 21.968 14.8768C22.0241 14.5485 22.0063 14.211 21.916 13.8911L20.399 8.53393C20.2733 8.09076 20.0143 7.70199 19.6605 7.42557C19.3068 7.14915 18.8773 6.99988 18.436 7H11.0917C11.0021 6.99995 10.9134 7.01839 10.8306 7.05426C10.7478 7.09013 10.6726 7.14274 10.6092 7.20906C10.5458 7.27539 10.4955 7.35415 10.4612 7.44083C10.4269 7.52752 10.4092 7.62044 10.4091 7.71429V15.9286C10.4091 16.118 10.481 16.2997 10.6088 16.4336C10.7367 16.5676 10.9101 16.6429 11.091 16.6429H11.4329C11.7266 16.6428 12.0121 16.7444 12.245 16.9319C12.4779 17.1193 12.6452 17.382 12.7209 17.6793L13.4699 20.6186C13.5709 21.0148 13.794 21.365 14.1045 21.6148C14.415 21.8646 14.7956 22 15.1871 22Z" fill="white"/>
76
+ </g>
77
+ <defs>
78
+ <clipPath id="unlike-clip0">
79
+ <rect width="28" height="28" fill="white" transform="matrix(1 0 0 -1 0 28)"/>
80
+ </clipPath>
81
+ </defs>
82
+ </svg>
83
+ <h3 class="blog-pros-cons-title" v-bind="editableAttrs('cons_title')">{{ consTitle }}</h3>
84
+ </div>
85
+ <ul class="blog-pros-cons-list">
86
+ <template v-for="blockId in consBlocks" :key="blockId">
87
+ <li v-if="blocks[blockId]" v-bind="blockEditableAttrs(blockId, 'text')">
88
+ {{ blocks[blockId]!.settings.text }}
89
+ </li>
90
+ </template>
91
+ </ul>
92
+ </div>
93
+ </div>
94
+ </template>
95
+
96
+ <style scoped>
97
+ .blog-pros-cons{display:flex;flex-direction:column;gap:12px;margin-top:40px}.blog-pros-cons-card{background:#f7f8fa;border-radius:10px;flex:1;padding:20px 12px}.blog-pros-cons-header{align-items:center;display:flex;gap:12px;margin-bottom:16px}.blog-pros-cons-title{color:#000;font-size:18px;font-weight:700;margin:0}.blog-pros-cons-list{color:#000;font-size:14px;list-style-position:inside;list-style-type:disc;margin:0;padding:0}.blog-pros-cons-list li+li{margin-top:12px}@media (min-width:768px){.blog-pros-cons{flex-direction:row;gap:24px}.blog-pros-cons-card{border-radius:20px;padding:26px 30px}}
98
+ </style>
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,80 @@
1
+ <script setup lang="ts">
2
+ import type { BlockData } from '@vigilkids/section-core'
3
+
4
+ import { computed } from 'vue'
5
+
6
+ import { useInlineEdit } from '../../../composables/useInlineEdit'
7
+
8
+ const props = defineProps<{
9
+ blockOrder: string[]
10
+ blocks: Record<string, BlockData>
11
+ editorMode?: boolean
12
+ settings: Record<string, unknown>
13
+ }>()
14
+
15
+ const emit = defineEmits<{
16
+ (e: 'update:setting', key: string, value: unknown): void
17
+ (e: 'update:block-setting', blockId: string, key: string, value: unknown): void
18
+ (e: 'inline-edit-start', key: string): void
19
+ (e: 'inline-edit-end'): void
20
+ (e: 'undo-redo', action: 'redo' | 'undo'): void
21
+ }>()
22
+
23
+ const s = computed(() => props.settings)
24
+ const variant = computed(() => (s.value.variant as string) || 'default')
25
+
26
+ const items = computed(() =>
27
+ props.blockOrder
28
+ .map((id) => props.blocks[id])
29
+ .filter((b): b is BlockData => !!b && b.type === 'qa_item'),
30
+ )
31
+
32
+ const { blockEditableAttrs } = useInlineEdit({
33
+ editorMode: () => !!props.editorMode,
34
+ onSettingUpdate: (key, value) => emit('update:setting', key, value),
35
+ onBlockSettingUpdate: (blockId, key, value) => emit('update:block-setting', blockId, key, value),
36
+ onEditStart: (key) => emit('inline-edit-start', key),
37
+ onEditEnd: () => emit('inline-edit-end'),
38
+ onUndoRedo: (action) => emit('undo-redo', action),
39
+ })
40
+ </script>
41
+
42
+ <template>
43
+ <!-- blog-qa-card: default -->
44
+ <div v-if="variant === 'default'" class="blog-qa-card">
45
+ <div
46
+ v-for="(item, index) in items"
47
+ :key="blockOrder[index]"
48
+ :class="index === items.length - 1 ? 'blog-qa-item-last' : 'blog-qa-item'"
49
+ >
50
+ <h3 class="blog-qa-question" v-bind="blockEditableAttrs(blockOrder[index], 'question')">
51
+ {{ item.settings.question }}
52
+ </h3>
53
+ <p class="blog-qa-answer" v-html="String(item.settings.answer || '')" />
54
+ </div>
55
+ </div>
56
+
57
+ <!-- blog-qa-card2: titled -->
58
+ <template v-else-if="variant === 'titled'">
59
+ <h2 class="blog-qa-card2-title">{{ s.title }}</h2>
60
+ <p v-if="s.intro" class="blog-qa-card2-intro">{{ s.intro }}</p>
61
+ <div class="blog-qa-card2-container">
62
+ <div
63
+ v-for="(item, index) in items"
64
+ :key="blockOrder[index]"
65
+ :class="index === items.length - 1 ? 'blog-qa-item-last' : 'blog-qa-item'"
66
+ >
67
+ <h3 class="blog-qa-question-black" v-bind="blockEditableAttrs(blockOrder[index], 'question')">
68
+ {{ item.settings.question }}
69
+ </h3>
70
+ <p class="blog-qa-answer">
71
+ {{ item.settings.answer }}
72
+ </p>
73
+ </div>
74
+ </div>
75
+ </template>
76
+ </template>
77
+
78
+ <style scoped>
79
+ .blog-qa-card{background:#f7f8fa;border-radius:10px;font-size:14px;margin-top:40px;padding:20px 16px}.blog-qa-item{margin-bottom:24px}.blog-qa-item-last{margin-bottom:0}.blog-qa-question,.blog-qa-question-black{font-weight:600;margin:0 0 8px}.blog-qa-question-black{color:#000}.blog-qa-answer{color:#666262;line-height:1.625;margin:0}.blog-qa-answer :deep(span){color:#000;font-weight:600}.blog-qa-card2-title{font-size:24px;font-weight:700;margin-bottom:0;margin-top:40px}.blog-qa-card2-container,.blog-qa-card2-intro{font-size:14px;margin-top:20px}.blog-qa-card2-container{background:#f7f8fa;border-radius:10px;padding:20px 16px}@media (min-width:768px){.blog-qa-card{border-radius:20px;font-size:16px;padding:24px 20px}.blog-qa-card2-title{font-size:28px}.blog-qa-card2-intro{font-size:16px}.blog-qa-card2-container{border-radius:20px;font-size:16px;padding:24px 20px}}
80
+ </style>
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,50 @@
1
+ <script setup lang="ts">
2
+ import type { BlockData } from '@vigilkids/section-core'
3
+
4
+ import { computed } from 'vue'
5
+
6
+ import { renderContent } from '../prosemirror'
7
+ import { useInlineEdit } from '../../../composables/useInlineEdit'
8
+
9
+ const props = defineProps<{
10
+ blockOrder: string[]
11
+ blocks: Record<string, BlockData>
12
+ editorMode?: boolean
13
+ settings: Record<string, unknown>
14
+ }>()
15
+
16
+ const emit = defineEmits<{
17
+ (e: 'update:setting', key: string, value: unknown): void
18
+ (e: 'update:block-setting', blockId: string, key: string, value: unknown): void
19
+ (e: 'inline-edit-start', key: string): void
20
+ (e: 'inline-edit-end'): void
21
+ (e: 'undo-redo', action: 'redo' | 'undo'): void
22
+ }>()
23
+
24
+ const s = computed(() => props.settings)
25
+ const renderedContent = computed(() => renderContent(s.value.content))
26
+
27
+ const { editableAttrs } = useInlineEdit({
28
+ editorMode: () => !!props.editorMode,
29
+ onSettingUpdate: (key, value) => emit('update:setting', key, value),
30
+ onBlockSettingUpdate: (blockId, key, value) => emit('update:block-setting', blockId, key, value),
31
+ onEditStart: (key) => emit('inline-edit-start', key),
32
+ onEditEnd: () => emit('inline-edit-end'),
33
+ onUndoRedo: (action) => emit('undo-redo', action),
34
+ })
35
+ </script>
36
+
37
+ <template>
38
+ <div class="blog-quote">
39
+ <h3 v-if="s.title" class="blog-quote-title" v-bind="editableAttrs('title')">{{ s.title }}</h3>
40
+ <p class="blog-quote-text" v-html="renderedContent" />
41
+ <div v-if="s.attribution" class="blog-quote-footer">
42
+ <span class="blog-quote-divider" />
43
+ <p class="blog-quote-author">by <span v-bind="editableAttrs('attribution')">{{ s.attribution }}</span></p>
44
+ </div>
45
+ </div>
46
+ </template>
47
+
48
+ <style scoped>
49
+ .blog-quote{background:#fff;border:1px solid #d4d4d4;border-radius:10px;margin-top:40px;padding:20px 12px}.blog-quote-title{font-size:16px;font-weight:600;margin:0 0 16px}.blog-quote-text{font-size:12px;font-style:italic;line-height:1.625;margin:0 0 8px}.blog-quote-footer{align-items:flex-end;display:flex;gap:8px}.blog-quote-divider{background:#666262;display:inline-block;height:1px;margin-bottom:4px;width:48px}.blog-quote-author{color:#666262;font-size:12px;margin:0}@media (min-width:768px){.blog-quote{border-radius:20px;padding:30px 28px}.blog-quote-title{font-size:20px}.blog-quote-text{font-size:14px;margin-bottom:16px}.blog-quote-author{font-size:14px}}
50
+ </style>
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,48 @@
1
+ <script setup lang="ts">
2
+ import type { BlockData } from '@vigilkids/section-core'
3
+
4
+ import { computed } from 'vue'
5
+
6
+ import { useInlineEdit } from '../../../composables/useInlineEdit'
7
+
8
+ const props = defineProps<{
9
+ blockOrder: string[]
10
+ blocks: Record<string, BlockData>
11
+ editorMode?: boolean
12
+ settings: Record<string, unknown>
13
+ }>()
14
+
15
+ const emit = defineEmits<{
16
+ (e: 'update:setting', key: string, value: unknown): void
17
+ (e: 'update:block-setting', blockId: string, key: string, value: unknown): void
18
+ (e: 'inline-edit-start', key: string): void
19
+ (e: 'inline-edit-end'): void
20
+ (e: 'undo-redo', action: 'redo' | 'undo'): void
21
+ }>()
22
+
23
+ const blockOrder = computed(() => props.blockOrder)
24
+ const blocks = computed(() => props.blocks)
25
+
26
+ const { blockEditableAttrs } = useInlineEdit({
27
+ editorMode: () => !!props.editorMode,
28
+ onSettingUpdate: (key, value) => emit('update:setting', key, value),
29
+ onBlockSettingUpdate: (blockId, key, value) => emit('update:block-setting', blockId, key, value),
30
+ onEditStart: (key) => emit('inline-edit-start', key),
31
+ onEditEnd: () => emit('inline-edit-end'),
32
+ onUndoRedo: (action) => emit('undo-redo', action),
33
+ })
34
+ </script>
35
+
36
+ <template>
37
+ <template v-for="blockId in blockOrder" :key="blockId">
38
+ <h5 v-if="blocks[blockId]" class="blog-step">
39
+ <span class="blog-step-number" v-bind="blockEditableAttrs(blockId, 'label')">{{ blocks[blockId]!.settings.label }}</span>
40
+ <span>. </span>
41
+ <span v-html="String(blocks[blockId]!.settings.description || '')" />
42
+ </h5>
43
+ </template>
44
+ </template>
45
+
46
+ <style scoped>
47
+ .blog-step{font-size:16px;font-weight:400;margin-top:20px}.blog-step-number{color:#1fb04f;font-style:italic;font-weight:900}.blog-step :deep(a){color:#1fb04f;font-weight:900;text-decoration:none}@media (min-width:768px){.blog-step{font-size:20px}}
48
+ </style>
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import type { BlockData } from '@vigilkids/section-core';
2
+ type __VLS_Props = {
3
+ blockOrder: string[];
4
+ blocks: Record<string, BlockData>;
5
+ editorMode?: boolean;
6
+ settings: Record<string, unknown>;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:setting": (key: string, value: unknown) => any;
10
+ "update:block-setting": (blockId: string, key: string, value: unknown) => any;
11
+ "inline-edit-start": (key: string) => any;
12
+ "inline-edit-end": () => any;
13
+ "undo-redo": (action: "redo" | "undo") => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:setting"?: ((key: string, value: unknown) => any) | undefined;
16
+ "onUpdate:block-setting"?: ((blockId: string, key: string, value: unknown) => any) | undefined;
17
+ "onInline-edit-start"?: ((key: string) => any) | undefined;
18
+ "onInline-edit-end"?: (() => any) | undefined;
19
+ "onUndo-redo"?: ((action: "redo" | "undo") => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;