@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.
- package/dist/chunks/tailwindConfig.mjs +3 -3
- package/dist/global/types/blockOptions.d.ts +18 -2
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +281 -18
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +1 -0
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.d.vue.ts +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.vue +14 -49
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.vue.d.ts +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.d.vue.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue +102 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue.d.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +8 -5
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +9 -5
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +16 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +29 -0
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +3 -1
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +8 -1
- package/dist/modules/charts/index.d.mts +1 -1
- package/dist/modules/charts/index.mjs +2 -3
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +1 -1
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +16 -0
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +9 -0
- package/dist/modules/drupal/graphql/features/agent.graphql +20 -0
- package/dist/modules/drupal/graphql/features/publishNew.graphql +14 -0
- package/dist/modules/drupal/graphql/features/referenced-entities.graphql +21 -0
- package/dist/modules/drupal/graphql/features/textFieldValues.graphql +20 -0
- package/dist/modules/drupal/graphql/features/workspace.graphql +23 -0
- package/dist/modules/drupal/graphql/mutations/bulk_translate_field_values.graphql +19 -0
- package/dist/modules/drupal/graphql/mutations/clear_outdated_translation.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/ignore_analyze.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/request_translation.graphql +10 -0
- package/dist/modules/drupal/graphql/mutations/unignore_analyze.graphql +15 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/index.mjs +16 -0
- package/dist/modules/drupal/runtime/adapter/index.js +180 -11
- package/dist/modules/iframes/index.d.mts +31 -0
- package/dist/modules/iframes/index.mjs +52 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.d.vue.ts +18 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.vue +61 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.vue.d.ts +18 -0
- package/dist/modules/iframes/runtime/components/index.d.ts +1 -0
- package/dist/modules/iframes/runtime/components/index.js +1 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.d.vue.ts +12 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue +220 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue.d.ts +12 -0
- package/dist/modules/iframes/runtime/types.d.ts +10 -0
- package/dist/modules/index.d.mts +1 -1
- package/dist/modules/table-of-contents/index.d.mts +1 -1
- package/dist/runtime/components/Blocks/NotImplemented/index.vue +57 -0
- package/dist/runtime/components/BlokkliEditable.vue +1 -1
- package/dist/runtime/editor/adapter/index.d.ts +8 -1
- package/dist/runtime/editor/components/Actions/Interactions/index.vue +77 -17
- package/dist/runtime/editor/components/Actions/{ItemDropdown.vue → ItemDropdown/index.vue} +9 -10
- package/dist/runtime/editor/components/Actions/index.vue +586 -23
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +1 -0
- package/dist/runtime/editor/components/AppMenu/MenuButton.vue +185 -1
- package/dist/runtime/editor/components/AppMenu/index.vue +24 -10
- package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +6 -2
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +223 -3
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +6 -2
- package/dist/runtime/editor/components/AutoHeight/index.vue +23 -0
- package/dist/runtime/editor/components/Banner/Inner.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Banner/Inner.vue +32 -0
- package/dist/runtime/editor/components/Banner/Inner.vue.d.ts +30 -0
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +3 -13
- package/dist/runtime/editor/components/Banner/index.vue +2 -14
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +3 -13
- package/dist/runtime/editor/components/BetaIndicator/index.d.vue.ts +6 -0
- package/dist/runtime/editor/components/BetaIndicator/index.vue +16 -0
- package/dist/runtime/editor/components/BetaIndicator/index.vue.d.ts +6 -0
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue +51 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +27 -1
- package/dist/runtime/editor/components/BlockProxy/index.vue +148 -1
- package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +59 -0
- package/dist/runtime/editor/components/BundleSelector/index.vue +170 -20
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -0
- package/dist/runtime/editor/components/Dialog/index.vue +341 -0
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +117 -0
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +224 -28
- package/dist/runtime/editor/components/DiffViewer/DiffValue.d.vue.ts +1 -0
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue +5 -1
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue.d.ts +1 -0
- package/dist/runtime/editor/components/DiffViewer/State.vue +319 -0
- package/dist/runtime/editor/components/DraggableList.vue +103 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +84 -0
- package/dist/runtime/editor/components/EditProvider.vue +72 -15
- package/dist/runtime/editor/components/FileDropHandler/index.d.vue.ts +23 -0
- package/dist/runtime/editor/components/FileDropHandler/index.vue +108 -0
- package/dist/runtime/editor/components/FileDropHandler/index.vue.d.ts +23 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue +4 -2
- package/dist/runtime/editor/components/Form/Datepicker/index.vue +149 -0
- package/dist/runtime/editor/components/Form/Toggle/index.vue +205 -1
- package/dist/runtime/editor/components/FormOverlay/index.vue +90 -0
- package/dist/runtime/editor/components/Icon/index.vue +6 -0
- package/dist/runtime/editor/components/Indicators/index.vue +161 -0
- package/dist/runtime/editor/components/InfoBox/index.vue +65 -0
- package/dist/runtime/editor/components/Konami/index.vue +119 -0
- package/dist/runtime/editor/components/Loading/index.d.vue.ts +6 -3
- package/dist/runtime/editor/components/Loading/index.vue +10 -5
- package/dist/runtime/editor/components/Loading/index.vue.d.ts +6 -3
- package/dist/runtime/editor/components/Messages/index.vue +131 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +246 -12
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.vue +19 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Overlay/index.vue +84 -0
- package/dist/runtime/editor/components/Pagination/index.vue +41 -0
- package/dist/runtime/editor/components/PluginConfigForm/index.vue +23 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +429 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.d.vue.ts +22 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +150 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue.d.ts +22 -0
- package/dist/runtime/editor/components/Popup/index.vue +77 -2
- package/dist/runtime/editor/components/PreviewProvider.vue +7 -0
- package/dist/runtime/editor/components/Resizable/index.vue +90 -1
- package/dist/runtime/editor/components/ScaleToFit/index.vue +30 -1
- package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +43 -0
- package/dist/runtime/editor/components/SearchOverlay/index.vue +264 -0
- package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +43 -0
- package/dist/runtime/editor/components/StatusIcon/index.vue +104 -0
- package/dist/runtime/editor/components/StatusIndicator/index.d.vue.ts +9 -0
- package/dist/runtime/editor/components/StatusIndicator/index.vue +16 -0
- package/dist/runtime/editor/components/StatusIndicator/index.vue.d.ts +9 -0
- package/dist/runtime/editor/components/SystemRequirements/index.vue +57 -0
- package/dist/runtime/editor/components/Tabs/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Tabs/index.vue +32 -0
- package/dist/runtime/editor/components/Tabs/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/Toolbar/index.vue +214 -3
- package/dist/runtime/editor/components/Tooltip/Context.d.vue.ts +7 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue +13 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue.d.ts +7 -0
- package/dist/runtime/editor/components/Tooltip/Status.d.vue.ts +8 -0
- package/dist/runtime/editor/components/Tooltip/Status.vue +27 -0
- package/dist/runtime/editor/components/Tooltip/Status.vue.d.ts +8 -0
- package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +27 -0
- package/dist/runtime/editor/components/Tooltip/index.vue +40 -0
- package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +27 -0
- package/dist/runtime/editor/components/index.d.ts +59 -49
- package/dist/runtime/editor/components/index.js +59 -98
- package/dist/runtime/editor/composables/defineHighlight.d.ts +2 -0
- package/dist/runtime/editor/composables/defineHighlight.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +1 -0
- package/dist/runtime/editor/composables/index.js +1 -0
- package/dist/runtime/editor/composables/useBlockRegistration.js +8 -0
- package/dist/runtime/editor/composables/useStickyToolbar.d.ts +1 -0
- package/dist/runtime/editor/composables/useStickyToolbar.js +16 -0
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +10 -0
- package/dist/runtime/editor/features/add-list/Help/index.vue +193 -0
- package/dist/runtime/editor/features/add-list/index.vue +441 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.vue +35 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/analyze/Main.vue +148 -24
- package/dist/runtime/editor/features/analyze/Results/Results.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/Results.vue +0 -2
- package/dist/runtime/editor/features/analyze/Results/Results.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue +1 -2
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue +11 -8
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.d.vue.ts +3 -10
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +63 -25
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue.d.ts +3 -10
- package/dist/runtime/editor/features/analyze/analyzers/altText.js +2 -0
- package/dist/runtime/editor/features/analyze/analyzers/headingStructure.js +3 -0
- package/dist/runtime/editor/features/analyze/analyzers/helpers/hashString.d.ts +7 -0
- package/dist/runtime/editor/features/analyze/analyzers/helpers/hashString.js +8 -0
- package/dist/runtime/editor/features/analyze/analyzers/readability.js +6 -12
- package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +20 -0
- package/dist/runtime/editor/features/analyze/index.vue +458 -0
- package/dist/runtime/editor/features/analyze/types.d.ts +12 -0
- package/dist/runtime/editor/features/artboard/Overview/index.vue +37 -4
- package/dist/runtime/editor/features/artboard/Renderer.vue +79 -9
- package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +84 -0
- package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/block-scheduler/index.vue +114 -0
- package/dist/runtime/editor/features/breadcrumbs/index.vue +150 -0
- package/dist/runtime/editor/features/changelog/Dialog/index.vue +62 -7
- package/dist/runtime/editor/features/changelog/changelog.json +9 -1
- package/dist/runtime/editor/features/clipboard/index.vue +153 -1
- package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +39 -16
- package/dist/runtime/editor/features/command-palette/Palette/index.vue +24 -130
- package/dist/runtime/editor/features/comments/index.vue +235 -0
- package/dist/runtime/editor/features/complex-options/index.vue +4 -1
- package/dist/runtime/editor/features/debug/Main.vue +1 -1
- package/dist/runtime/editor/features/debug/Section/Features.vue +2 -4
- package/dist/runtime/editor/features/debug/index.vue +168 -0
- package/dist/runtime/editor/features/dev-mode/index.vue +92 -27
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/dragging-overlay/index.vue +330 -0
- package/dist/runtime/editor/features/edit/index.vue +15 -17
- package/dist/runtime/editor/features/edit-form/Frame/index.vue +21 -4
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.d.vue.ts +9 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +32 -3
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue.d.ts +9 -1
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +77 -0
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +55 -56
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +416 -8
- package/dist/runtime/editor/features/editable-mask/index.vue +9 -0
- package/dist/runtime/editor/features/entity-title/index.vue +40 -56
- package/dist/runtime/editor/features/fragments/Dialog/index.vue +90 -0
- package/dist/runtime/editor/features/help/Shortcuts/index.vue +71 -0
- package/dist/runtime/editor/features/help/index.vue +17 -0
- package/dist/runtime/editor/features/highlights/Renderer/fragment.glsl +89 -0
- package/dist/runtime/editor/features/highlights/Renderer/index.vue +408 -0
- package/dist/runtime/editor/features/highlights/Renderer/vertex.glsl +87 -0
- package/dist/runtime/editor/features/highlights/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/highlights/index.vue +20 -0
- package/dist/runtime/editor/features/highlights/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/history/List/index.vue +209 -0
- package/dist/runtime/editor/features/history/index.vue +0 -1
- package/dist/runtime/editor/features/hover/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/hover/Renderer/vertex.glsl +1 -1
- package/dist/runtime/editor/features/import-existing/Dialog/index.vue +18 -0
- package/dist/runtime/editor/features/media-library/Library/index.vue +10 -30
- package/dist/runtime/editor/features/media-library/index.vue +331 -0
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +6 -2
- package/dist/runtime/editor/features/options/Form/Item.vue +21 -18
- package/dist/runtime/editor/features/options/Form/Radios/index.d.vue.ts +6 -0
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +25 -6
- package/dist/runtime/editor/features/options/Form/Radios/index.vue.d.ts +6 -0
- package/dist/runtime/editor/features/options/Form/index.vue +1 -4
- package/dist/runtime/editor/features/options/index.vue +729 -0
- package/dist/runtime/editor/features/ownership/Banner/index.vue +9 -8
- package/dist/runtime/editor/features/ownership/index.vue +1 -1
- package/dist/runtime/editor/features/preview-grant/QrCode/index.vue +8 -3
- package/dist/runtime/editor/features/publish/Dialog/Item.vue +18 -20
- package/dist/runtime/editor/features/publish/Dialog/index.vue +5 -1
- package/dist/runtime/editor/features/publish/index.vue +835 -0
- package/dist/runtime/editor/features/publish/types.d.ts +5 -1
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.d.vue.ts +4 -0
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +81 -0
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue.d.ts +4 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.vue +78 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/referenced-entities/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/referenced-entities/index.vue +36 -0
- package/dist/runtime/editor/features/referenced-entities/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/referenced-entities/types.d.ts +13 -0
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +188 -0
- package/dist/runtime/editor/features/search/Overlay/Results/Page/index.vue +1 -1
- package/dist/runtime/editor/features/search/index.vue +511 -0
- package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +58 -0
- package/dist/runtime/editor/features/selection/index.vue +47 -15
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +23 -0
- package/dist/runtime/editor/features/settings/Dialog/index.vue +5 -2
- package/dist/runtime/editor/features/settings/index.vue +152 -0
- package/dist/runtime/editor/features/structure/List/Item/index.vue +7 -0
- package/dist/runtime/editor/features/structure/index.vue +178 -0
- package/dist/runtime/editor/features/templates/ManageDialog/Item.vue +3 -3
- package/dist/runtime/editor/features/templates/ManageDialog/index.vue +24 -3
- package/dist/runtime/editor/features/theme/index.vue +94 -0
- package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +34 -0
- package/dist/runtime/editor/features/tour/Overlay/index.vue +243 -13
- package/dist/runtime/editor/features/transform/Dialog/index.vue +132 -1
- package/dist/runtime/editor/features/translations/Banner/index.d.vue.ts +14 -1
- package/dist/runtime/editor/features/translations/Banner/index.vue +139 -12
- package/dist/runtime/editor/features/translations/Banner/index.vue.d.ts +14 -1
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue +272 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.d.vue.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +382 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue.d.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/csv.d.ts +22 -0
- package/dist/runtime/editor/features/translations/CsvDialog/csv.js +50 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.d.vue.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.vue +37 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.vue.d.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/po.d.ts +7 -0
- package/dist/runtime/editor/features/translations/CsvDialog/po.js +36 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.d.vue.ts +37 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue +102 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue.d.ts +37 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +294 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/translations/index.vue +276 -6
- package/dist/runtime/editor/features/translations/types.d.ts +47 -0
- package/dist/runtime/editor/features/validations/Overlay/index.vue +130 -0
- package/dist/runtime/editor/features/validations/index.vue +41 -0
- package/dist/runtime/editor/features/{assistant → workspace}/Overlay/index.d.vue.ts +2 -4
- package/dist/runtime/editor/features/workspace/Overlay/index.vue +177 -0
- package/dist/runtime/editor/features/{assistant → workspace}/Overlay/index.vue.d.ts +2 -4
- package/dist/runtime/editor/features/workspace/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/workspace/index.vue +46 -0
- package/dist/runtime/editor/features/workspace/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/workspace/types.d.ts +59 -0
- package/dist/runtime/editor/features/workspace/types.js +0 -0
- package/dist/runtime/editor/icons/svg/spinner.svg +2 -2
- package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +21 -7
- package/dist/runtime/editor/plugins/ContextMenu/index.vue +4 -0
- package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +9 -2
- package/dist/runtime/editor/plugins/ItemAction/index.vue +26 -16
- package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +9 -2
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +24 -26
- package/dist/runtime/editor/plugins/Sidebar/index.vue +612 -27
- package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +13 -84
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +36 -22
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +13 -84
- package/dist/runtime/editor/plugins/ViewOption/index.vue +13 -14
- package/dist/runtime/editor/providers/blocks.js +1 -0
- package/dist/runtime/editor/providers/cache.d.ts +23 -0
- package/dist/runtime/editor/providers/cache.js +29 -0
- package/dist/runtime/editor/providers/directive.d.ts +25 -0
- package/dist/runtime/editor/providers/directive.js +20 -0
- package/dist/runtime/editor/providers/fieldValue.d.ts +5 -5
- package/dist/runtime/editor/providers/fieldValue.js +8 -7
- package/dist/runtime/editor/providers/plugin.d.ts +14 -0
- package/dist/runtime/editor/providers/plugin.js +9 -0
- package/dist/runtime/editor/providers/readability.js +1 -1
- package/dist/runtime/editor/providers/selection.js +1 -1
- package/dist/runtime/editor/providers/state.d.ts +1 -0
- package/dist/runtime/editor/providers/state.js +1 -0
- package/dist/runtime/editor/providers/texts.js +11 -1
- package/dist/runtime/editor/providers/ui.d.ts +11 -0
- package/dist/runtime/editor/providers/ui.js +5 -1
- package/dist/runtime/editor/translations/de.json +316 -56
- package/dist/runtime/editor/translations/fr.json +310 -50
- package/dist/runtime/editor/translations/gsw_CH.json +311 -51
- package/dist/runtime/editor/translations/it.json +310 -50
- package/dist/runtime/editor/types/app.d.ts +2 -0
- package/dist/runtime/editor/types/definitions.d.ts +8 -0
- package/dist/runtime/editor/types/field.d.ts +1 -0
- package/dist/runtime/editor/types/state.d.ts +10 -0
- package/dist/runtime/editor/types/ui.d.ts +3 -1
- package/dist/runtime/helpers/tw.d.ts +15 -0
- package/dist/runtime/helpers/tw.js +3 -0
- package/dist/runtime/types/field.d.ts +1 -0
- package/dist/shared/{editor.DsGJIlGn.d.mts → editor.BTOBvmaz.d.mts} +20 -3
- package/dist/types.d.mts +1 -1
- package/package.json +16 -3
- package/dist/runtime/editor/features/analyze/Renderer/fragment.glsl +0 -74
- package/dist/runtime/editor/features/analyze/Renderer/index.d.vue.ts +0 -24
- package/dist/runtime/editor/features/analyze/Renderer/index.vue +0 -330
- package/dist/runtime/editor/features/analyze/Renderer/index.vue.d.ts +0 -24
- package/dist/runtime/editor/features/analyze/Renderer/vertex.glsl +0 -94
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.d.vue.ts +0 -7
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.vue +0 -17
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.vue.d.ts +0 -7
- package/dist/runtime/editor/features/assistant/Overlay/index.vue +0 -108
- package/dist/runtime/editor/features/assistant/docs.md +0 -7
- package/dist/runtime/editor/features/assistant/index.vue +0 -66
- package/dist/runtime/editor/features/assistant/types.d.ts +0 -37
- package/dist/runtime/editor/features/media-library/Library/FilterSelect/index.vue +0 -168
- package/dist/runtime/editor/providers/fieldValueAdapterTypes.d.ts +0 -13
- /package/dist/{runtime/editor/features/assistant → modules/iframes/runtime}/types.js +0 -0
- /package/dist/runtime/editor/components/Actions/{ItemDropdown.d.vue.ts → ItemDropdown/index.d.vue.ts} +0 -0
- /package/dist/runtime/editor/components/Actions/{ItemDropdown.vue.d.ts → ItemDropdown/index.vue.d.ts} +0 -0
- /package/dist/runtime/editor/{features/media-library/Library → components/PluginConfigFormInline}/FilterSelect/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/{features/media-library/Library → components/PluginConfigFormInline}/FilterSelect/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/{assistant → highlights/Renderer}/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/{assistant → highlights/Renderer}/index.vue.d.ts +0 -0
- /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
|
-
|
|
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) =>
|
|
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.
|
|
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.
|
|
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 &&
|
|
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>;
|