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

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 +214 -3
  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 +9 -1
  210. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +32 -3
  211. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue.d.ts +9 -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 +416 -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
@@ -563,9 +563,11 @@ interface ComplexOptionTypeDefinition {
563
563
  typeName: string;
564
564
  typePath: string;
565
565
  editorComponentPath: string;
566
- editorButtonLabel: string;
566
+ editTitle: {
567
+ key: string;
568
+ defaultTranslation: string;
569
+ };
567
570
  editorIcon: string;
568
- editorTitle?: string;
569
571
  }
570
572
  declare class ModuleContext {
571
573
  helper: ModuleHelper;
@@ -579,11 +581,23 @@ declare class ModuleContext {
579
581
  private featureFragments;
580
582
  private complexOptionTypes;
581
583
  private cssFiles;
584
+ private contentPaths;
582
585
  private additionalIcons;
583
586
  collectors: Collector[];
584
587
  constructor(helper: ModuleHelper, icons: IconCollector, features: FeatureCollector, blocks: BlockCollector, theme: ThemeData);
585
588
  addCSS(filePath: string): void;
586
589
  getCSSFiles(): string[];
590
+ /**
591
+ * Register a directory containing Vue files that should participate in
592
+ * blökkli's CSS build pipeline. Files in these directories will:
593
+ * - Have their Tailwind utility classes generated and included in the output
594
+ * - Have their template class names mangled (_bk_ prefix) at build time
595
+ * - Have their <style> blocks processed through blökkli's PostCSS pipeline
596
+ *
597
+ * @param dirPath - Absolute path to a directory containing Vue components
598
+ */
599
+ addContentPath(dirPath: string): void;
600
+ getContentPaths(): string[];
587
601
  addIcon(...names: string[]): void;
588
602
  getAdditionalIcons(): string[];
589
603
  addFeatureFragment(name: string): void;
@@ -615,7 +629,10 @@ declare class ModuleContext {
615
629
  type Blokkli = {
616
630
  helper: ModuleHelper;
617
631
  context: ModuleContext;
618
- $t: (key: string, defaultText: string) => string;
632
+ $t: (key: string, defaultText: string) => {
633
+ key: string;
634
+ defaultTranslation: string;
635
+ };
619
636
  };
620
637
  type BlokkliModuleInit<O extends object> = {
621
638
  alterOptions?: (options: ModuleOptions) => void;
package/dist/types.d.mts CHANGED
@@ -4,6 +4,6 @@ declare module '@nuxt/schema' {
4
4
  interface NuxtHooks extends ModuleHooks {}
5
5
  }
6
6
 
7
- export { type ModuleHooks } from './shared/editor.DsGJIlGn.mjs'
7
+ export { type ModuleHooks } from './shared/editor.BTOBvmaz.mjs'
8
8
 
9
9
  export { type ModuleOptions, default } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blokkli/editor",
3
- "version": "2.0.0-alpha.52",
3
+ "version": "2.0.0-alpha.53",
4
4
  "description": "Interactive page building experience for Nuxt",
5
5
  "keywords": [
6
6
  "cms",
@@ -49,6 +49,9 @@
49
49
  "charts": [
50
50
  "./dist/modules/charts/index.d.mts"
51
51
  ],
52
+ "iframes": [
53
+ "./dist/modules/iframes/index.d.mts"
54
+ ],
52
55
  "modules": [
53
56
  "./dist/modules/index.d.mts"
54
57
  ],
@@ -78,6 +81,10 @@
78
81
  "types": "./dist/modules/charts/index.d.mts",
79
82
  "import": "./dist/modules/charts/index.mjs"
80
83
  },
84
+ "./iframes": {
85
+ "types": "./dist/modules/iframes/index.d.mts",
86
+ "import": "./dist/modules/iframes/index.mjs"
87
+ },
81
88
  "./modules": {
82
89
  "types": "./dist/modules/index.d.mts",
83
90
  "import": "./dist/modules/index.mjs"
@@ -89,7 +96,7 @@
89
96
  }
90
97
  },
91
98
  "scripts": {
92
- "prepack": "rm -rf dist && nuxt-module-build build && find dist/ -type f -name '*.*' | grep '.spec.' | xargs rm -f",
99
+ "prepack": "rm -rf dist && nuxt-module-build build && find dist/ -type f -name '*.*' | grep '.spec.' | xargs rm -f && npx tsx scripts/mangle-dist.ts",
93
100
  "dev": "nuxi dev playground --host",
94
101
  "typecheck": "npm run typecheck:build && npm run typecheck:runtime && npm run typecheck:server && npm run typecheck:playground",
95
102
  "typecheck:build": "vue-tsc --noEmit -p .nuxt/tsconfig.node.json",
@@ -99,7 +106,7 @@
99
106
  "dev:minimal": "nuxi dev playground-minimal --host",
100
107
  "styles:build": "postcss ./css/index.css -o ./src/runtime/editor/css/output.css",
101
108
  "styles:watch": "postcss ./css/index.css -o ./src/runtime/editor/css/output.css --watch",
102
- "dev:build": "npm run dev:prepare && nuxt build playground",
109
+ "dev:build": "npm run changelog && npm run dev:prepare && nuxi generate playground",
103
110
  "dev:start": "npx serve playground/.output/public",
104
111
  "dev:prepare": "PLAYGROUND_MODULE_BUILD=true nuxt-module-build build --stub && PLAYGROUND_MODULE_BUILD=true nuxt-module-build prepare && nuxi prepare playground",
105
112
  "release": "npm run lint && npm run prepack && changelogen --release",
@@ -128,6 +135,8 @@
128
135
  "html-diff-ts": "^1.4.2",
129
136
  "marked": "^17.0.1",
130
137
  "mitt": "^3.0.1",
138
+ "papaparse": "^5.5.3",
139
+ "pofile": "^1.1.4",
131
140
  "qrcode.vue": "^3.6.0",
132
141
  "twgl.js": "^7.0.0",
133
142
  "vue3-apexcharts": "^1.10.0",
@@ -149,6 +158,7 @@
149
158
  "@types/gettext-parser": "^8.0.0",
150
159
  "@types/micromatch": "^4.0.10",
151
160
  "@types/node": "^25.0.3",
161
+ "@types/papaparse": "^5.5.2",
152
162
  "@types/turndown": "^5.0.5",
153
163
  "@vue/test-utils": "^2.4.6",
154
164
  "axe-core": "^4.11.0",
@@ -156,6 +166,7 @@
156
166
  "ckeditor5": "^47.3.0",
157
167
  "commander": "^13.1.0",
158
168
  "cypress": "^15.8.1",
169
+ "deepl-node": "^1.25.0",
159
170
  "eslint": "^9.39.2",
160
171
  "eslint-plugin-oxlint": "^1.35.0",
161
172
  "eslint-plugin-sonarjs": "^3.0.5",
@@ -175,10 +186,12 @@
175
186
  "postcss-mixins": "^12.1.2",
176
187
  "postcss-nested-import": "^1.3.0",
177
188
  "postcss-replace": "^2.0.1",
189
+ "postcss-selector-parser": "^7.1.1",
178
190
  "postcss-url": "^10.1.3",
179
191
  "prettier": "^3.7.4",
180
192
  "prettier-plugin-glsl": "^0.2.2",
181
193
  "tailwindcss": "^3.4.17",
194
+ "tsx": "^4.21.0",
182
195
  "unbuild": "^3.6.1",
183
196
  "vite-plugin-glsl": "^1.5.5",
184
197
  "vitepress": "^1.6.4",
@@ -1,74 +0,0 @@
1
- #version 300 es
2
-
3
- precision highp float;
4
-
5
- in vec4 v_quad;
6
- in float v_rect_type;
7
- in vec3 v_color;
8
- in vec2 v_rect_size;
9
- in vec2 v_rect_center;
10
- in float v_opacity;
11
- in float v_border_opacity;
12
- in float v_border_factor;
13
- in float v_fill_opacity;
14
-
15
- out vec4 fragColor;
16
-
17
- uniform float u_dpi;
18
-
19
- int pseudoQuadrant(vec2 p) {
20
- return int(floor(step(0.0, p.x) + 2.0 * step(0.0, -p.y)));
21
- }
22
-
23
- float sdRoundBox(vec2 p, vec2 b, vec4 radii) {
24
- int idx = pseudoQuadrant(p);
25
- float cr;
26
- if (idx == 0) cr = radii[0];
27
- else if (idx == 1) cr = radii[1];
28
- else if (idx == 2) cr = radii[3];
29
- else cr = radii[2];
30
- vec2 q = abs(p) - b + cr;
31
- return min(max(q.x, q.y), 0.0) + length(max(q, 0.0)) - cr;
32
- }
33
-
34
- void main() {
35
- float borderThickness = 2.0 * u_dpi * v_border_factor;
36
- vec2 size = v_rect_size;
37
- vec4 radius = vec4(4.0 * u_dpi * v_border_factor);
38
-
39
- vec2 posRelativeToQuad = gl_FragCoord.xy - v_rect_center;
40
-
41
- // Outer rounded rectangle (includes border)
42
- float outerDist = sdRoundBox(posRelativeToQuad, size / 2.0, radius);
43
-
44
- // Inner rounded rectangle (fill area, excluding border)
45
- float innerDist = sdRoundBox(
46
- posRelativeToQuad,
47
- size / 2.0 - borderThickness,
48
- radius - borderThickness
49
- );
50
-
51
- // Calculate fill alpha (inside the inner rectangle)
52
- float fillAlpha = 1.0 - smoothstep(-1.0, 0.0, innerDist);
53
-
54
- // Calculate border alpha (between outer and inner)
55
- float outerAlpha = 1.0 - smoothstep(-1.0, 0.0, outerDist);
56
- float borderAlpha = outerAlpha * (1.0 - fillAlpha);
57
-
58
- // Background (transparent)
59
- vec4 bg = vec4(0.0, 0.0, 0.0, 0.0);
60
-
61
- // Fill (semi-transparent) - use fill opacity from vertex shader
62
- vec4 fill = vec4(v_color, v_fill_opacity * v_opacity);
63
-
64
- // Border - use opacity calculated in vertex shader
65
- vec4 border = vec4(v_color, v_border_opacity);
66
-
67
- // Mix background with fill
68
- vec4 res_with_fill = mix(bg, fill, fillAlpha);
69
-
70
- // Mix with border
71
- vec4 finalColor = mix(res_with_fill, border, borderAlpha);
72
-
73
- fragColor = finalColor;
74
- }
@@ -1,24 +0,0 @@
1
- import type { AnalyzeResultMapped } from '#blokkli/analyzer/types';
2
- declare const _default: typeof __VLS_export;
3
- export default _default;
4
- declare const __VLS_export: import("vue").DefineComponent<{
5
- results: AnalyzeResultMapped[];
6
- isStale: boolean;
7
- isRunning: boolean;
8
- manualAnalyzerIds: Set<string>;
9
- isShown: boolean;
10
- } & {
11
- modelValue?: string;
12
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- "update:modelValue": (value: string) => any;
14
- }, string, import("vue").PublicProps, Readonly<{
15
- results: AnalyzeResultMapped[];
16
- isStale: boolean;
17
- isRunning: boolean;
18
- manualAnalyzerIds: Set<string>;
19
- isShown: boolean;
20
- } & {
21
- modelValue?: string;
22
- }> & Readonly<{
23
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
24
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,330 +0,0 @@
1
- <template>
2
- <Teleport to="#bk-canvas-overlay">
3
- <button
4
- v-if="tooltipData"
5
- v-show="showTooltip"
6
- class="bk bk-analyze-tooltip bk-control"
7
- :class="'bk-is-' + tooltipData.status"
8
- :style="{
9
- transform: `translate(${tooltipData.x}px, ${tooltipData.y}px)`
10
- }"
11
- @click.prevent="onTooltipClick"
12
- >
13
- <Icon name="bk_mdi_speed" />
14
- <span>{{ tooltipData.title }}</span>
15
- <span v-if="tooltipData.scoreText" class="bk-analyze-tooltip-score">{{
16
- tooltipData.scoreText
17
- }}</span>
18
- </button>
19
- </Teleport>
20
- </template>
21
-
22
- <script setup>
23
- import { useBlokkli, computed, watch, ref } from "#imports";
24
- import {
25
- setBuffersAndAttributes,
26
- drawBufferInfo,
27
- setUniforms
28
- } from "twgl.js";
29
- import vs from "./vertex.glsl?raw";
30
- import fs from "./fragment.glsl?raw";
31
- import { RectangleBufferCollector } from "#blokkli/editor/helpers/webgl";
32
- import { toShaderColor } from "#blokkli/editor/helpers/color";
33
- import { defineRenderer, onBlokkliEvent } from "#blokkli/editor/composables";
34
- import { Icon } from "#blokkli/editor/components";
35
- const props = defineProps({
36
- results: { type: Array, required: true },
37
- isStale: { type: Boolean, required: true },
38
- isRunning: { type: Boolean, required: true },
39
- manualAnalyzerIds: { type: Set, required: true },
40
- isShown: { type: Boolean, required: true }
41
- });
42
- const {
43
- animation,
44
- ui,
45
- theme,
46
- selection,
47
- element,
48
- dom,
49
- blocks,
50
- eventBus,
51
- readability
52
- } = useBlokkli();
53
- const showTooltip = computed(() => {
54
- return !ui.isChangingOptions.value && !selection.isMultiSelecting.value && !selection.activeEditableLabel.value && !selection.isDragging.value;
55
- });
56
- const activeId = defineModel({ type: String, ...{
57
- default: ""
58
- } });
59
- const statusPriority = {
60
- violation: 3,
61
- incomplete: 2,
62
- pass: 1,
63
- inapplicable: 0
64
- };
65
- const nodes = computed(() => {
66
- const mappedNodes = [];
67
- for (let i = 0; i < props.results.length; i++) {
68
- const result = props.results[i];
69
- if (!result) {
70
- continue;
71
- }
72
- if (result.status !== "incomplete" && result.status !== "violation") {
73
- continue;
74
- }
75
- for (let j = 0; j < result.nodes.length; j++) {
76
- const node = result.nodes[j];
77
- if (!node) {
78
- continue;
79
- }
80
- for (let k = 0; k < node.targets.length; k++) {
81
- const target = node.targets[k];
82
- if (!target) {
83
- continue;
84
- }
85
- let targetElement = null;
86
- if (typeof target.target === "string") {
87
- targetElement = element.query(
88
- ui.providerElement,
89
- target.target,
90
- "Find analyze node target element."
91
- );
92
- } else if (target.target instanceof HTMLElement) {
93
- targetElement = target.target;
94
- } else {
95
- const item = blocks.getBlock(target.target.uuid);
96
- if (item) {
97
- targetElement = dom.getDragElement(item) ?? null;
98
- }
99
- }
100
- if (targetElement) {
101
- mappedNodes.push({
102
- id: result.id,
103
- element: targetElement,
104
- index: target.globalIndex,
105
- title: result.title,
106
- status: result.status,
107
- plugin: result.plugin,
108
- score: node.score
109
- });
110
- }
111
- }
112
- }
113
- }
114
- const nodeMap = /* @__PURE__ */ new Map();
115
- for (const node of mappedNodes) {
116
- const existing = nodeMap.get(node.element);
117
- if (!existing || statusPriority[node.status] > statusPriority[existing.status]) {
118
- nodeMap.set(node.element, node);
119
- }
120
- }
121
- const finalNodes = Array.from(nodeMap.values());
122
- return finalNodes;
123
- });
124
- const activeRectId = computed(() => {
125
- if (!activeId.value) {
126
- return -1;
127
- }
128
- for (let i = 0; i < nodes.value.length; i++) {
129
- const node = nodes.value[i];
130
- const id = node.id + "_____" + node.index;
131
- if (activeId.value === id) {
132
- return i;
133
- }
134
- }
135
- return -1;
136
- });
137
- const hoveredNode = ref(null);
138
- const tooltipData = computed(() => {
139
- const node = hoveredNode.value;
140
- if (!node) {
141
- return null;
142
- }
143
- const rect = collector.rectCache.get(node.element);
144
- if (!rect) {
145
- return null;
146
- }
147
- const scale = ui.artboardScale.value;
148
- const offset = ui.artboardOffset.value;
149
- const x = rect.x * scale + offset.x;
150
- const y = rect.y * scale + offset.y;
151
- let scoreText = "";
152
- if (node.score != null) {
153
- const label = readability.analyzer.value.scoreLabel;
154
- scoreText = `${label} ${readability.formatScore(node.score)}`;
155
- }
156
- return {
157
- x,
158
- y,
159
- title: node.title,
160
- status: node.status,
161
- scoreText
162
- };
163
- });
164
- function onTooltipClick() {
165
- const node = hoveredNode.value;
166
- if (!node) {
167
- return;
168
- }
169
- const id = node.id + "_____" + node.index;
170
- if (activeId.value === id) {
171
- activeId.value = "";
172
- } else {
173
- activeId.value = id;
174
- eventBus.emit("sidebar:open", "analyze");
175
- }
176
- hoveredNode.value = null;
177
- }
178
- class AnalyzeRectangleBufferCollector extends RectangleBufferCollector {
179
- prevKey = "";
180
- rectCache = /* @__PURE__ */ new Map();
181
- clearCache() {
182
- this.rectCache.clear();
183
- this.prevKey = "";
184
- }
185
- getBufferInfo(gl, force) {
186
- const key = nodes.value.map((node, index) => {
187
- if (!this.rectCache.has(node.element)) {
188
- const rect2 = ui.getAbsoluteElementRect(node.element);
189
- this.rectCache.set(node.element, rect2);
190
- }
191
- const rect = this.rectCache.get(node.element);
192
- if (!rect) {
193
- return `${index}_no_rect`;
194
- }
195
- return `${index}_${rect.x}_${rect.y}_${rect.width}_${rect.height}_${node.status}`;
196
- }).join("_");
197
- const hasChanged = force || this.prevKey !== key;
198
- if (hasChanged) {
199
- this.reset();
200
- for (let i = 0; i < nodes.value.length; i++) {
201
- const node = nodes.value[i];
202
- const id = `analyze_${i}`;
203
- if (this.added.has(id)) {
204
- continue;
205
- }
206
- const rect = this.rectCache.get(node.element);
207
- if (!rect) {
208
- continue;
209
- }
210
- this.added.add(id);
211
- const isManual = props.manualAnalyzerIds.has(node.plugin);
212
- const statusType = node.status === "violation" ? isManual ? 0 : 1 : isManual ? 2 : 3;
213
- this.addRectangle(
214
- {
215
- id,
216
- x: rect.x,
217
- y: rect.y,
218
- width: rect.width,
219
- height: rect.height,
220
- status: node.status,
221
- plugin: node.plugin,
222
- nodeIndex: node.index
223
- },
224
- statusType
225
- );
226
- }
227
- this.prevKey = key;
228
- }
229
- if (hasChanged && gl) {
230
- this.bufferInfo = this.createBufferInfo(gl);
231
- }
232
- return { info: this.bufferInfo, hasChanged };
233
- }
234
- }
235
- function getOpacity() {
236
- return props.isRunning ? 0.3 : 1;
237
- }
238
- const { collector } = defineRenderer("analyze-overlay", {
239
- zIndex: 500,
240
- collector: () => new AnalyzeRectangleBufferCollector(),
241
- program: () => ({ shaders: [vs, fs] }),
242
- enabled: () => !selection.isMultiSelecting.value && !selection.isDragging.value && !ui.isChangingOptions.value && !selection.activeEditableLabel.value,
243
- render: (_ctx, gl, program) => {
244
- gl.useProgram(program.program);
245
- const { info } = collector.getBufferInfo(gl);
246
- if (!info) {
247
- return;
248
- }
249
- setUniforms(program, {
250
- u_color_violation: toShaderColor(theme.red.value.normal),
251
- u_color_incomplete: toShaderColor(theme.yellow.value.normal),
252
- u_opacity: getOpacity(),
253
- u_manual_stale: props.isStale ? 1 : 0,
254
- u_active_id: activeRectId.value
255
- });
256
- animation.setSharedUniforms(gl, program);
257
- setBuffersAndAttributes(gl, program, info);
258
- drawBufferInfo(gl, info, gl.TRIANGLES);
259
- },
260
- renderFallback: (ctx, ctx2d) => {
261
- collector.getBufferInfo();
262
- const rects = Object.values(collector.rects);
263
- if (rects.length === 0) {
264
- return;
265
- }
266
- const rgbaToCss = (rgb, alpha) => {
267
- return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${alpha})`;
268
- };
269
- const globalOpacity = getOpacity();
270
- const borderRadius = 8 * ctx.dpi;
271
- for (let i = 0; i < rects.length; i++) {
272
- const rect = rects[i];
273
- const isManual = props.manualAnalyzerIds.has(rect.plugin);
274
- const finalOpacity = isManual && props.isStale ? 0.3 : globalOpacity;
275
- const fillAlpha = 0.3 * finalOpacity;
276
- const baseColor = rect.status === "violation" ? theme.red.value.normal : theme.yellow.value.normal;
277
- const fillColor = rgbaToCss(baseColor, fillAlpha);
278
- const x = (rect.x * ctx.artboardScale + ctx.artboardOffset.x) * ctx.dpi;
279
- const y = (rect.y * ctx.artboardScale + ctx.artboardOffset.y) * ctx.dpi;
280
- const width = rect.width * ctx.artboardScale * ctx.dpi;
281
- const height = rect.height * ctx.artboardScale * ctx.dpi;
282
- ctx2d.fillStyle = fillColor;
283
- ctx2d.beginPath();
284
- ctx2d.roundRect(x, y, width, height, borderRadius);
285
- ctx2d.fill();
286
- }
287
- }
288
- });
289
- onBlokkliEvent("ui:resized", function() {
290
- collector.clearCache();
291
- collector.reset();
292
- });
293
- onBlokkliEvent("option:finish-change", () => {
294
- collector.clearCache();
295
- collector.reset();
296
- });
297
- watch(
298
- () => props.results,
299
- () => {
300
- collector.clearCache();
301
- collector.reset();
302
- }
303
- );
304
- onBlokkliEvent("canvas:draw", (e) => {
305
- const artboardX = (e.mouseX - e.artboardOffset.x) / e.artboardScale;
306
- const artboardY = (e.mouseY - e.artboardOffset.y) / e.artboardScale;
307
- for (let i = 0; i < nodes.value.length; i++) {
308
- const node = nodes.value[i];
309
- const rect = collector.rectCache.get(node.element);
310
- if (!rect) {
311
- continue;
312
- }
313
- if (artboardX >= rect.x && artboardX <= rect.x + rect.width && artboardY >= rect.y && artboardY <= rect.y + rect.height) {
314
- hoveredNode.value = node;
315
- return;
316
- }
317
- }
318
- hoveredNode.value = null;
319
- });
320
- onBlokkliEvent("window:clickAway", () => {
321
- hoveredNode.value = null;
322
- activeId.value = "";
323
- });
324
- </script>
325
-
326
- <script>
327
- export default {
328
- name: "AnalyzeOverlay"
329
- };
330
- </script>
@@ -1,24 +0,0 @@
1
- import type { AnalyzeResultMapped } from '#blokkli/analyzer/types';
2
- declare const _default: typeof __VLS_export;
3
- export default _default;
4
- declare const __VLS_export: import("vue").DefineComponent<{
5
- results: AnalyzeResultMapped[];
6
- isStale: boolean;
7
- isRunning: boolean;
8
- manualAnalyzerIds: Set<string>;
9
- isShown: boolean;
10
- } & {
11
- modelValue?: string;
12
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- "update:modelValue": (value: string) => any;
14
- }, string, import("vue").PublicProps, Readonly<{
15
- results: AnalyzeResultMapped[];
16
- isStale: boolean;
17
- isRunning: boolean;
18
- manualAnalyzerIds: Set<string>;
19
- isShown: boolean;
20
- } & {
21
- modelValue?: string;
22
- }> & Readonly<{
23
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
24
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,94 +0,0 @@
1
- #version 300 es
2
-
3
- precision highp float;
4
-
5
- // [x, y] position.
6
- in vec2 a_position;
7
- // The [x,y,width, height] of the quad the vertex belongs to.
8
- in vec4 a_quad;
9
- in float a_rect_id;
10
- in float a_rect_type;
11
-
12
- // The global scaling applied to all quads.
13
- uniform float u_scale;
14
- uniform float u_dpi;
15
- // The amount of pixels to offset on the x axis.
16
- uniform float u_offset_x;
17
- // The amount of pixels to offset on the y axis.
18
- uniform float u_offset_y;
19
- uniform vec2 u_resolution;
20
- uniform vec3 u_color_violation;
21
- uniform vec3 u_color_incomplete;
22
- uniform float u_opacity;
23
- uniform float u_manual_stale;
24
- uniform float u_active_id;
25
-
26
- out vec4 v_quad;
27
- out float v_rect_type;
28
- out vec3 v_color;
29
- out vec2 v_rect_size;
30
- out vec2 v_rect_center;
31
- out float v_opacity;
32
- out float v_border_opacity;
33
- out float v_border_factor;
34
- out float v_fill_opacity;
35
-
36
- void main() {
37
- // Apply global scale and offsets
38
- vec2 offsetPosition = a_position * u_scale;
39
- offsetPosition.x += u_offset_x;
40
- offsetPosition.y += u_offset_y;
41
-
42
- // Normalize position for rendering
43
- vec2 normalizedPosition = offsetPosition / u_resolution;
44
-
45
- // Transform to screen space (-1 to 1)
46
- vec2 screenSpacePosition = normalizedPosition * 2.0 - vec2(1.0, 1.0);
47
- screenSpacePosition.y = -screenSpacePosition.y;
48
-
49
- // Output final position in clip space
50
- gl_Position = vec4(screenSpacePosition, 0.0, 1.0) * u_dpi;
51
-
52
- // Pass quad and type to fragment shader
53
- vec4 transformed_quad = vec4(
54
- (a_quad.x * u_scale + u_offset_x) * u_dpi,
55
- (u_resolution.y - a_quad.y * u_scale - a_quad.w * u_scale - u_offset_y) *
56
- u_dpi,
57
- a_quad.z * u_scale * u_dpi,
58
- a_quad.w * u_scale * u_dpi
59
- );
60
- v_quad = transformed_quad;
61
- v_rect_type = a_rect_type;
62
- v_rect_size = vec2(v_quad.z, v_quad.w);
63
- v_rect_center = vec2(v_quad.x + v_quad.z / 2.0, v_quad.y + v_quad.w / 2.0);
64
-
65
- // Set color based on status type
66
- // 0 = violation (manual), 1 = violation (continuous)
67
- // 2 = incomplete (manual), 3 = incomplete (continuous)
68
- if (a_rect_type < 1.5) {
69
- // Types 0 and 1: violation
70
- v_color = u_color_violation;
71
- } else {
72
- // Types 2 and 3: incomplete
73
- v_color = u_color_incomplete;
74
- }
75
-
76
- // Calculate final opacity
77
- // Check if this is a manual analyzer (type 0 or 2)
78
- bool isManual = a_rect_type == 0.0 || a_rect_type == 2.0;
79
-
80
- // If manual AND stale, use 0.3, otherwise use global opacity
81
- if (isManual && u_manual_stale > 0.5) {
82
- v_opacity = 0.3;
83
- } else {
84
- v_opacity = u_opacity;
85
- }
86
-
87
- // Calculate border factor based on scale.
88
- v_border_factor = smoothstep(0.5, 0.8, u_scale);
89
-
90
- // Calculate fill opacity based on whether this rect is active
91
- // If active (rect_id matches u_active_id), use 0.5, otherwise 0.1
92
- v_fill_opacity = a_rect_id == u_active_id ? 0.3 : 0.1;
93
- v_border_opacity = a_rect_id == u_active_id ? 1.0 : 0.5;
94
- }
@@ -1,7 +0,0 @@
1
- declare const _default: typeof __VLS_export;
2
- export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{
4
- markup: string;
5
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
6
- markup: string;
7
- }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;