@blokkli/editor 2.0.0-alpha.54 → 2.0.0-alpha.56

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 (214) hide show
  1. package/dist/global/constants/index.d.ts +1 -1
  2. package/dist/global/constants/index.js +1 -1
  3. package/dist/global/types/features.d.ts +5 -9
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +28 -35
  6. package/dist/modules/agent/index.mjs +46 -29
  7. package/dist/modules/agent/runtime/app/composables/agentProvider.js +2 -1
  8. package/dist/modules/agent/runtime/app/features/agent/Container.d.vue.ts +19 -0
  9. package/dist/modules/agent/runtime/app/features/agent/Container.vue +195 -0
  10. package/dist/modules/agent/runtime/app/features/agent/Container.vue.d.ts +19 -0
  11. package/dist/modules/agent/runtime/app/features/agent/index.vue +18 -164
  12. package/dist/modules/agent/runtime/app/features/agent/types.d.ts +9 -0
  13. package/dist/modules/agent/runtime/app/helpers/index.d.ts +7 -3
  14. package/dist/modules/agent/runtime/app/helpers/index.js +9 -3
  15. package/dist/modules/agent/runtime/app/prompts/fixReadability.js +51 -44
  16. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +2 -1
  17. package/dist/modules/agent/runtime/app/tools/check_readability/index.js +1 -0
  18. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +1 -1
  19. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +6 -1
  20. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +1 -0
  21. package/dist/modules/agent/runtime/app/types/index.d.ts +12 -0
  22. package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +34 -18
  23. package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +7 -0
  24. package/dist/modules/drupal/graphql/features/droppable-field-items.graphql +22 -0
  25. package/dist/modules/drupal/graphql/features/import-existing.graphql +0 -25
  26. package/dist/modules/drupal/graphql/features/workspace.graphql +9 -2
  27. package/dist/modules/drupal/graphql/mutations/update_droppable_field.graphql +21 -0
  28. package/dist/modules/drupal/index.mjs +6 -2
  29. package/dist/modules/drupal/runtime/adapter/index.js +75 -39
  30. package/dist/modules/readability/index.d.mts +11 -0
  31. package/dist/modules/readability/index.mjs +17 -0
  32. package/dist/modules/readability/runtime/adapter-extension.d.ts +2 -0
  33. package/dist/modules/readability/runtime/adapter-extension.js +5 -0
  34. package/dist/modules/readability/runtime/analyzers/builtin.d.ts +10 -0
  35. package/dist/modules/readability/runtime/analyzers/builtin.js +340 -0
  36. package/dist/runtime/components/BlokkliEditable.vue +10 -90
  37. package/dist/runtime/components/BlokkliItem.vue +2 -2
  38. package/dist/runtime/components/BlokkliProvider.vue +11 -5
  39. package/dist/runtime/composables/defineBlokkli.js +3 -1
  40. package/dist/runtime/composables/defineBlokkliFeature.d.ts +2 -3
  41. package/dist/runtime/editor/components/Actions/index.vue +1 -1
  42. package/dist/runtime/editor/components/AnimationCanvas/index.vue +41 -6
  43. package/dist/runtime/editor/components/AppMenu/Inner.d.vue.ts +7 -0
  44. package/dist/runtime/editor/components/AppMenu/Inner.vue +83 -0
  45. package/dist/runtime/editor/components/AppMenu/Inner.vue.d.ts +7 -0
  46. package/dist/runtime/editor/components/AppMenu/index.vue +5 -79
  47. package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +1 -0
  48. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +9 -1
  49. package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +1 -0
  50. package/dist/runtime/editor/components/BlockPreviewItem/index.vue +12 -6
  51. package/dist/runtime/editor/components/BlokkliEditableEdit.d.vue.ts +23 -0
  52. package/dist/runtime/editor/components/BlokkliEditableEdit.vue +95 -0
  53. package/dist/runtime/editor/components/BlokkliEditableEdit.vue.d.ts +23 -0
  54. package/dist/runtime/editor/components/BlokkliRootErrorBoundary.d.vue.ts +4 -1
  55. package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +4 -1
  56. package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue.d.ts +4 -1
  57. package/dist/runtime/editor/components/BundleSelector/index.vue +10 -5
  58. package/dist/runtime/editor/components/Dialog/index.vue +0 -77
  59. package/dist/runtime/editor/components/EditIndicator.d.vue.ts +1 -0
  60. package/dist/runtime/editor/components/EditIndicator.vue +3 -2
  61. package/dist/runtime/editor/components/EditIndicator.vue.d.ts +1 -0
  62. package/dist/runtime/editor/components/EditProvider.d.vue.ts +3 -1
  63. package/dist/runtime/editor/components/EditProvider.vue +13 -4
  64. package/dist/runtime/editor/components/EditProvider.vue.d.ts +3 -1
  65. package/dist/runtime/editor/components/FeaturesRenderer/index.vue +1 -4
  66. package/dist/runtime/editor/components/Form/Text/index.d.vue.ts +5 -0
  67. package/dist/runtime/editor/components/Form/Text/index.vue +10 -4
  68. package/dist/runtime/editor/components/Form/Text/index.vue.d.ts +5 -0
  69. package/dist/runtime/editor/components/FormOverlay/index.vue +0 -24
  70. package/dist/runtime/editor/components/GrowOnly/index.d.vue.ts +10 -0
  71. package/dist/runtime/editor/components/GrowOnly/index.vue +34 -0
  72. package/dist/runtime/editor/components/GrowOnly/index.vue.d.ts +10 -0
  73. package/dist/runtime/editor/components/Konami/Game/index.vue +120 -0
  74. package/dist/runtime/editor/components/Konami/index.vue +7 -124
  75. package/dist/runtime/editor/components/Loading/index.vue +1 -1
  76. package/dist/runtime/editor/components/PluginConfigForm/Text/index.vue +1 -0
  77. package/dist/runtime/editor/components/PluginConfigForm/index.vue +1 -0
  78. package/dist/runtime/editor/components/PreviewProvider.d.vue.ts +3 -1
  79. package/dist/runtime/editor/components/PreviewProvider.vue +6 -1
  80. package/dist/runtime/editor/components/PreviewProvider.vue.d.ts +3 -1
  81. package/dist/runtime/editor/components/index.d.ts +11 -10
  82. package/dist/runtime/editor/components/index.js +32 -10
  83. package/dist/runtime/editor/composables/defineRenderer.d.ts +2 -2
  84. package/dist/runtime/editor/composables/defineRenderer.js +8 -3
  85. package/dist/runtime/editor/css/output.css +1 -1
  86. package/dist/runtime/editor/events/index.d.ts +6 -0
  87. package/dist/runtime/editor/features/analyze/Main.d.vue.ts +1 -0
  88. package/dist/runtime/editor/features/analyze/Main.vue +9 -8
  89. package/dist/runtime/editor/features/analyze/Main.vue.d.ts +1 -0
  90. package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue +7 -15
  91. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +4 -2
  92. package/dist/runtime/editor/features/analyze/analyzers/axe.js +9 -9
  93. package/dist/runtime/editor/features/analyze/analyzers/readability.js +7 -7
  94. package/dist/runtime/editor/features/analyze/index.vue +26 -26
  95. package/dist/runtime/editor/features/analyze/readability/types.d.ts +18 -14
  96. package/dist/runtime/editor/features/anchors/index.vue +6 -2
  97. package/dist/runtime/editor/features/artboard/Renderer.vue +3 -2
  98. package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +78 -0
  99. package/dist/runtime/editor/features/block-scheduler/index.vue +34 -89
  100. package/dist/runtime/editor/features/breadcrumbs/index.vue +2 -2
  101. package/dist/runtime/editor/features/changelog/changelog.json +8 -0
  102. package/dist/runtime/editor/features/changelog/index.vue +10 -8
  103. package/dist/runtime/editor/features/clipboard/DropElement/index.vue +152 -0
  104. package/dist/runtime/editor/features/clipboard/index.vue +13 -159
  105. package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -28
  106. package/dist/runtime/editor/features/command-palette/Palette/index.vue +17 -6
  107. package/dist/runtime/editor/features/command-palette/index.vue +7 -2
  108. package/dist/runtime/editor/features/comments/index.vue +6 -3
  109. package/dist/runtime/editor/features/debug/Main.vue +168 -0
  110. package/dist/runtime/editor/features/debug/Section/Features.vue +1 -2
  111. package/dist/runtime/editor/features/debug/index.vue +6 -170
  112. package/dist/runtime/editor/features/dev-mode/index.vue +2 -1
  113. package/dist/runtime/editor/features/diff/index.vue +6 -2
  114. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +15 -16
  115. package/dist/runtime/editor/features/dragging-overlay/index.vue +4 -3
  116. package/dist/runtime/editor/features/droppable-field-edit/Overlay/index.d.vue.ts +15 -0
  117. package/dist/runtime/editor/features/droppable-field-edit/Overlay/index.vue +547 -0
  118. package/dist/runtime/editor/features/droppable-field-edit/Overlay/index.vue.d.ts +15 -0
  119. package/dist/runtime/editor/features/droppable-field-edit/index.d.vue.ts +3 -0
  120. package/dist/runtime/editor/features/droppable-field-edit/index.vue +231 -0
  121. package/dist/runtime/editor/features/droppable-field-edit/index.vue.d.ts +3 -0
  122. package/dist/runtime/editor/features/droppable-field-edit/types.d.ts +70 -0
  123. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.d.vue.ts +2 -2
  124. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue.d.ts +2 -2
  125. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +1 -1
  126. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +6 -13
  127. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +3 -4
  128. package/dist/runtime/editor/features/fragments/index.vue +9 -4
  129. package/dist/runtime/editor/features/help/index.vue +7 -2
  130. package/dist/runtime/editor/features/highlights/Renderer/index.vue +11 -17
  131. package/dist/runtime/editor/features/history/index.vue +3 -2
  132. package/dist/runtime/editor/features/hover/Renderer/index.vue +87 -36
  133. package/dist/runtime/editor/features/hover/Renderer/vertex.glsl +5 -5
  134. package/dist/runtime/editor/features/hover/index.vue +1 -1
  135. package/dist/runtime/editor/features/import-existing/Dialog/Item.d.vue.ts +5 -0
  136. package/dist/runtime/editor/features/import-existing/Dialog/Item.vue +55 -0
  137. package/dist/runtime/editor/features/import-existing/Dialog/Item.vue.d.ts +5 -0
  138. package/dist/runtime/editor/features/import-existing/Dialog/index.d.vue.ts +7 -3
  139. package/dist/runtime/editor/features/import-existing/Dialog/index.vue +107 -65
  140. package/dist/runtime/editor/features/import-existing/Dialog/index.vue.d.ts +7 -3
  141. package/dist/runtime/editor/features/import-existing/index.vue +19 -6
  142. package/dist/runtime/editor/features/import-existing/types.d.ts +0 -11
  143. package/dist/runtime/editor/features/library/ReusableDialog/index.vue +7 -33
  144. package/dist/runtime/editor/features/library/index.vue +14 -5
  145. package/dist/runtime/editor/features/media-library/Library/index.vue +3 -1
  146. package/dist/runtime/editor/features/media-library/index.vue +9 -2
  147. package/dist/runtime/editor/features/media-library/types.d.ts +2 -0
  148. package/dist/runtime/editor/features/multi-select/Renderer/index.vue +16 -15
  149. package/dist/runtime/editor/features/multi-select/index.vue +9 -3
  150. package/dist/runtime/editor/features/options/Form/Radios/index.vue +4 -8
  151. package/dist/runtime/editor/features/options/index.vue +7 -2
  152. package/dist/runtime/editor/features/preview-grant/index.vue +8 -2
  153. package/dist/runtime/editor/features/publish/index.vue +3 -2
  154. package/dist/runtime/editor/features/referenced-entities/index.vue +7 -2
  155. package/dist/runtime/editor/features/responsive-preview/index.vue +13 -11
  156. package/dist/runtime/editor/features/search/index.vue +6 -2
  157. package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +6 -11
  158. package/dist/runtime/editor/features/selection/Renderer/index.vue +9 -14
  159. package/dist/runtime/editor/features/selection/index.vue +7 -4
  160. package/dist/runtime/editor/features/settings/index.vue +8 -3
  161. package/dist/runtime/editor/features/structure/index.vue +3 -2
  162. package/dist/runtime/editor/features/templates/CreateDialog/index.vue +1 -0
  163. package/dist/runtime/editor/features/templates/index.vue +14 -6
  164. package/dist/runtime/editor/features/theme/index.vue +2 -1
  165. package/dist/runtime/editor/features/tour/index.vue +6 -2
  166. package/dist/runtime/editor/features/translations/index.vue +7 -4
  167. package/dist/runtime/editor/features/workspace/Overlay/Item.d.vue.ts +3 -0
  168. package/dist/runtime/editor/features/workspace/Overlay/Item.vue +49 -0
  169. package/dist/runtime/editor/features/workspace/Overlay/Item.vue.d.ts +3 -0
  170. package/dist/runtime/editor/features/workspace/Overlay/index.vue +16 -104
  171. package/dist/runtime/editor/features/workspace/index.vue +6 -2
  172. package/dist/runtime/editor/helpers/webgl/index.d.ts +3 -2
  173. package/dist/runtime/editor/helpers/webgl/index.js +2 -3
  174. package/dist/runtime/editor/libraries/fzf.d.ts +3 -0
  175. package/dist/runtime/editor/libraries/fzf.js +7 -0
  176. package/dist/runtime/editor/libraries/twgl.d.ts +10 -0
  177. package/dist/runtime/editor/libraries/twgl.js +14 -0
  178. package/dist/runtime/editor/plugins/DebugOverlay/index.vue +3 -1
  179. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +39 -18
  180. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -0
  181. package/dist/runtime/editor/plugins/Sidebar/index.vue +12 -4
  182. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -0
  183. package/dist/runtime/editor/providers/animation.d.ts +5 -10
  184. package/dist/runtime/editor/providers/animation.js +10 -8
  185. package/dist/runtime/editor/providers/directive.d.ts +11 -0
  186. package/dist/runtime/editor/providers/directive.js +16 -0
  187. package/dist/runtime/editor/providers/features.d.ts +3 -3
  188. package/dist/runtime/editor/providers/features.js +1 -1
  189. package/dist/runtime/editor/providers/fieldValue.d.ts +27 -0
  190. package/dist/runtime/editor/providers/fieldValue.js +21 -1
  191. package/dist/runtime/editor/providers/keyboard.js +6 -3
  192. package/dist/runtime/editor/providers/readability.d.ts +28 -4
  193. package/dist/runtime/editor/providers/readability.js +30 -46
  194. package/dist/runtime/editor/providers/selection.d.ts +8 -0
  195. package/dist/runtime/editor/providers/selection.js +6 -0
  196. package/dist/runtime/editor/providers/texts.d.ts +1 -3
  197. package/dist/runtime/editor/providers/texts.js +34 -37
  198. package/dist/runtime/editor/providers/workspaces.d.ts +93 -0
  199. package/dist/runtime/editor/providers/workspaces.js +76 -0
  200. package/dist/runtime/editor/translations/de.json +918 -3616
  201. package/dist/runtime/editor/translations/fr.json +250 -3616
  202. package/dist/runtime/editor/translations/gsw_CH.json +918 -3616
  203. package/dist/runtime/editor/translations/it.json +250 -3616
  204. package/dist/runtime/editor/types/app.d.ts +2 -0
  205. package/dist/runtime/editor/types/features.d.ts +1 -1
  206. package/dist/runtime/editor/types/state.d.ts +7 -0
  207. package/dist/runtime/helpers/injections.d.ts +6 -0
  208. package/dist/runtime/helpers/injections.js +3 -0
  209. package/dist/runtime/types/definitions.d.ts +4 -0
  210. package/package.json +14 -4
  211. package/dist/runtime/editor/features/analyze/readability/builtinAnalyzer.d.ts +0 -6
  212. package/dist/runtime/editor/features/analyze/readability/builtinAnalyzer.js +0 -216
  213. package/dist/runtime/editor/features/workspace/types.d.ts +0 -59
  214. /package/dist/runtime/editor/features/{workspace → droppable-field-edit}/types.js +0 -0
@@ -1,4 +1,12 @@
1
1
  [
2
+ {
3
+ "version": "2.0.0-alpha.55",
4
+ "date": "2026-04-20",
5
+ "body": {
6
+ "en": "<h3>New Features</h3>\n<h4>Edit media fields directly</h4>\n<p>Media fields (images, videos, etc.) on blocks and on the page itself can now be\nedited directly in the editor. New media can be added from the media library,\nindividual entries can be removed or reordered by drag &amp; drop. Media can also be\ndragged out of a media field into the page to create a new block from it.</p>\n<h3>Improvements</h3>\n<h4>Edit a block directly with the Ctrl key</h4>\n<p>Holding the Ctrl key (or Cmd on macOS) while double-clicking a block skips the\nunderlying media or text field, so the block itself can be edited.</p>\n<h4>Revised import dialog</h4>\n<p>The dialog for importing existing content has been revised. Content can now be\nfound through an improved search. If there is only one importable field, the\nfield selection is hidden. On empty pages, the import dialog no longer opens\nautomatically, but it can still be opened manually. The previous behavior can be\nre-enabled in the settings.</p>\n<h4>Further improvements</h4>\n<ul>\n<li>The editor now loads significantly faster. Rarely used parts of the editor are\nonly loaded when needed.</li>\n<li>When the editor is loading, space is reserved so the content below no longer\njumps while the editor is loading.</li>\n</ul>\n<h3>Fixes</h3>\n<ul>\n<li>Detached sidebar panels could end up outside the visible area in certain\nsituations and were no longer reachable. Positions are now constrained to the\nvisible area.</li>\n<li>The icons in the responsive preview were not displayed correctly.</li>\n<li>The preview of fragment blocks in the selection list is displayed correctly\nagain.</li>\n</ul>\n",
7
+ "de": "<h3>Neue Funktionen</h3>\n<h4>Medienfelder direkt bearbeiten</h4>\n<p>Medienfelder (Bilder, Videos, etc.) auf Blöcken und auf der Seite selbst können\njetzt direkt im Editor bearbeitet werden. Neue Medien können aus der\nMedienbibliothek hinzugefügt werden, einzelne Einträge können entfernt oder per\nDrag &amp; Drop umsortiert werden. Medien können auch aus einem Medienfeld heraus in\ndie Seite gezogen werden, um daraus einen neuen Block zu erstellen.</p>\n<h3>Verbesserungen</h3>\n<h4>Block mit Ctrl-Taste direkt bearbeiten</h4>\n<p>Mit gedrückter Ctrl-Taste (oder Cmd auf macOS) wird bei Doppelklick auf einen\nBlock das darunterliegende Medien- oder Textfeld ignoriert, sodass der Block\nselbst bearbeitet werden kann.</p>\n<h4>Überarbeiteter Import-Dialog</h4>\n<p>Der Dialog zum Importieren bestehender Inhalte wurde überarbeitet. Inhalte\nkönnen jetzt über eine verbesserte Suche gefunden werden. Gibt es nur ein\nimportierbares Feld, wird die Feldauswahl neu ausgeblendet. Auf leeren Seiten\nwird der Import-Dialog nicht mehr automatisch geöffnet, kann aber weiterhin\nmanuell aufgerufen werden. Das bisherige Verhalten lässt sich in den\nEinstellungen wieder aktivieren.</p>\n<h4>Weitere Verbesserungen</h4>\n<ul>\n<li>Der Editor lädt nun deutlich schneller. Selten verwendete Teile des Editors\nwerden erst bei Bedarf geladen.</li>\n<li>Beim Laden des Editors wird Platz reserviert, sodass der Inhalt darunter nicht\nmehr springt, während der Editor geladen wird.</li>\n</ul>\n<h3>Fehlerbehebungen</h3>\n<ul>\n<li>Abgedockte Sidebar-Panels konnten in bestimmten Situationen ausserhalb des\nsichtbaren Bereichs landen und waren nicht mehr erreichbar. Die Positionen\nwerden jetzt auf den sichtbaren Bereich beschränkt.</li>\n<li>Die Symbole in der responsiven Vorschau wurden nicht korrekt angezeigt.</li>\n<li>Die Vorschau von Fragment-Blöcken in der Auswahlliste werden wieder korrekt\ndargestellt.</li>\n</ul>\n"
8
+ }
9
+ },
2
10
  {
3
11
  "version": "2.0.0-alpha.53",
4
12
  "date": "2026-04-07",
@@ -7,11 +7,16 @@
7
7
  </template>
8
8
 
9
9
  <script setup>
10
- import { useBlokkli, defineBlokkliFeature, computed } from "#imports";
11
- import ChangelogDialog from "./Dialog/index.vue";
10
+ import {
11
+ useBlokkli,
12
+ defineBlokkliFeature,
13
+ computed,
14
+ defineAsyncComponent
15
+ } from "#imports";
16
+ import { blokkliVersion } from "#blokkli-build/editor-config";
12
17
  import { BlokkliTransition } from "#blokkli/editor/components";
13
18
  import { defineMenuButton } from "#blokkli/editor/composables";
14
- import data from "./changelog.json";
19
+ const ChangelogDialog = defineAsyncComponent(() => import("./Dialog/index.vue"));
15
20
  const { ui, storage, $t } = useBlokkli();
16
21
  defineBlokkliFeature({
17
22
  id: "changelog",
@@ -19,14 +24,11 @@ defineBlokkliFeature({
19
24
  icon: "bk_mdi_campaign",
20
25
  description: "Provides a menu button to display a changelog of what's new."
21
26
  });
22
- const latestVersion = data[0]?.version ?? "";
23
27
  const lastSeenVersion = storage.use("changelog:lastSeenVersion", "");
24
- const hasNew = computed(
25
- () => !!latestVersion && lastSeenVersion.value !== latestVersion
26
- );
28
+ const hasNew = computed(() => lastSeenVersion.value !== blokkliVersion);
27
29
  const showDialog = computed(() => ui.currentDialog.value?.id === "changelog");
28
30
  function onClick() {
29
- lastSeenVersion.value = latestVersion;
31
+ lastSeenVersion.value = blokkliVersion;
30
32
  ui.openDialog({ id: "changelog", alignment: "center" });
31
33
  }
32
34
  function onClose() {
@@ -95,3 +95,155 @@ const label = computed(() => {
95
95
  });
96
96
  const icon = computed(() => getItemIcon(itemType.value));
97
97
  </script>
98
+
99
+ <style>
100
+ .bk .bk-clipboard-drop-element {
101
+ pointer-events: none;
102
+ display: flex;
103
+ flex-direction: column;
104
+ border-radius: 8px;
105
+ border-width: 1px;
106
+ --bk-tw-border-opacity: 1;
107
+ border-color: rgb(var(--bk-theme-mono-200) / var(--bk-tw-border-opacity, 1));
108
+ --bk-tw-bg-opacity: 1;
109
+ background-color: rgb(255 255 255 / var(--bk-tw-bg-opacity, 1));
110
+ --bk-tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
111
+ --bk-tw-shadow-colored: 0 10px 15px -3px var(--bk-tw-shadow-color), 0 4px 6px -4px var(--bk-tw-shadow-color);
112
+ box-shadow: var(--bk-tw-ring-offset-shadow, 0 0 #0000), var(--bk-tw-ring-shadow, 0 0 #0000), var(--bk-tw-shadow);
113
+ overflow: hidden;
114
+ width: 350px;
115
+ height: 200px
116
+ }
117
+
118
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-header {
119
+ display: flex;
120
+ gap: 10px;
121
+ --bk-tw-bg-opacity: 1;
122
+ background-color: rgb(var(--bk-theme-mono-800) / var(--bk-tw-bg-opacity, 1));
123
+ padding: 15px;
124
+ font-weight: 600;
125
+ --bk-tw-text-opacity: 1;
126
+ color: rgb(var(--bk-theme-mono-100) / var(--bk-tw-text-opacity, 1))
127
+ }
128
+
129
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview {
130
+ display: flex;
131
+ overflow: hidden;
132
+ flex: 1;
133
+ min-height: 0
134
+ }
135
+
136
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-item {
137
+ position: relative;
138
+ min-width: 0px;
139
+ flex: 1 1 0%;
140
+ overflow: hidden
141
+ }
142
+
143
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-text {
144
+ overflow: hidden;
145
+ display: -webkit-box;
146
+ -webkit-box-orient: vertical;
147
+ -webkit-line-clamp: 6;
148
+ height: 100%;
149
+ padding: 8px;
150
+ font-family: PB Inter, sans-serif;
151
+ font-size: 12px;
152
+ line-height: 16px;
153
+ --bk-tw-text-opacity: 1;
154
+ color: rgb(var(--bk-theme-mono-700) / var(--bk-tw-text-opacity, 1))
155
+ }
156
+
157
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview img {
158
+ display: block;
159
+ height: 100%;
160
+ width: 100%;
161
+ object-fit: cover
162
+ }
163
+
164
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-file-icon {
165
+ display: flex;
166
+ height: 100%;
167
+ align-items: center;
168
+ justify-content: center;
169
+ --bk-tw-bg-opacity: 1;
170
+ background-color: rgb(var(--bk-theme-mono-100) / var(--bk-tw-bg-opacity, 1))
171
+ }
172
+
173
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-file-icon svg {
174
+ width: 24px;
175
+ height: 24px;
176
+ fill: rgb(var(--bk-theme-mono-400) / 1)
177
+ }
178
+
179
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-item-label {
180
+ position: absolute;
181
+ bottom: 0px;
182
+ left: 0px;
183
+ right: 0px;
184
+ overflow: hidden;
185
+ text-overflow: ellipsis;
186
+ white-space: nowrap;
187
+ font-family: PB Inter, sans-serif;
188
+ font-size: 12px;
189
+ line-height: 16px;
190
+ line-height: 1;
191
+ --bk-tw-text-opacity: 1;
192
+ color: rgb(255 255 255 / var(--bk-tw-text-opacity, 1));
193
+ padding: 5px;
194
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.6))
195
+ }
196
+
197
+ .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-item-video {
198
+ font-size: 12px;
199
+ line-height: 16px
200
+ }
201
+ .bk .bk-clipboard-item-video {
202
+ position: relative;
203
+ aspect-ratio: 16 / 9;
204
+ overflow: hidden;
205
+ border-width: 1px;
206
+ --bk-tw-border-opacity: 1;
207
+ border-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1));
208
+ --bk-tw-bg-opacity: 1;
209
+ background-color: rgb(var(--bk-theme-mono-900) / var(--bk-tw-bg-opacity, 1));
210
+ --bk-tw-text-opacity: 1;
211
+ color: rgb(var(--bk-theme-mono-50) / var(--bk-tw-text-opacity, 1))
212
+ }
213
+ .bk .bk-clipboard-item-video img {
214
+ position: absolute;
215
+ top: 0px;
216
+ left: 0px;
217
+ display: block;
218
+ height: 100%;
219
+ width: 100%;
220
+ object-fit: cover
221
+ }
222
+ .bk .bk-clipboard-item-video > div {
223
+ position: absolute;
224
+ left: 0px;
225
+ bottom: 0px;
226
+ z-index: 30;
227
+ width: 100%;
228
+ padding: 10px;
229
+ background-image: linear-gradient(to bottom, var(--bk-tw-gradient-stops));
230
+ --bk-tw-gradient-from: rgb(var(--bk-theme-mono-900) / 0) var(--bk-tw-gradient-from-position);
231
+ --bk-tw-gradient-to: rgb(var(--bk-theme-mono-900) / 0) var(--bk-tw-gradient-to-position);
232
+ --bk-tw-gradient-stops: var(--bk-tw-gradient-from), var(--bk-tw-gradient-to);
233
+ --bk-tw-gradient-to: rgb(var(--bk-theme-mono-900) / 1) var(--bk-tw-gradient-to-position)
234
+ }
235
+ .bk .bk-clipboard-item-video > div svg {
236
+ width: 20px;
237
+ height: 20px;
238
+ fill: currentColor
239
+ }
240
+ .bk .bk-clipboard-item-video > div p {
241
+ font-size: 12px;
242
+ line-height: 16px
243
+ }
244
+ .bk .bk-clipboard-item-video > div > div {
245
+ display: flex;
246
+ gap: 5px;
247
+ font-weight: 700
248
+ }
249
+ </style>
@@ -18,12 +18,11 @@ import {
18
18
  onMounted,
19
19
  onUnmounted,
20
20
  computed,
21
- useTemplateRef
21
+ useTemplateRef,
22
+ defineAsyncComponent
22
23
  } from "#imports";
23
24
  import { falsy, getFieldKey } from "#blokkli/helpers";
24
25
  import { generateUUID } from "#blokkli/editor/helpers/uuid";
25
- import getVideoId from "get-video-id";
26
- import DropElement, {} from "./DropElement/index.vue";
27
26
  import { emitMessage } from "#blokkli/editor/events";
28
27
  import { fragmentBlockBundle, itemEntityType } from "#blokkli-build/config";
29
28
  import {
@@ -33,6 +32,13 @@ import {
33
32
  onBlokkliEvent
34
33
  } from "#blokkli/editor/composables";
35
34
  import { buildMapBundleEvent, sanitizeHtml } from "./helpers";
35
+ const DropElement = defineAsyncComponent(
36
+ () => import("./DropElement/index.vue")
37
+ );
38
+ async function getVideoId(url) {
39
+ const { default: fn } = await import("get-video-id");
40
+ return fn(url);
41
+ }
36
42
  const { logger } = defineBlokkliFeature({
37
43
  id: "clipboard",
38
44
  label: "Clipboard",
@@ -501,11 +507,11 @@ function onPaste(e) {
501
507
  handlePastedText(pastedData);
502
508
  }
503
509
  }
504
- const handlePastedText = (text) => {
510
+ const handlePastedText = async (text) => {
505
511
  if (!adapter.clipboardMapBundle) {
506
512
  return;
507
513
  }
508
- const video = getVideoId(text);
514
+ const video = await getVideoId(text);
509
515
  if (video.id && video.service) {
510
516
  const itemBundles = normalizeBundles(
511
517
  adapter.clipboardMapBundle({
@@ -566,7 +572,7 @@ function extractBareUrl(text) {
566
572
  return null;
567
573
  }
568
574
  defineDropHandler("native_drop", {
569
- resolveBundles({ items, field }) {
575
+ async resolveBundles({ items, field }) {
570
576
  const item = items[0];
571
577
  if (!adapter.addBlockFromClipboardItem) {
572
578
  return [];
@@ -611,7 +617,7 @@ defineDropHandler("native_drop", {
611
617
  return [];
612
618
  }
613
619
  if (adapter.clipboardMapBundle) {
614
- const video = getVideoId(text);
620
+ const video = await getVideoId(text);
615
621
  if (video.id && video.service) {
616
622
  const mapped2 = normalizeBundles(
617
623
  adapter.clipboardMapBundle({
@@ -838,155 +844,3 @@ export default {
838
844
  name: "Clipboard"
839
845
  };
840
846
  </script>
841
-
842
- <style>
843
- .bk .bk-clipboard-drop-element {
844
- pointer-events: none;
845
- display: flex;
846
- flex-direction: column;
847
- border-radius: 8px;
848
- border-width: 1px;
849
- --bk-tw-border-opacity: 1;
850
- border-color: rgb(var(--bk-theme-mono-200) / var(--bk-tw-border-opacity, 1));
851
- --bk-tw-bg-opacity: 1;
852
- background-color: rgb(255 255 255 / var(--bk-tw-bg-opacity, 1));
853
- --bk-tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
854
- --bk-tw-shadow-colored: 0 10px 15px -3px var(--bk-tw-shadow-color), 0 4px 6px -4px var(--bk-tw-shadow-color);
855
- box-shadow: var(--bk-tw-ring-offset-shadow, 0 0 #0000), var(--bk-tw-ring-shadow, 0 0 #0000), var(--bk-tw-shadow);
856
- overflow: hidden;
857
- width: 350px;
858
- height: 200px
859
- }
860
-
861
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-header {
862
- display: flex;
863
- gap: 10px;
864
- --bk-tw-bg-opacity: 1;
865
- background-color: rgb(var(--bk-theme-mono-800) / var(--bk-tw-bg-opacity, 1));
866
- padding: 15px;
867
- font-weight: 600;
868
- --bk-tw-text-opacity: 1;
869
- color: rgb(var(--bk-theme-mono-100) / var(--bk-tw-text-opacity, 1))
870
- }
871
-
872
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview {
873
- display: flex;
874
- overflow: hidden;
875
- flex: 1;
876
- min-height: 0
877
- }
878
-
879
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-item {
880
- position: relative;
881
- min-width: 0px;
882
- flex: 1 1 0%;
883
- overflow: hidden
884
- }
885
-
886
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-text {
887
- overflow: hidden;
888
- display: -webkit-box;
889
- -webkit-box-orient: vertical;
890
- -webkit-line-clamp: 6;
891
- height: 100%;
892
- padding: 8px;
893
- font-family: PB Inter, sans-serif;
894
- font-size: 12px;
895
- line-height: 16px;
896
- --bk-tw-text-opacity: 1;
897
- color: rgb(var(--bk-theme-mono-700) / var(--bk-tw-text-opacity, 1))
898
- }
899
-
900
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview img {
901
- display: block;
902
- height: 100%;
903
- width: 100%;
904
- object-fit: cover
905
- }
906
-
907
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-file-icon {
908
- display: flex;
909
- height: 100%;
910
- align-items: center;
911
- justify-content: center;
912
- --bk-tw-bg-opacity: 1;
913
- background-color: rgb(var(--bk-theme-mono-100) / var(--bk-tw-bg-opacity, 1))
914
- }
915
-
916
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-file-icon svg {
917
- width: 24px;
918
- height: 24px;
919
- fill: rgb(var(--bk-theme-mono-400) / 1)
920
- }
921
-
922
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-drop-element-item-label {
923
- position: absolute;
924
- bottom: 0px;
925
- left: 0px;
926
- right: 0px;
927
- overflow: hidden;
928
- text-overflow: ellipsis;
929
- white-space: nowrap;
930
- font-family: PB Inter, sans-serif;
931
- font-size: 12px;
932
- line-height: 16px;
933
- line-height: 1;
934
- --bk-tw-text-opacity: 1;
935
- color: rgb(255 255 255 / var(--bk-tw-text-opacity, 1));
936
- padding: 5px;
937
- background: linear-gradient(transparent, rgba(0, 0, 0, 0.6))
938
- }
939
-
940
- .bk .bk-clipboard-drop-element .bk-clipboard-drop-element-preview .bk-clipboard-item-video {
941
- font-size: 12px;
942
- line-height: 16px
943
- }
944
- .bk .bk-clipboard-item-video {
945
- position: relative;
946
- aspect-ratio: 16 / 9;
947
- overflow: hidden;
948
- border-width: 1px;
949
- --bk-tw-border-opacity: 1;
950
- border-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1));
951
- --bk-tw-bg-opacity: 1;
952
- background-color: rgb(var(--bk-theme-mono-900) / var(--bk-tw-bg-opacity, 1));
953
- --bk-tw-text-opacity: 1;
954
- color: rgb(var(--bk-theme-mono-50) / var(--bk-tw-text-opacity, 1))
955
- }
956
- .bk .bk-clipboard-item-video img {
957
- position: absolute;
958
- top: 0px;
959
- left: 0px;
960
- display: block;
961
- height: 100%;
962
- width: 100%;
963
- object-fit: cover
964
- }
965
- .bk .bk-clipboard-item-video > div {
966
- position: absolute;
967
- left: 0px;
968
- bottom: 0px;
969
- z-index: 30;
970
- width: 100%;
971
- padding: 10px;
972
- background-image: linear-gradient(to bottom, var(--bk-tw-gradient-stops));
973
- --bk-tw-gradient-from: rgb(var(--bk-theme-mono-900) / 0) var(--bk-tw-gradient-from-position);
974
- --bk-tw-gradient-to: rgb(var(--bk-theme-mono-900) / 0) var(--bk-tw-gradient-to-position);
975
- --bk-tw-gradient-stops: var(--bk-tw-gradient-from), var(--bk-tw-gradient-to);
976
- --bk-tw-gradient-to: rgb(var(--bk-theme-mono-900) / 1) var(--bk-tw-gradient-to-position)
977
- }
978
- .bk .bk-clipboard-item-video > div svg {
979
- width: 20px;
980
- height: 20px;
981
- fill: currentColor
982
- }
983
- .bk .bk-clipboard-item-video > div p {
984
- font-size: 12px;
985
- line-height: 16px
986
- }
987
- .bk .bk-clipboard-item-video > div > div {
988
- display: flex;
989
- gap: 5px;
990
- font-weight: 700
991
- }
992
- </style>
@@ -42,31 +42,3 @@ const getGroupLabel = (id) => {
42
42
  return $t("commandGroup.misc", "Miscellaneous");
43
43
  };
44
44
  </script>
45
-
46
- <style>
47
- .bk .bk-command {
48
- height: var(--bk-command-palette-item-height);
49
- }
50
-
51
- .bk .bk-command .bk-highlight em {
52
- background-color: rgb(var(--bk-theme-yellow-normal) / 0.2);
53
- font-weight: 600;
54
- --bk-tw-text-opacity: 1;
55
- color: rgb(255 255 255 / var(--bk-tw-text-opacity, 1));
56
- outline-style: solid;
57
- outline-width: 1px;
58
- outline-color: rgb(var(--bk-theme-yellow-normal) / 0.5);
59
- }
60
-
61
- .bk .bk-command-icon .bk-blokkli-item-icon,
62
- .bk .bk-command-icon .bk-icon {
63
- height: 100%;
64
- width: 100%;
65
- }
66
-
67
- .bk .bk-command-icon .bk-blokkli-item-icon svg, .bk .bk-command-icon .bk-icon svg {
68
- height: 100%;
69
- width: 100%;
70
- fill: currentColor;
71
- }
72
- </style>
@@ -21,9 +21,16 @@
21
21
  </template>
22
22
 
23
23
  <script setup>
24
- import { computed, ref, useBlokkli, watch } from "#imports";
24
+ import {
25
+ computed,
26
+ onMounted,
27
+ ref,
28
+ shallowRef,
29
+ useBlokkli,
30
+ watch
31
+ } from "#imports";
25
32
  import { SearchOverlay } from "#blokkli/editor/components";
26
- import { Fzf } from "fzf";
33
+ import { loadFzf } from "#blokkli/editor/libraries/fzf";
27
34
  import Item, {} from "./Item/index.vue";
28
35
  const emit = defineEmits(["close"]);
29
36
  const { commands, $t, selection, plugins, storage } = useBlokkli();
@@ -64,14 +71,18 @@ const items = computed(() => {
64
71
  return freqB - freqA;
65
72
  });
66
73
  });
67
- const fzf = new Fzf(items.value, {
68
- selector: (item) => item.label
74
+ const fzf = shallowRef(null);
75
+ onMounted(async () => {
76
+ const { Fzf } = await loadFzf();
77
+ fzf.value = new Fzf(items.value, {
78
+ selector: (item) => item.label
79
+ });
69
80
  });
70
81
  const visibleIds = computed(() => {
71
- if (!text.value) {
82
+ if (!text.value || !fzf.value) {
72
83
  return void 0;
73
84
  }
74
- const results = fzf.find(text.value);
85
+ const results = fzf.value.find(text.value);
75
86
  return results.map((v) => {
76
87
  return {
77
88
  id: v.item._id,
@@ -26,11 +26,16 @@
26
26
  </template>
27
27
 
28
28
  <script setup>
29
- import { useBlokkli, defineBlokkliFeature, computed } from "#imports";
29
+ import {
30
+ useBlokkli,
31
+ defineBlokkliFeature,
32
+ computed,
33
+ defineAsyncComponent
34
+ } from "#imports";
30
35
  import { PluginToolbarButton } from "#blokkli/editor/plugins";
31
36
  import { BlokkliTransition } from "#blokkli/editor/components";
32
- import Palette from "./Palette/index.vue";
33
37
  import { onBlokkliEvent, useDialog } from "#blokkli/editor/composables";
38
+ const Palette = defineAsyncComponent(() => import("./Palette/index.vue"));
34
39
  defineBlokkliFeature({
35
40
  id: "command-palette",
36
41
  icon: "bk_mdi_keyboard_command_key",
@@ -61,13 +61,16 @@ import {
61
61
  useBlokkli,
62
62
  defineBlokkliFeature,
63
63
  computed,
64
- useTemplateRef
64
+ useTemplateRef,
65
+ defineAsyncComponent
65
66
  } from "#imports";
66
67
  import { PluginSidebar, PluginItemAction } from "#blokkli/editor/plugins";
67
68
  import { BlokkliTransition } from "#blokkli/editor/components";
68
69
  import Comment from "./Comment/index.vue";
69
- import CommentAddForm from "./AddForm/index.vue";
70
- import CommentsOverlay from "./Overlay/index.vue";
70
+ const CommentsOverlay = defineAsyncComponent(
71
+ () => import("./Overlay/index.vue")
72
+ );
73
+ const CommentAddForm = defineAsyncComponent(() => import("./AddForm/index.vue"));
71
74
  const { adapter } = defineBlokkliFeature({
72
75
  id: "comments",
73
76
  icon: "bk_mdi_comment",