@blokkli/editor 2.0.0-alpha.59 → 2.0.0-alpha.61
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/module.json +1 -1
- package/dist/module.mjs +28 -11
- package/dist/modules/agent/index.mjs +2 -5
- package/dist/modules/agent/runtime/app/features/agent/Container.vue +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +15 -3
- package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +2 -1
- package/dist/modules/agent/runtime/app/helpers/mutationResult.d.ts +38 -0
- package/dist/modules/agent/runtime/app/helpers/mutationResult.js +49 -0
- package/dist/modules/agent/runtime/app/prompts/fixReadability.js +3 -3
- package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +2 -1
- package/dist/modules/agent/runtime/app/providers/agentProvider.js +6 -6
- package/dist/modules/agent/runtime/app/providers/toolsProvider.js +3 -13
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +25 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +24 -0
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +32 -0
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +6 -4
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +5 -3
- package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +3 -3
- package/dist/modules/agent/runtime/app/tools/ask_question/index.js +7 -6
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +28 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
- package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +10 -1
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +5 -3
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +31 -0
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +7 -7
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +7 -0
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +10 -0
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +3 -3
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +35 -0
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +30 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +15 -11
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +25 -0
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +8 -0
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +8 -0
- package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +81 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +20 -12
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +14 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +38 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +7 -6
- package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.d.ts +12 -0
- package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +9 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
- package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +21 -0
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +25 -5
- package/dist/modules/agent/runtime/app/tools/schemas.js +37 -10
- package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +15 -0
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +8 -7
- package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +5 -1
- package/dist/modules/agent/runtime/app/tools/search_media/index.js +3 -3
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +13 -0
- package/dist/modules/agent/runtime/app/tools/search_templates/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +15 -0
- package/dist/modules/agent/runtime/app/tools/search_text/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
- package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +2 -2
- package/dist/modules/agent/runtime/app/tools/select_media/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +13 -4
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +8 -7
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +2 -2
- package/dist/modules/agent/runtime/app/types/index.d.ts +6 -9
- package/dist/modules/agent/runtime/app/types/index.js +4 -3
- package/dist/modules/agent/runtime/server/agent.js +1 -2
- package/dist/modules/agent/runtime/server/classes/Session/index.d.ts +2 -2
- package/dist/modules/agent/runtime/server/classes/Session/index.js +10 -5
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +2 -1
- package/dist/modules/agent/runtime/shared/toolParams.d.ts +19 -0
- package/dist/modules/agent/runtime/shared/toolParams.js +6 -0
- package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
- package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
- package/dist/modules/agent/runtime/shared/types.d.ts +23 -4
- package/dist/modules/agent/runtime/shared/types.js +6 -1
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +4 -13
- package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
- package/dist/modules/drupal/index.mjs +6 -1
- package/dist/modules/drupal/runtime/adapter/index.js +38 -0
- package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/Actions/Title/index.vue +9 -8
- package/dist/runtime/editor/components/Actions/index.vue +47 -7
- package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
- package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
- package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
- package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
- package/dist/runtime/editor/components/Avatar/index.vue +0 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/Dialog/index.vue +1 -3
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/index.vue +3 -2
- package/dist/runtime/editor/components/Dropdown/index.vue +0 -39
- package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +12 -2
- package/dist/runtime/editor/components/DropdownItem/index.vue +46 -2
- package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +12 -2
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
- package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
- package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
- package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
- package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
- package/dist/runtime/editor/components/Icon/index.vue +0 -2
- package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
- package/dist/runtime/editor/components/Messages/index.vue +3 -0
- package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
- package/dist/runtime/editor/components/Popup/index.vue +0 -2
- package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
- package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
- package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
- package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
- package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
- package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
- package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/index.d.ts +1 -0
- package/dist/runtime/editor/components/index.js +1 -0
- package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
- package/dist/runtime/editor/composables/defineViewOption.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +3 -0
- package/dist/runtime/editor/composables/index.js +2 -0
- package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
- package/dist/runtime/editor/composables/useDismiss.js +43 -0
- package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +23 -0
- package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
- package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
- package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
- package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
- package/dist/runtime/editor/features/add-list/index.vue +0 -2
- package/dist/runtime/editor/features/anchors/index.vue +11 -11
- package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
- package/dist/runtime/editor/features/anchors/types.js +1 -0
- package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
- package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
- package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
- package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
- package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
- package/dist/runtime/editor/features/changelog/changelog.json +16 -0
- package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
- package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
- package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
- package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
- package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
- package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
- package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
- package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
- package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
- package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
- package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
- package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/comments/index.vue +28 -3
- package/dist/runtime/editor/features/delete/types.d.ts +1 -0
- package/dist/runtime/editor/features/delete/types.js +1 -0
- package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
- package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
- package/dist/runtime/editor/features/duplicate/types.js +1 -0
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
- package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
- package/dist/runtime/editor/features/entity-title/index.vue +0 -4
- package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
- package/dist/runtime/editor/features/grid/index.vue +16 -15
- package/dist/runtime/editor/features/grid/types.d.ts +1 -0
- package/dist/runtime/editor/features/grid/types.js +1 -0
- package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
- package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/help/index.vue +52 -47
- package/dist/runtime/editor/features/history/List/index.vue +2 -9
- package/dist/runtime/editor/features/history/types.d.ts +1 -0
- package/dist/runtime/editor/features/history/types.js +1 -0
- package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
- package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
- package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
- package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
- package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/notifications/docs.md +12 -0
- package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/notifications/index.vue +123 -0
- package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
- package/dist/runtime/editor/features/notifications/types.js +20 -0
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
- package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
- package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
- package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
- package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
- package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
- package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
- package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
- package/dist/runtime/editor/features/options/index.vue +7 -1
- package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
- package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
- package/dist/runtime/editor/features/ownership/types.js +1 -0
- package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
- package/dist/runtime/editor/features/preview-grant/types.js +1 -0
- package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
- package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
- package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
- package/dist/runtime/editor/features/revert/types.d.ts +1 -0
- package/dist/runtime/editor/features/revert/types.js +1 -0
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
- package/dist/runtime/editor/features/swap/types.d.ts +1 -0
- package/dist/runtime/editor/features/swap/types.js +1 -0
- package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
- package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
- package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
- package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
- package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
- package/dist/runtime/editor/plugins/index.d.ts +1 -2
- package/dist/runtime/editor/plugins/index.js +1 -3
- package/dist/runtime/editor/providers/fieldValue.js +11 -13
- package/dist/runtime/editor/providers/plugin.d.ts +12 -0
- package/dist/runtime/editor/providers/plugin.js +9 -0
- package/dist/runtime/editor/translations/de.json +53 -19
- package/dist/runtime/editor/translations/fr.json +16 -4
- package/dist/runtime/editor/translations/gsw_CH.json +53 -19
- package/dist/runtime/editor/translations/it.json +16 -4
- package/package.json +6 -6
- package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
- package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
- package/dist/runtime/editor/plugins/ViewOption/index.vue.d.ts +0 -139
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuids: z.ZodArray<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
+
type: z.ZodEnum<{
|
|
7
|
+
rewrite: "rewrite";
|
|
8
|
+
delete: "delete";
|
|
9
|
+
add: "add";
|
|
10
|
+
move: "move";
|
|
11
|
+
options: "options";
|
|
12
|
+
}>;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
error: z.ZodString;
|
|
16
|
+
}, z.core.$strip>]>;
|
|
1
17
|
declare const _default: any;
|
|
2
18
|
export default _default;
|
|
@@ -5,9 +5,10 @@ import {
|
|
|
5
5
|
requireBundlePermission,
|
|
6
6
|
requireNoRestrictedAncestor
|
|
7
7
|
} from "../../helpers/validation.js";
|
|
8
|
-
const paramsSchema = z.object({
|
|
8
|
+
export const paramsSchema = z.object({
|
|
9
9
|
uuids: z.array(z.string()).describe("The UUIDs of the paragraphs to delete")
|
|
10
10
|
});
|
|
11
|
+
export const resultSchema = mutationResultSchema;
|
|
11
12
|
export default defineBlokkliAgentTool({
|
|
12
13
|
name: "delete_paragraphs",
|
|
13
14
|
description: "Delete one or more paragraphs from the page.",
|
|
@@ -19,7 +20,7 @@ export default defineBlokkliAgentTool({
|
|
|
19
20
|
return $t("aiAgentDeleteBlocksRunning", "Deleting blocks", { more: true });
|
|
20
21
|
},
|
|
21
22
|
paramsSchema,
|
|
22
|
-
resultSchema
|
|
23
|
+
resultSchema,
|
|
23
24
|
requiredAdapterMethods: ["deleteBlocks"],
|
|
24
25
|
execute(ctx, params) {
|
|
25
26
|
const { blocks, types } = ctx.app;
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuids: z.ZodArray<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
+
type: z.ZodEnum<{
|
|
7
|
+
rewrite: "rewrite";
|
|
8
|
+
delete: "delete";
|
|
9
|
+
add: "add";
|
|
10
|
+
move: "move";
|
|
11
|
+
options: "options";
|
|
12
|
+
}>;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
error: z.ZodString;
|
|
16
|
+
}, z.core.$strip>]>;
|
|
1
17
|
declare const _default: any;
|
|
2
18
|
export default _default;
|
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
requireNoRestrictedAncestor
|
|
7
7
|
} from "../../helpers/validation.js";
|
|
8
8
|
import { fromLibraryBlockBundle } from "#blokkli-build/config";
|
|
9
|
-
const paramsSchema = z.object({
|
|
9
|
+
export const paramsSchema = z.object({
|
|
10
10
|
uuids: z.array(z.string()).describe("UUIDs of library paragraphs to detach")
|
|
11
11
|
});
|
|
12
|
+
export const resultSchema = mutationResultSchema;
|
|
12
13
|
export default defineBlokkliAgentTool({
|
|
13
14
|
name: "detach_reusable_paragraph",
|
|
14
15
|
description: "Detach one or more library paragraphs to create editable copies. IMPORTANT: The original library paragraph UUIDs will no longer exist after detaching. The result includes newParagraphs containing the UUIDs and bundles of the newly created editable paragraph. Use these new UUIDs for any subsequent operations.",
|
|
@@ -22,7 +23,7 @@ export default defineBlokkliAgentTool({
|
|
|
22
23
|
});
|
|
23
24
|
},
|
|
24
25
|
paramsSchema,
|
|
25
|
-
resultSchema
|
|
26
|
+
resultSchema,
|
|
26
27
|
requiredAdapterMethods: ["detachReusableBlock"],
|
|
27
28
|
execute(ctx, params) {
|
|
28
29
|
const { blocks, $t } = ctx.app;
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuids: z.ZodArray<z.ZodString>;
|
|
4
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
type: z.ZodString;
|
|
6
|
+
uuid: z.ZodString;
|
|
7
|
+
field: z.ZodString;
|
|
8
|
+
}, z.core.$strip>>;
|
|
9
|
+
position: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
|
+
type: z.ZodEnum<{
|
|
13
|
+
rewrite: "rewrite";
|
|
14
|
+
delete: "delete";
|
|
15
|
+
add: "add";
|
|
16
|
+
move: "move";
|
|
17
|
+
options: "options";
|
|
18
|
+
}>;
|
|
19
|
+
label: z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
error: z.ZodString;
|
|
22
|
+
}, z.core.$strip>]>;
|
|
1
23
|
declare const _default: any;
|
|
2
24
|
export default _default;
|
|
@@ -11,18 +11,20 @@ import {
|
|
|
11
11
|
requireNoRestrictedAncestor
|
|
12
12
|
} from "../../helpers/validation.js";
|
|
13
13
|
import { getFieldKey } from "#blokkli/helpers";
|
|
14
|
-
|
|
14
|
+
import { countNewParagraphs } from "#blokkli/agent/app/helpers/mutationResult";
|
|
15
|
+
export const paramsSchema = z.object({
|
|
15
16
|
uuids: z.array(z.string()).min(1).describe("Paragraph UUIDs to duplicate"),
|
|
16
17
|
parent: parentSchema.optional().describe("Target parent field. If omitted, duplicates in same field."),
|
|
17
18
|
position: positionSchema.describe(
|
|
18
19
|
'Where to place the duplicated paragraphs (only when parent is provided). Defaults to "end".'
|
|
19
20
|
)
|
|
20
21
|
});
|
|
22
|
+
export const resultSchema = mutationResultSchema;
|
|
21
23
|
export default defineBlokkliAgentTool({
|
|
22
24
|
name: "duplicate_paragraphs",
|
|
23
25
|
description: "Duplicate one or more paragraphs, with ALL their child paragraphs. Without parent parameter, duplicates in the same field. With parent parameter, duplicates to a different field.",
|
|
24
26
|
category: "mutation",
|
|
25
|
-
prunedSummary: (r) => r.success ? `duplicated ${r.newParagraphs
|
|
27
|
+
prunedSummary: (r) => r.success ? `duplicated ${countNewParagraphs(r.newParagraphs ?? [])} paragraphs` : "rejected",
|
|
26
28
|
modes: ["editing"],
|
|
27
29
|
lazy: true,
|
|
28
30
|
label($t) {
|
|
@@ -31,7 +33,7 @@ export default defineBlokkliAgentTool({
|
|
|
31
33
|
});
|
|
32
34
|
},
|
|
33
35
|
paramsSchema,
|
|
34
|
-
resultSchema
|
|
36
|
+
resultSchema,
|
|
35
37
|
requiredAdapterMethods: ["duplicateBlocks"],
|
|
36
38
|
execute(ctx, params) {
|
|
37
39
|
const { $t, types } = ctx.app;
|
|
@@ -1,2 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
bundle: z.ZodOptional<z.ZodString>;
|
|
4
|
+
bundles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
|
+
hasChildren: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
6
|
+
isRootLevel: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
7
|
+
nestingLevel: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
parentBundle: z.ZodOptional<z.ZodString>;
|
|
9
|
+
inField: z.ZodOptional<z.ZodString>;
|
|
10
|
+
containsText: z.ZodOptional<z.ZodString>;
|
|
11
|
+
optionEquals: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
key: z.ZodString;
|
|
13
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const resultSchema: z.ZodObject<{
|
|
18
|
+
paragraphs: z.ZodArray<z.ZodObject<{
|
|
19
|
+
uuid: z.ZodString;
|
|
20
|
+
bundle: z.ZodString;
|
|
21
|
+
label: z.ZodString;
|
|
22
|
+
nestingLevel: z.ZodNumber;
|
|
23
|
+
parent: z.ZodObject<{
|
|
24
|
+
type: z.ZodString;
|
|
25
|
+
uuid: z.ZodString;
|
|
26
|
+
field: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
total: z.ZodNumber;
|
|
30
|
+
hasMore: z.ZodBoolean;
|
|
31
|
+
}, z.core.$strip>;
|
|
1
32
|
declare const _default: any;
|
|
2
33
|
export default _default;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
3
|
import { parentSchema } from "../schemas.js";
|
|
4
|
-
import {
|
|
4
|
+
import { optionalBooleanParam } from "../../../shared/toolParams.js";
|
|
5
5
|
import { getResolvedOptions } from "../helpers.js";
|
|
6
6
|
import {
|
|
7
7
|
getMutatedOptionValue,
|
|
8
8
|
optionValueToStorable
|
|
9
9
|
} from "#blokkli/editor/helpers/options";
|
|
10
|
-
const paramsSchema = z.object({
|
|
10
|
+
export const paramsSchema = z.object({
|
|
11
11
|
// Bundle filters
|
|
12
12
|
bundle: z.string().optional().describe("Filter by exact bundle name"),
|
|
13
13
|
bundles: z.array(z.string()).optional().describe("Filter by any of these bundles"),
|
|
14
14
|
// Structure filters
|
|
15
|
-
hasChildren:
|
|
15
|
+
hasChildren: optionalBooleanParam(
|
|
16
16
|
"Filter by whether paragraph has child paragraphs"
|
|
17
|
-
)
|
|
18
|
-
isRootLevel:
|
|
17
|
+
),
|
|
18
|
+
isRootLevel: optionalBooleanParam(
|
|
19
19
|
"Filter to root level paragraphs (nesting 0)"
|
|
20
|
-
)
|
|
20
|
+
),
|
|
21
21
|
nestingLevel: z.number().optional().describe("Filter to exact nesting level"),
|
|
22
22
|
parentBundle: z.string().optional().describe("Filter to paragraphs whose parent is this bundle"),
|
|
23
23
|
inField: z.string().optional().describe("Filter to paragraphs in a field with this name"),
|
|
@@ -38,7 +38,7 @@ const paragraphResultSchema = z.object({
|
|
|
38
38
|
nestingLevel: z.number().describe("Nesting depth (0 = root level)"),
|
|
39
39
|
parent: parentSchema.describe("The parent entity containing this paragraph")
|
|
40
40
|
});
|
|
41
|
-
const resultSchema = z.object({
|
|
41
|
+
export const resultSchema = z.object({
|
|
42
42
|
paragraphs: z.array(paragraphResultSchema).describe("paragraphs matching the filters"),
|
|
43
43
|
total: z.number().describe("Total number of matches before pagination"),
|
|
44
44
|
hasMore: z.boolean().describe("Whether there are more results beyond the limit")
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const resultSchema: z.ZodArray<z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
label: z.ZodString;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>>;
|
|
1
8
|
declare const _default: any;
|
|
2
9
|
export default _default;
|
|
@@ -5,8 +5,8 @@ const fragmentSchema = z.object({
|
|
|
5
5
|
label: z.string().describe("The display label"),
|
|
6
6
|
description: z.string().optional().describe("A short description of the fragment")
|
|
7
7
|
});
|
|
8
|
-
const paramsSchema = z.object({});
|
|
9
|
-
const resultSchema = z.array(fragmentSchema).describe("All available fragments");
|
|
8
|
+
export const paramsSchema = z.object({});
|
|
9
|
+
export const resultSchema = z.array(fragmentSchema).describe("All available fragments");
|
|
10
10
|
export default defineBlokkliAgentTool({
|
|
11
11
|
name: "get_all_fragments",
|
|
12
12
|
description: "Get all available fragments that can be added to the page",
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const resultSchema: z.ZodObject<{
|
|
4
|
+
content: z.ZodArray<z.ZodObject<{
|
|
5
|
+
uuid: z.ZodString;
|
|
6
|
+
bundle: z.ZodString;
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
referenceFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
1
11
|
declare const _default: any;
|
|
2
12
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
3
|
import { readBlockContentFields } from "../helpers.js";
|
|
4
|
-
const paramsSchema = z.object({});
|
|
4
|
+
export const paramsSchema = z.object({});
|
|
5
5
|
const blockContentSchema = z.object({
|
|
6
6
|
uuid: z.string().describe("The paragraph UUID"),
|
|
7
7
|
bundle: z.string().describe("The paragraph type"),
|
|
@@ -10,12 +10,12 @@ const blockContentSchema = z.object({
|
|
|
10
10
|
"Names of reference/link content fields on this paragraph (e.g., media fields)"
|
|
11
11
|
)
|
|
12
12
|
});
|
|
13
|
-
const resultSchema = z.object({
|
|
13
|
+
export const resultSchema = z.object({
|
|
14
14
|
content: z.array(blockContentSchema).describe("All paragraphs with their text content, flattened")
|
|
15
15
|
});
|
|
16
16
|
export default defineBlokkliAgentTool({
|
|
17
17
|
name: "get_all_page_content",
|
|
18
|
-
description: "Get
|
|
18
|
+
description: "Get a flat list of every paragraph on the page with its uuid, bundle, and the concatenated text of its OWN editable fields (does NOT follow references \u2014 a teaser appears with empty text). Use this when you need per-block uuids to act on specific blocks (translate, rewrite, delete). For any question about what the page SAYS \u2014 summarising, writing an intro that matches the content, translating the page, reviewing meaning \u2014 call `get_page_text` instead; it reads the actual rendered DOM (so teaser/referenced content is included) and returns Markdown the LLM can reason about directly.",
|
|
19
19
|
category: "query",
|
|
20
20
|
lazy: true,
|
|
21
21
|
volatile: true,
|
|
@@ -1,2 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
parentUuid: z.ZodString;
|
|
4
|
+
parentField: z.ZodString;
|
|
5
|
+
bundles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const resultSchema: z.ZodObject<{
|
|
8
|
+
fieldLabel: z.ZodString;
|
|
9
|
+
cardinality: z.ZodNumber;
|
|
10
|
+
currentCount: z.ZodNumber;
|
|
11
|
+
bundles: z.ZodArray<z.ZodObject<{
|
|
12
|
+
bundle: z.ZodString;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
description: z.ZodOptional<z.ZodString>;
|
|
15
|
+
contentFields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16
|
+
type: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
paragraphFields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
19
|
+
label: z.ZodString;
|
|
20
|
+
allowedBundles: z.ZodArray<z.ZodString>;
|
|
21
|
+
cardinality: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
24
|
+
type: z.ZodString;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
description: z.ZodOptional<z.ZodString>;
|
|
27
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
28
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
29
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
30
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
currentValue: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
nestingInfo: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
1
36
|
declare const _default: any;
|
|
2
37
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
|
3
3
|
import { getRuntimeOptionValue } from "#blokkli/runtime-helpers";
|
|
4
4
|
import { blockOptionsMapSchema } from "../schemas.js";
|
|
5
5
|
import { extractOptionLabels, getResolvedOptions } from "../helpers.js";
|
|
6
|
-
const paramsSchema = z.object({
|
|
6
|
+
export const paramsSchema = z.object({
|
|
7
7
|
parentUuid: z.string().describe("The parent entity UUID"),
|
|
8
8
|
parentField: z.string().describe("The field name on the parent"),
|
|
9
9
|
bundles: z.array(z.string()).optional().describe(
|
|
@@ -36,7 +36,7 @@ const bundleSchema = z.object({
|
|
|
36
36
|
"Available options for this bundle with their default values (only included when few bundles are returned)"
|
|
37
37
|
)
|
|
38
38
|
});
|
|
39
|
-
const resultSchema = z.object({
|
|
39
|
+
export const resultSchema = z.object({
|
|
40
40
|
fieldLabel: z.string().describe("Human-readable field label"),
|
|
41
41
|
cardinality: z.number().describe("Max paragraphs allowed (-1 = unlimited)"),
|
|
42
42
|
currentCount: z.number().describe("Current number of paragraphs in the field"),
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resultSchema: z.ZodObject<{
|
|
6
|
+
parentBundle: z.ZodString;
|
|
7
|
+
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
8
|
+
label: z.ZodString;
|
|
9
|
+
cardinality: z.ZodNumber;
|
|
10
|
+
parent: z.ZodObject<{
|
|
11
|
+
type: z.ZodString;
|
|
12
|
+
uuid: z.ZodString;
|
|
13
|
+
field: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
paragraphs: z.ZodArray<z.ZodObject<{
|
|
16
|
+
uuid: z.ZodString;
|
|
17
|
+
bundle: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
1
21
|
declare const _default: any;
|
|
2
22
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
3
|
import { parentSchema } from "../schemas.js";
|
|
4
|
-
const paramsSchema = z.object({
|
|
4
|
+
export const paramsSchema = z.object({
|
|
5
5
|
uuid: z.string().optional().describe(
|
|
6
6
|
"Paragraph UUID to get children for. If not provided, returns page-level paragraphs."
|
|
7
7
|
)
|
|
@@ -18,7 +18,7 @@ const fieldWithParagraphsSchema = z.object({
|
|
|
18
18
|
),
|
|
19
19
|
paragraphs: z.array(paragraphSchema).describe("Paragraphs in this field")
|
|
20
20
|
});
|
|
21
|
-
const resultSchema = z.object({
|
|
21
|
+
export const resultSchema = z.object({
|
|
22
22
|
parentBundle: z.string().describe("The bundle type of the parent (page or paragraph)"),
|
|
23
23
|
fields: z.record(z.string().describe("Field name"), fieldWithParagraphsSchema).describe("Fields keyed by name, each with parent object and paragraphs")
|
|
24
24
|
});
|
|
@@ -1,2 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
3
|
+
uuids: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
|
|
4
|
+
includeNested: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
|
|
5
|
+
}, z.core.$strip>>;
|
|
6
|
+
export declare const resultSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
type: z.ZodLiteral<"plain">;
|
|
8
|
+
currentValue: z.ZodString;
|
|
9
|
+
required: z.ZodBoolean;
|
|
10
|
+
maxLength: z.ZodNumber;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<"markup">;
|
|
13
|
+
currentValue: z.ZodString;
|
|
14
|
+
required: z.ZodBoolean;
|
|
15
|
+
maxLength: z.ZodNumber;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"reference">;
|
|
18
|
+
label: z.ZodString;
|
|
19
|
+
allowed: z.ZodArray<z.ZodObject<{
|
|
20
|
+
type: z.ZodString;
|
|
21
|
+
bundles: z.ZodArray<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"link">;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
allowed: z.ZodArray<z.ZodObject<{
|
|
27
|
+
type: z.ZodString;
|
|
28
|
+
bundles: z.ZodArray<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>], "type">>>;
|
|
1
31
|
declare const _default: any;
|
|
2
32
|
export default _default;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
3
|
import { readBlockContentFields } from "../helpers.js";
|
|
4
|
-
import { stringArrayParam } from "../schemas.js";
|
|
5
|
-
import {
|
|
6
|
-
const paramsSchema =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import { stringArrayParam, tolerantSingularKeys } from "../schemas.js";
|
|
5
|
+
import { booleanParamWithDefault } from "../../../shared/toolParams.js";
|
|
6
|
+
export const paramsSchema = tolerantSingularKeys(
|
|
7
|
+
z.object({
|
|
8
|
+
uuids: stringArrayParam(
|
|
9
|
+
"Array of paragraph UUIDs. To get page-level fields, pass the page UUID in this array."
|
|
10
|
+
),
|
|
11
|
+
includeNested: booleanParamWithDefault(
|
|
12
|
+
"Recursively include content fields from all nested child paragraphs (default: true). Set to false to only get direct fields.",
|
|
13
|
+
true
|
|
14
|
+
)
|
|
15
|
+
}),
|
|
16
|
+
{ uuid: "uuids" }
|
|
17
|
+
);
|
|
14
18
|
const fieldSchema = z.discriminatedUnion("type", [
|
|
15
19
|
z.object({
|
|
16
20
|
type: z.literal("plain").describe("Plain text field"),
|
|
@@ -45,7 +49,7 @@ const fieldSchema = z.discriminatedUnion("type", [
|
|
|
45
49
|
).describe("Entity types and bundles this field accepts")
|
|
46
50
|
})
|
|
47
51
|
]);
|
|
48
|
-
const resultSchema = z.record(
|
|
52
|
+
export const resultSchema = z.record(
|
|
49
53
|
z.string().describe("Paragraph UUID"),
|
|
50
54
|
z.record(z.string().describe("Field name"), fieldSchema)
|
|
51
55
|
);
|
|
@@ -1,2 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
before: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
4
|
+
after: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const resultSchema: z.ZodObject<{
|
|
7
|
+
currentIndex: z.ZodNumber;
|
|
8
|
+
totalCount: z.ZodNumber;
|
|
9
|
+
canUndo: z.ZodBoolean;
|
|
10
|
+
canRedo: z.ZodBoolean;
|
|
11
|
+
currentMutation: z.ZodNullable<z.ZodObject<{
|
|
12
|
+
index: z.ZodNumber;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
pluginId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
affectedParagraphUuid: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
mutationsBefore: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
18
|
+
index: z.ZodNumber;
|
|
19
|
+
label: z.ZodString;
|
|
20
|
+
}, z.core.$strip>>>;
|
|
21
|
+
mutationsAfter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
|
+
index: z.ZodNumber;
|
|
23
|
+
label: z.ZodString;
|
|
24
|
+
}, z.core.$strip>>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
1
26
|
declare const _default: any;
|
|
2
27
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
|
-
const paramsSchema = z.object({
|
|
3
|
+
export const paramsSchema = z.object({
|
|
4
4
|
before: z.coerce.number().optional().describe("How many mutations before current to include"),
|
|
5
5
|
after: z.coerce.number().optional().describe("How many mutations after current to include (redo-able)")
|
|
6
6
|
});
|
|
@@ -14,7 +14,7 @@ const currentMutationSchema = z.object({
|
|
|
14
14
|
pluginId: z.string().optional().describe("Internal plugin ID"),
|
|
15
15
|
affectedParagraphUuid: z.string().optional().describe("UUID of the paragraph that was affected")
|
|
16
16
|
});
|
|
17
|
-
const resultSchema = z.object({
|
|
17
|
+
export const resultSchema = z.object({
|
|
18
18
|
currentIndex: z.number().describe("Current position in history (-1 = pristine state)"),
|
|
19
19
|
totalCount: z.number().describe("Total mutations in history"),
|
|
20
20
|
canUndo: z.boolean().describe("Whether undo is possible"),
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resultSchema: z.ZodObject<{
|
|
6
|
+
totalParagraphs: z.ZodNumber;
|
|
7
|
+
structure: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
1
9
|
declare const _default: any;
|
|
2
10
|
export default _default;
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
buildBlock,
|
|
6
6
|
countBlocks
|
|
7
7
|
} from "#blokkli/agent/app/helpers/pageStructure";
|
|
8
|
-
const paramsSchema = z.object({
|
|
8
|
+
export const paramsSchema = z.object({
|
|
9
9
|
uuid: z.string().optional().describe(
|
|
10
10
|
"UUID of a specific paragraph. When provided, returns only that paragraph and its subtree. Omit to get the full page structure."
|
|
11
11
|
)
|
|
12
12
|
});
|
|
13
|
-
const resultSchema = z.object({
|
|
13
|
+
export const resultSchema = z.object({
|
|
14
14
|
totalParagraphs: z.number().describe(
|
|
15
15
|
"Total number of paragraphs in scope (full page or subtree when uuid is given)"
|
|
16
16
|
),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const resultSchema: z.ZodObject<{
|
|
4
|
+
text: z.ZodString;
|
|
5
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
declare const _default: any;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
|
+
export const paramsSchema = z.object({});
|
|
4
|
+
export const resultSchema = z.object({
|
|
5
|
+
text: z.string().describe(
|
|
6
|
+
"The page rendered as Markdown \u2014 exactly what the user sees, in reading order"
|
|
7
|
+
),
|
|
8
|
+
truncated: z.boolean().optional().describe("True when the Markdown exceeded the size cap and was cut off")
|
|
9
|
+
});
|
|
10
|
+
const MAX_LENGTH = 5e4;
|
|
11
|
+
const STRIP_SELECTOR = [
|
|
12
|
+
"[hidden]",
|
|
13
|
+
'[aria-hidden="true"]',
|
|
14
|
+
'[data-bk-is-muted="true"]',
|
|
15
|
+
"style",
|
|
16
|
+
"script"
|
|
17
|
+
].join(", ");
|
|
18
|
+
export default defineBlokkliAgentTool({
|
|
19
|
+
name: "get_page_text",
|
|
20
|
+
description: 'Get the rendered page as Markdown \u2014 exactly what the user sees, in reading order, with headings/lists/tables preserved and content from referenced entities (teasers, etc.) included because it reads from the actual DOM. ALWAYS PREFER this over `get_all_page_content` for any question about page meaning or content ("what does this page say", "summarize the page", "write an intro that matches the content", "translate the page"). Reach for `get_all_page_content` only when you need per-block UUIDs to act on specific blocks.',
|
|
21
|
+
category: "query",
|
|
22
|
+
lazy: true,
|
|
23
|
+
volatile: true,
|
|
24
|
+
prunedSummary: (r) => `${r.text?.length ?? 0} chars of page text`,
|
|
25
|
+
modes: ["readonly", "editing", "translating", "review"],
|
|
26
|
+
label($t) {
|
|
27
|
+
return $t("aiAgentGetPageTextRunning", "Reading page content", {
|
|
28
|
+
more: true
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
paramsSchema,
|
|
32
|
+
resultSchema,
|
|
33
|
+
async execute(ctx) {
|
|
34
|
+
const { ui, $t } = ctx.app;
|
|
35
|
+
const clone = ui.providerElement.cloneNode(true);
|
|
36
|
+
for (const el of Array.from(clone.querySelectorAll(STRIP_SELECTOR))) {
|
|
37
|
+
el.remove();
|
|
38
|
+
}
|
|
39
|
+
const { default: TurndownService } = await import("turndown");
|
|
40
|
+
const turndown = new TurndownService({
|
|
41
|
+
headingStyle: "atx",
|
|
42
|
+
codeBlockStyle: "fenced",
|
|
43
|
+
bulletListMarker: "-"
|
|
44
|
+
});
|
|
45
|
+
const REMOVED_TAGS = /* @__PURE__ */ new Set([
|
|
46
|
+
"SVG",
|
|
47
|
+
"IFRAME",
|
|
48
|
+
"PICTURE",
|
|
49
|
+
"VIDEO",
|
|
50
|
+
"AUDIO",
|
|
51
|
+
"CANVAS"
|
|
52
|
+
]);
|
|
53
|
+
turndown.remove((node) => REMOVED_TAGS.has(node.nodeName));
|
|
54
|
+
let text = turndown.turndown(clone.innerHTML).trim();
|
|
55
|
+
let truncated = false;
|
|
56
|
+
if (text.length > MAX_LENGTH) {
|
|
57
|
+
text = text.slice(0, MAX_LENGTH) + "\n\n[TRUNCATED]";
|
|
58
|
+
truncated = true;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
label: $t("aiAgentGetPageTextDone", "Read page content"),
|
|
62
|
+
result: truncated ? { text, truncated } : { text }
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|