@blokkli/editor 2.0.0-alpha.62 → 2.0.0-alpha.64
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/global/types/blockOptions.d.ts +32 -27
- package/dist/global/types/colorOptions.d.ts +16 -0
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +275 -18
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +2 -1
- package/dist/modules/agent/runtime/app/components/Attachment/PreviewCsv/index.vue +1 -1
- package/dist/modules/agent/runtime/app/components/Conversation/Item/Assistant/index.vue +14 -5
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/ConversationsTab/Item.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/Item.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/ConversationDetail.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.d.vue.ts +1 -1
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.vue.d.ts +1 -1
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +1 -1
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +1 -1
- package/dist/modules/agent/runtime/app/features/agent/Transcript/MessageContent.vue +14 -1
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +31 -13
- package/dist/modules/agent/runtime/app/features/agent/index.vue +1 -1
- package/dist/modules/agent/runtime/app/helpers/linkifyBlockUuids.d.ts +11 -0
- package/dist/modules/agent/runtime/app/helpers/linkifyBlockUuids.js +47 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +1 -1
- package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +28 -26
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +16 -1
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.d.vue.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +59 -16
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +15 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.d.ts +85 -15
- package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.js +136 -28
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +2 -2
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +6 -2
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +3 -3
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +5 -5
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +17 -7
- package/dist/modules/agent/runtime/app/tools/schemas.js +29 -12
- package/dist/modules/agent/runtime/app/tools/search_text/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.d.vue.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.vue +54 -30
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.vue.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +18 -3
- package/dist/modules/agent/runtime/server/classes/FieldStreamParser/index.js +10 -15
- package/dist/modules/agent/runtime/server/default-system-prompts/architecture.js +1 -1
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +1 -0
- package/dist/modules/agent/runtime/shared/toolParams.d.ts +3 -3
- package/dist/modules/agent/runtime/shared/types.d.ts +3 -3
- package/dist/modules/charts/index.d.mts +14 -1
- package/dist/modules/charts/index.mjs +37 -2
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +1 -1
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +12 -5
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +7 -16
- package/dist/modules/charts/runtime/features/charts/Editor/AdvancedConfigPanel/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/Field.vue +19 -9
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +7 -77
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/OutputPreviewTable/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/csvHelpers.d.ts +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +16 -8
- package/dist/modules/charts/runtime/features/charts/Editor/NumberFormatEditor/index.vue +23 -7
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +5 -6
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +1 -1
- package/dist/modules/charts/runtime/helpers/index.d.ts +2 -1
- package/dist/modules/charts/runtime/helpers/index.js +4 -2
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +5 -0
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliMutationResult.graphql +3 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.js +5 -1
- package/dist/modules/iframes/index.d.mts +1 -1
- package/dist/modules/index.d.mts +1 -1
- package/dist/modules/readability/index.d.mts +1 -1
- package/dist/modules/readability/index.mjs +2 -1
- package/dist/modules/table-of-contents/index.d.mts +1 -1
- package/dist/runtime/components/Blocks/NotImplemented/index.vue +1 -1
- package/dist/runtime/composables/useBlokkliRuntimeConfig.d.ts +50 -0
- package/dist/runtime/composables/useBlokkliRuntimeConfig.js +34 -0
- package/dist/runtime/editor/adapter/index.d.ts +2 -1
- package/dist/runtime/editor/components/Actions/Title/index.vue +1 -1
- package/dist/runtime/editor/components/Actions/index.vue +1 -1
- package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +2 -2
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/Avatar/index.vue +1 -1
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue +1 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +1 -1
- package/dist/runtime/editor/components/BlockProxy/index.vue +1 -1
- package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +1 -1
- package/dist/runtime/editor/components/BundleSelector/index.vue +1 -1
- package/dist/runtime/editor/components/ColorDropdown/index.d.vue.ts +26 -0
- package/dist/runtime/editor/components/ColorDropdown/index.vue +116 -0
- package/dist/runtime/editor/components/ColorDropdown/index.vue.d.ts +26 -0
- package/dist/runtime/editor/components/Dialog/index.vue +1 -1
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +14 -20
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +97 -52
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +14 -20
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +6 -6
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +30 -21
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +6 -6
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +19 -9
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +19 -10
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +19 -9
- package/dist/runtime/editor/components/DiffApproval/index.d.vue.ts +14 -6
- package/dist/runtime/editor/components/DiffApproval/index.vue +62 -35
- package/dist/runtime/editor/components/DiffApproval/index.vue.d.ts +14 -6
- package/dist/runtime/editor/components/DiffApproval/types.d.ts +32 -0
- package/dist/runtime/editor/components/DiffApproval/types.js +20 -0
- package/dist/runtime/editor/components/DiffViewer/State.vue +1 -1
- package/dist/runtime/editor/components/DraggableList.vue +1 -1
- package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +6 -4
- package/dist/runtime/editor/components/Dropdown/index.vue +91 -31
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +6 -4
- package/dist/runtime/editor/components/DropdownItem/index.vue +1 -1
- package/dist/runtime/editor/components/EditIndicator.vue +1 -1
- package/dist/runtime/editor/components/EditProvider.vue +2 -2
- package/dist/runtime/editor/components/FileDropHandler/index.vue +1 -1
- 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/RadioTabs/index.vue +1 -1
- package/dist/runtime/editor/components/Form/Search/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Search/index.vue +2 -2
- package/dist/runtime/editor/components/Form/Search/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/FormOverlay/index.vue +1 -1
- package/dist/runtime/editor/components/Icon/index.vue +1 -1
- package/dist/runtime/editor/components/Indicators/index.vue +31 -100
- package/dist/runtime/editor/components/Konami/Game/index.vue +1 -1
- package/dist/runtime/editor/components/Messages/index.vue +1 -1
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +3 -2
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +5 -4
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +3 -2
- package/dist/runtime/editor/components/Overlay/index.vue +1 -1
- package/dist/runtime/editor/components/Pagination/index.vue +1 -1
- package/dist/runtime/editor/components/Panel/Section/index.vue +1 -1
- package/dist/runtime/editor/components/Panel/Tabs/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Panel/Tabs/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/PluginConfigForm/index.vue +1 -1
- package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +1 -1
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +1 -1
- package/dist/runtime/editor/components/Popup/index.vue +1 -1
- package/dist/runtime/editor/components/PopupHost/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/PopupHost/index.vue +12 -0
- package/dist/runtime/editor/components/PopupHost/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
- package/dist/runtime/editor/components/RelativeTime/index.vue +7 -13
- package/dist/runtime/editor/components/Resizable/index.vue +1 -1
- package/dist/runtime/editor/components/RichText/Editor/index.vue +1 -1
- package/dist/runtime/editor/components/ScaleToFit/index.vue +1 -1
- package/dist/runtime/editor/components/SearchOverlay/index.vue +1 -1
- package/dist/runtime/editor/components/SidebarFloater/index.vue +1 -1
- package/dist/runtime/editor/components/StatusIcon/index.vue +1 -1
- package/dist/runtime/editor/components/StatusIndicator/index.vue +1 -1
- package/dist/runtime/editor/components/SystemRequirements/index.vue +1 -1
- package/dist/runtime/editor/components/Tabs/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Tabs/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +2 -1
- package/dist/runtime/editor/components/Toolbar/index.vue +1 -1
- package/dist/runtime/editor/components/Transition/Collapse/index.vue +1 -1
- package/dist/runtime/editor/components/Transition/List/index.vue +1 -1
- package/dist/runtime/editor/components/index.d.ts +2 -0
- package/dist/runtime/editor/components/index.js +2 -0
- package/dist/runtime/editor/composables/defineViewOption.js +5 -1
- package/dist/runtime/editor/composables/useStickyToolbar.js +1 -4
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
- package/dist/runtime/editor/features/add-list/index.vue +1 -1
- package/dist/runtime/editor/features/analyze/Main.vue +15 -2
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue +4 -1
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +25 -16
- package/dist/runtime/editor/features/analyze/analyzers/defaults/validations.d.ts +10 -0
- package/dist/runtime/editor/features/analyze/analyzers/defaults/validations.js +39 -0
- package/dist/runtime/editor/features/analyze/analyzers/helpers/Context.d.ts +5 -1
- package/dist/runtime/editor/features/analyze/analyzers/helpers/Context.js +5 -0
- package/dist/runtime/editor/features/analyze/index.vue +1 -2
- package/dist/runtime/editor/features/anchors/Overlay/index.vue +11 -5
- package/dist/runtime/editor/features/anchors/index.vue +2 -1
- package/dist/runtime/editor/features/artboard/Overview/index.vue +1 -1
- package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
- package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +1 -1
- package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/block-transfer/index.vue +1 -1
- package/dist/runtime/editor/features/breadcrumbs/index.vue +1 -1
- package/dist/runtime/editor/features/changelog/changelog.json +17 -1
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue +1 -1
- package/dist/runtime/editor/features/comments/AddForm/index.vue +1 -1
- package/dist/runtime/editor/features/comments/Comment/Meta/index.vue +1 -1
- package/dist/runtime/editor/features/comments/Comment/index.vue +1 -1
- package/dist/runtime/editor/features/comments/Thread/index.vue +1 -1
- package/dist/runtime/editor/features/complex-options/index.vue +1 -0
- package/dist/runtime/editor/features/debug/Main.vue +1 -1
- package/dist/runtime/editor/features/dev-mode/index.vue +1 -1
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -1
- package/dist/runtime/editor/features/dragging-overlay/index.vue +1 -1
- package/dist/runtime/editor/features/droppable-field-edit/Overlay/index.vue +1 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +1 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.d.vue.ts +1 -5
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue.d.ts +1 -5
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +1 -1
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +1 -1
- package/dist/runtime/editor/features/editable-mask/index.vue +1 -1
- package/dist/runtime/editor/features/entity-title/index.vue +17 -7
- package/dist/runtime/editor/features/help/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/help/Shortcuts/index.vue +1 -1
- package/dist/runtime/editor/features/history/List/index.vue +1 -1
- package/dist/runtime/editor/features/import-existing/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/library/index.vue +1 -0
- package/dist/runtime/editor/features/media-library/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/Item.vue +5 -12
- package/dist/runtime/editor/features/options/Form/Radios/index.d.vue.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +8 -5
- package/dist/runtime/editor/features/options/Form/Radios/index.vue.d.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Text/index.d.vue.ts +4 -0
- package/dist/runtime/editor/features/options/Form/Text/index.vue +11 -3
- package/dist/runtime/editor/features/options/Form/Text/index.vue.d.ts +4 -0
- package/dist/runtime/editor/features/options/index.vue +1 -1
- package/dist/runtime/editor/features/publish/Dialog/Item.vue +4 -7
- package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +1 -1
- package/dist/runtime/editor/features/publish/Dialog/Violations.d.vue.ts +12 -0
- package/dist/runtime/editor/features/publish/Dialog/Violations.vue +117 -0
- package/dist/runtime/editor/features/publish/Dialog/Violations.vue.d.ts +12 -0
- package/dist/runtime/editor/features/publish/Dialog/index.vue +61 -24
- package/dist/runtime/editor/features/publish/index.vue +2 -4
- package/dist/runtime/editor/features/publish/types.d.ts +0 -4
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +1 -0
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +1 -1
- package/dist/runtime/editor/features/search/index.vue +1 -1
- package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +1 -1
- package/dist/runtime/editor/features/settings/index.vue +1 -1
- package/dist/runtime/editor/features/structure/List/Item/index.vue +1 -1
- package/dist/runtime/editor/features/structure/index.vue +1 -1
- package/dist/runtime/editor/features/templates/DialogManageTemplates/Item.vue +1 -0
- package/dist/runtime/editor/features/templates/DialogManageTemplates/index.vue +1 -1
- package/dist/runtime/editor/features/theme/index.vue +1 -1
- package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +1 -1
- package/dist/runtime/editor/features/tour/Overlay/index.vue +1 -1
- package/dist/runtime/editor/features/transform/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue +1 -1
- package/dist/runtime/editor/features/workspace/index.vue +1 -1
- package/dist/runtime/editor/helpers/color/index.d.ts +7 -0
- package/dist/runtime/editor/helpers/color/index.js +14 -0
- package/dist/runtime/editor/helpers/diff/index.d.ts +98 -0
- package/dist/runtime/editor/helpers/diff/index.js +262 -0
- package/dist/runtime/editor/helpers/injections.d.ts +11 -0
- package/dist/runtime/editor/helpers/injections.js +1 -0
- package/dist/runtime/editor/helpers/options/index.d.ts +2 -0
- package/dist/runtime/editor/helpers/options/index.js +21 -0
- package/dist/runtime/editor/plugins/BlockIndicator/index.d.vue.ts +24 -1
- package/dist/runtime/editor/plugins/BlockIndicator/index.vue +17 -7
- package/dist/runtime/editor/plugins/BlockIndicator/index.vue.d.ts +24 -1
- package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +1 -0
- package/dist/runtime/editor/plugins/ItemAction/index.vue +1 -1
- package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +1 -0
- 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 +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +1 -1
- package/dist/runtime/editor/providers/analyze.js +5 -2
- package/dist/runtime/editor/providers/animation.d.ts +2 -0
- package/dist/runtime/editor/providers/config.d.ts +3 -1
- package/dist/runtime/editor/providers/config.js +46 -15
- package/dist/runtime/editor/providers/definition.d.ts +4 -3
- package/dist/runtime/editor/providers/definition.js +10 -2
- package/dist/runtime/editor/providers/plugin.d.ts +1 -0
- package/dist/runtime/editor/providers/state.d.ts +21 -0
- package/dist/runtime/editor/providers/state.js +10 -0
- package/dist/runtime/editor/translations/de.json +9 -4
- package/dist/runtime/editor/translations/fr.json +4 -4
- package/dist/runtime/editor/translations/gsw_CH.json +9 -4
- package/dist/runtime/editor/translations/it.json +4 -4
- package/dist/runtime/editor/types/state.d.ts +7 -0
- package/dist/runtime/editor/types/ui.d.ts +1 -0
- package/dist/runtime/helpers/colors.d.ts +39 -0
- package/dist/runtime/helpers/colors.js +28 -0
- package/dist/runtime/types/colors.d.ts +11 -0
- package/dist/shared/{editor.D28NbXr3.d.mts → editor.BDyiQvbV.d.mts} +434 -406
- package/dist/shared/{editor.Gu7mgJ5Q.mjs → editor.BGemL1Oh.mjs} +146 -146
- package/dist/types.d.mts +1 -1
- package/package.json +74 -82
- package/dist/runtime/editor/features/validations/Overlay/Item.d.vue.ts +0 -7
- package/dist/runtime/editor/features/validations/Overlay/Item.vue +0 -36
- package/dist/runtime/editor/features/validations/Overlay/Item.vue.d.ts +0 -7
- package/dist/runtime/editor/features/validations/Overlay/index.d.vue.ts +0 -7
- package/dist/runtime/editor/features/validations/Overlay/index.vue +0 -115
- package/dist/runtime/editor/features/validations/Overlay/index.vue.d.ts +0 -7
- package/dist/runtime/editor/features/validations/SidebarItem/index.d.vue.ts +0 -10
- package/dist/runtime/editor/features/validations/SidebarItem/index.vue +0 -41
- package/dist/runtime/editor/features/validations/SidebarItem/index.vue.d.ts +0 -10
- package/dist/runtime/editor/features/validations/index.d.vue.ts +0 -3
- package/dist/runtime/editor/features/validations/index.vue +0 -91
- package/dist/runtime/editor/features/validations/index.vue.d.ts +0 -3
- package/dist/runtime/editor/types/config.d.ts +0 -5
- /package/dist/runtime/{editor/types/config.js → types/colors.js} +0 -0
|
@@ -6,6 +6,141 @@ import { ColorOption } from '../../dist/global/types/colorOptions.js';
|
|
|
6
6
|
import { Resolver } from '@nuxt/kit';
|
|
7
7
|
import { FeatureDefinitionBase } from '../../dist/global/types/features.js';
|
|
8
8
|
|
|
9
|
+
declare class FileCache {
|
|
10
|
+
private cache;
|
|
11
|
+
private existingFiles;
|
|
12
|
+
/**
|
|
13
|
+
* Read a file from disk.
|
|
14
|
+
*/
|
|
15
|
+
read(filePath: string): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Delete a file.
|
|
18
|
+
*/
|
|
19
|
+
delete(filePath: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Check if a file exists.
|
|
22
|
+
*/
|
|
23
|
+
fileExists(filePath: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Handles the builder watch event.
|
|
26
|
+
*/
|
|
27
|
+
handleWatchEvent(event: WatchEvent, filePath: string): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
type ExtractedFeatureDefinition = {
|
|
31
|
+
id: string;
|
|
32
|
+
componentName: string;
|
|
33
|
+
componentPath: string;
|
|
34
|
+
definition: FeatureDefinitionBase;
|
|
35
|
+
definitionSource: string;
|
|
36
|
+
};
|
|
37
|
+
declare class CollectedFeatureFile extends CollectedFile {
|
|
38
|
+
private definition;
|
|
39
|
+
private composableName;
|
|
40
|
+
private enabled;
|
|
41
|
+
private objectLiteral;
|
|
42
|
+
getDefinition(): ExtractedFeatureDefinition | null;
|
|
43
|
+
handleChange(): Promise<boolean>;
|
|
44
|
+
isEnabled(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Disable the feature.
|
|
47
|
+
*/
|
|
48
|
+
disable(): void;
|
|
49
|
+
}
|
|
50
|
+
declare class FeatureCollector extends Collector<CollectedFeatureFile> {
|
|
51
|
+
protected needsFileContents: boolean;
|
|
52
|
+
private disabledFeatures;
|
|
53
|
+
private srcFromModule;
|
|
54
|
+
private srcFromBlokkliDir;
|
|
55
|
+
constructor(helper: ModuleHelper);
|
|
56
|
+
getEnabledFeatures(): ExtractedFeatureDefinition[];
|
|
57
|
+
init(): Promise<void>;
|
|
58
|
+
runHooks(): void | Promise<any>;
|
|
59
|
+
createCollectedFile(filePath: string, fileContents?: string): CollectedFeatureFile;
|
|
60
|
+
applies(filePath: string): Promise<boolean>;
|
|
61
|
+
getDependencyTypes(): TemplateDependency[];
|
|
62
|
+
disableFeature(id: string): void;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare class ThemeData {
|
|
66
|
+
css: string;
|
|
67
|
+
fullTheme: Record<string, any>;
|
|
68
|
+
hasCustomTheme: boolean;
|
|
69
|
+
constructor(helper: ModuleHelper);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface AdapterExtensionDefinition {
|
|
73
|
+
namespace: string;
|
|
74
|
+
path: string;
|
|
75
|
+
}
|
|
76
|
+
interface ComplexOptionTypeDefinition {
|
|
77
|
+
id: string;
|
|
78
|
+
typeName: string;
|
|
79
|
+
typePath: string;
|
|
80
|
+
editorComponentPath: string;
|
|
81
|
+
editTitle: {
|
|
82
|
+
key: string;
|
|
83
|
+
defaultTranslation: string;
|
|
84
|
+
};
|
|
85
|
+
editorIcon: string;
|
|
86
|
+
}
|
|
87
|
+
declare class ModuleContext {
|
|
88
|
+
helper: ModuleHelper;
|
|
89
|
+
icons: IconCollector;
|
|
90
|
+
features: FeatureCollector;
|
|
91
|
+
blocks: BlockCollector;
|
|
92
|
+
theme: ThemeData;
|
|
93
|
+
private templates;
|
|
94
|
+
private templateContents;
|
|
95
|
+
private adapterExtensions;
|
|
96
|
+
private featureFragments;
|
|
97
|
+
private complexOptionTypes;
|
|
98
|
+
private cssFiles;
|
|
99
|
+
private contentPaths;
|
|
100
|
+
private additionalIcons;
|
|
101
|
+
collectors: Collector[];
|
|
102
|
+
constructor(helper: ModuleHelper, icons: IconCollector, features: FeatureCollector, blocks: BlockCollector, theme: ThemeData);
|
|
103
|
+
addCSS(filePath: string): void;
|
|
104
|
+
getCSSFiles(): string[];
|
|
105
|
+
/**
|
|
106
|
+
* Register a directory containing Vue files that should participate in
|
|
107
|
+
* blökkli's CSS build pipeline. Files in these directories will:
|
|
108
|
+
* - Have their Tailwind utility classes generated and included in the output
|
|
109
|
+
* - Have their template class names mangled (_bk_ prefix) at build time
|
|
110
|
+
* - Have their <style> blocks processed through blökkli's PostCSS pipeline
|
|
111
|
+
*
|
|
112
|
+
* @param dirPath - Absolute path to a directory containing Vue components
|
|
113
|
+
*/
|
|
114
|
+
addContentPath(dirPath: string): void;
|
|
115
|
+
getContentPaths(): string[];
|
|
116
|
+
addIcon(...names: string[]): void;
|
|
117
|
+
getAdditionalIcons(): string[];
|
|
118
|
+
addFeatureFragment(name: string): void;
|
|
119
|
+
getFeatureFragmentNames(): string[];
|
|
120
|
+
registerComplexOptionType(def: ComplexOptionTypeDefinition): void;
|
|
121
|
+
getComplexOptionTypes(): ComplexOptionTypeDefinition[];
|
|
122
|
+
registerAdapterExtension(namespace: string, path: string): void;
|
|
123
|
+
getAdapterExtensions(): AdapterExtensionDefinition[];
|
|
124
|
+
addCollector(collector: Collector): void;
|
|
125
|
+
private getTemplateContents;
|
|
126
|
+
private setTemplateContents;
|
|
127
|
+
generateTemplates(dependencies?: TemplateDependency[]): Promise<void>;
|
|
128
|
+
addTemplate(template: ModuleTemplate): void;
|
|
129
|
+
/**
|
|
130
|
+
* Add a template path to Nitro's externals.inline for server-side usage.
|
|
131
|
+
* @see https://github.com/nuxt/nuxt/issues/28995
|
|
132
|
+
*/
|
|
133
|
+
private inlineForNitro;
|
|
134
|
+
/**
|
|
135
|
+
* Register a type template without adding to globalTypeFiles.
|
|
136
|
+
*
|
|
137
|
+
* Uses addTemplate instead of addTypeTemplate to avoid Vue compiler-sfc
|
|
138
|
+
* issue where exported types from globalTypeFiles cannot be resolved.
|
|
139
|
+
* @see https://github.com/nuxt/nuxt/issues/33694
|
|
140
|
+
*/
|
|
141
|
+
private addTypeTemplate;
|
|
142
|
+
}
|
|
143
|
+
|
|
9
144
|
type TemplateCallback = (context: ModuleContext) => string | Promise<string>;
|
|
10
145
|
type TemplateDependency = 'icons' | 'features' | 'block-content' | 'block-path' | 'block-global-options' | 'agent-mcp-tools' | 'agent-server' | 'agent-prompts' | 'module-css' | 'chart-types';
|
|
11
146
|
/**
|
|
@@ -44,99 +179,323 @@ type ModuleFileTemplate = {
|
|
|
44
179
|
};
|
|
45
180
|
type ModuleTemplate = ModuleCodeTemplate | ModuleFileTemplate;
|
|
46
181
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
type BlockValidationError = ValidationError & OptionValidationError;
|
|
55
|
-
declare class CollectedBlockFile extends CollectedFile {
|
|
56
|
-
folder: string;
|
|
57
|
-
iconPath: string | null;
|
|
58
|
-
imagePath: string | null;
|
|
59
|
-
iconContents: string | null;
|
|
60
|
-
diffComponentPath: string | null;
|
|
61
|
-
proxyComponentPath: string | null;
|
|
62
|
-
type: CollectedBlockType | null;
|
|
63
|
-
definition: FragmentDefinitionInputBase | BlockDefinitionInputBase | null;
|
|
64
|
-
definitionSource: string | null;
|
|
65
|
-
hasBlokkliField: boolean;
|
|
66
|
-
identifier: string;
|
|
67
|
-
chunkName: string;
|
|
68
|
-
variations: string[];
|
|
69
|
-
private objectLiteralString;
|
|
70
|
-
private validationCache;
|
|
71
|
-
private hasSiblingFile;
|
|
72
|
-
handleChange(helper: ModuleHelper): Promise<boolean>;
|
|
182
|
+
declare class IconCollector extends Collector {
|
|
183
|
+
protected needsFileContents: boolean;
|
|
184
|
+
private srcFromModule;
|
|
185
|
+
private validMaterialIconNames;
|
|
186
|
+
private validFileIconNames;
|
|
187
|
+
constructor(helper: ModuleHelper);
|
|
188
|
+
private updateValidFileIconNames;
|
|
73
189
|
/**
|
|
74
|
-
*
|
|
75
|
-
* Results are cached and invalidated when the file changes.
|
|
190
|
+
* Load all valid Material Symbols icon names from the package.
|
|
76
191
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
192
|
+
private loadValidMaterialIconNames;
|
|
193
|
+
/**
|
|
194
|
+
* Check if a given string is a valid Material Symbols icon name.
|
|
195
|
+
*
|
|
196
|
+
* @param name - The icon name to check (should include `bk_mdi_` prefix).
|
|
197
|
+
*
|
|
198
|
+
* @returns True if the icon name is valid.
|
|
199
|
+
*/
|
|
200
|
+
isValidIconName(name: string): boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Check if a given string is a valid Material Symbols icon name.
|
|
203
|
+
*
|
|
204
|
+
* @param name - The icon name to check (should include `bk_mdi_` prefix).
|
|
205
|
+
*
|
|
206
|
+
* @returns True if the icon name is valid.
|
|
207
|
+
*/
|
|
208
|
+
isValidMaterialIconName(name: string): boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Get all valid Material Symbols icon names.
|
|
211
|
+
*
|
|
212
|
+
* @returns An array of all valid icon names (with `bk_mdi_` prefix).
|
|
213
|
+
*/
|
|
214
|
+
getValidMaterialIconNames(): string[];
|
|
215
|
+
handleWatchEvent(event: WatchEvent, filePath: string): Promise<HandleWatchEventResult>;
|
|
83
216
|
init(): Promise<void>;
|
|
84
217
|
runHooks(): void | Promise<any>;
|
|
85
|
-
createCollectedFile(filePath: string, fileContents?: string): CollectedBlockFile;
|
|
86
|
-
private findBlockForFolderFile;
|
|
87
|
-
protected handleAdd(filePath: string): Promise<boolean>;
|
|
88
|
-
protected handleUnlink(filePath: string): Promise<boolean>;
|
|
89
|
-
protected handleChange(filePath: string): Promise<boolean>;
|
|
90
218
|
applies(filePath: string): Promise<boolean>;
|
|
91
219
|
getDependencyTypes(): TemplateDependency[];
|
|
220
|
+
createCollectedFile(filePath: string, fileContents?: string): CollectedFile;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
interface ValidationInterface {
|
|
92
224
|
validate(icons: IconCollector): boolean;
|
|
93
225
|
}
|
|
94
226
|
|
|
95
|
-
type
|
|
96
|
-
typeName: string;
|
|
97
|
-
from: string;
|
|
98
|
-
};
|
|
99
|
-
type GetBundlePropsType = (name: string, definition: CollectedBlockFile) => GetBundlePropsTypeResult;
|
|
100
|
-
type BuildRelativeImports = {
|
|
101
|
-
TYPES: string;
|
|
102
|
-
TYPES_DEFINITIONS: string;
|
|
103
|
-
CONSTANTS: string;
|
|
104
|
-
ADAPTER: string;
|
|
105
|
-
TYPES_THEME: string;
|
|
106
|
-
TYPES_BLOKK_OPTIONS: string;
|
|
107
|
-
};
|
|
108
|
-
type ModuleOptionsStorageDefaults = {
|
|
227
|
+
type ModuleHelperResolvers = {
|
|
109
228
|
/**
|
|
110
|
-
*
|
|
229
|
+
* Resolver for files relative to the module src.
|
|
111
230
|
*/
|
|
112
|
-
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Options for the module.
|
|
116
|
-
*/
|
|
117
|
-
type ModuleOptions = {
|
|
231
|
+
module: Resolver;
|
|
118
232
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* These follow the same structure as <rootDir>/blokkli/ (tools/, skills/,
|
|
122
|
-
* prompts/, system-prompts/) and are scanned by collectors that support it.
|
|
123
|
-
*
|
|
124
|
-
* Modules should push to this array during alterOptions.
|
|
125
|
-
*
|
|
126
|
-
* @internal
|
|
233
|
+
* Resolver for files relative to the blökkli build directory.
|
|
127
234
|
*/
|
|
128
|
-
|
|
235
|
+
build: Resolver;
|
|
129
236
|
/**
|
|
130
|
-
*
|
|
237
|
+
* Resolver for files relative to the Nuxt app source directory.
|
|
131
238
|
*/
|
|
132
|
-
|
|
239
|
+
src: Resolver;
|
|
133
240
|
/**
|
|
134
|
-
*
|
|
241
|
+
* Resolver for the app directory.
|
|
135
242
|
*/
|
|
136
|
-
|
|
243
|
+
app: Resolver;
|
|
137
244
|
/**
|
|
138
|
-
*
|
|
139
|
-
|
|
245
|
+
* Resolver for the Nuxt app root dir.
|
|
246
|
+
*/
|
|
247
|
+
root: Resolver;
|
|
248
|
+
};
|
|
249
|
+
type ModuleHelperPaths = {
|
|
250
|
+
blokkliBuildDir: string;
|
|
251
|
+
srcDir: string;
|
|
252
|
+
editAdapter: string;
|
|
253
|
+
};
|
|
254
|
+
declare class ModuleHelper implements ValidationInterface {
|
|
255
|
+
nuxt: Nuxt;
|
|
256
|
+
logger: ConsolaInstance;
|
|
257
|
+
relativePaths: BuildRelativeImports;
|
|
258
|
+
paths: ModuleHelperPaths;
|
|
259
|
+
resolvers: ModuleHelperResolvers;
|
|
260
|
+
fileCache: FileCache;
|
|
261
|
+
readonly options: ModuleOptions;
|
|
262
|
+
/**
|
|
263
|
+
* npm packages to pre-bundle via Vite's optimizeDeps, collected from the core
|
|
264
|
+
* module and enabled sub-modules. Flushed by {@link applyBuildConfig}.
|
|
265
|
+
*/
|
|
266
|
+
private packageDependencies;
|
|
267
|
+
readonly isDev: boolean;
|
|
268
|
+
readonly isModuleBuild: boolean;
|
|
269
|
+
readonly isPrepare: boolean;
|
|
270
|
+
constructor(nuxt: Nuxt, logger: ConsolaInstance, moduleUrl: string, providedOptions: ModuleOptions);
|
|
271
|
+
/**
|
|
272
|
+
* Transform the path relative to the module's build directory.
|
|
273
|
+
*
|
|
274
|
+
* @param path - The absolute path.
|
|
275
|
+
*
|
|
276
|
+
* @returns The path relative to the module's build directory.
|
|
277
|
+
*/
|
|
278
|
+
toModuleBuildRelative(path: string): string;
|
|
279
|
+
/**
|
|
280
|
+
* Path to the editor's compiled tailwind config. Used by the SFC mangle
|
|
281
|
+
* pipeline and module CSS processing to inject `@config` so consumer-side
|
|
282
|
+
* `@apply` resolves against the editor's theme + utilities.
|
|
283
|
+
*
|
|
284
|
+
* In dist (npm install): `dist/modules/tailwind/index.mjs`. In source (this
|
|
285
|
+
* repo's playground): `tailwind.config.ts` at the repo root.
|
|
286
|
+
*/
|
|
287
|
+
getTailwindConfigPath(): string;
|
|
288
|
+
private findEditAdapterPath;
|
|
289
|
+
getChunkNames(): string[];
|
|
290
|
+
addComponent(name: string): void;
|
|
291
|
+
addComposable(name: string): void;
|
|
292
|
+
/**
|
|
293
|
+
* Register npm packages that the editor imports at runtime so Vite
|
|
294
|
+
* pre-bundles them.
|
|
295
|
+
*
|
|
296
|
+
* Without this, Vite discovers a dependency lazily on first import (often via
|
|
297
|
+
* a dynamic `import()`) and triggers a full page reload to re-optimize. The
|
|
298
|
+
* core module declares its own dependencies; optional modules (agent, charts,
|
|
299
|
+
* …) declare theirs only when enabled, so projects that don't use a module
|
|
300
|
+
* don't pre-bundle its dependencies.
|
|
301
|
+
*
|
|
302
|
+
* Collected here and flushed to the Vite config by {@link applyBuildConfig},
|
|
303
|
+
* which the core module calls once all modules have run their setup.
|
|
304
|
+
*
|
|
305
|
+
* @param names - Bare package specifiers (e.g. 'echarts', '@tiptap/core').
|
|
306
|
+
*/
|
|
307
|
+
addPackageDependency(...names: string[]): void;
|
|
308
|
+
/**
|
|
309
|
+
* Apply collected build configuration to the Nuxt/Vite config.
|
|
310
|
+
*
|
|
311
|
+
* Called once by the core module after every module's setup has run, so it
|
|
312
|
+
* sees the full set of {@link addPackageDependency} registrations.
|
|
313
|
+
*/
|
|
314
|
+
applyBuildConfig(): void;
|
|
315
|
+
addAlias(name: string, path: string): void;
|
|
316
|
+
/**
|
|
317
|
+
* Add a directory to the app TypeScript tsconfig includes.
|
|
318
|
+
*/
|
|
319
|
+
addAppTsInclude(absolutePath: string): void;
|
|
320
|
+
/**
|
|
321
|
+
* Add a directory to the server/Nitro TypeScript tsconfig includes.
|
|
322
|
+
*/
|
|
323
|
+
addServerTsInclude(absolutePath: string): void;
|
|
324
|
+
/**
|
|
325
|
+
* Add a path to Nitro's externals.inline for server-side usage.
|
|
326
|
+
* @see https://github.com/nuxt/nuxt/issues/28995
|
|
327
|
+
*/
|
|
328
|
+
inlineForNitro(path: string): void;
|
|
329
|
+
getMappedBlockBundle(bundle: string): string;
|
|
330
|
+
validate(icons: IconCollector): boolean;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
type AlterHookContext<K extends string, T extends CollectedFile> = {
|
|
334
|
+
[P in K]: T[];
|
|
335
|
+
};
|
|
336
|
+
interface ModuleHooks {
|
|
337
|
+
'blokkli:alter-features': (ctx: AlterHookContext<'features', CollectedFeatureFile>) => void | Promise<void>;
|
|
338
|
+
'blokkli:alter-icons': (ctx: AlterHookContext<'icons', CollectedFile>) => void | Promise<void>;
|
|
339
|
+
'blokkli:alter-blocks': (ctx: AlterHookContext<'blocks', CollectedBlockFile>) => void | Promise<void>;
|
|
340
|
+
}
|
|
341
|
+
declare module '@nuxt/schema' {
|
|
342
|
+
interface NuxtHooks extends ModuleHooks {
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
type HandleWatchEventResult = {
|
|
346
|
+
hasChanged: boolean;
|
|
347
|
+
};
|
|
348
|
+
type ValidationSeverity = 'error' | 'warning';
|
|
349
|
+
type ValidationError = {
|
|
350
|
+
message: string;
|
|
351
|
+
severity?: ValidationSeverity;
|
|
352
|
+
};
|
|
353
|
+
declare class CollectedFile {
|
|
354
|
+
readonly filePath: string;
|
|
355
|
+
fileContents: string;
|
|
356
|
+
constructor(filePath: string, fileContents: string);
|
|
357
|
+
handleChange(_helper: ModuleHelper): Promise<boolean>;
|
|
358
|
+
/**
|
|
359
|
+
* Validate the collected file and return any errors.
|
|
360
|
+
* Override this method in subclasses to add validation logic.
|
|
361
|
+
*/
|
|
362
|
+
validate(_icons: IconCollector): ValidationError[];
|
|
363
|
+
}
|
|
364
|
+
declare abstract class Collector<T extends CollectedFile = CollectedFile> implements ValidationInterface {
|
|
365
|
+
protected helper: ModuleHelper;
|
|
366
|
+
files: Map<string, T>;
|
|
367
|
+
protected needsFileContents: boolean;
|
|
368
|
+
constructor(helper: ModuleHelper);
|
|
369
|
+
abstract init(): Promise<any>;
|
|
370
|
+
abstract runHooks(): Promise<any> | void;
|
|
371
|
+
abstract applies(filePath: string): Promise<boolean>;
|
|
372
|
+
abstract createCollectedFile(filePath: string, fileContents?: string): T;
|
|
373
|
+
abstract getDependencyTypes(): TemplateDependency[];
|
|
374
|
+
addFile(filePath: string): Promise<void>;
|
|
375
|
+
protected handleAdd(filePath: string): Promise<boolean>;
|
|
376
|
+
protected handleChange(filePath: string): Promise<boolean>;
|
|
377
|
+
protected handleUnlink(filePath: string): Promise<boolean> | boolean;
|
|
378
|
+
private handleAddDir;
|
|
379
|
+
private handleUnlinkDir;
|
|
380
|
+
handleWatchEvent(event: WatchEvent, filePath: string): Promise<HandleWatchEventResult>;
|
|
381
|
+
/**
|
|
382
|
+
* Validate all collected files and log any errors/warnings to the console.
|
|
383
|
+
* @returns true if there are validation errors (not warnings), false otherwise.
|
|
384
|
+
*/
|
|
385
|
+
validate(icons: IconCollector): boolean;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
type OptionValidationError = {
|
|
389
|
+
message: string;
|
|
390
|
+
optionKey?: string;
|
|
391
|
+
severity?: 'error' | 'warning';
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
type CollectedBlockType = 'main' | 'context' | 'fragment' | 'provider';
|
|
395
|
+
type BlockValidationError = ValidationError & OptionValidationError;
|
|
396
|
+
declare class CollectedBlockFile extends CollectedFile {
|
|
397
|
+
folder: string;
|
|
398
|
+
iconPath: string | null;
|
|
399
|
+
imagePath: string | null;
|
|
400
|
+
iconContents: string | null;
|
|
401
|
+
diffComponentPath: string | null;
|
|
402
|
+
proxyComponentPath: string | null;
|
|
403
|
+
type: CollectedBlockType | null;
|
|
404
|
+
definition: FragmentDefinitionInputBase | BlockDefinitionInputBase | null;
|
|
405
|
+
definitionSource: string | null;
|
|
406
|
+
hasBlokkliField: boolean;
|
|
407
|
+
identifier: string;
|
|
408
|
+
chunkName: string;
|
|
409
|
+
variations: string[];
|
|
410
|
+
private objectLiteralString;
|
|
411
|
+
private validationCache;
|
|
412
|
+
private hasSiblingFile;
|
|
413
|
+
handleChange(helper: ModuleHelper): Promise<boolean>;
|
|
414
|
+
/**
|
|
415
|
+
* Validate the block definition and return any errors.
|
|
416
|
+
* Results are cached and invalidated when the file changes.
|
|
417
|
+
*/
|
|
418
|
+
validate(icons: IconCollector): BlockValidationError[];
|
|
419
|
+
}
|
|
420
|
+
declare class BlockCollector extends Collector<CollectedBlockFile> {
|
|
421
|
+
protected icons: IconCollector;
|
|
422
|
+
private patterns;
|
|
423
|
+
constructor(helper: ModuleHelper, icons: IconCollector);
|
|
424
|
+
init(): Promise<void>;
|
|
425
|
+
runHooks(): void | Promise<any>;
|
|
426
|
+
createCollectedFile(filePath: string, fileContents?: string): CollectedBlockFile;
|
|
427
|
+
private findBlockForFolderFile;
|
|
428
|
+
protected handleAdd(filePath: string): Promise<boolean>;
|
|
429
|
+
protected handleUnlink(filePath: string): Promise<boolean>;
|
|
430
|
+
protected handleChange(filePath: string): Promise<boolean>;
|
|
431
|
+
applies(filePath: string): Promise<boolean>;
|
|
432
|
+
getDependencyTypes(): TemplateDependency[];
|
|
433
|
+
validate(icons: IconCollector): boolean;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
type Blokkli = {
|
|
437
|
+
helper: ModuleHelper;
|
|
438
|
+
context: ModuleContext;
|
|
439
|
+
$t: (key: string, defaultText: string) => {
|
|
440
|
+
key: string;
|
|
441
|
+
defaultTranslation: string;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
type BlokkliModuleInit<O extends object> = {
|
|
445
|
+
alterOptions?: (options: ModuleOptions) => void;
|
|
446
|
+
setup: (app: Blokkli, options: O) => Promise<void> | void;
|
|
447
|
+
};
|
|
448
|
+
type BlokkliModule<O extends object = object> = {
|
|
449
|
+
options?: O;
|
|
450
|
+
init: BlokkliModuleInit<O>;
|
|
451
|
+
};
|
|
452
|
+
declare function defineBlokkliModule<O extends object, HasOptions = object extends O ? true : false>(init: BlokkliModuleInit<O>): HasOptions extends true ? (options?: O) => BlokkliModule<O> : (options: O) => BlokkliModule<O>;
|
|
453
|
+
|
|
454
|
+
type GetBundlePropsTypeResult = {
|
|
455
|
+
typeName: string;
|
|
456
|
+
from: string;
|
|
457
|
+
};
|
|
458
|
+
type GetBundlePropsType = (name: string, definition: CollectedBlockFile) => GetBundlePropsTypeResult;
|
|
459
|
+
type BuildRelativeImports = {
|
|
460
|
+
TYPES: string;
|
|
461
|
+
TYPES_DEFINITIONS: string;
|
|
462
|
+
CONSTANTS: string;
|
|
463
|
+
ADAPTER: string;
|
|
464
|
+
TYPES_THEME: string;
|
|
465
|
+
TYPES_BLOKK_OPTIONS: string;
|
|
466
|
+
};
|
|
467
|
+
type ModuleOptionsStorageDefaults = {
|
|
468
|
+
/**
|
|
469
|
+
* The default favorite block bundles.
|
|
470
|
+
*/
|
|
471
|
+
blockFavorites?: string[];
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* Options for the module.
|
|
475
|
+
*/
|
|
476
|
+
type ModuleOptions = {
|
|
477
|
+
/**
|
|
478
|
+
* Additional blokkli/ directories provided by modules.
|
|
479
|
+
*
|
|
480
|
+
* These follow the same structure as <rootDir>/blokkli/ (tools/, skills/,
|
|
481
|
+
* prompts/, system-prompts/) and are scanned by collectors that support it.
|
|
482
|
+
*
|
|
483
|
+
* Modules should push to this array during alterOptions.
|
|
484
|
+
*
|
|
485
|
+
* @internal
|
|
486
|
+
*/
|
|
487
|
+
blokkliDirs?: string[];
|
|
488
|
+
/**
|
|
489
|
+
* An array of blökkli modules to use.
|
|
490
|
+
*/
|
|
491
|
+
modules?: BlokkliModule<any>[];
|
|
492
|
+
/**
|
|
493
|
+
* The pattern of source files to scan for blokkli components.
|
|
494
|
+
*/
|
|
495
|
+
pattern?: string[];
|
|
496
|
+
/**
|
|
497
|
+
* Define reusable options that can be used in blokkli item components by
|
|
498
|
+
* referencing the option name.
|
|
140
499
|
*/
|
|
141
500
|
globalOptions?: BlockDefinitionOptionsInputBase;
|
|
142
501
|
/**
|
|
@@ -329,336 +688,5 @@ type ModuleOptions = {
|
|
|
329
688
|
colorOptions?: Record<string, ColorOption>;
|
|
330
689
|
};
|
|
331
690
|
|
|
332
|
-
declare class FileCache {
|
|
333
|
-
private cache;
|
|
334
|
-
private existingFiles;
|
|
335
|
-
/**
|
|
336
|
-
* Read a file from disk.
|
|
337
|
-
*/
|
|
338
|
-
read(filePath: string): Promise<string>;
|
|
339
|
-
/**
|
|
340
|
-
* Delete a file.
|
|
341
|
-
*/
|
|
342
|
-
delete(filePath: string): void;
|
|
343
|
-
/**
|
|
344
|
-
* Check if a file exists.
|
|
345
|
-
*/
|
|
346
|
-
fileExists(filePath: string): boolean;
|
|
347
|
-
/**
|
|
348
|
-
* Handles the builder watch event.
|
|
349
|
-
*/
|
|
350
|
-
handleWatchEvent(event: WatchEvent, filePath: string): Promise<void>;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
interface ValidationInterface {
|
|
354
|
-
validate(icons: IconCollector): boolean;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
type ModuleHelperResolvers = {
|
|
358
|
-
/**
|
|
359
|
-
* Resolver for files relative to the module src.
|
|
360
|
-
*/
|
|
361
|
-
module: Resolver;
|
|
362
|
-
/**
|
|
363
|
-
* Resolver for files relative to the blökkli build directory.
|
|
364
|
-
*/
|
|
365
|
-
build: Resolver;
|
|
366
|
-
/**
|
|
367
|
-
* Resolver for files relative to the Nuxt app source directory.
|
|
368
|
-
*/
|
|
369
|
-
src: Resolver;
|
|
370
|
-
/**
|
|
371
|
-
* Resolver for the app directory.
|
|
372
|
-
*/
|
|
373
|
-
app: Resolver;
|
|
374
|
-
/**
|
|
375
|
-
* Resolver for the Nuxt app root dir.
|
|
376
|
-
*/
|
|
377
|
-
root: Resolver;
|
|
378
|
-
};
|
|
379
|
-
type ModuleHelperPaths = {
|
|
380
|
-
blokkliBuildDir: string;
|
|
381
|
-
srcDir: string;
|
|
382
|
-
editAdapter: string;
|
|
383
|
-
};
|
|
384
|
-
declare class ModuleHelper implements ValidationInterface {
|
|
385
|
-
nuxt: Nuxt;
|
|
386
|
-
logger: ConsolaInstance;
|
|
387
|
-
relativePaths: BuildRelativeImports;
|
|
388
|
-
paths: ModuleHelperPaths;
|
|
389
|
-
resolvers: ModuleHelperResolvers;
|
|
390
|
-
fileCache: FileCache;
|
|
391
|
-
readonly options: ModuleOptions;
|
|
392
|
-
readonly isDev: boolean;
|
|
393
|
-
readonly isModuleBuild: boolean;
|
|
394
|
-
readonly isPrepare: boolean;
|
|
395
|
-
constructor(nuxt: Nuxt, logger: ConsolaInstance, moduleUrl: string, providedOptions: ModuleOptions);
|
|
396
|
-
/**
|
|
397
|
-
* Transform the path relative to the module's build directory.
|
|
398
|
-
*
|
|
399
|
-
* @param path - The absolute path.
|
|
400
|
-
*
|
|
401
|
-
* @returns The path relative to the module's build directory.
|
|
402
|
-
*/
|
|
403
|
-
toModuleBuildRelative(path: string): string;
|
|
404
|
-
/**
|
|
405
|
-
* Path to the editor's compiled tailwind config. Used by the SFC mangle
|
|
406
|
-
* pipeline and module CSS processing to inject `@config` so consumer-side
|
|
407
|
-
* `@apply` resolves against the editor's theme + utilities.
|
|
408
|
-
*
|
|
409
|
-
* In dist (npm install): `dist/modules/tailwind/index.mjs`. In source (this
|
|
410
|
-
* repo's playground): `tailwind.config.ts` at the repo root.
|
|
411
|
-
*/
|
|
412
|
-
getTailwindConfigPath(): string;
|
|
413
|
-
private findEditAdapterPath;
|
|
414
|
-
getChunkNames(): string[];
|
|
415
|
-
addComponent(name: string): void;
|
|
416
|
-
addComposable(name: string): void;
|
|
417
|
-
addAlias(name: string, path: string): void;
|
|
418
|
-
/**
|
|
419
|
-
* Add a directory to the app TypeScript tsconfig includes.
|
|
420
|
-
*/
|
|
421
|
-
addAppTsInclude(absolutePath: string): void;
|
|
422
|
-
/**
|
|
423
|
-
* Add a directory to the server/Nitro TypeScript tsconfig includes.
|
|
424
|
-
*/
|
|
425
|
-
addServerTsInclude(absolutePath: string): void;
|
|
426
|
-
/**
|
|
427
|
-
* Add a path to Nitro's externals.inline for server-side usage.
|
|
428
|
-
* @see https://github.com/nuxt/nuxt/issues/28995
|
|
429
|
-
*/
|
|
430
|
-
inlineForNitro(path: string): void;
|
|
431
|
-
getMappedBlockBundle(bundle: string): string;
|
|
432
|
-
validate(icons: IconCollector): boolean;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
type ExtractedFeatureDefinition = {
|
|
436
|
-
id: string;
|
|
437
|
-
componentName: string;
|
|
438
|
-
componentPath: string;
|
|
439
|
-
definition: FeatureDefinitionBase;
|
|
440
|
-
definitionSource: string;
|
|
441
|
-
};
|
|
442
|
-
declare class CollectedFeatureFile extends CollectedFile {
|
|
443
|
-
private definition;
|
|
444
|
-
private composableName;
|
|
445
|
-
private enabled;
|
|
446
|
-
private objectLiteral;
|
|
447
|
-
getDefinition(): ExtractedFeatureDefinition | null;
|
|
448
|
-
handleChange(): Promise<boolean>;
|
|
449
|
-
isEnabled(): boolean;
|
|
450
|
-
/**
|
|
451
|
-
* Disable the feature.
|
|
452
|
-
*/
|
|
453
|
-
disable(): void;
|
|
454
|
-
}
|
|
455
|
-
declare class FeatureCollector extends Collector<CollectedFeatureFile> {
|
|
456
|
-
protected needsFileContents: boolean;
|
|
457
|
-
private disabledFeatures;
|
|
458
|
-
private srcFromModule;
|
|
459
|
-
private srcFromBlokkliDir;
|
|
460
|
-
constructor(helper: ModuleHelper);
|
|
461
|
-
getEnabledFeatures(): ExtractedFeatureDefinition[];
|
|
462
|
-
init(): Promise<void>;
|
|
463
|
-
runHooks(): void | Promise<any>;
|
|
464
|
-
createCollectedFile(filePath: string, fileContents?: string): CollectedFeatureFile;
|
|
465
|
-
applies(filePath: string): Promise<boolean>;
|
|
466
|
-
getDependencyTypes(): TemplateDependency[];
|
|
467
|
-
disableFeature(id: string): void;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
type AlterHookContext<K extends string, T extends CollectedFile> = {
|
|
471
|
-
[P in K]: T[];
|
|
472
|
-
};
|
|
473
|
-
interface ModuleHooks {
|
|
474
|
-
'blokkli:alter-features': (ctx: AlterHookContext<'features', CollectedFeatureFile>) => void | Promise<void>;
|
|
475
|
-
'blokkli:alter-icons': (ctx: AlterHookContext<'icons', CollectedFile>) => void | Promise<void>;
|
|
476
|
-
'blokkli:alter-blocks': (ctx: AlterHookContext<'blocks', CollectedBlockFile>) => void | Promise<void>;
|
|
477
|
-
}
|
|
478
|
-
declare module '@nuxt/schema' {
|
|
479
|
-
interface NuxtHooks extends ModuleHooks {
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
type HandleWatchEventResult = {
|
|
483
|
-
hasChanged: boolean;
|
|
484
|
-
};
|
|
485
|
-
type ValidationSeverity = 'error' | 'warning';
|
|
486
|
-
type ValidationError = {
|
|
487
|
-
message: string;
|
|
488
|
-
severity?: ValidationSeverity;
|
|
489
|
-
};
|
|
490
|
-
declare class CollectedFile {
|
|
491
|
-
readonly filePath: string;
|
|
492
|
-
fileContents: string;
|
|
493
|
-
constructor(filePath: string, fileContents: string);
|
|
494
|
-
handleChange(_helper: ModuleHelper): Promise<boolean>;
|
|
495
|
-
/**
|
|
496
|
-
* Validate the collected file and return any errors.
|
|
497
|
-
* Override this method in subclasses to add validation logic.
|
|
498
|
-
*/
|
|
499
|
-
validate(_icons: IconCollector): ValidationError[];
|
|
500
|
-
}
|
|
501
|
-
declare abstract class Collector<T extends CollectedFile = CollectedFile> implements ValidationInterface {
|
|
502
|
-
protected helper: ModuleHelper;
|
|
503
|
-
files: Map<string, T>;
|
|
504
|
-
protected needsFileContents: boolean;
|
|
505
|
-
constructor(helper: ModuleHelper);
|
|
506
|
-
abstract init(): Promise<any>;
|
|
507
|
-
abstract runHooks(): Promise<any>;
|
|
508
|
-
abstract applies(filePath: string): Promise<boolean>;
|
|
509
|
-
abstract createCollectedFile(filePath: string, fileContents?: string): T;
|
|
510
|
-
abstract getDependencyTypes(): TemplateDependency[];
|
|
511
|
-
addFile(filePath: string): Promise<void>;
|
|
512
|
-
protected handleAdd(filePath: string): Promise<boolean>;
|
|
513
|
-
protected handleChange(filePath: string): Promise<boolean>;
|
|
514
|
-
protected handleUnlink(filePath: string): Promise<boolean> | boolean;
|
|
515
|
-
private handleAddDir;
|
|
516
|
-
private handleUnlinkDir;
|
|
517
|
-
handleWatchEvent(event: WatchEvent, filePath: string): Promise<HandleWatchEventResult>;
|
|
518
|
-
/**
|
|
519
|
-
* Validate all collected files and log any errors/warnings to the console.
|
|
520
|
-
* @returns true if there are validation errors (not warnings), false otherwise.
|
|
521
|
-
*/
|
|
522
|
-
validate(icons: IconCollector): boolean;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
declare class IconCollector extends Collector {
|
|
526
|
-
protected needsFileContents: boolean;
|
|
527
|
-
private srcFromModule;
|
|
528
|
-
private validMaterialIconNames;
|
|
529
|
-
private validFileIconNames;
|
|
530
|
-
constructor(helper: ModuleHelper);
|
|
531
|
-
private updateValidFileIconNames;
|
|
532
|
-
/**
|
|
533
|
-
* Load all valid Material Symbols icon names from the package.
|
|
534
|
-
*/
|
|
535
|
-
private loadValidMaterialIconNames;
|
|
536
|
-
/**
|
|
537
|
-
* Check if a given string is a valid Material Symbols icon name.
|
|
538
|
-
*
|
|
539
|
-
* @param name - The icon name to check (should include `bk_mdi_` prefix).
|
|
540
|
-
*
|
|
541
|
-
* @returns True if the icon name is valid.
|
|
542
|
-
*/
|
|
543
|
-
isValidIconName(name: string): boolean;
|
|
544
|
-
/**
|
|
545
|
-
* Check if a given string is a valid Material Symbols icon name.
|
|
546
|
-
*
|
|
547
|
-
* @param name - The icon name to check (should include `bk_mdi_` prefix).
|
|
548
|
-
*
|
|
549
|
-
* @returns True if the icon name is valid.
|
|
550
|
-
*/
|
|
551
|
-
isValidMaterialIconName(name: string): boolean;
|
|
552
|
-
/**
|
|
553
|
-
* Get all valid Material Symbols icon names.
|
|
554
|
-
*
|
|
555
|
-
* @returns An array of all valid icon names (with `bk_mdi_` prefix).
|
|
556
|
-
*/
|
|
557
|
-
getValidMaterialIconNames(): string[];
|
|
558
|
-
handleWatchEvent(event: WatchEvent, filePath: string): Promise<HandleWatchEventResult>;
|
|
559
|
-
init(): Promise<void>;
|
|
560
|
-
runHooks(): void | Promise<any>;
|
|
561
|
-
applies(filePath: string): Promise<boolean>;
|
|
562
|
-
getDependencyTypes(): TemplateDependency[];
|
|
563
|
-
createCollectedFile(filePath: string, fileContents?: string): CollectedFile;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
declare class ThemeData {
|
|
567
|
-
css: string;
|
|
568
|
-
fullTheme: Record<string, any>;
|
|
569
|
-
hasCustomTheme: boolean;
|
|
570
|
-
constructor(helper: ModuleHelper);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
interface AdapterExtensionDefinition {
|
|
574
|
-
namespace: string;
|
|
575
|
-
path: string;
|
|
576
|
-
}
|
|
577
|
-
interface ComplexOptionTypeDefinition {
|
|
578
|
-
id: string;
|
|
579
|
-
typeName: string;
|
|
580
|
-
typePath: string;
|
|
581
|
-
editorComponentPath: string;
|
|
582
|
-
editTitle: {
|
|
583
|
-
key: string;
|
|
584
|
-
defaultTranslation: string;
|
|
585
|
-
};
|
|
586
|
-
editorIcon: string;
|
|
587
|
-
}
|
|
588
|
-
declare class ModuleContext {
|
|
589
|
-
helper: ModuleHelper;
|
|
590
|
-
icons: IconCollector;
|
|
591
|
-
features: FeatureCollector;
|
|
592
|
-
blocks: BlockCollector;
|
|
593
|
-
theme: ThemeData;
|
|
594
|
-
private templates;
|
|
595
|
-
private templateContents;
|
|
596
|
-
private adapterExtensions;
|
|
597
|
-
private featureFragments;
|
|
598
|
-
private complexOptionTypes;
|
|
599
|
-
private cssFiles;
|
|
600
|
-
private contentPaths;
|
|
601
|
-
private additionalIcons;
|
|
602
|
-
collectors: Collector[];
|
|
603
|
-
constructor(helper: ModuleHelper, icons: IconCollector, features: FeatureCollector, blocks: BlockCollector, theme: ThemeData);
|
|
604
|
-
addCSS(filePath: string): void;
|
|
605
|
-
getCSSFiles(): string[];
|
|
606
|
-
/**
|
|
607
|
-
* Register a directory containing Vue files that should participate in
|
|
608
|
-
* blökkli's CSS build pipeline. Files in these directories will:
|
|
609
|
-
* - Have their Tailwind utility classes generated and included in the output
|
|
610
|
-
* - Have their template class names mangled (_bk_ prefix) at build time
|
|
611
|
-
* - Have their <style> blocks processed through blökkli's PostCSS pipeline
|
|
612
|
-
*
|
|
613
|
-
* @param dirPath - Absolute path to a directory containing Vue components
|
|
614
|
-
*/
|
|
615
|
-
addContentPath(dirPath: string): void;
|
|
616
|
-
getContentPaths(): string[];
|
|
617
|
-
addIcon(...names: string[]): void;
|
|
618
|
-
getAdditionalIcons(): string[];
|
|
619
|
-
addFeatureFragment(name: string): void;
|
|
620
|
-
getFeatureFragmentNames(): string[];
|
|
621
|
-
registerComplexOptionType(def: ComplexOptionTypeDefinition): void;
|
|
622
|
-
getComplexOptionTypes(): ComplexOptionTypeDefinition[];
|
|
623
|
-
registerAdapterExtension(namespace: string, path: string): void;
|
|
624
|
-
getAdapterExtensions(): AdapterExtensionDefinition[];
|
|
625
|
-
addCollector(collector: Collector): void;
|
|
626
|
-
private getTemplateContents;
|
|
627
|
-
private setTemplateContents;
|
|
628
|
-
generateTemplates(dependencies?: TemplateDependency[]): Promise<void>;
|
|
629
|
-
addTemplate(template: ModuleTemplate): void;
|
|
630
|
-
/**
|
|
631
|
-
* Add a template path to Nitro's externals.inline for server-side usage.
|
|
632
|
-
* @see https://github.com/nuxt/nuxt/issues/28995
|
|
633
|
-
*/
|
|
634
|
-
private inlineForNitro;
|
|
635
|
-
/**
|
|
636
|
-
* Register a type template without adding to globalTypeFiles.
|
|
637
|
-
*
|
|
638
|
-
* Uses addTemplate instead of addTypeTemplate to avoid Vue compiler-sfc
|
|
639
|
-
* issue where exported types from globalTypeFiles cannot be resolved.
|
|
640
|
-
* @see https://github.com/nuxt/nuxt/issues/33694
|
|
641
|
-
*/
|
|
642
|
-
private addTypeTemplate;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
type Blokkli = {
|
|
646
|
-
helper: ModuleHelper;
|
|
647
|
-
context: ModuleContext;
|
|
648
|
-
$t: (key: string, defaultText: string) => {
|
|
649
|
-
key: string;
|
|
650
|
-
defaultTranslation: string;
|
|
651
|
-
};
|
|
652
|
-
};
|
|
653
|
-
type BlokkliModuleInit<O extends object> = {
|
|
654
|
-
alterOptions?: (options: ModuleOptions) => void;
|
|
655
|
-
setup: (app: Blokkli, options: O) => Promise<void> | void;
|
|
656
|
-
};
|
|
657
|
-
type BlokkliModule<O extends object = object> = {
|
|
658
|
-
options?: O;
|
|
659
|
-
init: BlokkliModuleInit<O>;
|
|
660
|
-
};
|
|
661
|
-
declare function defineBlokkliModule<O extends object, HasOptions = object extends O ? true : false>(init: BlokkliModuleInit<O>): HasOptions extends true ? (options?: O) => BlokkliModule<O> : (options: O) => BlokkliModule<O>;
|
|
662
|
-
|
|
663
691
|
export { defineBlokkliModule as d };
|
|
664
692
|
export type { BlokkliModule as B, ModuleOptions as M, ModuleHooks as a, Blokkli as b };
|