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

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 (373) hide show
  1. package/dist/chunks/tailwindConfig.mjs +3 -3
  2. package/dist/global/types/blockOptions.d.ts +18 -2
  3. package/dist/module.d.mts +2 -2
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +281 -18
  6. package/dist/modules/agent/index.d.mts +1 -1
  7. package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +1 -0
  8. package/dist/modules/agent/runtime/app/composables/agentProvider.js +7 -0
  9. package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.d.vue.ts +2 -2
  10. package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.vue +14 -49
  11. package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.vue.d.ts +2 -2
  12. package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.d.vue.ts +10 -0
  13. package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue +102 -0
  14. package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue.d.ts +10 -0
  15. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +8 -5
  16. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +3 -3
  17. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +9 -5
  18. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +3 -3
  19. package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +7 -0
  20. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +16 -2
  21. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +7 -0
  22. package/dist/modules/agent/runtime/app/features/agent/index.vue +29 -0
  23. package/dist/modules/agent/runtime/app/features/agent/types.d.ts +16 -0
  24. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +3 -1
  25. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +2 -0
  26. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +8 -1
  27. package/dist/modules/charts/index.d.mts +1 -1
  28. package/dist/modules/charts/index.mjs +2 -3
  29. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +1 -1
  30. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +1 -1
  31. package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +16 -0
  32. package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +9 -0
  33. package/dist/modules/drupal/graphql/features/agent.graphql +20 -0
  34. package/dist/modules/drupal/graphql/features/publishNew.graphql +14 -0
  35. package/dist/modules/drupal/graphql/features/referenced-entities.graphql +21 -0
  36. package/dist/modules/drupal/graphql/features/textFieldValues.graphql +20 -0
  37. package/dist/modules/drupal/graphql/features/workspace.graphql +23 -0
  38. package/dist/modules/drupal/graphql/mutations/bulk_translate_field_values.graphql +19 -0
  39. package/dist/modules/drupal/graphql/mutations/clear_outdated_translation.graphql +15 -0
  40. package/dist/modules/drupal/graphql/mutations/ignore_analyze.graphql +15 -0
  41. package/dist/modules/drupal/graphql/mutations/request_translation.graphql +10 -0
  42. package/dist/modules/drupal/graphql/mutations/unignore_analyze.graphql +15 -0
  43. package/dist/modules/drupal/index.d.mts +1 -1
  44. package/dist/modules/drupal/index.mjs +16 -0
  45. package/dist/modules/drupal/runtime/adapter/index.js +180 -11
  46. package/dist/modules/iframes/index.d.mts +31 -0
  47. package/dist/modules/iframes/index.mjs +52 -0
  48. package/dist/modules/iframes/runtime/components/BlokkliIframe/index.d.vue.ts +18 -0
  49. package/dist/modules/iframes/runtime/components/BlokkliIframe/index.vue +61 -0
  50. package/dist/modules/iframes/runtime/components/BlokkliIframe/index.vue.d.ts +18 -0
  51. package/dist/modules/iframes/runtime/components/index.d.ts +1 -0
  52. package/dist/modules/iframes/runtime/components/index.js +1 -0
  53. package/dist/modules/iframes/runtime/features/iframes/Editor/index.d.vue.ts +12 -0
  54. package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue +220 -0
  55. package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue.d.ts +12 -0
  56. package/dist/modules/iframes/runtime/types.d.ts +10 -0
  57. package/dist/modules/index.d.mts +1 -1
  58. package/dist/modules/table-of-contents/index.d.mts +1 -1
  59. package/dist/runtime/components/Blocks/NotImplemented/index.vue +57 -0
  60. package/dist/runtime/components/BlokkliEditable.vue +1 -1
  61. package/dist/runtime/editor/adapter/index.d.ts +8 -1
  62. package/dist/runtime/editor/components/Actions/Interactions/index.vue +77 -17
  63. package/dist/runtime/editor/components/Actions/{ItemDropdown.vue → ItemDropdown/index.vue} +9 -10
  64. package/dist/runtime/editor/components/Actions/index.vue +586 -23
  65. package/dist/runtime/editor/components/AnimationCanvas/index.vue +1 -0
  66. package/dist/runtime/editor/components/AppMenu/MenuButton.vue +185 -1
  67. package/dist/runtime/editor/components/AppMenu/index.vue +24 -10
  68. package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +6 -2
  69. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +223 -3
  70. package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +6 -2
  71. package/dist/runtime/editor/components/AutoHeight/index.vue +23 -0
  72. package/dist/runtime/editor/components/Banner/Inner.d.vue.ts +30 -0
  73. package/dist/runtime/editor/components/Banner/Inner.vue +32 -0
  74. package/dist/runtime/editor/components/Banner/Inner.vue.d.ts +30 -0
  75. package/dist/runtime/editor/components/Banner/index.d.vue.ts +3 -13
  76. package/dist/runtime/editor/components/Banner/index.vue +2 -14
  77. package/dist/runtime/editor/components/Banner/index.vue.d.ts +3 -13
  78. package/dist/runtime/editor/components/BetaIndicator/index.d.vue.ts +6 -0
  79. package/dist/runtime/editor/components/BetaIndicator/index.vue +16 -0
  80. package/dist/runtime/editor/components/BetaIndicator/index.vue.d.ts +6 -0
  81. package/dist/runtime/editor/components/BlockPreviewItem/index.vue +51 -1
  82. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +27 -1
  83. package/dist/runtime/editor/components/BlockProxy/index.vue +148 -1
  84. package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +59 -0
  85. package/dist/runtime/editor/components/BundleSelector/index.vue +170 -20
  86. package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -0
  87. package/dist/runtime/editor/components/Dialog/index.vue +341 -0
  88. package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -0
  89. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +117 -0
  90. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +224 -28
  91. package/dist/runtime/editor/components/DiffViewer/DiffValue.d.vue.ts +1 -0
  92. package/dist/runtime/editor/components/DiffViewer/DiffValue.vue +5 -1
  93. package/dist/runtime/editor/components/DiffViewer/DiffValue.vue.d.ts +1 -0
  94. package/dist/runtime/editor/components/DiffViewer/State.vue +319 -0
  95. package/dist/runtime/editor/components/DraggableList.vue +103 -0
  96. package/dist/runtime/editor/components/Dropdown/index.vue +84 -0
  97. package/dist/runtime/editor/components/EditProvider.vue +72 -15
  98. package/dist/runtime/editor/components/FileDropHandler/index.d.vue.ts +23 -0
  99. package/dist/runtime/editor/components/FileDropHandler/index.vue +108 -0
  100. package/dist/runtime/editor/components/FileDropHandler/index.vue.d.ts +23 -0
  101. package/dist/runtime/editor/components/FlexTextarea/index.vue +4 -2
  102. package/dist/runtime/editor/components/Form/Datepicker/index.vue +149 -0
  103. package/dist/runtime/editor/components/Form/Toggle/index.vue +205 -1
  104. package/dist/runtime/editor/components/FormOverlay/index.vue +90 -0
  105. package/dist/runtime/editor/components/Icon/index.vue +6 -0
  106. package/dist/runtime/editor/components/Indicators/index.vue +161 -0
  107. package/dist/runtime/editor/components/InfoBox/index.vue +65 -0
  108. package/dist/runtime/editor/components/Konami/index.vue +119 -0
  109. package/dist/runtime/editor/components/Loading/index.d.vue.ts +6 -3
  110. package/dist/runtime/editor/components/Loading/index.vue +10 -5
  111. package/dist/runtime/editor/components/Loading/index.vue.d.ts +6 -3
  112. package/dist/runtime/editor/components/Messages/index.vue +131 -0
  113. package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +1 -0
  114. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +246 -12
  115. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +1 -0
  116. package/dist/runtime/editor/components/NotEditStateInfo/index.d.vue.ts +3 -0
  117. package/dist/runtime/editor/components/NotEditStateInfo/index.vue +19 -0
  118. package/dist/runtime/editor/components/NotEditStateInfo/index.vue.d.ts +3 -0
  119. package/dist/runtime/editor/components/Overlay/index.vue +84 -0
  120. package/dist/runtime/editor/components/Pagination/index.vue +41 -0
  121. package/dist/runtime/editor/components/PluginConfigForm/index.vue +23 -0
  122. package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +429 -0
  123. package/dist/runtime/editor/components/PluginConfigFormInline/index.d.vue.ts +22 -0
  124. package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +150 -0
  125. package/dist/runtime/editor/components/PluginConfigFormInline/index.vue.d.ts +22 -0
  126. package/dist/runtime/editor/components/Popup/index.vue +77 -2
  127. package/dist/runtime/editor/components/PreviewProvider.vue +7 -0
  128. package/dist/runtime/editor/components/Resizable/index.vue +90 -1
  129. package/dist/runtime/editor/components/ScaleToFit/index.vue +30 -1
  130. package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +43 -0
  131. package/dist/runtime/editor/components/SearchOverlay/index.vue +264 -0
  132. package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +43 -0
  133. package/dist/runtime/editor/components/StatusIcon/index.vue +104 -0
  134. package/dist/runtime/editor/components/StatusIndicator/index.d.vue.ts +9 -0
  135. package/dist/runtime/editor/components/StatusIndicator/index.vue +16 -0
  136. package/dist/runtime/editor/components/StatusIndicator/index.vue.d.ts +9 -0
  137. package/dist/runtime/editor/components/SystemRequirements/index.vue +57 -0
  138. package/dist/runtime/editor/components/Tabs/index.d.vue.ts +30 -0
  139. package/dist/runtime/editor/components/Tabs/index.vue +32 -0
  140. package/dist/runtime/editor/components/Tabs/index.vue.d.ts +30 -0
  141. package/dist/runtime/editor/components/Toolbar/index.vue +215 -4
  142. package/dist/runtime/editor/components/Tooltip/Context.d.vue.ts +7 -0
  143. package/dist/runtime/editor/components/Tooltip/Context.vue +13 -0
  144. package/dist/runtime/editor/components/Tooltip/Context.vue.d.ts +7 -0
  145. package/dist/runtime/editor/components/Tooltip/Status.d.vue.ts +8 -0
  146. package/dist/runtime/editor/components/Tooltip/Status.vue +27 -0
  147. package/dist/runtime/editor/components/Tooltip/Status.vue.d.ts +8 -0
  148. package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +27 -0
  149. package/dist/runtime/editor/components/Tooltip/index.vue +40 -0
  150. package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +27 -0
  151. package/dist/runtime/editor/components/index.d.ts +59 -49
  152. package/dist/runtime/editor/components/index.js +59 -98
  153. package/dist/runtime/editor/composables/defineHighlight.d.ts +2 -0
  154. package/dist/runtime/editor/composables/defineHighlight.js +10 -0
  155. package/dist/runtime/editor/composables/index.d.ts +1 -0
  156. package/dist/runtime/editor/composables/index.js +1 -0
  157. package/dist/runtime/editor/composables/useBlockRegistration.js +8 -0
  158. package/dist/runtime/editor/composables/useStickyToolbar.d.ts +1 -0
  159. package/dist/runtime/editor/composables/useStickyToolbar.js +16 -0
  160. package/dist/runtime/editor/css/output.css +1 -1
  161. package/dist/runtime/editor/events/index.d.ts +10 -0
  162. package/dist/runtime/editor/features/add-list/Help/index.vue +193 -0
  163. package/dist/runtime/editor/features/add-list/index.vue +441 -0
  164. package/dist/runtime/editor/features/analyze/Ignored/index.d.vue.ts +7 -0
  165. package/dist/runtime/editor/features/analyze/Ignored/index.vue +35 -0
  166. package/dist/runtime/editor/features/analyze/Ignored/index.vue.d.ts +7 -0
  167. package/dist/runtime/editor/features/analyze/Main.vue +148 -24
  168. package/dist/runtime/editor/features/analyze/Results/Results.d.vue.ts +1 -9
  169. package/dist/runtime/editor/features/analyze/Results/Results.vue +0 -2
  170. package/dist/runtime/editor/features/analyze/Results/Results.vue.d.ts +1 -9
  171. package/dist/runtime/editor/features/analyze/Results/ResultsItem.d.vue.ts +1 -9
  172. package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue +1 -2
  173. package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue.d.ts +1 -9
  174. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.d.vue.ts +1 -9
  175. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue +11 -8
  176. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue.d.ts +1 -9
  177. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.d.vue.ts +3 -10
  178. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +63 -25
  179. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue.d.ts +3 -10
  180. package/dist/runtime/editor/features/analyze/analyzers/altText.js +2 -0
  181. package/dist/runtime/editor/features/analyze/analyzers/headingStructure.js +3 -0
  182. package/dist/runtime/editor/features/analyze/analyzers/helpers/hashString.d.ts +7 -0
  183. package/dist/runtime/editor/features/analyze/analyzers/helpers/hashString.js +8 -0
  184. package/dist/runtime/editor/features/analyze/analyzers/readability.js +6 -12
  185. package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +20 -0
  186. package/dist/runtime/editor/features/analyze/index.vue +458 -0
  187. package/dist/runtime/editor/features/analyze/types.d.ts +12 -0
  188. package/dist/runtime/editor/features/artboard/Overview/index.vue +37 -4
  189. package/dist/runtime/editor/features/artboard/Renderer.vue +79 -9
  190. package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +84 -0
  191. package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +1 -1
  192. package/dist/runtime/editor/features/block-scheduler/index.vue +114 -0
  193. package/dist/runtime/editor/features/breadcrumbs/index.vue +150 -0
  194. package/dist/runtime/editor/features/changelog/Dialog/index.vue +62 -7
  195. package/dist/runtime/editor/features/changelog/changelog.json +9 -1
  196. package/dist/runtime/editor/features/clipboard/index.vue +153 -1
  197. package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +39 -16
  198. package/dist/runtime/editor/features/command-palette/Palette/index.vue +24 -130
  199. package/dist/runtime/editor/features/comments/index.vue +235 -0
  200. package/dist/runtime/editor/features/complex-options/index.vue +4 -1
  201. package/dist/runtime/editor/features/debug/Main.vue +1 -1
  202. package/dist/runtime/editor/features/debug/Section/Features.vue +2 -4
  203. package/dist/runtime/editor/features/debug/index.vue +168 -0
  204. package/dist/runtime/editor/features/dev-mode/index.vue +92 -27
  205. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +1 -1
  206. package/dist/runtime/editor/features/dragging-overlay/index.vue +330 -0
  207. package/dist/runtime/editor/features/edit/index.vue +15 -17
  208. package/dist/runtime/editor/features/edit-form/Frame/index.vue +21 -4
  209. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.d.vue.ts +10 -1
  210. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +47 -5
  211. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue.d.ts +10 -1
  212. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +77 -0
  213. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +55 -56
  214. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +417 -8
  215. package/dist/runtime/editor/features/editable-mask/index.vue +9 -0
  216. package/dist/runtime/editor/features/entity-title/index.vue +40 -56
  217. package/dist/runtime/editor/features/fragments/Dialog/index.vue +90 -0
  218. package/dist/runtime/editor/features/help/Shortcuts/index.vue +71 -0
  219. package/dist/runtime/editor/features/help/index.vue +17 -0
  220. package/dist/runtime/editor/features/highlights/Renderer/fragment.glsl +89 -0
  221. package/dist/runtime/editor/features/highlights/Renderer/index.vue +408 -0
  222. package/dist/runtime/editor/features/highlights/Renderer/vertex.glsl +87 -0
  223. package/dist/runtime/editor/features/highlights/index.d.vue.ts +3 -0
  224. package/dist/runtime/editor/features/highlights/index.vue +20 -0
  225. package/dist/runtime/editor/features/highlights/index.vue.d.ts +3 -0
  226. package/dist/runtime/editor/features/history/List/index.vue +209 -0
  227. package/dist/runtime/editor/features/history/index.vue +0 -1
  228. package/dist/runtime/editor/features/hover/Renderer/index.vue +1 -1
  229. package/dist/runtime/editor/features/hover/Renderer/vertex.glsl +1 -1
  230. package/dist/runtime/editor/features/import-existing/Dialog/index.vue +18 -0
  231. package/dist/runtime/editor/features/media-library/Library/index.vue +10 -30
  232. package/dist/runtime/editor/features/media-library/index.vue +331 -0
  233. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +1 -1
  234. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +1 -1
  235. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +6 -2
  236. package/dist/runtime/editor/features/options/Form/Item.vue +21 -18
  237. package/dist/runtime/editor/features/options/Form/Radios/index.d.vue.ts +6 -0
  238. package/dist/runtime/editor/features/options/Form/Radios/index.vue +25 -6
  239. package/dist/runtime/editor/features/options/Form/Radios/index.vue.d.ts +6 -0
  240. package/dist/runtime/editor/features/options/Form/index.vue +1 -4
  241. package/dist/runtime/editor/features/options/index.vue +729 -0
  242. package/dist/runtime/editor/features/ownership/Banner/index.vue +9 -8
  243. package/dist/runtime/editor/features/ownership/index.vue +1 -1
  244. package/dist/runtime/editor/features/preview-grant/QrCode/index.vue +8 -3
  245. package/dist/runtime/editor/features/publish/Dialog/Item.vue +18 -20
  246. package/dist/runtime/editor/features/publish/Dialog/index.vue +5 -1
  247. package/dist/runtime/editor/features/publish/index.vue +835 -0
  248. package/dist/runtime/editor/features/publish/types.d.ts +5 -1
  249. package/dist/runtime/editor/features/referenced-entities/List/Item/index.d.vue.ts +4 -0
  250. package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +81 -0
  251. package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue.d.ts +4 -0
  252. package/dist/runtime/editor/features/referenced-entities/List/index.d.vue.ts +11 -0
  253. package/dist/runtime/editor/features/referenced-entities/List/index.vue +78 -0
  254. package/dist/runtime/editor/features/referenced-entities/List/index.vue.d.ts +11 -0
  255. package/dist/runtime/editor/features/referenced-entities/index.d.vue.ts +3 -0
  256. package/dist/runtime/editor/features/referenced-entities/index.vue +36 -0
  257. package/dist/runtime/editor/features/referenced-entities/index.vue.d.ts +3 -0
  258. package/dist/runtime/editor/features/referenced-entities/types.d.ts +13 -0
  259. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +188 -0
  260. package/dist/runtime/editor/features/search/Overlay/Results/Page/index.vue +1 -1
  261. package/dist/runtime/editor/features/search/index.vue +511 -0
  262. package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +58 -0
  263. package/dist/runtime/editor/features/selection/index.vue +47 -15
  264. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +23 -0
  265. package/dist/runtime/editor/features/settings/Dialog/index.vue +5 -2
  266. package/dist/runtime/editor/features/settings/index.vue +152 -0
  267. package/dist/runtime/editor/features/structure/List/Item/index.vue +7 -0
  268. package/dist/runtime/editor/features/structure/index.vue +178 -0
  269. package/dist/runtime/editor/features/templates/ManageDialog/Item.vue +3 -3
  270. package/dist/runtime/editor/features/templates/ManageDialog/index.vue +24 -3
  271. package/dist/runtime/editor/features/theme/index.vue +94 -0
  272. package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +34 -0
  273. package/dist/runtime/editor/features/tour/Overlay/index.vue +243 -13
  274. package/dist/runtime/editor/features/transform/Dialog/index.vue +132 -1
  275. package/dist/runtime/editor/features/translations/Banner/index.d.vue.ts +14 -1
  276. package/dist/runtime/editor/features/translations/Banner/index.vue +139 -12
  277. package/dist/runtime/editor/features/translations/Banner/index.vue.d.ts +14 -1
  278. package/dist/runtime/editor/features/translations/CsvDialog/Export/index.d.vue.ts +3 -0
  279. package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue +272 -0
  280. package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue.d.ts +3 -0
  281. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.d.vue.ts +10 -0
  282. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +382 -0
  283. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue.d.ts +10 -0
  284. package/dist/runtime/editor/features/translations/CsvDialog/csv.d.ts +22 -0
  285. package/dist/runtime/editor/features/translations/CsvDialog/csv.js +50 -0
  286. package/dist/runtime/editor/features/translations/CsvDialog/index.d.vue.ts +10 -0
  287. package/dist/runtime/editor/features/translations/CsvDialog/index.vue +37 -0
  288. package/dist/runtime/editor/features/translations/CsvDialog/index.vue.d.ts +10 -0
  289. package/dist/runtime/editor/features/translations/CsvDialog/po.d.ts +7 -0
  290. package/dist/runtime/editor/features/translations/CsvDialog/po.js +36 -0
  291. package/dist/runtime/editor/features/translations/SelectionTable/index.d.vue.ts +37 -0
  292. package/dist/runtime/editor/features/translations/SelectionTable/index.vue +102 -0
  293. package/dist/runtime/editor/features/translations/SelectionTable/index.vue.d.ts +37 -0
  294. package/dist/runtime/editor/features/translations/TranslateDialog/index.d.vue.ts +7 -0
  295. package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +294 -0
  296. package/dist/runtime/editor/features/translations/TranslateDialog/index.vue.d.ts +7 -0
  297. package/dist/runtime/editor/features/translations/index.vue +276 -6
  298. package/dist/runtime/editor/features/translations/types.d.ts +47 -0
  299. package/dist/runtime/editor/features/validations/Overlay/index.vue +130 -0
  300. package/dist/runtime/editor/features/validations/index.vue +41 -0
  301. package/dist/runtime/editor/features/{assistant → workspace}/Overlay/index.d.vue.ts +2 -4
  302. package/dist/runtime/editor/features/workspace/Overlay/index.vue +177 -0
  303. package/dist/runtime/editor/features/{assistant → workspace}/Overlay/index.vue.d.ts +2 -4
  304. package/dist/runtime/editor/features/workspace/index.d.vue.ts +3 -0
  305. package/dist/runtime/editor/features/workspace/index.vue +46 -0
  306. package/dist/runtime/editor/features/workspace/index.vue.d.ts +3 -0
  307. package/dist/runtime/editor/features/workspace/types.d.ts +59 -0
  308. package/dist/runtime/editor/features/workspace/types.js +0 -0
  309. package/dist/runtime/editor/icons/svg/spinner.svg +2 -2
  310. package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +21 -7
  311. package/dist/runtime/editor/plugins/ContextMenu/index.vue +4 -0
  312. package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +9 -2
  313. package/dist/runtime/editor/plugins/ItemAction/index.vue +26 -16
  314. package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +9 -2
  315. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +24 -26
  316. package/dist/runtime/editor/plugins/Sidebar/index.vue +612 -27
  317. package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +13 -84
  318. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +36 -22
  319. package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +13 -84
  320. package/dist/runtime/editor/plugins/ViewOption/index.vue +13 -14
  321. package/dist/runtime/editor/providers/blocks.js +1 -0
  322. package/dist/runtime/editor/providers/cache.d.ts +23 -0
  323. package/dist/runtime/editor/providers/cache.js +29 -0
  324. package/dist/runtime/editor/providers/directive.d.ts +25 -0
  325. package/dist/runtime/editor/providers/directive.js +20 -0
  326. package/dist/runtime/editor/providers/fieldValue.d.ts +5 -5
  327. package/dist/runtime/editor/providers/fieldValue.js +8 -7
  328. package/dist/runtime/editor/providers/plugin.d.ts +14 -0
  329. package/dist/runtime/editor/providers/plugin.js +9 -0
  330. package/dist/runtime/editor/providers/readability.js +1 -1
  331. package/dist/runtime/editor/providers/selection.js +1 -1
  332. package/dist/runtime/editor/providers/state.d.ts +1 -0
  333. package/dist/runtime/editor/providers/state.js +1 -0
  334. package/dist/runtime/editor/providers/texts.js +11 -1
  335. package/dist/runtime/editor/providers/ui.d.ts +11 -0
  336. package/dist/runtime/editor/providers/ui.js +5 -1
  337. package/dist/runtime/editor/translations/de.json +316 -56
  338. package/dist/runtime/editor/translations/fr.json +310 -50
  339. package/dist/runtime/editor/translations/gsw_CH.json +311 -51
  340. package/dist/runtime/editor/translations/it.json +310 -50
  341. package/dist/runtime/editor/types/app.d.ts +2 -0
  342. package/dist/runtime/editor/types/definitions.d.ts +8 -0
  343. package/dist/runtime/editor/types/field.d.ts +1 -0
  344. package/dist/runtime/editor/types/state.d.ts +10 -0
  345. package/dist/runtime/editor/types/ui.d.ts +3 -1
  346. package/dist/runtime/helpers/tw.d.ts +15 -0
  347. package/dist/runtime/helpers/tw.js +3 -0
  348. package/dist/runtime/types/field.d.ts +1 -0
  349. package/dist/shared/{editor.DsGJIlGn.d.mts → editor.BTOBvmaz.d.mts} +20 -3
  350. package/dist/types.d.mts +1 -1
  351. package/package.json +16 -3
  352. package/dist/runtime/editor/features/analyze/Renderer/fragment.glsl +0 -74
  353. package/dist/runtime/editor/features/analyze/Renderer/index.d.vue.ts +0 -24
  354. package/dist/runtime/editor/features/analyze/Renderer/index.vue +0 -330
  355. package/dist/runtime/editor/features/analyze/Renderer/index.vue.d.ts +0 -24
  356. package/dist/runtime/editor/features/analyze/Renderer/vertex.glsl +0 -94
  357. package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.d.vue.ts +0 -7
  358. package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.vue +0 -17
  359. package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.vue.d.ts +0 -7
  360. package/dist/runtime/editor/features/assistant/Overlay/index.vue +0 -108
  361. package/dist/runtime/editor/features/assistant/docs.md +0 -7
  362. package/dist/runtime/editor/features/assistant/index.vue +0 -66
  363. package/dist/runtime/editor/features/assistant/types.d.ts +0 -37
  364. package/dist/runtime/editor/features/media-library/Library/FilterSelect/index.vue +0 -168
  365. package/dist/runtime/editor/providers/fieldValueAdapterTypes.d.ts +0 -13
  366. /package/dist/{runtime/editor/features/assistant → modules/iframes/runtime}/types.js +0 -0
  367. /package/dist/runtime/editor/components/Actions/{ItemDropdown.d.vue.ts → ItemDropdown/index.d.vue.ts} +0 -0
  368. /package/dist/runtime/editor/components/Actions/{ItemDropdown.vue.d.ts → ItemDropdown/index.vue.d.ts} +0 -0
  369. /package/dist/runtime/editor/{features/media-library/Library → components/PluginConfigFormInline}/FilterSelect/index.d.vue.ts +0 -0
  370. /package/dist/runtime/editor/{features/media-library/Library → components/PluginConfigFormInline}/FilterSelect/index.vue.d.ts +0 -0
  371. /package/dist/runtime/editor/features/{assistant → highlights/Renderer}/index.d.vue.ts +0 -0
  372. /package/dist/runtime/editor/features/{assistant → highlights/Renderer}/index.vue.d.ts +0 -0
  373. /package/dist/runtime/editor/{providers/fieldValueAdapterTypes.js → features/referenced-entities/types.js} +0 -0
@@ -7,9 +7,26 @@
7
7
  placement-y="top"
8
8
  :placement-x="useHorizontalPlacement ? 'auto-side' : 'center'"
9
9
  class="bk-editable-field"
10
+ :class="{ 'bk-is-fullscreen': isFullscreen }"
10
11
  close-icon="bk_mdi_check"
12
+ :fullscreen="isFullscreen"
13
+ :button-label="$t('save', 'Save')"
11
14
  @close="save"
12
15
  >
16
+ <template #header>
17
+ <button
18
+ v-if="canDoFullscreen"
19
+ type="button"
20
+ @click="isFullscreenPreference = !isFullscreenPreference"
21
+ >
22
+ <Icon
23
+ :name="isFullscreen ? 'bk_mdi_fullscreen_exit' : 'bk_mdi_fullscreen'"
24
+ />
25
+ <span>{{
26
+ isFullscreen ? $t("editableFieldExitFullscreen", "Exit Fullscreen") : $t("editableFieldFullscreen", "Fullscreen")
27
+ }}</span>
28
+ </button>
29
+ </template>
13
30
  <form ref="form" class="bk-editable-field-input" @submit.prevent="save">
14
31
  <div ref="input">
15
32
  <InputContenteditable
@@ -21,11 +38,14 @@
21
38
 
22
39
  <InputFrame
23
40
  v-else-if="config.type === 'frame'"
41
+ ref="inputFrame"
24
42
  v-model="modelValue"
25
43
  :type="config.type"
26
44
  :field-name="fieldName"
27
45
  :host="host"
28
46
  :initial-height="scrollHeight"
47
+ :is-fullscreen
48
+ @formatted="onFormattedValue"
29
49
  />
30
50
 
31
51
  <InputPlaintext
@@ -40,9 +60,30 @@
40
60
  </div>
41
61
 
42
62
  <div class="bk-artboard-tooltip-info">
43
- <button :disabled="!hasChanged" @click.prevent="discard">
63
+ <button
64
+ :disabled="!hasChanged"
65
+ class="bk-artboard-tooltip-info-button bk-scheme-red"
66
+ @click.prevent="discard"
67
+ >
44
68
  {{ $t("editableFieldDiscard", "Discard") }}
45
69
  </button>
70
+ <button
71
+ v-if="canTranslate"
72
+ :disabled="isAutoTranslating"
73
+ class="bk-artboard-tooltip-info-button bk-scheme-mono _bk_relative _bk_group/tooltip"
74
+ @click.prevent="autoTranslate"
75
+ >
76
+ <Icon name="bk_mdi_translate" class="_bk_size-15" />
77
+ {{ $t("editableFieldTranslate", "Translate") }}
78
+ <Tooltip
79
+ :label="
80
+ $t(
81
+ 'editableFieldTranslateTooltip',
82
+ 'Automatically translate the current text.'
83
+ )
84
+ "
85
+ />
86
+ </button>
46
87
  <div v-if="errorText" class="bk-editable-field-info-error">
47
88
  {{ errorText }}
48
89
  </div>
@@ -57,9 +98,18 @@
57
98
  :text="modelValue"
58
99
  :field-type="readabilityFieldType"
59
100
  />
60
- <div v-if="!isMarkup" class="bk-editable-field-info-count">
101
+ <div
102
+ v-if="!isMarkup"
103
+ class="bk-editable-field-info-count _bk_relative _bk_group/tooltip"
104
+ >
61
105
  <span>{{ count }}</span>
62
106
  <span v-if="maxlength >= 1">&nbsp;/&nbsp;{{ maxlength }}</span>
107
+ <Tooltip
108
+ v-if="maxlength >= 1"
109
+ :label="
110
+ $t('editableFieldCharCountMax', '@count of @max characters used').replace('@count', count.toString()).replace('@max', maxlength.toString())
111
+ "
112
+ />
63
113
  </div>
64
114
  </div>
65
115
  </form>
@@ -73,7 +123,7 @@
73
123
  </template>
74
124
 
75
125
  <script setup>
76
- import { ArtboardTooltip } from "#blokkli/editor/components";
126
+ import { ArtboardTooltip, Icon, Tooltip } from "#blokkli/editor/components";
77
127
  import {
78
128
  computed,
79
129
  ref,
@@ -95,7 +145,16 @@ import {
95
145
  } from "#blokkli/editor/composables";
96
146
  import ReadabilityIndicator from "./ReadabilityIndicator/index.vue";
97
147
  import ChunkOverlay from "./ReadabilityIndicator/ChunkOverlay.vue";
98
- const { state, adapter, $t, types, element: elementProvider } = useBlokkli();
148
+ const {
149
+ state,
150
+ adapter,
151
+ $t,
152
+ types,
153
+ context,
154
+ fieldValue,
155
+ element: elementProvider,
156
+ storage
157
+ } = useBlokkli();
99
158
  const props = defineProps({
100
159
  fieldName: { type: String, required: true },
101
160
  host: { type: Object, required: true },
@@ -110,7 +169,17 @@ const loaded = ref(false);
110
169
  const originalText = ref("");
111
170
  const modelValue = ref("");
112
171
  const form = useTemplateRef("form");
172
+ const inputFrame = useTemplateRef("inputFrame");
113
173
  const isClosing = ref(false);
174
+ const isAutoTranslating = ref(false);
175
+ const isFullscreenPreference = storage.use("editableOverlayFullscreen", false);
176
+ const canDoFullscreen = computed(
177
+ () => props.config.type === "markup" || props.config.type === "frame"
178
+ );
179
+ const isFullscreen = computed(
180
+ () => canDoFullscreen.value && isFullscreenPreference.value
181
+ );
182
+ const formattedValue = ref(null);
114
183
  const override = useEditableFieldOverride(props.fieldName, props.host);
115
184
  const hasChanged = computed(
116
185
  () => modelValue.value.trim() !== originalText.value.trim()
@@ -146,6 +215,37 @@ const isReadabilityField = computed(
146
215
  const readabilityFieldType = computed(
147
216
  () => props.config.type === "frame" || props.config.type === "markup" ? "markup" : "plain"
148
217
  );
218
+ function onFormattedValue(text) {
219
+ formattedValue.value = text;
220
+ }
221
+ const canTranslate = computed(
222
+ () => state.editMode.value === "translating" && !!adapter.requestTranslation
223
+ );
224
+ async function autoTranslate() {
225
+ if (isAutoTranslating.value) return;
226
+ isAutoTranslating.value = true;
227
+ try {
228
+ const sourceLanguage = state.translation.value.sourceLanguage || "en";
229
+ const targetLanguage = context.value.language;
230
+ const key = `${props.host.uuid}:${props.fieldName}`;
231
+ const response = await adapter.requestTranslation([
232
+ {
233
+ key,
234
+ text: modelValue.value,
235
+ isHtml: readabilityFieldType.value === "markup",
236
+ sourceLanguage,
237
+ targetLanguage
238
+ }
239
+ ]);
240
+ if (response.success && response.data.length) {
241
+ const translatedText = response.data[0].translatedText;
242
+ modelValue.value = translatedText;
243
+ inputFrame.value?.setValue(translatedText);
244
+ }
245
+ } finally {
246
+ isAutoTranslating.value = false;
247
+ }
248
+ }
149
249
  function restoreOriginalState() {
150
250
  override.restore();
151
251
  }
@@ -183,6 +283,8 @@ async function save() {
183
283
  }
184
284
  isClosing.value = true;
185
285
  if (hasChanged.value) {
286
+ console.log("modelValue", modelValue.value);
287
+ console.log("originalText", originalText.value);
186
288
  if (errorText.value) {
187
289
  restoreOriginalState();
188
290
  } else {
@@ -192,9 +294,14 @@ async function save() {
192
294
  emit("close");
193
295
  }
194
296
  onBlokkliEvent("window:clickAway", save);
195
- watch(modelValue, (newText) => {
196
- override.setValue(newText);
197
- });
297
+ watch(
298
+ () => props.config.type === "frame" ? formattedValue.value : modelValue.value,
299
+ (newText) => {
300
+ if (newText !== null) {
301
+ override.setValue(newText);
302
+ }
303
+ }
304
+ );
198
305
  const focusInput = (el) => {
199
306
  if (!el) {
200
307
  return;
@@ -232,7 +339,10 @@ onMounted(() => {
232
339
  if (props.isComponent) {
233
340
  modelValue.value = props.value || "";
234
341
  } else {
235
- modelValue.value = override.originalValue;
342
+ const tfv = fieldValue.getTextFieldValues().find(
343
+ (v) => v.uuid === props.host.uuid && v.fieldName === props.fieldName
344
+ );
345
+ modelValue.value = tfv?.value || override.originalValue || (isMarkup.value ? props.element.innerHTML : props.element.textContent) || "";
236
346
  }
237
347
  originalText.value = modelValue.value;
238
348
  nextTick(() => {
@@ -252,3 +362,302 @@ onBeforeUnmount(async () => {
252
362
  }
253
363
  });
254
364
  </script>
365
+
366
+ <style>
367
+ .bk.bk-editable-field {
368
+ --bk-bg: white;
369
+ --bk-header-bg: rgb(var(--bk-theme-teal-normal) / 1);
370
+ --bk-header-text: rgb(var(--bk-theme-teal-dark) / 1);
371
+ --bk-border: rgb(var(--bk-theme-teal-normal) / 1);
372
+ --bk-header-hover: rgb(var(--bk-theme-teal-dark) / 0.2);
373
+ }
374
+
375
+ .bk.bk-editable-field.bk-is-fullscreen .bk-editable-field-input {
376
+ display: flex;
377
+ max-width: none;
378
+ flex: 1 1 0%;
379
+ flex-direction: column;
380
+ }
381
+
382
+ .bk.bk-editable-field.bk-is-fullscreen .bk-editable-field-input > div:first-child {
383
+ display: flex;
384
+ flex: 1 1 0%;
385
+ flex-direction: column;
386
+ }
387
+
388
+ .bk.bk-editable-field.bk-is-fullscreen .bk-editable-field-input > div:first-child > * {
389
+ flex: 1 1 0%;
390
+ }
391
+
392
+ .bk.bk-editable-field .bk-editable-field-input {
393
+ width: 100%;
394
+ min-width: 360px;
395
+ max-width: 700px;
396
+ }
397
+
398
+ @media (min-width: 768px) {
399
+
400
+ .bk.bk-editable-field .bk-editable-field-input {
401
+ border-radius: 4px;
402
+ }
403
+ }
404
+
405
+ .bk.bk-editable-field .bk-editable-field-input .bk-editable-field-textarea {
406
+ position: relative;
407
+ }
408
+
409
+ @media (min-width: 1024px) {
410
+
411
+ .bk.bk-editable-field .bk-editable-field-input .bk-editable-field-textarea {
412
+ min-width: 600px;
413
+ }
414
+ }
415
+
416
+ .bk.bk-editable-field .bk-editable-field-input textarea {
417
+ display: block;
418
+ resize: none;
419
+ appearance: none;
420
+ padding: 10px;
421
+ border-style: none;
422
+ --bk-tw-shadow: 0 0 #0000;
423
+ --bk-tw-shadow-colored: 0 0 #0000;
424
+ box-shadow: var(--bk-tw-ring-offset-shadow, 0 0 #0000), var(--bk-tw-ring-shadow, 0 0 #0000), var(--bk-tw-shadow);
425
+ outline: 2px solid transparent;
426
+ outline-offset: 2px;
427
+ background-color: transparent;
428
+ }
429
+
430
+ .bk.bk-editable-field .bk-editable-field-input textarea:focus {
431
+ border-style: none !important;
432
+ --bk-tw-shadow: 0 0 #0000 !important;
433
+ --bk-tw-shadow-colored: 0 0 #0000 !important;
434
+ box-shadow: var(--bk-tw-ring-offset-shadow, 0 0 #0000), var(--bk-tw-ring-shadow, 0 0 #0000), var(--bk-tw-shadow) !important;
435
+ outline: 2px solid transparent !important;
436
+ outline-offset: 2px !important;
437
+ --bk-tw-ring-offset-shadow: var(--bk-tw-ring-inset) 0 0 0 var(--bk-tw-ring-offset-width) var(--bk-tw-ring-offset-color) !important;
438
+ --bk-tw-ring-shadow: var(--bk-tw-ring-inset) 0 0 0 calc(0px + var(--bk-tw-ring-offset-width)) var(--bk-tw-ring-color) !important;
439
+ box-shadow: var(--bk-tw-ring-offset-shadow), var(--bk-tw-ring-shadow), var(--bk-tw-shadow, 0 0 #0000) !important;
440
+ }
441
+
442
+ .bk.bk-editable-field .bk-editable-field-input textarea {
443
+ min-height: 50px;
444
+ width: 100%;
445
+ font-size: 16px;
446
+ line-height: 24px;
447
+ }
448
+
449
+ @media (min-width: 1024px) {
450
+
451
+ .bk.bk-editable-field .bk-editable-field-input textarea {
452
+ font-size: 18px;
453
+ line-height: 28px;
454
+ }
455
+ }
456
+
457
+ .bk.bk-editable-field .bk-editable-field-input textarea {
458
+ position: absolute;
459
+ top: 0px;
460
+ left: 0px;
461
+ height: 100%;
462
+ }
463
+
464
+ .bk.bk-editable-field .bk-editable-field-translate {
465
+ display: flex;
466
+ align-items: center;
467
+ gap: 3px;
468
+ border-right-width: 1px;
469
+ --bk-tw-border-opacity: 1;
470
+ border-right-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1));
471
+ padding-left: 10px;
472
+ padding-right: 10px;
473
+ --bk-tw-text-opacity: 1;
474
+ color: rgb(var(--bk-theme-teal-dark) / var(--bk-tw-text-opacity, 1));
475
+ }
476
+
477
+ .bk.bk-editable-field .bk-editable-field-translate:disabled {
478
+ opacity: 0.5;
479
+ }
480
+
481
+ .bk.bk-editable-field .bk-editable-field-info-error {
482
+ margin-left: auto;
483
+ padding-left: 10px;
484
+ padding-right: 10px;
485
+ --bk-tw-text-opacity: 1;
486
+ color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-text-opacity, 1));
487
+ }
488
+
489
+ .bk.bk-editable-field .bk-editable-field-info-hint {
490
+ margin-left: auto;
491
+ padding-left: 10px;
492
+ padding-right: 10px;
493
+ text-align: right;
494
+ font-size: 12px;
495
+ line-height: 16px;
496
+ font-weight: 400;
497
+ --bk-tw-text-opacity: 1;
498
+ color: rgb(var(--bk-theme-mono-500) / var(--bk-tw-text-opacity, 1));
499
+ }
500
+
501
+ .bk.bk-editable-field .bk-editable-field-readability {
502
+ position: relative;
503
+ display: flex;
504
+ height: 32px;
505
+ cursor: default;
506
+ align-items: center;
507
+ gap: 5px;
508
+ border-left-width: 1px;
509
+ --bk-tw-border-opacity: 1;
510
+ border-left-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1));
511
+ padding-left: 10px;
512
+ padding-right: 10px;
513
+ font-size: 12px;
514
+ line-height: 16px;
515
+ --bk-tw-text-opacity: 1;
516
+ color: rgb(var(--bk-theme-mono-600) / var(--bk-tw-text-opacity, 1));
517
+ transition-property: opacity;
518
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
519
+ transition-duration: 200ms;
520
+ cursor: help;
521
+ }
522
+
523
+ .bk.bk-editable-field .bk-editable-field-readability.bk-is-stale {
524
+ opacity: 0.4;
525
+ }
526
+
527
+ .bk.bk-editable-field .bk-readability-scale {
528
+ margin-top: 15px;
529
+ width: 100%;
530
+ padding-bottom: 25px;
531
+ }
532
+
533
+ .bk.bk-editable-field .bk-readability-scale-labels {
534
+ position: relative;
535
+ height: 16px;
536
+ font-size: 12px;
537
+ line-height: 16px;
538
+ font-weight: 600;
539
+ --bk-tw-text-opacity: 1;
540
+ color: rgb(var(--bk-theme-mono-50) / var(--bk-tw-text-opacity, 1));
541
+ }
542
+
543
+ .bk.bk-editable-field .bk-readability-scale-labels > span {
544
+ position: absolute;
545
+ top: -5px;
546
+ --bk-tw-translate-x: -50%;
547
+ transform: translate(var(--bk-tw-translate-x), var(--bk-tw-translate-y)) rotate(var(--bk-tw-rotate)) skewX(var(--bk-tw-skew-x)) skewY(var(--bk-tw-skew-y)) scaleX(var(--bk-tw-scale-x)) scaleY(var(--bk-tw-scale-y));
548
+ }
549
+
550
+ .bk.bk-editable-field .bk-readability-scale-bar {
551
+ position: relative;
552
+ height: 12px;
553
+ }
554
+
555
+ .bk.bk-editable-field .bk-readability-scale-segments {
556
+ position: absolute;
557
+ inset: 0px;
558
+ overflow: hidden;
559
+ border-radius: 9999px;
560
+ }
561
+
562
+ .bk.bk-editable-field .bk-readability-scale-segment {
563
+ position: absolute;
564
+ top: 0px;
565
+ height: 100%;
566
+ }
567
+
568
+ .bk.bk-editable-field .bk-readability-scale-segment.bk-is-left {
569
+ left: 0px;
570
+ }
571
+
572
+ .bk.bk-editable-field .bk-readability-scale-segment.bk-is-middle {
573
+ --bk-tw-bg-opacity: 1;
574
+ background-color: rgb(var(--bk-theme-yellow-normal) / var(--bk-tw-bg-opacity, 1));
575
+ }
576
+
577
+ /* higher_easier (e.g. FRE): low=hard, high=easy */
578
+
579
+ .bk.bk-editable-field .bk-readability-scale.bk-is-higher_easier .bk-is-left {
580
+ --bk-tw-bg-opacity: 1;
581
+ background-color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-bg-opacity, 1));
582
+ }
583
+
584
+ .bk.bk-editable-field .bk-readability-scale.bk-is-higher_easier .bk-is-right {
585
+ --bk-tw-bg-opacity: 1;
586
+ background-color: rgb(var(--bk-theme-lime-normal) / var(--bk-tw-bg-opacity, 1));
587
+ }
588
+
589
+ /* higher_harder (e.g. LIX): low=easy, high=hard */
590
+
591
+ .bk.bk-editable-field .bk-readability-scale.bk-is-higher_harder .bk-is-left {
592
+ --bk-tw-bg-opacity: 1;
593
+ background-color: rgb(var(--bk-theme-lime-normal) / var(--bk-tw-bg-opacity, 1));
594
+ }
595
+
596
+ .bk.bk-editable-field .bk-readability-scale.bk-is-higher_harder .bk-is-right {
597
+ --bk-tw-bg-opacity: 1;
598
+ background-color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-bg-opacity, 1));
599
+ }
600
+
601
+ .bk.bk-editable-field .bk-readability-scale-marker {
602
+ position: absolute;
603
+ top: -5px;
604
+ bottom: -5px;
605
+ width: 3px;
606
+ --bk-tw-translate-x: -50%;
607
+ transform: translate(var(--bk-tw-translate-x), var(--bk-tw-translate-y)) rotate(var(--bk-tw-rotate)) skewX(var(--bk-tw-skew-x)) skewY(var(--bk-tw-skew-y)) scaleX(var(--bk-tw-scale-x)) scaleY(var(--bk-tw-scale-y));
608
+ border-radius: 9999px;
609
+ --bk-tw-bg-opacity: 1;
610
+ background-color: rgb(255 255 255 / var(--bk-tw-bg-opacity, 1));
611
+ box-shadow: 0 0 0 1px rgb(0 0 0 / 0.3);
612
+ }
613
+
614
+ .bk.bk-editable-field .bk-readability-scale-marker > span {
615
+ position: absolute;
616
+ top: 100%;
617
+ left: 50%;
618
+ margin-top: 5px;
619
+ --bk-tw-translate-x: -50%;
620
+ transform: translate(var(--bk-tw-translate-x), var(--bk-tw-translate-y)) rotate(var(--bk-tw-rotate)) skewX(var(--bk-tw-skew-x)) skewY(var(--bk-tw-skew-y)) scaleX(var(--bk-tw-scale-x)) scaleY(var(--bk-tw-scale-y));
621
+ white-space: nowrap;
622
+ font-size: 14px;
623
+ line-height: 20px;
624
+ font-weight: 700;
625
+ --bk-tw-text-opacity: 1;
626
+ color: rgb(255 255 255 / var(--bk-tw-text-opacity, 1));
627
+ }
628
+
629
+ .bk.bk-editable-field .bk-editable-field-readability-dot {
630
+ height: 8px;
631
+ width: 8px;
632
+ flex-shrink: 0;
633
+ border-radius: 9999px;
634
+ --bk-tw-bg-opacity: 1;
635
+ background-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-bg-opacity, 1));
636
+ }
637
+
638
+ .bk.bk-editable-field .bk-editable-field-readability-dot.bk-is-easy {
639
+ --bk-tw-bg-opacity: 1;
640
+ background-color: rgb(var(--bk-theme-lime-normal) / var(--bk-tw-bg-opacity, 1));
641
+ }
642
+
643
+ .bk.bk-editable-field .bk-editable-field-readability-dot.bk-is-ok {
644
+ --bk-tw-bg-opacity: 1;
645
+ background-color: rgb(var(--bk-theme-yellow-normal) / var(--bk-tw-bg-opacity, 1));
646
+ }
647
+
648
+ .bk.bk-editable-field .bk-editable-field-readability-dot.bk-is-hard {
649
+ --bk-tw-bg-opacity: 1;
650
+ background-color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-bg-opacity, 1));
651
+ }
652
+
653
+ .bk.bk-editable-field .bk-editable-field-info-count {
654
+ display: flex;
655
+ height: 32px;
656
+ align-items: center;
657
+ border-left-width: 1px;
658
+ --bk-tw-border-opacity: 1;
659
+ border-left-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1));
660
+ padding-left: 10px;
661
+ padding-right: 10px;
662
+ }
663
+ </style>
@@ -37,3 +37,12 @@ export default {
37
37
  name: "EditableMask"
38
38
  };
39
39
  </script>
40
+
41
+ <style>
42
+ html.bk-hide-non-editable .bk-main-canvas > * {
43
+ visibility: hidden
44
+ }
45
+ html.bk-hide-non-editable .bk-main-canvas [data-blokkli-provider-active='true'] {
46
+ visibility: visible
47
+ }
48
+ </style>
@@ -2,49 +2,35 @@
2
2
  <Teleport to="#bk-toolbar-title">
3
3
  <button
4
4
  v-if="scheduledDate"
5
- class="bk-toolbar-title-scheduled"
5
+ class="bk-toolbar-title-scheduled _bk_group/tooltip"
6
6
  @click.prevent="eventBus.emit('publish:show-dialog')"
7
7
  >
8
8
  <Icon name="bk_mdi_calendar_clock" />
9
9
  <div class="bk-toolbar-title-scheduled-text">
10
10
  <div>{{ formattedScheduledDate }}</div>
11
11
  </div>
12
- <div class="bk-tooltip">
13
- <div>
14
- {{
15
- $t("scheduledFor", "The changes will be published on this date.")
16
- }}
17
- </div>
18
- </div>
12
+ <Tooltip
13
+ :label="
14
+ $t('scheduledFor', 'The changes will be published on this date.')
15
+ "
16
+ />
19
17
  </button>
20
18
  <button
21
19
  ref="buttonEl"
22
- class="bk-toolbar-button"
20
+ class="bk-toolbar-button _bk_group/tooltip _bk_w-full _bk_justify-start _bk_relative"
23
21
  :disabled="!state.canEdit.value"
24
22
  @click="eventBus.emit('editEntity')"
25
23
  >
26
- <div class="bk-toolbar-title">
27
- <div>
28
- <span
29
- class="bk-status-indicator"
30
- :class="{
31
- 'bk-is-success': entity.status && !mutations.length,
32
- 'bk-is-warning': entity.status && mutations.length
33
- }"
34
- />
35
- <strong>{{ entity.label }}</strong>
24
+ <div class="bk-toolbar-title _bk_relative _bk_size-full">
25
+ <div
26
+ class="_bk_min-w-0 _bk_truncate _bk_absolute _bk_top-1/2 _bk_left-0 _bk_w-full _bk_-translate-y-1/2 _bk_text-left _bk_flex _bk_items-center"
27
+ >
28
+ <StatusIndicator :status="statusIndicatorStatus" />
29
+ <strong class="_bk_text-mono-100">{{ entity.label }}</strong>
36
30
  <span>&nbsp;{{ entity.bundleLabel }}</span>
37
31
  </div>
38
32
  </div>
39
- <div class="bk-tooltip">
40
- <span v-if="entity.status && !mutations.length">{{
41
- statusPublished
42
- }}</span>
43
- <span v-else-if="entity.status && mutations.length">{{
44
- statusPending
45
- }}</span>
46
- <span v-else>{{ statusUnpublished }}</span>
47
- </div>
33
+ <Tooltip :label="tooltipLabel" />
48
34
  </button>
49
35
  </Teleport>
50
36
  </template>
@@ -56,7 +42,7 @@ import {
56
42
  computed,
57
43
  useTemplateRef
58
44
  } from "#imports";
59
- import { Icon } from "#blokkli/editor/components";
45
+ import { Icon, StatusIndicator, Tooltip } from "#blokkli/editor/components";
60
46
  import { defineCommands, defineTourItem } from "#blokkli/editor/composables";
61
47
  defineBlokkliFeature({
62
48
  id: "entity-title",
@@ -81,18 +67,17 @@ const formattedScheduledDate = computed(() => {
81
67
  minute: "2-digit"
82
68
  });
83
69
  });
84
- const statusPublished = computed(
85
- () => $t("pageIsPublished", "Page is published")
86
- );
87
- const statusPending = computed(
88
- () => $t(
89
- "pageIsPublishedWithPendingChanges",
90
- "Page is published (changes pending)"
91
- )
92
- );
93
- const statusUnpublished = computed(
94
- () => $t("pageIsNotPublished", "Page is not published")
95
- );
70
+ const tooltipLabel = computed(() => {
71
+ if (entity.value.status && !mutations.value.length) {
72
+ return $t("pageIsPublished", "Page is published");
73
+ } else if (entity.value.status && mutations.value.length) {
74
+ return $t(
75
+ "pageIsPublishedWithPendingChanges",
76
+ "Page is published (changes pending)"
77
+ );
78
+ }
79
+ return $t("pageIsNotPublished", "Page is not published");
80
+ });
96
81
  defineCommands(() => {
97
82
  return {
98
83
  id: "feature:entity-title:edit-entity",
@@ -105,28 +90,27 @@ defineCommands(() => {
105
90
  icon: "bk_mdi_edit"
106
91
  };
107
92
  });
108
- const tourText = computed(() => {
109
- const intro = $t(
110
- "entityTitleTourText",
111
- "<p>Shows the title and status of the current page.</p><p>Click on the title to open the page edit form.</p>"
112
- );
113
- return `
114
- ${intro}
115
- <ul>
116
- <li><div class="bk-status-indicator"></div>${statusUnpublished.value}</li>
117
- <li><div class="bk-status-indicator bk-is-warning"></div>${statusPending.value}</li>
118
- <li><div class="bk-status-indicator bk-is-success"></div>${statusPublished.value}</li>
119
- </ul>
120
- `;
121
- });
122
93
  defineTourItem(() => {
123
94
  return {
124
95
  id: "entity-title",
125
96
  title: $t("entityTitleTourTitle", "Page"),
126
- text: tourText.value,
97
+ text: $t(
98
+ "entityTitleTourText",
99
+ "<p>Shows the title and status of the current page.</p><p>Click on the title to open the page edit form.</p>"
100
+ ),
127
101
  element: buttonEl.value
128
102
  };
129
103
  });
104
+ const statusIndicatorStatus = computed(() => {
105
+ if (entity.value.status) {
106
+ if (mutations.value.length) {
107
+ return "warning";
108
+ } else {
109
+ return "success";
110
+ }
111
+ }
112
+ return "error";
113
+ });
130
114
  </script>
131
115
 
132
116
  <script>