@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,148 @@
1
+ <script setup lang="ts">
2
+ import type { BlockData } from '@vigilkids/section-core'
3
+ import { safeUrl } from '@vigilkids/section-core'
4
+
5
+ import { computed } from 'vue'
6
+
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 variant = computed(() => (s.value.variant as string) || 'button')
26
+
27
+ const primaryUrl = computed(() => safeUrl(String(s.value.button_url || '')))
28
+ const secondaryUrl = computed(() => safeUrl(String(s.value.secondary_button_url || '')))
29
+
30
+ const { editableAttrs } = useInlineEdit({
31
+ editorMode: () => !!props.editorMode,
32
+ onSettingUpdate: (key, value) => emit('update:setting', key, value),
33
+ onBlockSettingUpdate: (blockId, key, value) => emit('update:block-setting', blockId, key, value),
34
+ onEditStart: (key) => emit('inline-edit-start', key),
35
+ onEditEnd: () => emit('inline-edit-end'),
36
+ onUndoRedo: (action) => emit('undo-redo', action),
37
+ })
38
+ </script>
39
+
40
+ <template>
41
+ <!-- blog-button-single -->
42
+ <div v-if="variant === 'button'" class="blog-button-single-wrapper">
43
+ <a
44
+ :href="editorMode ? undefined : primaryUrl"
45
+ class="blog-button-single"
46
+ :class="{ 'blog-button-single--disabled': editorMode }"
47
+ >
48
+ <!-- #living-beauty -->
49
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
50
+ <path d="M6.23628 4.592C6.15503 4.51075 6.02222 4.51075 5.94097 4.592L4.15815 6.37481C4.0769 6.45606 4.0769 6.58887 4.15815 6.67012L12.016 14.5279C12.2738 14.7857 12.7644 14.7154 13.1097 14.3701L13.9363 13.5436C14.2816 13.1982 14.3519 12.7076 14.0941 12.4498L6.23628 4.592ZM3.2769 5.78731C3.35815 5.86856 3.49097 5.86856 3.57222 5.78731L5.35503 4.00449C5.43628 3.92324 5.43628 3.79043 5.35503 3.70918L3.33159 1.68731C3.07378 1.4295 2.58315 1.49981 2.23784 1.84512L1.41128 2.67168C1.06597 3.01699 0.995654 3.50762 1.25347 3.76543L3.2769 5.78731ZM4.64878 11.4982C4.48315 11.4279 4.3519 11.2967 4.28159 11.1311L3.68784 9.74356C3.67378 9.71074 3.64722 9.68418 3.6144 9.67012C3.54409 9.64043 3.46128 9.67324 3.43159 9.74356L2.83784 11.1311C2.76753 11.2967 2.63628 11.4279 2.47065 11.4982L1.08315 12.092C1.05034 12.1061 1.02378 12.1326 1.00972 12.1654C0.980029 12.2357 1.01284 12.3186 1.08315 12.3482L2.47065 12.942C2.63628 13.0123 2.76753 13.1436 2.83784 13.3092L3.43159 14.6967C3.44565 14.7295 3.47222 14.7561 3.50503 14.7701C3.57534 14.7998 3.65815 14.767 3.68784 14.6967L4.28159 13.3092C4.3519 13.1436 4.48315 13.0123 4.64878 12.942L6.03628 12.3482C6.06909 12.3342 6.09565 12.3076 6.10972 12.2748C6.1394 12.2045 6.10659 12.1217 6.03628 12.092L4.64878 11.4982ZM8.72065 3.55137C8.83784 3.60137 8.93003 3.69356 8.98003 3.81075L9.4019 4.79825C9.41128 4.82168 9.43003 4.84043 9.45347 4.84981C9.50347 4.87168 9.56128 4.84825 9.58315 4.79825L10.005 3.81075C10.055 3.69356 10.1472 3.60137 10.2644 3.55137L11.2519 3.1295C11.2753 3.12012 11.2941 3.10137 11.3035 3.07793C11.3253 3.02793 11.3019 2.97012 11.2519 2.94824L10.2644 2.52637C10.1472 2.47637 10.055 2.38418 10.005 2.267L9.58315 1.2795C9.57378 1.25606 9.55503 1.23731 9.53159 1.22793C9.48159 1.20606 9.42378 1.2295 9.4019 1.2795L8.98003 2.267C8.93003 2.38418 8.83784 2.47637 8.72065 2.52637L7.73315 2.94824C7.70972 2.95762 7.69097 2.97637 7.68159 2.99981C7.65972 3.04981 7.68315 3.10762 7.73315 3.1295L8.72065 3.55137ZM14.955 6.65137L14.2019 6.32949C14.1128 6.292 14.0425 6.22012 14.005 6.13106L13.6832 5.37793C13.6753 5.36074 13.6613 5.34668 13.6441 5.33887C13.6066 5.32325 13.5613 5.34043 13.5457 5.37793L13.2238 6.13106C13.1863 6.22012 13.1144 6.29043 13.0269 6.32949L12.2738 6.65137C12.2566 6.65918 12.2425 6.67324 12.2347 6.69043C12.2191 6.72793 12.2363 6.77324 12.2738 6.78887L13.0269 7.11074C13.116 7.14824 13.1863 7.22012 13.2238 7.30762L13.5457 8.06075C13.5535 8.07793 13.5675 8.092 13.5847 8.09981C13.6222 8.11543 13.6675 8.09825 13.6832 8.06075L14.005 7.30762C14.0425 7.21856 14.1144 7.14824 14.2019 7.11074L14.955 6.78887C14.9722 6.78106 14.9863 6.76699 14.9941 6.74981C15.0113 6.71231 14.9925 6.66856 14.955 6.65137Z" fill="currentColor"/>
51
+ </svg>
52
+ <span class="blog-button-single-text" v-bind="editableAttrs('button_text')">{{ s.button_text }}</span>
53
+ </a>
54
+ </div>
55
+
56
+ <!-- blog-button-group -->
57
+ <div v-else-if="variant === 'button-group'" class="blog-button-group">
58
+ <div class="blog-button-group-item">
59
+ <a
60
+ :href="editorMode ? undefined : primaryUrl"
61
+ class="blog-button-group-button-black"
62
+ :class="{ 'blog-button-group--disabled': editorMode }"
63
+ >
64
+ <!-- #living-beauty2 -->
65
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
66
+ <path d="M6.23628 4.592C6.15503 4.51075 6.02222 4.51075 5.94097 4.592L4.15815 6.37481C4.0769 6.45606 4.0769 6.58887 4.15815 6.67012L12.016 14.5279C12.2738 14.7857 12.7644 14.7154 13.1097 14.3701L13.9363 13.5436C14.2816 13.1982 14.3519 12.7076 14.0941 12.4498L6.23628 4.592ZM3.2769 5.78731C3.35815 5.86856 3.49097 5.86856 3.57222 5.78731L5.35503 4.00449C5.43628 3.92324 5.43628 3.79043 5.35503 3.70918L3.33159 1.68731C3.07378 1.4295 2.58315 1.49981 2.23784 1.84512L1.41128 2.67168C1.06597 3.01699 0.995654 3.50762 1.25347 3.76543L3.2769 5.78731ZM4.64878 11.4982C4.48315 11.4279 4.3519 11.2967 4.28159 11.1311L3.68784 9.74356C3.67378 9.71074 3.64722 9.68418 3.6144 9.67012C3.54409 9.64043 3.46128 9.67324 3.43159 9.74356L2.83784 11.1311C2.76753 11.2967 2.63628 11.4279 2.47065 11.4982L1.08315 12.092C1.05034 12.1061 1.02378 12.1326 1.00972 12.1654C0.980029 12.2357 1.01284 12.3186 1.08315 12.3482L2.47065 12.942C2.63628 13.0123 2.76753 13.1436 2.83784 13.3092L3.43159 14.6967C3.44565 14.7295 3.47222 14.7561 3.50503 14.7701C3.57534 14.7998 3.65815 14.767 3.68784 14.6967L4.28159 13.3092C4.3519 13.1436 4.48315 13.0123 4.64878 12.942L6.03628 12.3482C6.06909 12.3342 6.09565 12.3076 6.10972 12.2748C6.1394 12.2045 6.10659 12.1217 6.03628 12.092L4.64878 11.4982ZM8.72065 3.55137C8.83784 3.60137 8.93003 3.69356 8.98003 3.81075L9.4019 4.79825C9.41128 4.82168 9.43003 4.84043 9.45347 4.84981C9.50347 4.87168 9.56128 4.84825 9.58315 4.79825L10.005 3.81075C10.055 3.69356 10.1472 3.60137 10.2644 3.55137L11.2519 3.1295C11.2753 3.12012 11.2941 3.10137 11.3035 3.07793C11.3253 3.02793 11.3019 2.97012 11.2519 2.94824L10.2644 2.52637C10.1472 2.47637 10.055 2.38418 10.005 2.267L9.58315 1.2795C9.57378 1.25606 9.55503 1.23731 9.53159 1.22793C9.48159 1.20606 9.42378 1.2295 9.4019 1.2795L8.98003 2.267C8.93003 2.38418 8.83784 2.47637 8.72065 2.52637L7.73315 2.94824C7.70972 2.95762 7.69097 2.97637 7.68159 2.99981C7.65972 3.04981 7.68315 3.10762 7.73315 3.1295L8.72065 3.55137ZM14.955 6.65137L14.2019 6.32949C14.1128 6.292 14.0425 6.22012 14.005 6.13106L13.6832 5.37793C13.6753 5.36074 13.6613 5.34668 13.6441 5.33887C13.6066 5.32325 13.5613 5.34043 13.5457 5.37793L13.2238 6.13106C13.1863 6.22012 13.1144 6.29043 13.0269 6.32949L12.2738 6.65137C12.2566 6.65918 12.2425 6.67324 12.2347 6.69043C12.2191 6.72793 12.2363 6.77324 12.2738 6.78887L13.0269 7.11074C13.116 7.14824 13.1863 7.22012 13.2238 7.30762L13.5457 8.06075C13.5535 8.07793 13.5675 8.092 13.5847 8.09981C13.6222 8.11543 13.6675 8.09825 13.6832 8.06075L14.005 7.30762C14.0425 7.21856 14.1144 7.14824 14.2019 7.11074L14.955 6.78887C14.9722 6.78106 14.9863 6.76699 14.9941 6.74981C15.0113 6.71231 14.9925 6.66856 14.955 6.65137Z" fill="currentColor"/>
67
+ </svg>
68
+ <span class="blog-button-group-text" v-bind="editableAttrs('button_text')">{{ s.button_text }}</span>
69
+ </a>
70
+ <p v-if="s.button_caption" class="blog-button-group-note">
71
+ <img src="https://cdn.visiva.ai/blog/coupon.svg" alt="Coupon" class="blog-icon-17">
72
+ <span class="blog-button-group-note-text" v-bind="editableAttrs('button_caption')">{{ s.button_caption }}</span>
73
+ </p>
74
+ </div>
75
+
76
+ <div class="blog-button-group-item">
77
+ <a
78
+ :href="editorMode ? undefined : secondaryUrl"
79
+ class="blog-button-group-button-green"
80
+ :class="{ 'blog-button-group--disabled': editorMode }"
81
+ >
82
+ <!-- #market -->
83
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
84
+ <mask id="market-mask0" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="16" height="16">
85
+ <rect width="16" height="16" fill="#D9D9D9"/>
86
+ </mask>
87
+ <g mask="url(#market-mask0)">
88
+ <path d="M5.14284 13.7144C4.50998 13.7144 4 14.2243 4 14.8572C4 15.4901 4.50998 16 5.14284 16C5.77571 16 6.28569 15.4901 6.28569 14.8572C6.28569 14.2243 5.77571 13.7144 5.14284 13.7144Z" fill="black"/>
89
+ <path d="M13.1463 13.7144C12.5134 13.7144 12.0034 14.2243 12.0034 14.8572C12.0034 15.4901 12.5134 16 13.1463 16C13.7791 16 14.2891 15.4901 14.2891 14.8572C14.2891 14.2243 13.7761 13.7144 13.1463 13.7144Z" fill="black"/>
90
+ <path d="M15.5789 2.22449C15.2871 1.8927 14.8846 1.71451 14.4484 1.71451H2.99843L2.95849 1.48103C2.85711 0.648471 2.12594 0.000244141 1.29338 0.000244141H0.571422C0.25499 0.000244141 0 0.255234 0 0.571666C0 0.888099 0.25499 1.14309 0.571422 1.14309H1.29031C1.53915 1.14309 1.79414 1.37043 1.82486 1.64692L2.37785 4.83583L3.34866 11.6591C3.45004 12.4917 4.172 13.143 4.99841 13.143H14.2886C14.6051 13.143 14.8601 12.888 14.8601 12.5715C14.8601 12.2551 14.6051 12.0001 14.2886 12.0001H4.99534C4.75264 12.0001 4.51301 11.7758 4.47921 11.5086L4.38398 10.8419L13.4499 10.2828C14.2733 10.2828 14.9983 9.63147 15.0935 8.82964L15.9998 3.6807C16.0643 3.13078 15.9138 2.59929 15.5789 2.22449Z" fill="black"/>
91
+ </g>
92
+ </svg>
93
+ <span class="blog-button-group-text" v-bind="editableAttrs('secondary_button_text')">{{ s.secondary_button_text }}</span>
94
+ </a>
95
+ <p v-if="s.secondary_button_caption" class="blog-button-group-note">
96
+ <!-- #star -->
97
+ <svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
98
+ <path d="M8.5 0L10.4084 5.87336L16.584 5.87336L11.5878 9.50329L13.4962 15.3766L8.5 11.7467L3.50383 15.3766L5.41219 9.50329L0.416019 5.87336L6.59163 5.87336L8.5 0Z" fill="#00B67A"/>
99
+ <path d="M8.5 12L11.5 9.5L12 11L8.5 12Z" fill="#005128"/>
100
+ </svg>
101
+ <span class="blog-button-group-note-text" v-bind="editableAttrs('secondary_button_caption')">{{ s.secondary_button_caption }}</span>
102
+ </p>
103
+ </div>
104
+ </div>
105
+
106
+ <!-- blog-button-group-dark -->
107
+ <div v-else-if="variant === 'button-group-dark'" class="blog-button-group-dark">
108
+ <div class="blog-button-group-dark-inner">
109
+ <div>
110
+ <a
111
+ :href="editorMode ? undefined : primaryUrl"
112
+ class="blog-button-group-dark-button"
113
+ :class="{ 'blog-button-group--disabled': editorMode }"
114
+ >
115
+ <!-- #living-beauty2 -->
116
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
117
+ <path d="M6.23628 4.592C6.15503 4.51075 6.02222 4.51075 5.94097 4.592L4.15815 6.37481C4.0769 6.45606 4.0769 6.58887 4.15815 6.67012L12.016 14.5279C12.2738 14.7857 12.7644 14.7154 13.1097 14.3701L13.9363 13.5436C14.2816 13.1982 14.3519 12.7076 14.0941 12.4498L6.23628 4.592ZM3.2769 5.78731C3.35815 5.86856 3.49097 5.86856 3.57222 5.78731L5.35503 4.00449C5.43628 3.92324 5.43628 3.79043 5.35503 3.70918L3.33159 1.68731C3.07378 1.4295 2.58315 1.49981 2.23784 1.84512L1.41128 2.67168C1.06597 3.01699 0.995654 3.50762 1.25347 3.76543L3.2769 5.78731ZM4.64878 11.4982C4.48315 11.4279 4.3519 11.2967 4.28159 11.1311L3.68784 9.74356C3.67378 9.71074 3.64722 9.68418 3.6144 9.67012C3.54409 9.64043 3.46128 9.67324 3.43159 9.74356L2.83784 11.1311C2.76753 11.2967 2.63628 11.4279 2.47065 11.4982L1.08315 12.092C1.05034 12.1061 1.02378 12.1326 1.00972 12.1654C0.980029 12.2357 1.01284 12.3186 1.08315 12.3482L2.47065 12.942C2.63628 13.0123 2.76753 13.1436 2.83784 13.3092L3.43159 14.6967C3.44565 14.7295 3.47222 14.7561 3.50503 14.7701C3.57534 14.7998 3.65815 14.767 3.68784 14.6967L4.28159 13.3092C4.3519 13.1436 4.48315 13.0123 4.64878 12.942L6.03628 12.3482C6.06909 12.3342 6.09565 12.3076 6.10972 12.2748C6.1394 12.2045 6.10659 12.1217 6.03628 12.092L4.64878 11.4982ZM8.72065 3.55137C8.83784 3.60137 8.93003 3.69356 8.98003 3.81075L9.4019 4.79825C9.41128 4.82168 9.43003 4.84043 9.45347 4.84981C9.50347 4.87168 9.56128 4.84825 9.58315 4.79825L10.005 3.81075C10.055 3.69356 10.1472 3.60137 10.2644 3.55137L11.2519 3.1295C11.2753 3.12012 11.2941 3.10137 11.3035 3.07793C11.3253 3.02793 11.3019 2.97012 11.2519 2.94824L10.2644 2.52637C10.1472 2.47637 10.055 2.38418 10.005 2.267L9.58315 1.2795C9.57378 1.25606 9.55503 1.23731 9.53159 1.22793C9.48159 1.20606 9.42378 1.2295 9.4019 1.2795L8.98003 2.267C8.93003 2.38418 8.83784 2.47637 8.72065 2.52637L7.73315 2.94824C7.70972 2.95762 7.69097 2.97637 7.68159 2.99981C7.65972 3.04981 7.68315 3.10762 7.73315 3.1295L8.72065 3.55137ZM14.955 6.65137L14.2019 6.32949C14.1128 6.292 14.0425 6.22012 14.005 6.13106L13.6832 5.37793C13.6753 5.36074 13.6613 5.34668 13.6441 5.33887C13.6066 5.32325 13.5613 5.34043 13.5457 5.37793L13.2238 6.13106C13.1863 6.22012 13.1144 6.29043 13.0269 6.32949L12.2738 6.65137C12.2566 6.65918 12.2425 6.67324 12.2347 6.69043C12.2191 6.72793 12.2363 6.77324 12.2738 6.78887L13.0269 7.11074C13.116 7.14824 13.1863 7.22012 13.2238 7.30762L13.5457 8.06075C13.5535 8.07793 13.5675 8.092 13.5847 8.09981C13.6222 8.11543 13.6675 8.09825 13.6832 8.06075L14.005 7.30762C14.0425 7.21856 14.1144 7.14824 14.2019 7.11074L14.955 6.78887C14.9722 6.78106 14.9863 6.76699 14.9941 6.74981C15.0113 6.71231 14.9925 6.66856 14.955 6.65137Z" fill="currentColor"/>
118
+ </svg>
119
+ <span class="blog-button-group-text" v-bind="editableAttrs('button_text')">{{ s.button_text }}</span>
120
+ </a>
121
+ </div>
122
+ <div>
123
+ <a
124
+ :href="editorMode ? undefined : secondaryUrl"
125
+ class="blog-button-group-button-green"
126
+ :class="{ 'blog-button-group--disabled': editorMode }"
127
+ >
128
+ <!-- #market -->
129
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
130
+ <mask id="market-mask1" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="16" height="16">
131
+ <rect width="16" height="16" fill="#D9D9D9"/>
132
+ </mask>
133
+ <g mask="url(#market-mask1)">
134
+ <path d="M5.14284 13.7144C4.50998 13.7144 4 14.2243 4 14.8572C4 15.4901 4.50998 16 5.14284 16C5.77571 16 6.28569 15.4901 6.28569 14.8572C6.28569 14.2243 5.77571 13.7144 5.14284 13.7144Z" fill="black"/>
135
+ <path d="M13.1463 13.7144C12.5134 13.7144 12.0034 14.2243 12.0034 14.8572C12.0034 15.4901 12.5134 16 13.1463 16C13.7791 16 14.2891 15.4901 14.2891 14.8572C14.2891 14.2243 13.7761 13.7144 13.1463 13.7144Z" fill="black"/>
136
+ <path d="M15.5789 2.22449C15.2871 1.8927 14.8846 1.71451 14.4484 1.71451H2.99843L2.95849 1.48103C2.85711 0.648471 2.12594 0.000244141 1.29338 0.000244141H0.571422C0.25499 0.000244141 0 0.255234 0 0.571666C0 0.888099 0.25499 1.14309 0.571422 1.14309H1.29031C1.53915 1.14309 1.79414 1.37043 1.82486 1.64692L2.37785 4.83583L3.34866 11.6591C3.45004 12.4917 4.172 13.143 4.99841 13.143H14.2886C14.6051 13.143 14.8601 12.888 14.8601 12.5715C14.8601 12.2551 14.6051 12.0001 14.2886 12.0001H4.99534C4.75264 12.0001 4.51301 11.7758 4.47921 11.5086L4.38398 10.8419L13.4499 10.2828C14.2733 10.2828 14.9983 9.63147 15.0935 8.82964L15.9998 3.6807C16.0643 3.13078 15.9138 2.59929 15.5789 2.22449Z" fill="black"/>
137
+ </g>
138
+ </svg>
139
+ <span class="blog-button-group-text" v-bind="editableAttrs('secondary_button_text')">{{ s.secondary_button_text }}</span>
140
+ </a>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </template>
145
+
146
+ <style scoped>
147
+ .blog-button-single-wrapper{margin-top:40px;text-align:center}.blog-button-single{align-items:center;background:linear-gradient(90deg,#33ff78,#caff33);border-radius:40px;color:#000;cursor:pointer;display:inline-flex;gap:8px;height:60px;justify-content:center;min-width:270px;text-decoration:none}.blog-button-single:hover{background:linear-gradient(270deg,#33ff78,#caff33)}.blog-button-single--disabled{pointer-events:none}.blog-button-single-text{font-size:16px;font-weight:700}.blog-button-group{align-items:center;display:flex;flex-direction:column;gap:20px;margin-top:40px}.blog-button-group--disabled{pointer-events:none}.blog-button-group-button-black{align-items:center;background:#000;border-radius:40px;color:#fff;cursor:pointer;display:flex;gap:8px;height:60px;justify-content:center;min-width:270px;text-decoration:none}.blog-button-group-button-black:hover{background:rgba(0,0,0,.8)}.blog-button-group-button-green{align-items:center;background:linear-gradient(90deg,#33ff78,#caff33);border-radius:40px;color:#000;cursor:pointer;display:flex;gap:8px;height:60px;justify-content:center;min-width:270px;text-decoration:none}.blog-button-group-button-green:hover{background:linear-gradient(270deg,#33ff78,#caff33)}.blog-button-group-text{font-size:16px;font-weight:700}.blog-button-group-note{align-items:center;display:flex;gap:6px;justify-content:center;margin-top:16px}.blog-button-group-note-text{color:#666262;font-size:14px;font-weight:500}.blog-button-group-dark{background:#000;border-radius:20px;margin-top:40px;padding:40px 16px}.blog-button-group-dark-inner{align-items:center;display:flex;flex-direction:column;gap:16px}.blog-button-group-dark-button{align-items:center;background:#000;border:1px solid #fff;border-radius:40px;color:#fff;cursor:pointer;display:flex;gap:8px;height:60px;justify-content:center;min-width:270px;text-decoration:none}.blog-button-group-dark-button:hover{background:#fff;color:#000}@media (min-width:768px){.blog-button-single-wrapper{text-align:left}.blog-button-single{min-width:220px}.blog-button-group{flex-direction:row;gap:24px}.blog-button-group-button-black{min-width:220px}.blog-button-group-button-green{min-width:260px}.blog-button-group-note{margin-top:20px}.blog-button-group-dark-inner{flex-direction:row;gap:24px}.blog-button-group-dark-button{min-width:220px}}.blog-icon-17{height:17px;width:17px}
148
+ </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,76 @@
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 title = computed(() => (props.settings.title as string) || '')
24
+
25
+ const items = computed(() =>
26
+ props.blockOrder
27
+ .map((id) => props.blocks[id])
28
+ .filter((b): b is BlockData => !!b && b.type === 'faq_item'),
29
+ )
30
+
31
+ const { editableAttrs, blockEditableAttrs } = useInlineEdit({
32
+ editorMode: () => !!props.editorMode,
33
+ onSettingUpdate: (key, value) => emit('update:setting', key, value),
34
+ onBlockSettingUpdate: (blockId, key, value) => emit('update:block-setting', blockId, key, value),
35
+ onEditStart: (key) => emit('inline-edit-start', key),
36
+ onEditEnd: () => emit('inline-edit-end'),
37
+ onUndoRedo: (action) => emit('undo-redo', action),
38
+ })
39
+ </script>
40
+
41
+ <template>
42
+ <div class="blog-qa-card3">
43
+ <div class="blog-qa-card3-header">
44
+ <!-- #faq -->
45
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
46
+ <g clip-path="url(#faq-clip0)">
47
+ <path d="M10 0.9375C4.995 0.9375 0.9375 4.995 0.9375 10L0.939583 10.1971C0.970862 11.7478 1.40154 13.2643 2.19 14.6L2.2975 14.7771L1.76417 16.2446L1.73583 16.3308C1.52417 17.1 1.92333 17.8767 2.64833 18.14L2.74667 18.1721C2.87917 18.2096 3.01625 18.2292 3.15417 18.2292L6.20125 18.2296L6.04542 18.1562C7.27779 18.7544 8.63012 19.0643 10 19.0625C15.005 19.0625 19.0625 15.005 19.0625 10C19.0625 4.995 15.005 0.9375 10 0.9375Z" fill="#1FB04F"/>
48
+ <path d="M10 12.846C9.77992 12.846 9.56886 12.9334 9.41325 13.089C9.25763 13.2446 9.17021 13.4557 9.17021 13.6758C9.17021 13.8958 9.25763 14.1069 9.41325 14.2625C9.56886 14.4181 9.77992 14.5056 10 14.5056C10.2201 14.5056 10.4311 14.4181 10.5867 14.2625C10.7424 14.1069 10.8298 13.8958 10.8298 13.6758C10.8298 13.4557 10.7424 13.2446 10.5867 13.089C10.4311 12.9334 10.2201 12.846 10 12.846ZM10.0008 5.49514C9.26375 5.49514 8.56708 5.77555 8.03875 6.28472C7.76853 6.5439 7.55376 6.85525 7.40743 7.19989C7.26111 7.54454 7.18629 7.9153 7.1875 8.28972V8.4318L7.19041 8.47764C7.17499 8.56833 7.17912 8.66126 7.20253 8.75022C7.22593 8.83919 7.26807 8.92212 7.32613 8.99348C7.38418 9.06484 7.45681 9.12297 7.53915 9.16399C7.62149 9.205 7.71164 9.22795 7.80357 9.23131C7.8955 9.23466 7.98708 9.21834 8.07219 9.18343C8.1573 9.14852 8.23397 9.09583 8.29707 9.02889C8.36016 8.96195 8.40823 8.88231 8.43806 8.79528C8.46788 8.70826 8.47877 8.61588 8.47 8.52431L8.47833 8.45764L8.47958 8.29014L8.48166 8.21347C8.52333 7.48306 9.19083 6.89931 10.0008 6.89931C10.8408 6.89931 11.5221 7.52556 11.5221 8.28972C11.5221 8.80097 11.2096 9.27389 10.7154 9.51597L10.5362 9.59764C10.1943 9.76873 9.9069 10.0318 9.70625 10.3572C9.47583 10.726 9.35333 11.1697 9.35333 11.6251V12.0268L9.35625 12.0664C9.37958 12.1926 9.47625 12.2806 9.59291 12.2806H10.4054L10.4442 12.2768C10.5014 12.2648 10.5527 12.2333 10.5893 12.1877C10.6259 12.1421 10.6456 12.0853 10.645 12.0268V11.6026L10.6479 11.5335C10.6704 11.2347 10.8508 10.9693 11.105 10.8618C11.611 10.6485 12.0429 10.2907 12.3466 9.83323C12.6503 9.37574 12.8124 8.83885 12.8125 8.28972C12.8144 7.91532 12.7399 7.54447 12.5938 7.19976C12.4477 6.85505 12.2329 6.54371 11.9625 6.28472C11.4367 5.77566 10.7327 5.4923 10.0008 5.49514Z" fill="white"/>
49
+ </g>
50
+ <defs>
51
+ <clipPath id="faq-clip0">
52
+ <rect width="20" height="20" fill="white"/>
53
+ </clipPath>
54
+ </defs>
55
+ </svg>
56
+ <h2 class="blog-qa-card3-title" v-bind="editableAttrs('title')">{{ title }}</h2>
57
+ </div>
58
+
59
+ <div
60
+ v-for="(item, index) in items"
61
+ :key="blockOrder[index]"
62
+ :class="index === items.length - 1 ? 'blog-qa-card3-item-last' : 'blog-qa-card3-item'"
63
+ >
64
+ <h3 class="blog-qa-card3-question" v-bind="blockEditableAttrs(blockOrder[index], 'question')">
65
+ {{ item.settings.question }}
66
+ </h3>
67
+ <p class="blog-qa-card3-answer" v-bind="blockEditableAttrs(blockOrder[index], 'answer')">
68
+ {{ item.settings.answer }}
69
+ </p>
70
+ </div>
71
+ </div>
72
+ </template>
73
+
74
+ <style scoped>
75
+ .blog-qa-card3{background:#f8fffb;border-radius:10px;font-size:14px;margin-top:40px;padding:28px 16px}.blog-qa-card3-header{align-items:center;display:flex;gap:12px;margin-bottom:16px}.blog-qa-card3-title{color:#1fb04f;font-size:18px;font-weight:700;margin:0}.blog-qa-card3-item{margin-bottom:16px}.blog-qa-card3-item-last{margin-bottom:0}.blog-qa-card3-question{font-weight:700;margin:0 0 6px}.blog-qa-card3-answer{line-height:1.625;margin:0}@media (min-width:768px){.blog-qa-card3{border-radius:15px;font-size:16px;padding:28px 20px}.blog-qa-card3-title{font-size:20px}.blog-qa-card3-item{margin-bottom:24px}.blog-qa-card3-question{margin-bottom:12px}}
76
+ </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,79 @@
1
+ <script setup lang="ts">
2
+ import type { BlockData } from '@vigilkids/section-core'
3
+ import { safeUrl } from '@vigilkids/section-core'
4
+
5
+ import { computed } from 'vue'
6
+
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 isDark = computed(() => s.value.variant === 'dark')
26
+ const blockOrder = computed(() => props.blockOrder)
27
+ const blocks = computed(() => props.blocks)
28
+
29
+ const { editableAttrs, blockEditableAttrs } = useInlineEdit({
30
+ editorMode: () => !!props.editorMode,
31
+ onSettingUpdate: (key, value) => emit('update:setting', key, value),
32
+ onBlockSettingUpdate: (blockId, key, value) => emit('update:block-setting', blockId, key, value),
33
+ onEditStart: (key) => emit('inline-edit-start', key),
34
+ onEditEnd: () => emit('inline-edit-end'),
35
+ onUndoRedo: (action) => emit('undo-redo', action),
36
+ })
37
+ </script>
38
+
39
+ <template>
40
+ <!-- blog-features-card / blog-features-card-dark -->
41
+ <div :class="isDark ? 'blog-features-card-dark' : 'blog-features-card'">
42
+ <div class="blog-features-card-content">
43
+ <h2 class="blog-features-card-title" v-bind="editableAttrs('title')">{{ s.title }}</h2>
44
+
45
+ <ul :class="isDark ? 'blog-features-card-dark-list' : 'blog-features-card-list'">
46
+ <template v-for="blockId in blockOrder" :key="blockId">
47
+ <li v-if="blocks[blockId]" v-bind="blockEditableAttrs(blockId, 'text')">
48
+ {{ blocks[blockId]!.settings.text }}
49
+ </li>
50
+ </template>
51
+ </ul>
52
+
53
+ <a
54
+ :href="editorMode ? undefined : safeUrl(String(s.button_url || ''))"
55
+ :class="isDark ? 'blog-features-card-dark-button' : 'blog-features-card-button'"
56
+ target="_blank"
57
+ rel="noopener noreferrer"
58
+ >
59
+ <!-- #living-beauty -->
60
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
61
+ <path d="M6.23628 4.592C6.15503 4.51075 6.02222 4.51075 5.94097 4.592L4.15815 6.37481C4.0769 6.45606 4.0769 6.58887 4.15815 6.67012L12.016 14.5279C12.2738 14.7857 12.7644 14.7154 13.1097 14.3701L13.9363 13.5436C14.2816 13.1982 14.3519 12.7076 14.0941 12.4498L6.23628 4.592ZM3.2769 5.78731C3.35815 5.86856 3.49097 5.86856 3.57222 5.78731L5.35503 4.00449C5.43628 3.92324 5.43628 3.79043 5.35503 3.70918L3.33159 1.68731C3.07378 1.4295 2.58315 1.49981 2.23784 1.84512L1.41128 2.67168C1.06597 3.01699 0.995654 3.50762 1.25347 3.76543L3.2769 5.78731ZM4.64878 11.4982C4.48315 11.4279 4.3519 11.2967 4.28159 11.1311L3.68784 9.74356C3.67378 9.71074 3.64722 9.68418 3.6144 9.67012C3.54409 9.64043 3.46128 9.67324 3.43159 9.74356L2.83784 11.1311C2.76753 11.2967 2.63628 11.4279 2.47065 11.4982L1.08315 12.092C1.05034 12.1061 1.02378 12.1326 1.00972 12.1654C0.980029 12.2357 1.01284 12.3186 1.08315 12.3482L2.47065 12.942C2.63628 13.0123 2.76753 13.1436 2.83784 13.3092L3.43159 14.6967C3.44565 14.7295 3.47222 14.7561 3.50503 14.7701C3.57534 14.7998 3.65815 14.767 3.68784 14.6967L4.28159 13.3092C4.3519 13.1436 4.48315 13.0123 4.64878 12.942L6.03628 12.3482C6.06909 12.3342 6.09565 12.3076 6.10972 12.2748C6.1394 12.2045 6.10659 12.1217 6.03628 12.092L4.64878 11.4982ZM8.72065 3.55137C8.83784 3.60137 8.93003 3.69356 8.98003 3.81075L9.4019 4.79825C9.41128 4.82168 9.43003 4.84043 9.45347 4.84981C9.50347 4.87168 9.56128 4.84825 9.58315 4.79825L10.005 3.81075C10.055 3.69356 10.1472 3.60137 10.2644 3.55137L11.2519 3.1295C11.2753 3.12012 11.2941 3.10137 11.3035 3.07793C11.3253 3.02793 11.3019 2.97012 11.2519 2.94824L10.2644 2.52637C10.1472 2.47637 10.055 2.38418 10.005 2.267L9.58315 1.2795C9.57378 1.25606 9.55503 1.23731 9.53159 1.22793C9.48159 1.20606 9.42378 1.2295 9.4019 1.2795L8.98003 2.267C8.93003 2.38418 8.83784 2.47637 8.72065 2.52637L7.73315 2.94824C7.70972 2.95762 7.69097 2.97637 7.68159 2.99981C7.65972 3.04981 7.68315 3.10762 7.73315 3.1295L8.72065 3.55137ZM14.955 6.65137L14.2019 6.32949C14.1128 6.292 14.0425 6.22012 14.005 6.13106L13.6832 5.37793C13.6753 5.36074 13.6613 5.34668 13.6441 5.33887C13.6066 5.32325 13.5613 5.34043 13.5457 5.37793L13.2238 6.13106C13.1863 6.22012 13.1144 6.29043 13.0269 6.32949L12.2738 6.65137C12.2566 6.65918 12.2425 6.67324 12.2347 6.69043C12.2191 6.72793 12.2363 6.77324 12.2738 6.78887L13.0269 7.11074C13.116 7.14824 13.1863 7.22012 13.2238 7.30762L13.5457 8.06075C13.5535 8.07793 13.5675 8.092 13.5847 8.09981C13.6222 8.11543 13.6675 8.09825 13.6832 8.06075L14.005 7.30762C14.0425 7.21856 14.1144 7.14824 14.2019 7.11074L14.955 6.78887C14.9722 6.78106 14.9863 6.76699 14.9941 6.74981C15.0113 6.71231 14.9925 6.66856 14.955 6.65137Z" fill="currentColor"/>
62
+ </svg>
63
+ <span class="blog-button-group-text" v-bind="editableAttrs('button_text')">{{ s.button_text }}</span>
64
+ </a>
65
+ </div>
66
+
67
+ <div class="blog-features-card-image-wrapper">
68
+ <img
69
+ :src="safeUrl(String(s.image_src || ''))"
70
+ alt="Feature Image"
71
+ class="blog-features-card-image"
72
+ />
73
+ </div>
74
+ </div>
75
+ </template>
76
+
77
+ <style scoped>
78
+ .blog-features-card{background:#f7f8fa}.blog-features-card,.blog-features-card-dark{align-items:center;border-radius:10px;display:flex;flex-direction:column;gap:20px;justify-content:space-between;margin-top:40px;padding:28px 12px}.blog-features-card-dark{background:#2e2e2e;color:#fff}.blog-features-card-content{max-width:426px}.blog-features-card-title{font-size:18px;font-weight:700;margin:0 0 16px;text-align:center}.blog-features-card-list{color:#666262;font-size:14px;font-weight:300;list-style-position:outside;list-style-type:disc;margin:0 0 20px;padding-left:16px}.blog-features-card-list li+li{margin-top:8px}.blog-features-card-dark-list{font-size:14px;font-weight:300;list-style-position:outside;list-style-type:disc;margin:0 0 20px;padding-left:16px}.blog-features-card-dark-list li+li{margin-top:8px}.blog-features-card-button{align-items:center;background:linear-gradient(90deg,#33ff78,#caff33);border-radius:40px;color:#000;cursor:pointer;display:flex;gap:8px;height:60px;justify-content:center;margin:0 auto;min-width:270px;text-decoration:none}.blog-features-card-button:hover{background:linear-gradient(270deg,#33ff78,#caff33)}.blog-features-card-dark-button{align-items:center;background:linear-gradient(90deg,#33ff78,#caff33);border-radius:40px;color:#000;cursor:pointer;display:flex;gap:8px;height:60px;justify-content:center;margin:0 auto;min-width:270px;text-decoration:none}.blog-features-card-dark-button:hover{background:linear-gradient(270deg,#33ff78,#caff33)}.blog-button-group-text{font-size:16px;font-weight:700}.blog-features-card-image-wrapper{max-width:411px}.blog-features-card-image{border-radius:10px;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}@media (min-width:768px){.blog-features-card,.blog-features-card-dark{border-radius:20px;flex-direction:row;gap:16px;padding:40px}.blog-features-card-title{font-size:20px;text-align:left}.blog-features-card-dark-list,.blog-features-card-list{margin-bottom:28px}.blog-features-card-button,.blog-features-card-dark-button{margin:0;min-width:260px}.blog-features-card-image{border-radius:20px;min-height:239px}}@media (max-width:767px){.blog-features-card-button,.blog-features-card-dark-button{margin-left:auto;margin-right:auto}}
79
+ </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,61 @@
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) || 'plain')
25
+
26
+ const { editableAttrs } = 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
+ <!-- blog-h2-style1: plain -->
38
+ <h2
39
+ v-if="variant === 'plain'"
40
+ :id="String(s.anchor || '')"
41
+ class="blog-h2-style1"
42
+ v-bind="editableAttrs('title')"
43
+ >
44
+ {{ s.title }}
45
+ </h2>
46
+
47
+ <!-- blog-h2-style2: accent -->
48
+ <h2
49
+ v-else-if="variant === 'accent'"
50
+ :id="String(s.anchor || '')"
51
+ class="blog-h2-style2"
52
+ v-bind="editableAttrs('title')"
53
+ >
54
+ <span class="blog-h2-style2-indicator" />
55
+ {{ s.title }}
56
+ </h2>
57
+ </template>
58
+
59
+ <style scoped>
60
+ .blog-h2-style1,.blog-h2-style2{font-size:22px;font-weight:900;line-height:1;margin-bottom:0;margin-top:16px}.blog-h2-style2{gap:8px;padding-left:8px;position:relative}.blog-h2-style2-indicator{background:#1fb04f;display:block;height:18px;left:0;position:absolute;top:2px;width:4px}.blog-h2-style1[id],.blog-h2-style2[id]{scroll-margin-top:80px}@media (min-width:768px){.blog-h2-style1{font-size:30px}.blog-h2-style2{font-size:30px;padding-left:16px}.blog-h2-style2-indicator{height:25px;width:5px}}
61
+ </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;