@blokkli/editor 2.0.0-alpha.63 → 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/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +108 -5
- 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/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/index.vue +1 -1
- package/dist/modules/agent/runtime/app/features/agent/index.vue +1 -1
- 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/index.d.ts +1 -1
- 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.js +1 -3
- 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 +2 -2
- 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/index.d.ts +3 -3
- package/dist/modules/agent/runtime/server/classes/FieldStreamParser/index.js +10 -15
- 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/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/CsvImport/OutputPreviewTable/index.vue +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/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +5 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.js +3 -0
- 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/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.vue +1 -1
- package/dist/runtime/editor/components/Dialog/index.vue +1 -1
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +1 -1
- package/dist/runtime/editor/components/DiffApproval/types.js +1 -3
- 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 +1 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +2 -2
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +1 -0
- 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/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 +1 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +2 -1
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +1 -0
- 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/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/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/index.vue +1 -1
- 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 +8 -0
- 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/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/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/diff/index.d.ts +11 -0
- package/dist/runtime/editor/helpers/diff/index.js +13 -7
- 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/index.vue +1 -1
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +1 -1
- package/dist/runtime/editor/providers/animation.d.ts +2 -0
- 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 +8 -0
- package/dist/runtime/editor/providers/state.js +3 -0
- package/dist/runtime/editor/translations/de.json +2 -0
- package/dist/runtime/editor/translations/fr.json +2 -0
- package/dist/runtime/editor/translations/gsw_CH.json +2 -0
- package/dist/runtime/editor/translations/it.json +2 -0
- package/dist/runtime/editor/types/state.d.ts +7 -0
- package/dist/runtime/editor/types/ui.d.ts +1 -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
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
import type { DefinitionString } from '../../../../../../global/types/blockOptions.js';
|
|
1
2
|
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
3
4
|
declare const __VLS_export: import("vue").DefineComponent<{
|
|
4
5
|
label: string;
|
|
5
6
|
modelValue?: string;
|
|
6
7
|
type?: string;
|
|
8
|
+
placeholder?: DefinitionString;
|
|
7
9
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
10
|
"update:modelValue": (...args: any[]) => void;
|
|
9
11
|
}, string, import("vue").PublicProps, Readonly<{
|
|
10
12
|
label: string;
|
|
11
13
|
modelValue?: string;
|
|
12
14
|
type?: string;
|
|
15
|
+
placeholder?: DefinitionString;
|
|
13
16
|
}> & Readonly<{
|
|
14
17
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
15
18
|
}>, {
|
|
16
19
|
type: string;
|
|
20
|
+
placeholder: DefinitionString;
|
|
17
21
|
modelValue: string;
|
|
18
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
};
|
|
91
91
|
</script>
|
|
92
92
|
|
|
93
|
-
<style>/*! tailwindcss v4.
|
|
93
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
94
94
|
.bk .bk-blokkli-item-options {
|
|
95
95
|
display: flex;
|
|
96
96
|
min-width: 100vw;
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}"
|
|
59
59
|
>
|
|
60
60
|
<div v-if="isSuccess">
|
|
61
|
-
<StatusIndicator :status="newStatusPropValue"
|
|
61
|
+
<StatusIndicator :status="newStatusPropValue" />
|
|
62
62
|
</div>
|
|
63
63
|
<div v-else-if="isSelected && isMutating">
|
|
64
64
|
<Icon
|
|
@@ -67,13 +67,10 @@
|
|
|
67
67
|
/>
|
|
68
68
|
</div>
|
|
69
69
|
<div v-else-if="isSelected">
|
|
70
|
-
<StatusIndicator
|
|
71
|
-
:status="isCurrentlyPublished ? 'success' : 'error'"
|
|
72
|
-
class="_bk_mx-0"
|
|
73
|
-
/>
|
|
70
|
+
<StatusIndicator :status="isCurrentlyPublished ? 'success' : 'error'" />
|
|
74
71
|
<template v-if="newStatus.status !== isCurrentlyPublished">
|
|
75
72
|
<Icon name="arrow-right-thin" class="_bk_[&_svg]:size-15" />
|
|
76
|
-
<StatusIndicator :status="newStatusPropValue"
|
|
73
|
+
<StatusIndicator :status="newStatusPropValue" />
|
|
77
74
|
</template>
|
|
78
75
|
</div>
|
|
79
76
|
</td>
|
|
@@ -167,7 +164,7 @@ const newStatusPropValue = computed(() => {
|
|
|
167
164
|
});
|
|
168
165
|
</script>
|
|
169
166
|
|
|
170
|
-
<style>/*! tailwindcss v4.
|
|
167
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
171
168
|
.bk tr.bk-is-success input:checked + span:before {
|
|
172
169
|
background-color: rgb(var(--bk-theme-lime-normal) / 1) !important;
|
|
173
170
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
>
|
|
27
27
|
<Icon :name="icon" />
|
|
28
28
|
<div
|
|
29
|
-
class="_bk_absolute
|
|
29
|
+
class="_bk_absolute _bk_top-[-1px] _bk_right-[-9px] _bk_size-20 _bk_rounded-full _bk_bg-mono-950 _bk_flex _bk_items-center _bk_justify-center _bk_[&_.bk-icon_svg]:size-[13px] _bk_[&_.bk-icon_svg]:fill-white"
|
|
30
30
|
:class="isChecked ? '_bk_visible' : '_bk_invisible'"
|
|
31
31
|
>
|
|
32
32
|
<Icon name="bk_mdi_check" />
|
|
@@ -169,7 +169,7 @@ export default {
|
|
|
169
169
|
};
|
|
170
170
|
</script>
|
|
171
171
|
|
|
172
|
-
<style>/*! tailwindcss v4.
|
|
172
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
173
173
|
.bk.bk-search {
|
|
174
174
|
pointer-events: auto;
|
|
175
175
|
position: absolute;
|
|
@@ -620,7 +620,7 @@ export default {
|
|
|
620
620
|
};
|
|
621
621
|
</script>
|
|
622
622
|
|
|
623
|
-
<style>/*! tailwindcss v4.
|
|
623
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
624
624
|
.bk.bk-add-button-tooltip {
|
|
625
625
|
pointer-events: none;
|
|
626
626
|
position: absolute;
|
|
@@ -125,7 +125,7 @@ const tickmarks = computed(() => {
|
|
|
125
125
|
});
|
|
126
126
|
</script>
|
|
127
127
|
|
|
128
|
-
<style>/*! tailwindcss v4.
|
|
128
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
129
129
|
.bk .bk-input-range {
|
|
130
130
|
display: block;
|
|
131
131
|
width: 100%;
|
|
@@ -126,7 +126,7 @@ defineOptions({
|
|
|
126
126
|
});
|
|
127
127
|
</script>
|
|
128
128
|
|
|
129
|
-
<style>/*! tailwindcss v4.
|
|
129
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
130
130
|
:is(.bk-vars .bk-dragging-overlay-item) [bk-structure-uuid] {
|
|
131
131
|
background-color: rgb(var(--bk-theme-mono-100) / 1) !important;
|
|
132
132
|
}
|
|
@@ -99,7 +99,7 @@ export default {
|
|
|
99
99
|
};
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
|
-
<style>/*! tailwindcss v4.
|
|
102
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
103
103
|
.bk.bk-structure {
|
|
104
104
|
height: 100%;
|
|
105
105
|
overflow: auto;
|
|
@@ -110,7 +110,7 @@ watch(page, () => {
|
|
|
110
110
|
});
|
|
111
111
|
</script>
|
|
112
112
|
|
|
113
|
-
<style>/*! tailwindcss v4.
|
|
113
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
114
114
|
.bk .bk-templates-manage {
|
|
115
115
|
min-height: 70vh;
|
|
116
116
|
}
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
109
109
|
};
|
|
110
110
|
</script>
|
|
111
111
|
|
|
112
|
-
<style>/*! tailwindcss v4.
|
|
112
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
113
113
|
.bk.bk-theme-editor {
|
|
114
114
|
container-type: inline-size;
|
|
115
115
|
}
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
};
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
|
-
<style>/*! tailwindcss v4.
|
|
27
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
28
28
|
.bk.bk-touch-action-bar {
|
|
29
29
|
pointer-events: auto;
|
|
30
30
|
position: fixed;
|
|
@@ -227,7 +227,7 @@ useAnimationFrame(() => {
|
|
|
227
227
|
});
|
|
228
228
|
</script>
|
|
229
229
|
|
|
230
|
-
<style>/*! tailwindcss v4.
|
|
230
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
231
231
|
.bk.bk-tour {
|
|
232
232
|
position: fixed;
|
|
233
233
|
top: 0px;
|
|
@@ -225,7 +225,7 @@ onBeforeUnmount(() => {
|
|
|
225
225
|
});
|
|
226
226
|
</script>
|
|
227
227
|
|
|
228
|
-
<style>/*! tailwindcss v4.
|
|
228
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
229
229
|
.bk.bk-transform-overlay {
|
|
230
230
|
pointer-events: auto;
|
|
231
231
|
position: absolute;
|
|
@@ -32,7 +32,7 @@ defineProps({
|
|
|
32
32
|
defineEmits(["toggle-all"]);
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
|
-
<style>/*! tailwindcss v4.
|
|
35
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
36
36
|
.bk .bk-csv-table {
|
|
37
37
|
border-collapse: collapse;
|
|
38
38
|
}
|
|
@@ -36,7 +36,18 @@ export type AtomicSegment = {
|
|
|
36
36
|
kind: 'atomic';
|
|
37
37
|
id: string;
|
|
38
38
|
tag: string;
|
|
39
|
+
/**
|
|
40
|
+
* The open tag of the accepted (after) state. For matched segments this can
|
|
41
|
+
* differ from `beforeOpenTag` when only attributes changed — a segment
|
|
42
|
+
* counts as changed in that case even when the inner HTML is identical.
|
|
43
|
+
*/
|
|
39
44
|
openTag: string;
|
|
45
|
+
/**
|
|
46
|
+
* The open tag of the original (before) state. Rejecting a matched segment
|
|
47
|
+
* restores this alongside `beforeHtml`. Equals `openTag` for inserted
|
|
48
|
+
* segments (which have no before state).
|
|
49
|
+
*/
|
|
50
|
+
beforeOpenTag: string;
|
|
40
51
|
closeTag: string;
|
|
41
52
|
beforeHtml: string;
|
|
42
53
|
afterHtml: string;
|
|
@@ -337,10 +337,11 @@ function atomicFromAlignment(entry, id) {
|
|
|
337
337
|
id,
|
|
338
338
|
tag: entry.after.tag,
|
|
339
339
|
openTag: entry.after.openTag,
|
|
340
|
+
beforeOpenTag: entry.before.openTag,
|
|
340
341
|
closeTag: `</${entry.after.tag}>`,
|
|
341
342
|
beforeHtml: entry.before.innerHTML,
|
|
342
343
|
afterHtml: entry.after.innerHTML,
|
|
343
|
-
changed: entry.before.innerHTML !== entry.after.innerHTML,
|
|
344
|
+
changed: entry.before.innerHTML !== entry.after.innerHTML || entry.before.openTag !== entry.after.openTag,
|
|
344
345
|
status: "matched"
|
|
345
346
|
};
|
|
346
347
|
}
|
|
@@ -350,6 +351,7 @@ function atomicFromAlignment(entry, id) {
|
|
|
350
351
|
id,
|
|
351
352
|
tag: entry.before.tag,
|
|
352
353
|
openTag: entry.before.openTag,
|
|
354
|
+
beforeOpenTag: entry.before.openTag,
|
|
353
355
|
closeTag: `</${entry.before.tag}>`,
|
|
354
356
|
beforeHtml: entry.before.innerHTML,
|
|
355
357
|
afterHtml: "",
|
|
@@ -362,6 +364,7 @@ function atomicFromAlignment(entry, id) {
|
|
|
362
364
|
id,
|
|
363
365
|
tag: entry.after.tag,
|
|
364
366
|
openTag: entry.after.openTag,
|
|
367
|
+
beforeOpenTag: entry.after.openTag,
|
|
365
368
|
closeTag: `</${entry.after.tag}>`,
|
|
366
369
|
beforeHtml: "",
|
|
367
370
|
afterHtml: entry.after.innerHTML,
|
|
@@ -379,7 +382,7 @@ export function splitIntoSegments(before, after, fieldType) {
|
|
|
379
382
|
const segments = [];
|
|
380
383
|
alignment.forEach((entry, index) => {
|
|
381
384
|
const id = String(index);
|
|
382
|
-
if (entry.type === "match" && (entry.after.tag === "ul" || entry.after.tag === "ol") && entry.before.innerHTML !== entry.after.innerHTML) {
|
|
385
|
+
if (entry.type === "match" && (entry.after.tag === "ul" || entry.after.tag === "ol") && entry.before.innerHTML !== entry.after.innerHTML && entry.before.openTag === entry.after.openTag) {
|
|
383
386
|
const beforeItems = parseListItems(entry.before.innerHTML);
|
|
384
387
|
const afterItems = parseListItems(entry.after.innerHTML);
|
|
385
388
|
if (beforeItems && afterItems) {
|
|
@@ -404,9 +407,7 @@ export function splitIntoSegments(before, after, fieldType) {
|
|
|
404
407
|
}
|
|
405
408
|
export function segmentsHaveChanges(segments) {
|
|
406
409
|
return segments.some(
|
|
407
|
-
(seg) => seg.kind === "list" ? seg.children.some(
|
|
408
|
-
(c) => c.status !== "matched" || c.beforeHtml !== c.afterHtml
|
|
409
|
-
) : seg.status !== "matched" || seg.beforeHtml !== seg.afterHtml
|
|
410
|
+
(seg) => seg.kind === "list" ? seg.children.some((c) => c.changed) : seg.changed
|
|
410
411
|
);
|
|
411
412
|
}
|
|
412
413
|
function injectAttribute(openTag, name, value) {
|
|
@@ -428,7 +429,12 @@ function renderAtomicDiffMarkup(seg, opts) {
|
|
|
428
429
|
return `${open}<del>${seg.beforeHtml}</del>${seg.closeTag}`;
|
|
429
430
|
}
|
|
430
431
|
if (!accepted) {
|
|
431
|
-
|
|
432
|
+
const beforeOpen = injectAttribute(
|
|
433
|
+
seg.beforeOpenTag,
|
|
434
|
+
"data-chunk-index",
|
|
435
|
+
seg.id
|
|
436
|
+
);
|
|
437
|
+
return `${beforeOpen}${seg.beforeHtml}${seg.closeTag}`;
|
|
432
438
|
}
|
|
433
439
|
if (opts.insertionsOnly) {
|
|
434
440
|
return `${open}<ins>${seg.afterHtml}</ins>${seg.closeTag}`;
|
|
@@ -458,7 +464,7 @@ export function reassembleValue(segments, acceptedById) {
|
|
|
458
464
|
const renderAtomic = (seg) => {
|
|
459
465
|
const accepted = isAccepted(seg.id);
|
|
460
466
|
if (seg.status === "matched") {
|
|
461
|
-
return seg.openTag +
|
|
467
|
+
return accepted ? seg.openTag + seg.afterHtml + seg.closeTag : seg.beforeOpenTag + seg.beforeHtml + seg.closeTag;
|
|
462
468
|
}
|
|
463
469
|
if (seg.status === "inserted") {
|
|
464
470
|
return accepted ? seg.openTag + seg.afterHtml + seg.closeTag : "";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BlockOptionDefinition } from '#blokkli/types/blockOptions';
|
|
2
2
|
import type { BlockDefinitionOptionsInput } from '#blokkli/types/definitions';
|
|
3
|
+
import type { DefinitionString } from '../../../../global/types/blockOptions.js';
|
|
3
4
|
export type OptionItem = {
|
|
4
5
|
property: string;
|
|
5
6
|
option: BlockOptionDefinition;
|
|
@@ -18,3 +19,4 @@ export declare function getMutatedOptionValue(mutatedOptions: Record<string, Rec
|
|
|
18
19
|
* Convert a typed option value to the string format expected by the adapter.
|
|
19
20
|
*/
|
|
20
21
|
export declare function optionValueToStorable(definition: BlockOptionDefinition, value: string | string[] | boolean | undefined | null | number): string;
|
|
22
|
+
export declare function resolveDefinitionString(definitionString: DefinitionString, langcode?: string): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defaultLanguage } from "#blokkli-build/editor-config";
|
|
1
2
|
export function getAvailableOptions(definitionOptions, globalOptionKeys, globalOptionsMap) {
|
|
2
3
|
const options = definitionOptions || {};
|
|
3
4
|
const global = (globalOptionKeys || []).reduce(
|
|
@@ -69,3 +70,23 @@ export function optionValueToStorable(definition, value) {
|
|
|
69
70
|
}
|
|
70
71
|
return "";
|
|
71
72
|
}
|
|
73
|
+
export function resolveDefinitionString(definitionString, langcode) {
|
|
74
|
+
if (!definitionString) {
|
|
75
|
+
return "";
|
|
76
|
+
}
|
|
77
|
+
if (typeof definitionString === "string") {
|
|
78
|
+
return definitionString;
|
|
79
|
+
}
|
|
80
|
+
if (langcode) {
|
|
81
|
+
const translation = definitionString[langcode];
|
|
82
|
+
if (translation) {
|
|
83
|
+
return translation;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const defaultTranslation = definitionString[defaultLanguage];
|
|
87
|
+
if (defaultTranslation) {
|
|
88
|
+
return defaultTranslation;
|
|
89
|
+
}
|
|
90
|
+
const firstValue = Object.values(definitionString)[0];
|
|
91
|
+
return firstValue ?? "";
|
|
92
|
+
}
|
|
@@ -26,6 +26,15 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
26
26
|
* Optional icon to display in the indicator.
|
|
27
27
|
*/
|
|
28
28
|
icon?: BlokkliIcon;
|
|
29
|
+
/**
|
|
30
|
+
* Keep the indicator visible when the artboard edge is close to the
|
|
31
|
+
* edge of the visible viewport.
|
|
32
|
+
*
|
|
33
|
+
* Instead of moving out of view, the indicator is shifted onto the
|
|
34
|
+
* artboard so that at least the icon remains visible. Only supported
|
|
35
|
+
* for left-positioned indicators.
|
|
36
|
+
*/
|
|
37
|
+
sticky?: boolean;
|
|
29
38
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
30
39
|
click: () => any;
|
|
31
40
|
}, string, import("vue").PublicProps, Readonly<{
|
|
@@ -53,9 +62,23 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
53
62
|
* Optional icon to display in the indicator.
|
|
54
63
|
*/
|
|
55
64
|
icon?: BlokkliIcon;
|
|
65
|
+
/**
|
|
66
|
+
* Keep the indicator visible when the artboard edge is close to the
|
|
67
|
+
* edge of the visible viewport.
|
|
68
|
+
*
|
|
69
|
+
* Instead of moving out of view, the indicator is shifted onto the
|
|
70
|
+
* artboard so that at least the icon remains visible. Only supported
|
|
71
|
+
* for left-positioned indicators.
|
|
72
|
+
*/
|
|
73
|
+
sticky?: boolean;
|
|
56
74
|
}> & Readonly<{
|
|
57
75
|
onClick?: (() => any) | undefined;
|
|
58
|
-
}>, {
|
|
76
|
+
}>, {
|
|
77
|
+
label: string;
|
|
78
|
+
icon: BlokkliIcon;
|
|
79
|
+
sticky: boolean;
|
|
80
|
+
position: "left" | "right";
|
|
81
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
59
82
|
default?: (props: {}) => any;
|
|
60
83
|
}>;
|
|
61
84
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
<Teleport to="#bk-indicators-left">
|
|
3
3
|
<div
|
|
4
4
|
ref="el"
|
|
5
|
-
class="bk-indicator-item"
|
|
5
|
+
class="bk-indicator-item _bk_absolute _bk_top-0 _bk_pointer-events-auto _bk_cursor-pointer _bk_text-mono-500 _bk_h-30 _bk_flex _bk_items-center _bk_hover:text-mono-950 _bk_group"
|
|
6
|
+
:class="{
|
|
7
|
+
'_bk_right-0 _bk_pr-10': position === 'left'
|
|
8
|
+
}"
|
|
6
9
|
@click.prevent="$emit('click')"
|
|
7
10
|
@mouseenter="onMouseEnter"
|
|
8
11
|
@mouseleave="onMouseLeave"
|
|
9
12
|
>
|
|
10
13
|
<slot>
|
|
11
|
-
<div
|
|
14
|
+
<div
|
|
15
|
+
class="bk-indicator-item-inner _bk_flex _bk_gap-10 _bk_items-center _bk_text-xs _bk_font-medium"
|
|
16
|
+
>
|
|
12
17
|
<div v-if="label">{{ label }}</div>
|
|
13
18
|
<div v-if="icon">
|
|
14
|
-
<Icon
|
|
19
|
+
<Icon
|
|
20
|
+
:name="icon"
|
|
21
|
+
class="_bk_size-20 _bk_bg-red-normal _bk_text-white _bk_p-2 _bk_rounded-full _bk_group-hover:bg-red-dark"
|
|
22
|
+
/>
|
|
15
23
|
</div>
|
|
16
24
|
</div>
|
|
17
25
|
</slot>
|
|
@@ -30,9 +38,10 @@ import { Icon } from "#blokkli/editor/components";
|
|
|
30
38
|
const props = defineProps({
|
|
31
39
|
id: { type: String, required: true },
|
|
32
40
|
uuid: { type: String, required: true },
|
|
33
|
-
label: { type: String, required: false },
|
|
34
|
-
position: { type: String, required: false },
|
|
35
|
-
icon: { type: null, required: false }
|
|
41
|
+
label: { type: String, required: false, default: void 0 },
|
|
42
|
+
position: { type: String, required: false, default: "left" },
|
|
43
|
+
icon: { type: null, required: false, default: void 0 },
|
|
44
|
+
sticky: { type: Boolean, required: false, default: false }
|
|
36
45
|
});
|
|
37
46
|
defineEmits(["click"]);
|
|
38
47
|
const { indicators } = useBlokkli();
|
|
@@ -49,7 +58,8 @@ onMounted(() => {
|
|
|
49
58
|
id: props.id,
|
|
50
59
|
uuid: props.uuid,
|
|
51
60
|
position: props.position ?? "left",
|
|
52
|
-
element: el.value
|
|
61
|
+
element: el.value,
|
|
62
|
+
sticky: props.sticky
|
|
53
63
|
});
|
|
54
64
|
}
|
|
55
65
|
});
|
|
@@ -26,6 +26,15 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
26
26
|
* Optional icon to display in the indicator.
|
|
27
27
|
*/
|
|
28
28
|
icon?: BlokkliIcon;
|
|
29
|
+
/**
|
|
30
|
+
* Keep the indicator visible when the artboard edge is close to the
|
|
31
|
+
* edge of the visible viewport.
|
|
32
|
+
*
|
|
33
|
+
* Instead of moving out of view, the indicator is shifted onto the
|
|
34
|
+
* artboard so that at least the icon remains visible. Only supported
|
|
35
|
+
* for left-positioned indicators.
|
|
36
|
+
*/
|
|
37
|
+
sticky?: boolean;
|
|
29
38
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
30
39
|
click: () => any;
|
|
31
40
|
}, string, import("vue").PublicProps, Readonly<{
|
|
@@ -53,9 +62,23 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
53
62
|
* Optional icon to display in the indicator.
|
|
54
63
|
*/
|
|
55
64
|
icon?: BlokkliIcon;
|
|
65
|
+
/**
|
|
66
|
+
* Keep the indicator visible when the artboard edge is close to the
|
|
67
|
+
* edge of the visible viewport.
|
|
68
|
+
*
|
|
69
|
+
* Instead of moving out of view, the indicator is shifted onto the
|
|
70
|
+
* artboard so that at least the icon remains visible. Only supported
|
|
71
|
+
* for left-positioned indicators.
|
|
72
|
+
*/
|
|
73
|
+
sticky?: boolean;
|
|
56
74
|
}> & Readonly<{
|
|
57
75
|
onClick?: (() => any) | undefined;
|
|
58
|
-
}>, {
|
|
76
|
+
}>, {
|
|
77
|
+
label: string;
|
|
78
|
+
icon: BlokkliIcon;
|
|
79
|
+
sticky: boolean;
|
|
80
|
+
position: "left" | "right";
|
|
81
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
59
82
|
default?: (props: {}) => any;
|
|
60
83
|
}>;
|
|
61
84
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -95,6 +95,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
95
95
|
onClick?: ((items: RenderedFieldListItem[]) => any) | undefined;
|
|
96
96
|
}>, {
|
|
97
97
|
keyCode: string;
|
|
98
|
+
description: string;
|
|
98
99
|
disabled: boolean | string;
|
|
99
100
|
icon: BlokkliIcon;
|
|
100
101
|
active: boolean;
|
|
@@ -70,7 +70,7 @@ const uuids = computed(() => selection.uuids.value);
|
|
|
70
70
|
const props = defineProps({
|
|
71
71
|
id: { type: String, required: true },
|
|
72
72
|
title: { type: String, required: true },
|
|
73
|
-
description: { type: String, required: false },
|
|
73
|
+
description: { type: String, required: false, default: void 0 },
|
|
74
74
|
disabled: { type: [Boolean, String], required: false, default: false },
|
|
75
75
|
active: { type: Boolean, required: false, default: void 0 },
|
|
76
76
|
keyCode: { type: String, required: false, default: void 0 },
|
|
@@ -95,6 +95,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
95
95
|
onClick?: ((items: RenderedFieldListItem[]) => any) | undefined;
|
|
96
96
|
}>, {
|
|
97
97
|
keyCode: string;
|
|
98
|
+
description: string;
|
|
98
99
|
disabled: boolean | string;
|
|
99
100
|
icon: BlokkliIcon;
|
|
100
101
|
active: boolean;
|
|
@@ -309,7 +309,7 @@ export default {
|
|
|
309
309
|
};
|
|
310
310
|
</script>
|
|
311
311
|
|
|
312
|
-
<style>/*! tailwindcss v4.
|
|
312
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
313
313
|
.bk-html-root {
|
|
314
314
|
--bk-sidebar-width-right: 280px;
|
|
315
315
|
--bk-toolbar-left-width: 50px;
|
|
@@ -109,7 +109,7 @@ defineOptions({
|
|
|
109
109
|
});
|
|
110
110
|
</script>
|
|
111
111
|
|
|
112
|
-
<style>/*! tailwindcss v4.
|
|
112
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
113
113
|
.bk .bk-toolbar-button {
|
|
114
114
|
display: flex;
|
|
115
115
|
height: 40px;
|
|
@@ -50,6 +50,8 @@ export type Renderer<T = RectangleBufferCollector<any>> = {
|
|
|
50
50
|
*
|
|
51
51
|
* Renderers are checked from highest to lowest zIndex.
|
|
52
52
|
* @param coord - Mouse coordinates in screen and artboard space
|
|
53
|
+
* @param coord.mouse - Coordinates in screen space
|
|
54
|
+
* @param coord.mouseArtboard - Coordinates in artboard space
|
|
53
55
|
* @returns True to claim the click and stop propagation, false/undefined to continue
|
|
54
56
|
*/
|
|
55
57
|
onClick?: (coord: {
|
|
@@ -3,7 +3,7 @@ import type { BlockDefinition, FragmentDefinition, ProviderDefinition } from '#b
|
|
|
3
3
|
import type { ValidFieldListTypes, BlockBundleWithNested, ValidProviderTypes } from '#blokkli-build/generated-types';
|
|
4
4
|
import type { DeepReadonly } from 'vue';
|
|
5
5
|
import type { BlockDefinitionOptionsInput } from '../../types/definitions.js';
|
|
6
|
-
import type { RuntimeBlockOptionArray } from '../../../global/types/blockOptions.js';
|
|
6
|
+
import type { DefinitionString, RuntimeBlockOptionArray } from '../../../global/types/blockOptions.js';
|
|
7
7
|
import type { RenderedFieldListItem } from '../types/field.js';
|
|
8
8
|
export type DefinitionProvider = {
|
|
9
9
|
/**
|
|
@@ -14,7 +14,7 @@ export type DefinitionProvider = {
|
|
|
14
14
|
* 2. Parent bundle specific (e.g., bundle__parent:accordion)
|
|
15
15
|
* 3. Default bundle definition
|
|
16
16
|
*
|
|
17
|
-
* @param
|
|
17
|
+
* @param bundleOrBlock - The block bundle name, or a rendered field list item
|
|
18
18
|
* @param fieldListType - The field list type context
|
|
19
19
|
* @param parentBundle - Optional parent block bundle for nested blocks
|
|
20
20
|
* @returns The block definition, or undefined if not found
|
|
@@ -95,5 +95,6 @@ export type DefinitionProvider = {
|
|
|
95
95
|
* Block bundles that can be added automatically without showing the form.
|
|
96
96
|
*/
|
|
97
97
|
bundlesWithAutoAdd: ComputedRef<string[]>;
|
|
98
|
+
resolveDefinitionString: (definitionString: DefinitionString) => string;
|
|
98
99
|
};
|
|
99
|
-
export default function (providerType: ValidProviderTypes): DefinitionProvider;
|
|
100
|
+
export default function (providerType: ValidProviderTypes, interfaceLanguage: ComputedRef<string>): DefinitionProvider;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { computed, ref, readonly } from "#imports";
|
|
2
2
|
import definitions from "#blokkli-build/definitions";
|
|
3
3
|
import { OPTIONS } from "#blokkli-build/runtime-options";
|
|
4
|
-
|
|
4
|
+
import { resolveDefinitionString as resolveDefinitionStringBase } from "../helpers/options/index.js";
|
|
5
|
+
export default function(providerType, interfaceLanguage) {
|
|
5
6
|
const blocks = ref(definitions.blocks);
|
|
6
7
|
const fragments = ref(definitions.fragments);
|
|
7
8
|
const providers = ref(definitions.providers);
|
|
@@ -114,6 +115,12 @@ export default function(providerType) {
|
|
|
114
115
|
return addBehaviour === "no-form" || addBehaviour.startsWith("editable:");
|
|
115
116
|
}).map((v) => v.bundle);
|
|
116
117
|
});
|
|
118
|
+
function resolveDefinitionString(definitionString) {
|
|
119
|
+
return resolveDefinitionStringBase(
|
|
120
|
+
definitionString,
|
|
121
|
+
interfaceLanguage.value
|
|
122
|
+
);
|
|
123
|
+
}
|
|
117
124
|
return {
|
|
118
125
|
getBlockDefinition,
|
|
119
126
|
getFragmentDefinition,
|
|
@@ -126,7 +133,8 @@ export default function(providerType) {
|
|
|
126
133
|
globalOptions: readonly(allGlobalOptions),
|
|
127
134
|
runtimeOptions: readonly(runtimeOptions),
|
|
128
135
|
renderKey: readonly(renderKey),
|
|
129
|
-
bundlesWithAutoAdd
|
|
136
|
+
bundlesWithAutoAdd,
|
|
137
|
+
resolveDefinitionString
|
|
130
138
|
};
|
|
131
139
|
}
|
|
132
140
|
if (import.meta.hot) {
|
|
@@ -78,6 +78,14 @@ export type StateProvider = {
|
|
|
78
78
|
* -1 indicates no mutations, 0+ indicates active mutation index.
|
|
79
79
|
*/
|
|
80
80
|
currentMutationIndex: Readonly<Ref<number>>;
|
|
81
|
+
/**
|
|
82
|
+
* Unix timestamp (in seconds) of when the edit state was last changed, or
|
|
83
|
+
* `null` if there are no changes yet. Updates after every mutation.
|
|
84
|
+
*
|
|
85
|
+
* Distinct from `publishOptions.lastChanged`, which is the published entity's
|
|
86
|
+
* change time.
|
|
87
|
+
*/
|
|
88
|
+
lastChanged: Readonly<Ref<number | null>>;
|
|
81
89
|
/**
|
|
82
90
|
* Validation violations for the current state.
|
|
83
91
|
*
|