@bagelink/vue 1.4.184 → 1.4.188

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.4.184",
4
+ "version": "1.4.188",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -416,8 +416,8 @@ function showInlineToolbarForSelection() {
416
416
  const rangeClone = range.cloneRange()
417
417
  inlineToolbarSelection.value = selection
418
418
 
419
- // Store the cloned range for later use
420
- ; (inlineToolbarSelection.value as any)._storedRange = rangeClone
419
+ // Store the cloned range for later use
420
+ ; (inlineToolbarSelection.value as any)._storedRange = rangeClone
421
421
 
422
422
  showInlineToolbar.value = true
423
423
  }
@@ -1482,7 +1482,7 @@ function createNewTable(doc: Document) {
1482
1482
  console.log('Trying to add edit button to new table...')
1483
1483
  if (doc && (doc as any).__addEditButtonsToTables) {
1484
1484
  console.log('Calling __addEditButtonsToTables...')
1485
- ; (doc as any).__addEditButtonsToTables()
1485
+ ; (doc as any).__addEditButtonsToTables()
1486
1486
  } else {
1487
1487
  console.log('__addEditButtonsToTables not found, calling setupTableEditButtons...')
1488
1488
  setupTableEditButtons(doc)
@@ -1584,13 +1584,13 @@ function deleteEmbed() {
1584
1584
 
1585
1585
  // Expose openLinkModal to editor state
1586
1586
  ; (editor.state as any).openLinkModal = openLinkModal
1587
- ; (editor.state as any).showTooltipMessage = showTooltipMessage
1587
+ ; (editor.state as any).showTooltipMessage = showTooltipMessage
1588
1588
 
1589
- // Expose openTableEditor to editor state
1590
- ; (editor.state as any).openTableEditor = openTableEditor
1591
- ; (editor.state as any).openImageModal = openImageModal
1592
- ; (editor.state as any).openEmbedModal = openEmbedModal
1593
- ; (editor.state as any).openVideoModal = openVideoModal
1589
+ // Expose openTableEditor to editor state
1590
+ ; (editor.state as any).openTableEditor = openTableEditor
1591
+ ; (editor.state as any).openImageModal = openImageModal
1592
+ ; (editor.state as any).openEmbedModal = openEmbedModal
1593
+ ; (editor.state as any).openVideoModal = openVideoModal
1594
1594
 
1595
1595
  // Table manipulation functions
1596
1596
  function mergeCellRight() {
@@ -1918,12 +1918,6 @@ function handleTableContextMenu(event: MouseEvent) {
1918
1918
  }
1919
1919
  }
1920
1920
 
1921
- // Close context menu when clicking outside
1922
- function closeTableContextMenu() {
1923
- showTableContextMenu.value = false
1924
- contextMenuCell.value = null
1925
- }
1926
-
1927
1921
  // Handle clicks outside context menu
1928
1922
  // function handleDocumentClick(event: MouseEvent) {
1929
1923
  // if (showTableContextMenu.value) {
@@ -2910,38 +2904,28 @@ defineExpose({
2910
2904
  <div class="bagel-input" v-bind="attrs">
2911
2905
  <label v-if="label">{{ label }}</label>
2912
2906
 
2913
- <div
2914
- class="rounded" :class="[
2915
- {
2916
- 'rich-text-editor pt-05 px-05 pb-075': !basic,
2917
- 'rich-text-editor--basic': basic,
2918
- 'fullscreen-mode': editor.state.isFullscreen,
2919
- },
2920
- ]"
2921
- >
2922
- <EditorToolbar
2923
- v-if="editor.state.hasInit && shouldShowToolbar" :config="effectiveToolbarConfig"
2907
+ <div class="rounded" :class="[
2908
+ {
2909
+ 'rich-text-editor pt-05 px-05 pb-075': !basic,
2910
+ 'rich-text-editor--basic': basic,
2911
+ 'fullscreen-mode': editor.state.isFullscreen,
2912
+ },
2913
+ ]">
2914
+ <EditorToolbar v-if="editor.state.hasInit && shouldShowToolbar" :config="effectiveToolbarConfig"
2924
2915
  :selectedStyles="editor.state.selectedStyles" :hide-images="hideImages" :hide-videos="hideVideos"
2925
2916
  :hide-embeds="hideEmbed" :hide-tables="hideTables" :hide-alignment="hideAlignment"
2926
2917
  :hide-directions="hideDirections" :hide-h5-h6="hideH5H6" :hide="effectiveHideArray"
2927
- @action="commands.execute"
2928
- />
2918
+ @action="commands.execute" />
2929
2919
  <div class="editor-container" :class="{ 'split-view': editor.state.isSplitView }">
2930
- <div
2931
- class="content-area radius-1"
2932
- :style="{ height: editor.state.isFullscreen ? 'calc(100vh - 4rem)' : editorHeight }"
2933
- >
2934
- <iframe
2935
- id="rich-text-iframe" ref="iframe" class="editableContent" title="Editor" srcdoc=""
2920
+ <div class="content-area radius-1"
2921
+ :style="{ height: editor.state.isFullscreen ? 'calc(100vh - 4rem)' : editorHeight }">
2922
+ <iframe id="rich-text-iframe" ref="iframe" class="editableContent" title="Editor" srcdoc=""
2936
2923
  sandbox="allow-same-origin allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-scripts allow-top-navigation allow-top-navigation-by-user-activation"
2937
- @load="initEditor" @contextmenu="handleTableContextMenu"
2938
- />
2924
+ @load="initEditor" @contextmenu="handleTableContextMenu" />
2939
2925
  </div>
2940
- <CodeEditor
2941
- v-if="editor.state.isSplitView" v-model="editor.state.content" language="html"
2926
+ <CodeEditor v-if="editor.state.isSplitView" v-model="editor.state.content" language="html"
2942
2927
  :height="editor.state.isFullscreen ? 'calc(100vh - 4rem)' : editorHeight"
2943
- @update:modelValue="editor.updateState.content('html')"
2944
- />
2928
+ @update:modelValue="editor.updateState.content('html')" />
2945
2929
  </div>
2946
2930
  <div v-if="debug" class="flex pt-05">
2947
2931
  <p class="txt12 txt-gray mb-0 p-0">
@@ -2956,51 +2940,39 @@ defineExpose({
2956
2940
  <Btn thin color="gray" icon="download" @click="debugMethods?.downloadSession">
2957
2941
  Download Log
2958
2942
  </Btn>
2959
- <Btn
2960
- thin color="gray" icon="content_copy"
2961
- @click="copyText(debugMethods?.exportDebugWithPrompt() || '')"
2962
- >
2943
+ <Btn thin color="gray" icon="content_copy"
2944
+ @click="copyText(debugMethods?.exportDebugWithPrompt() || '')">
2963
2945
  Copy Log
2964
2946
  </Btn>
2965
2947
  </div>
2966
2948
  </div>
2967
2949
 
2968
2950
  <!-- Inline Toolbar -->
2969
- <div
2970
- v-if="showInlineToolbar" class="inline-toolbar" :style="{
2971
- position: 'fixed',
2972
- top: `${inlineToolbarPosition.top}px`,
2973
- left: `${inlineToolbarPosition.left}px`,
2974
- zIndex: 99,
2975
- }"
2976
- >
2951
+ <div v-if="showInlineToolbar" class="inline-toolbar" :style="{
2952
+ position: 'fixed',
2953
+ top: `${inlineToolbarPosition.top}px`,
2954
+ left: `${inlineToolbarPosition.left}px`,
2955
+ zIndex: 99,
2956
+ }">
2977
2957
  <div class="inline-toolbar-content">
2978
- <Btn
2979
- thin flat icon="format_bold" :class="{ active: editor.state.selectedStyles.has('bold') }"
2980
- @click="runInlineAction('bold')"
2981
- />
2982
- <Btn
2983
- thin flat icon="format_italic" :class="{ active: editor.state.selectedStyles.has('italic') }"
2984
- @click="runInlineAction('italic')"
2985
- />
2986
- <Btn
2987
- thin flat icon="format_underlined"
2958
+ <Btn thin flat icon="format_bold" :class="{ active: editor.state.selectedStyles.has('bold') }"
2959
+ @click="runInlineAction('bold')" />
2960
+ <Btn thin flat icon="format_italic" :class="{ active: editor.state.selectedStyles.has('italic') }"
2961
+ @click="runInlineAction('italic')" />
2962
+ <Btn thin flat icon="format_underlined"
2988
2963
  :class="{ active: editor.state.selectedStyles.has('underline') }"
2989
- @click="runInlineAction('underline')"
2990
- />
2964
+ @click="runInlineAction('underline')" />
2991
2965
  <span class="separator">|</span>
2992
2966
  <Btn thin flat icon="add_link" @click="runInlineAction('link')" />
2993
2967
  </div>
2994
2968
  </div>
2995
2969
  <!-- Table Context Menu -->
2996
- <div
2997
- v-if="showTableContextMenu" class="table-context-menu" :style="{
2998
- position: 'fixed',
2999
- top: `${contextMenuPosition.y}px`,
3000
- left: `${contextMenuPosition.x}px`,
3001
- zIndex: 1001,
3002
- }"
3003
- >
2970
+ <div v-if="showTableContextMenu" class="table-context-menu" :style="{
2971
+ position: 'fixed',
2972
+ top: `${contextMenuPosition.y}px`,
2973
+ left: `${contextMenuPosition.x}px`,
2974
+ zIndex: 1001,
2975
+ }">
3004
2976
  <div class="context-menu-content" @click.stop>
3005
2977
  <div class="menu-header">
3006
2978
  <span>Table Actions</span>
@@ -3009,60 +2981,42 @@ defineExpose({
3009
2981
  </button>
3010
2982
  </div>
3011
2983
  <div class="px-025">
3012
- <Btn
3013
- v-if="canMergeRight" full-width align-txt="start" thin flat icon="start"
3014
- class="context-menu-btn" @click="mergeCellRight(); showTableContextMenu = false"
3015
- >
2984
+ <Btn v-if="canMergeRight" full-width align-txt="start" thin flat icon="start"
2985
+ class="context-menu-btn" @click="mergeCellRight(); showTableContextMenu = false">
3016
2986
  Merge Right
3017
2987
  </Btn>
3018
- <Btn
3019
- v-if="canMergeDown" full-width align-txt="start" thin flat icon="text_select_move_down"
3020
- class="context-menu-btn" @click="mergeCellDown(); showTableContextMenu = false"
3021
- >
2988
+ <Btn v-if="canMergeDown" full-width align-txt="start" thin flat icon="text_select_move_down"
2989
+ class="context-menu-btn" @click="mergeCellDown(); showTableContextMenu = false">
3022
2990
  Merge Down
3023
2991
  </Btn>
3024
- <Btn
3025
- v-if="canSplit" full-width align-txt="start" thin flat icon="call_split"
3026
- class="context-menu-btn" @click="splitCell(); showTableContextMenu = false"
3027
- >
2992
+ <Btn v-if="canSplit" full-width align-txt="start" thin flat icon="call_split"
2993
+ class="context-menu-btn" @click="splitCell(); showTableContextMenu = false">
3028
2994
  Split Cell
3029
2995
  </Btn>
3030
2996
  <div v-if="canMergeRight || canMergeDown || canSplit" class="context-menu-separator" />
3031
- <Btn
3032
- full-width align-txt="start" thin flat icon="add_row_above" class="context-menu-btn"
3033
- @click="insertRowAbove(); showTableContextMenu = false"
3034
- >
2997
+ <Btn full-width align-txt="start" thin flat icon="add_row_above" class="context-menu-btn"
2998
+ @click="insertRowAbove(); showTableContextMenu = false">
3035
2999
  Insert Row Above
3036
3000
  </Btn>
3037
- <Btn
3038
- full-width align-txt="start" thin flat icon="add_row_below" class="context-menu-btn"
3039
- @click="insertRowBelow(); showTableContextMenu = false"
3040
- >
3001
+ <Btn full-width align-txt="start" thin flat icon="add_row_below" class="context-menu-btn"
3002
+ @click="insertRowBelow(); showTableContextMenu = false">
3041
3003
  Insert Row Below
3042
3004
  </Btn>
3043
- <Btn
3044
- full-width align-txt="start" thin flat icon="remove" class="context-menu-btn"
3045
- @click="deleteRow(); showTableContextMenu = false"
3046
- >
3005
+ <Btn full-width align-txt="start" thin flat icon="remove" class="context-menu-btn"
3006
+ @click="deleteRow(); showTableContextMenu = false">
3047
3007
  Delete Row
3048
3008
  </Btn>
3049
3009
  <div class="context-menu-separator" />
3050
- <Btn
3051
- full-width align-txt="start" thin flat icon="add_column_left" class="context-menu-btn"
3052
- @click="insertColumnLeft(); showTableContextMenu = false"
3053
- >
3010
+ <Btn full-width align-txt="start" thin flat icon="add_column_left" class="context-menu-btn"
3011
+ @click="insertColumnLeft(); showTableContextMenu = false">
3054
3012
  Insert Column Left
3055
3013
  </Btn>
3056
- <Btn
3057
- full-width align-txt="start" thin flat icon="add_column_right" class="context-menu-btn"
3058
- @click="insertColumnRight(); showTableContextMenu = false"
3059
- >
3014
+ <Btn full-width align-txt="start" thin flat icon="add_column_right" class="context-menu-btn"
3015
+ @click="insertColumnRight(); showTableContextMenu = false">
3060
3016
  Insert Column Right
3061
3017
  </Btn>
3062
- <Btn
3063
- full-width align-txt="start" thin flat icon="remove" class="context-menu-btn"
3064
- @click="deleteColumn(); showTableContextMenu = false"
3065
- >
3018
+ <Btn full-width align-txt="start" thin flat icon="remove" class="context-menu-btn"
3019
+ @click="deleteColumn(); showTableContextMenu = false">
3066
3020
  Delete Column
3067
3021
  </Btn>
3068
3022
  </div>
@@ -3072,14 +3026,10 @@ defineExpose({
3072
3026
  <!-- Link Modal -->
3073
3027
  <Modal v-model:visible="showLinkModal" title="Add Link" width="400">
3074
3028
  <div class="flex gap-05 align-items-end">
3075
- <TextInput
3076
- v-model="linkForm.url" label="URL" type="url" placeholder="https://example.com"
3077
- @keydown.enter="submitLink"
3078
- />
3079
- <Btn
3080
- icon="open_in_new" class="mb-05 radius-1" flat :disabled="!isValidUrl(linkForm.url)"
3081
- @click="visitLink"
3082
- />
3029
+ <TextInput v-model="linkForm.url" label="URL" type="url" placeholder="https://example.com"
3030
+ @keydown.enter="submitLink" />
3031
+ <Btn icon="open_in_new" class="mb-05 radius-1" flat :disabled="!isValidUrl(linkForm.url)"
3032
+ @click="visitLink" />
3083
3033
  </div>
3084
3034
  <CheckInput v-model="linkForm.openInNewTab" label="Open in new tab" type="checkbox" class="mb-2 mt-05" />
3085
3035
  <template #footer>
@@ -3094,54 +3044,36 @@ defineExpose({
3094
3044
  </div>
3095
3045
 
3096
3046
  <!-- Image Modal -->
3097
- <Modal
3098
- v-model:visible="showImageModal" :title="pendingImageData?.existingImage ? 'Edit Image' : 'Insert Image'"
3099
- width="500"
3100
- >
3101
- <TextInput
3102
- v-model="imageForm.src" label="Image URL" type="url" placeholder="https://example.com/image.jpg"
3103
- @keydown.enter="submitImage"
3104
- />
3047
+ <Modal v-model:visible="showImageModal" :title="pendingImageData?.existingImage ? 'Edit Image' : 'Insert Image'"
3048
+ width="500">
3049
+ <TextInput v-model="imageForm.src" label="Image URL" type="url" placeholder="https://example.com/image.jpg"
3050
+ @keydown.enter="submitImage" />
3105
3051
  <TextInput v-model="imageForm.alt" label="Alt Text" placeholder="Describe the image" />
3106
3052
  <div class="flex gap-1">
3107
- <TextInput
3108
- v-model="imageForm.width" label="Width" placeholder="100% or 500px or auto"
3109
- help="Examples: 100%, 500px, auto"
3110
- />
3111
- <TextInput
3112
- v-model="imageForm.height" label="Height" placeholder="auto or 300px"
3113
- help="Examples: auto, 300px"
3114
- />
3053
+ <TextInput v-model="imageForm.width" label="Width" placeholder="100% or 500px or auto"
3054
+ help="Examples: 100%, 500px, auto" />
3055
+ <TextInput v-model="imageForm.height" label="Height" placeholder="auto or 300px"
3056
+ help="Examples: auto, 300px" />
3115
3057
  </div>
3116
3058
  <TextInput v-model="imageForm.credit" label="Photo Credit" placeholder="Photographer name (optional)" />
3117
- <CheckInput
3118
- v-model="imageForm.figcaption" label="Show alt text as caption"
3119
- help="Photo credit will always be shown if provided"
3120
- />
3059
+ <CheckInput v-model="imageForm.figcaption" label="Show alt text as caption"
3060
+ help="Photo credit will always be shown if provided" />
3121
3061
  <template #footer>
3122
3062
  <div class="flex gap-05 w-100 ">
3123
3063
  <Btn value="Cancel" flat thin @click="showImageModal = false" />
3124
- <Btn
3125
- v-if="pendingImageData?.existingImage" value="Delete Image" color="red" flat thin icon="delete"
3126
- @click="deleteImage"
3127
- />
3128
- <Btn
3129
- class="ms-auto" :value="pendingImageData?.existingImage ? 'Save Changes' : 'Insert Image'"
3130
- :disabled="!imageForm.src" @click="submitImage"
3131
- />
3064
+ <Btn v-if="pendingImageData?.existingImage" value="Delete Image" color="red" flat thin icon="delete"
3065
+ @click="deleteImage" />
3066
+ <Btn class="ms-auto" :value="pendingImageData?.existingImage ? 'Save Changes' : 'Insert Image'"
3067
+ :disabled="!imageForm.src" @click="submitImage" />
3132
3068
  </div>
3133
3069
  </template>
3134
3070
  </Modal>
3135
3071
 
3136
3072
  <!-- Embed Modal -->
3137
- <Modal
3138
- v-model:visible="showEmbedModal" :title="pendingEmbedData?.existingEmbed ? 'Edit Embed' : 'Insert Embed'"
3139
- width="500"
3140
- >
3141
- <TextInput
3142
- v-model="embedForm.src" label="Embed URL or Code" type="url"
3143
- placeholder="https://www.youtube.com/embed/... or paste iframe code" @keydown.enter="submitEmbed"
3144
- />
3073
+ <Modal v-model:visible="showEmbedModal" :title="pendingEmbedData?.existingEmbed ? 'Edit Embed' : 'Insert Embed'"
3074
+ width="500">
3075
+ <TextInput v-model="embedForm.src" label="Embed URL or Code" type="url"
3076
+ placeholder="https://www.youtube.com/embed/... or paste iframe code" @keydown.enter="submitEmbed" />
3145
3077
  <div class="flex gap-1">
3146
3078
  <TextInput v-model="embedForm.width" label="Width" placeholder="560" />
3147
3079
  <TextInput v-model="embedForm.height" label="Height" placeholder="315" />
@@ -3150,25 +3082,19 @@ defineExpose({
3150
3082
  <template #footer>
3151
3083
  <div class="flex gap-05 w-100">
3152
3084
  <Btn value="Cancel" flat thin @click="showEmbedModal = false" />
3153
- <Btn
3154
- v-if="pendingEmbedData?.existingEmbed" value="Delete Embed" color="red" flat thin icon="delete"
3155
- @click="deleteEmbed"
3156
- />
3157
- <Btn
3158
- :value="pendingEmbedData?.existingEmbed ? 'Save Changes' : 'Insert Embed'"
3159
- :disabled="!embedForm.src" class="ms-auto" @click="submitEmbed"
3160
- />
3085
+ <Btn v-if="pendingEmbedData?.existingEmbed" value="Delete Embed" color="red" flat thin icon="delete"
3086
+ @click="deleteEmbed" />
3087
+ <Btn :value="pendingEmbedData?.existingEmbed ? 'Save Changes' : 'Insert Embed'"
3088
+ :disabled="!embedForm.src" class="ms-auto" @click="submitEmbed" />
3161
3089
  </div>
3162
3090
  </template>
3163
3091
  </Modal>
3164
3092
  <!-- Video Modal -->
3165
3093
  <Modal v-model:visible="showVideoModal" title="Insert Video" width="500">
3166
3094
  <div class="grid gap-0">
3167
- <TextInput
3168
- v-model="videoForm.src" label="Video URL or Embed Code" type="url"
3095
+ <TextInput v-model="videoForm.src" label="Video URL or Embed Code" type="url"
3169
3096
  placeholder="Paste YouTube URL, video file URL, or iframe embed code..."
3170
- :class="{ error: videoForm.src && !isValidVideoUrl(videoForm.src) }" @keydown.enter="submitVideo"
3171
- />
3097
+ :class="{ error: videoForm.src && !isValidVideoUrl(videoForm.src) }" @keydown.enter="submitVideo" />
3172
3098
 
3173
3099
  <div v-if="videoForm.src && !isValidVideoUrl(videoForm.src)" class="flex gap-025 opacity-5 -mt-05">
3174
3100
  <Icon name="warning" />
@@ -3177,21 +3103,17 @@ defineExpose({
3177
3103
  </p>
3178
3104
  </div>
3179
3105
 
3180
- <TextInput
3181
- v-model="videoForm.width" label="Width" placeholder="100% or 500px or 50vw"
3182
- help="Examples: 100%, 500px, 50vw, 300"
3183
- />
3184
-
3185
- <SelectInput
3186
- v-model="videoForm.aspectRatio" label="Aspect Ratio" :options="[
3187
- { value: '16:9', label: '16:9 (Standard)' },
3188
- { value: '4:3', label: '4:3 (Classic)' },
3189
- { value: '9:16', label: '9:16 (Vertical/Shorts)' },
3190
- { value: '21:9', label: '21:9 (Cinematic)' },
3191
- { value: '1:1', label: '1:1 (Square)' },
3192
- { value: 'custom', label: 'Custom' },
3193
- ]"
3194
- />
3106
+ <TextInput v-model="videoForm.width" label="Width" placeholder="100% or 500px or 50vw"
3107
+ help="Examples: 100%, 500px, 50vw, 300" />
3108
+
3109
+ <SelectInput v-model="videoForm.aspectRatio" label="Aspect Ratio" :options="[
3110
+ { value: '16:9', label: '16:9 (Standard)' },
3111
+ { value: '4:3', label: '4:3 (Classic)' },
3112
+ { value: '9:16', label: '9:16 (Vertical/Shorts)' },
3113
+ { value: '21:9', label: '21:9 (Cinematic)' },
3114
+ { value: '1:1', label: '1:1 (Square)' },
3115
+ { value: 'custom', label: 'Custom' },
3116
+ ]" />
3195
3117
 
3196
3118
  <div v-if="videoForm.aspectRatio === 'custom'" class="grid grid-wrap-2 gap-05">
3197
3119
  <TextInput v-model="videoForm.customWidth" label="Width ratio" placeholder="16" type="number" />
@@ -3204,10 +3126,8 @@ defineExpose({
3204
3126
  <CheckInput v-model="videoForm.mute" label="Mute" />
3205
3127
  <CheckInput v-model="videoForm.loop" label="Loop" />
3206
3128
  <CheckInput v-model="videoForm.showCaption" class="grid-span-2" label="Show caption below video" />
3207
- <TextInput
3208
- v-if="videoForm.showCaption" v-model="videoForm.caption" label="Caption" class="grid-span-2"
3209
- placeholder="Describe the video content"
3210
- />
3129
+ <TextInput v-if="videoForm.showCaption" v-model="videoForm.caption" label="Caption" class="grid-span-2"
3130
+ placeholder="Describe the video content" />
3211
3131
  </div>
3212
3132
 
3213
3133
  <!-- Video Preview -->
@@ -3216,35 +3136,27 @@ defineExpose({
3216
3136
  Preview:
3217
3137
  </p>
3218
3138
  <div class="overflow-hidden flex justify-content-center">
3219
- <BglVideo
3220
- :src="videoForm.src" class=""
3139
+ <BglVideo :src="videoForm.src" class=""
3221
3140
  :aspect-ratio="videoForm.aspectRatio === 'custom' && videoForm.customWidth && videoForm.customHeight ? `${videoForm.customWidth}:${videoForm.customHeight}` : videoForm.aspectRatio"
3222
3141
  :autoplay="false" :mute="videoForm.mute" :controls="videoForm.controls"
3223
- :loop="videoForm.loop"
3224
- />
3142
+ :loop="videoForm.loop" />
3225
3143
  </div>
3226
3144
  </Card>
3227
3145
  </div>
3228
3146
  <template #footer>
3229
3147
  <div class="flex gap-05 w-100 ">
3230
3148
  <Btn value="Cancel" flat thin @click="showVideoModal = false" />
3231
- <Btn
3232
- v-if="pendingVideoData?.existingVideo" value="Delete Video" color="red" flat thin icon="delete"
3233
- @click="deleteVideo"
3234
- />
3235
- <Btn
3236
- value="Insert Video" class="ms-auto" :disabled="!videoForm.src || !isValidVideoUrl(videoForm.src)"
3237
- @click="submitVideo"
3238
- />
3149
+ <Btn v-if="pendingVideoData?.existingVideo" value="Delete Video" color="red" flat thin icon="delete"
3150
+ @click="deleteVideo" />
3151
+ <Btn value="Insert Video" class="ms-auto" :disabled="!videoForm.src || !isValidVideoUrl(videoForm.src)"
3152
+ @click="submitVideo" />
3239
3153
  </div>
3240
3154
  </template>
3241
3155
  </Modal>
3242
3156
 
3243
3157
  <!-- Table Editor Modal -->
3244
- <Modal
3245
- v-model:visible="showTableEditor" :title="pendingTableData?.existingTable ? 'Edit Table' : 'Insert Table'"
3246
- width="700"
3247
- >
3158
+ <Modal v-model:visible="showTableEditor" :title="pendingTableData?.existingTable ? 'Edit Table' : 'Insert Table'"
3159
+ width="700">
3248
3160
  <template #default>
3249
3161
  <div class="grid grid-wrap-4 m_grid-wrap-2 gap-col-1 table-editor testMe1">
3250
3162
  <!-- Structure Section -->
@@ -3260,40 +3172,26 @@ defineExpose({
3260
3172
  <!-- Cell Text Alignment -->
3261
3173
  <div class="grid-span-1">
3262
3174
  <label class="label">Cell Text Alignment</label>
3263
- <div
3264
- class="flex gap-025 mt-025 radius-1 p-05 w-fit"
3265
- style="height: var(--input-height); background: var(--input-bg);"
3266
- >
3267
- <Btn
3268
- :class="{ activeBtn: tableForm.alignment === 'left' }" flat thin icon="format_align_left"
3269
- title="Align Left" @click="tableForm.alignment = 'left'"
3270
- />
3271
- <Btn
3272
- :class="{ activeBtn: tableForm.alignment === 'center' }" flat thin
3273
- icon="format_align_center" title="Align Center" @click="tableForm.alignment = 'center'"
3274
- />
3275
- <Btn
3276
- :class="{ activeBtn: tableForm.alignment === 'right' }" flat thin icon="format_align_right"
3277
- title="Align Right" @click="tableForm.alignment = 'right'"
3278
- />
3175
+ <div class="flex gap-025 mt-025 radius-1 p-05 w-fit"
3176
+ style="height: var(--input-height); background: var(--input-bg);">
3177
+ <Btn :class="{ activeBtn: tableForm.alignment === 'left' }" flat thin icon="format_align_left"
3178
+ title="Align Left" @click="tableForm.alignment = 'left'" />
3179
+ <Btn :class="{ activeBtn: tableForm.alignment === 'center' }" flat thin
3180
+ icon="format_align_center" title="Align Center" @click="tableForm.alignment = 'center'" />
3181
+ <Btn :class="{ activeBtn: tableForm.alignment === 'right' }" flat thin icon="format_align_right"
3182
+ title="Align Right" @click="tableForm.alignment = 'right'" />
3279
3183
  </div>
3280
3184
  </div>
3281
3185
 
3282
3186
  <!-- Text Direction -->
3283
3187
  <div class="grid-span-1">
3284
3188
  <label class="label">Text Direction</label>
3285
- <div
3286
- class="flex gap-025 mt-025 radius-1 p-025 w-fit"
3287
- style="height: var(--input-height); background: var(--input-bg);"
3288
- >
3289
- <Btn
3290
- :class="{ activeBtn: tableForm.direction === 'ltr' }" flat thin value="LTR"
3291
- title="Left to Right" @click="tableForm.direction = 'ltr'"
3292
- />
3293
- <Btn
3294
- :class="{ activeBtn: tableForm.direction === 'rtl' }" flat thin value="RTL"
3295
- title="Right to Left" @click="tableForm.direction = 'rtl'"
3296
- />
3189
+ <div class="flex gap-025 mt-025 radius-1 p-025 w-fit"
3190
+ style="height: var(--input-height); background: var(--input-bg);">
3191
+ <Btn :class="{ activeBtn: tableForm.direction === 'ltr' }" flat thin value="LTR"
3192
+ title="Left to Right" @click="tableForm.direction = 'ltr'" />
3193
+ <Btn :class="{ activeBtn: tableForm.direction === 'rtl' }" flat thin value="RTL"
3194
+ title="Right to Left" @click="tableForm.direction = 'rtl'" />
3297
3195
  </div>
3298
3196
  </div>
3299
3197
  <!-- Style Section -->
@@ -3308,10 +3206,8 @@ defineExpose({
3308
3206
  <NumberInput v-model="tableForm.cellPadding" label="Cell Padding (px)" :min="2" :max="20" />
3309
3207
  <NumberInput v-model="tableForm.borderWidth" label="Border Width (px)" :min="0" :max="5" />
3310
3208
  <ColorInput v-model="tableForm.borderColor" label="Border Color" />
3311
- <CheckInput
3312
- v-model="tableForm.fixedLayout" label="Fixed cell width (doesn't change by content)"
3313
- class="grid-span-4 m_grid-span-2"
3314
- />
3209
+ <CheckInput v-model="tableForm.fixedLayout" label="Fixed cell width (doesn't change by content)"
3210
+ class="grid-span-4 m_grid-span-2" />
3315
3211
 
3316
3212
  <!-- Cell Colors -->
3317
3213
  <div class="flex gap-05 white-space mt-0 grid-span-4 m_grid-span-2 pt-1 pb-05">
@@ -3321,10 +3217,8 @@ defineExpose({
3321
3217
  </p>
3322
3218
  <div class="line" />
3323
3219
  </div>
3324
- <ColorInput
3325
- v-model="tableForm.cellBgColor" class="grid-span-2 m_grid-span-1"
3326
- label="Background Color"
3327
- />
3220
+ <ColorInput v-model="tableForm.cellBgColor" class="grid-span-2 m_grid-span-1"
3221
+ label="Background Color" />
3328
3222
  <ColorInput v-model="tableForm.cellTextColor" class="grid-span-2 m_grid-span-1" label="Text Color" />
3329
3223
  <!-- Alternating Rows -->
3330
3224
  <div class="flex gap-05 white-space mt-0 grid-span-4 m_grid-span-2 pt-1 pb-05">
@@ -3336,35 +3230,21 @@ defineExpose({
3336
3230
  </div>
3337
3231
  <CheckInput v-model="tableForm.showHeaders" label="Show header row" class="grid-span-4 m_grid-span-2" />
3338
3232
  <!-- Header Colors -->
3339
- <div
3340
- v-if="tableForm.showHeaders"
3341
- class="grid-span-4 m_grid-span-2 grid-wrap-4 m_grid-wrap-2 grid gap-col-1 border-bottom pb-05 mb-05"
3342
- >
3343
- <ColorInput
3344
- v-model="tableForm.headerBgColor" class="grid-span-2 m_grid-span-1"
3345
- label="Header Background Color"
3346
- />
3347
- <ColorInput
3348
- v-model="tableForm.headerTextColor" class="grid-span-2 m_grid-span-1"
3349
- label="Header Text Color"
3350
- />
3233
+ <div v-if="tableForm.showHeaders"
3234
+ class="grid-span-4 m_grid-span-2 grid-wrap-4 m_grid-wrap-2 grid gap-col-1 border-bottom pb-05 mb-05">
3235
+ <ColorInput v-model="tableForm.headerBgColor" class="grid-span-2 m_grid-span-1"
3236
+ label="Header Background Color" />
3237
+ <ColorInput v-model="tableForm.headerTextColor" class="grid-span-2 m_grid-span-1"
3238
+ label="Header Text Color" />
3351
3239
  </div>
3352
- <CheckInput
3353
- v-model="tableForm.alternateRows" label="Alternating Row Colors"
3354
- class="grid-span-4 m_grid-span-2"
3355
- />
3356
- <div
3357
- v-if="tableForm.alternateRows"
3358
- class="grid grid-wrap-4 m_grid-wrap-2 gap-col-1 grid-span-4 m_grid-span-2 border-bottom pb-05 mb-05"
3359
- >
3360
- <ColorInput
3361
- v-model="tableForm.alternateRowBgColor" class="grid-span-2 m_grid-span-1"
3362
- label="Alternate Row Background:"
3363
- />
3364
- <ColorInput
3365
- v-model="tableForm.alternateRowTextColor" class="grid-span-2 m_grid-span-1"
3366
- label="Alternate Row Text:"
3367
- />
3240
+ <CheckInput v-model="tableForm.alternateRows" label="Alternating Row Colors"
3241
+ class="grid-span-4 m_grid-span-2" />
3242
+ <div v-if="tableForm.alternateRows"
3243
+ class="grid grid-wrap-4 m_grid-wrap-2 gap-col-1 grid-span-4 m_grid-span-2 border-bottom pb-05 mb-05">
3244
+ <ColorInput v-model="tableForm.alternateRowBgColor" class="grid-span-2 m_grid-span-1"
3245
+ label="Alternate Row Background:" />
3246
+ <ColorInput v-model="tableForm.alternateRowTextColor" class="grid-span-2 m_grid-span-1"
3247
+ label="Alternate Row Text:" />
3368
3248
  </div>
3369
3249
  </div>
3370
3250
  <!-- Table Preview -->
@@ -3380,14 +3260,10 @@ defineExpose({
3380
3260
 
3381
3261
  <template #footer>
3382
3262
  <Btn value="Cancel" flat thin @click="showTableEditor = false" />
3383
- <Btn
3384
- v-if="pendingTableData?.existingTable" value="Delete Table" color="red" flat thin icon="delete"
3385
- @click="deleteTable"
3386
- />
3387
- <Btn
3388
- :value="pendingTableData?.existingTable ? 'Save' : 'Insert Table'" class="ms-auto"
3389
- @click="submitTable"
3390
- />
3263
+ <Btn v-if="pendingTableData?.existingTable" value="Delete Table" color="red" flat thin icon="delete"
3264
+ @click="deleteTable" />
3265
+ <Btn :value="pendingTableData?.existingTable ? 'Save' : 'Insert Table'" class="ms-auto"
3266
+ @click="submitTable" />
3391
3267
  </template>
3392
3268
  </Modal>
3393
3269
  </template>
@@ -290,6 +290,7 @@ onMounted(() => {
290
290
  {{ getLabel(option) }}
291
291
  </span>
292
292
  </div>
293
+ <p v-if="results.length === 0" class="selectinput-option opacity-3 pointer-events-none">No options found</p>
293
294
  </div>
294
295
  <slot name="last" />
295
296
  </Card>