@blokkli/editor 2.0.0-alpha.56 → 2.0.0-alpha.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/modules/agent/runtime/app/composables/index.d.ts +3 -1
  4. package/dist/modules/agent/runtime/app/composables/index.js +1 -0
  5. package/dist/modules/agent/runtime/app/composables/useAgent.d.ts +6 -0
  6. package/dist/modules/agent/runtime/app/composables/useAgent.js +11 -0
  7. package/dist/modules/agent/runtime/app/features/agent/Container.vue +83 -88
  8. package/dist/modules/agent/runtime/app/helpers/buildPageContext.d.ts +7 -0
  9. package/dist/modules/agent/runtime/app/helpers/buildPageContext.js +81 -0
  10. package/dist/modules/agent/runtime/app/helpers/index.d.ts +15 -1
  11. package/dist/modules/agent/runtime/app/helpers/index.js +16 -0
  12. package/dist/modules/agent/runtime/app/helpers/injections.d.ts +3 -0
  13. package/dist/modules/agent/runtime/app/helpers/injections.js +3 -0
  14. package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +33 -0
  15. package/dist/modules/agent/runtime/app/providers/agentProvider.js +315 -0
  16. package/dist/modules/agent/runtime/app/providers/conversationProvider.d.ts +50 -0
  17. package/dist/modules/agent/runtime/app/providers/conversationProvider.js +263 -0
  18. package/dist/modules/agent/runtime/app/providers/planProvider.d.ts +15 -0
  19. package/dist/modules/agent/runtime/app/providers/planProvider.js +34 -0
  20. package/dist/modules/agent/runtime/app/providers/socketProvider.d.ts +17 -0
  21. package/dist/modules/agent/runtime/app/providers/socketProvider.js +110 -0
  22. package/dist/modules/agent/runtime/app/providers/toolsProvider.d.ts +44 -0
  23. package/dist/modules/agent/runtime/app/providers/toolsProvider.js +298 -0
  24. package/dist/modules/agent/runtime/app/types/index.d.ts +47 -0
  25. package/dist/modules/agent/runtime/app/types/index.js +3 -1
  26. package/dist/modules/agent/runtime/server/helpers.js +2 -1
  27. package/dist/runtime/editor/components/DiffViewer/State.vue +51 -67
  28. package/dist/runtime/editor/components/EditProvider.vue +30 -10
  29. package/dist/runtime/editor/components/PreviewProvider.vue +14 -8
  30. package/dist/runtime/editor/css/output.css +1 -1
  31. package/dist/runtime/editor/events/index.d.ts +4 -3
  32. package/dist/runtime/editor/features/add-list/index.vue +2 -1
  33. package/dist/runtime/editor/features/changelog/changelog.json +8 -0
  34. package/dist/runtime/editor/features/dev-mode/index.vue +1 -10
  35. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +2 -2
  36. package/dist/runtime/editor/features/translations/index.vue +1 -0
  37. package/dist/runtime/editor/plugins/Sidebar/index.vue +9 -2
  38. package/dist/runtime/editor/providers/state.js +4 -1
  39. package/package.json +1 -1
  40. package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +0 -62
  41. package/dist/modules/agent/runtime/app/composables/agentProvider.js +0 -1048
@@ -138,8 +138,9 @@ export type AddNewBlocksEvent = {
138
138
  host: BlokkliItemHost;
139
139
  afterUuid: string | null;
140
140
  };
141
- export type UpdateMutatedFieldsEvent = {
141
+ export type UpdatePreviewStateEvent = {
142
142
  fields: MutatedField[];
143
+ mutatedEntity: Record<any, any>;
143
144
  };
144
145
  type MultiSelectStartEvent = {
145
146
  x: number;
@@ -197,7 +198,7 @@ export interface EventbusEvents {
197
198
  'dragging:move': Coord;
198
199
  'dragging:end': undefined;
199
200
  'add:block:new': AddNewBlockEvent;
200
- updateMutatedFields: UpdateMutatedFieldsEvent;
201
+ updatePreviewState: UpdatePreviewStateEvent;
201
202
  animationFrame: AnimationFrameEvent;
202
203
  message: Message;
203
204
  keyPressed: KeyPressedEvent;
@@ -286,7 +287,7 @@ export type BlokkliEventBus = Emitter<EventbusEventsType>;
286
287
  export declare const emitMessage: (message: string, type?: "success" | "error" | "warning", additional?: string | Error | unknown, replace?: boolean) => void;
287
288
  type FrameEventBusEvents = {
288
289
  selectItems: string[];
289
- mutatedFields: MutatedField[];
290
+ updatePreviewState: UpdatePreviewStateEvent;
290
291
  focus: string;
291
292
  updateOption: UpdateBlockOptionEvent;
292
293
  };
@@ -86,7 +86,8 @@ const { settings } = defineBlokkliFeature({
86
86
  default: false
87
87
  }
88
88
  },
89
- screenshot: "feature-add-list.jpg"
89
+ screenshot: "feature-add-list.jpg",
90
+ viewports: ["desktop"]
90
91
  });
91
92
  const {
92
93
  $t,
@@ -1,4 +1,12 @@
1
1
  [
2
+ {
3
+ "version": "2.0.0-alpha.57",
4
+ "date": "2026-04-29",
5
+ "body": {
6
+ "en": "<h3>Fixes</h3>\n<ul>\n<li>Added and removed text is highlighted again in the diff view on the page.</li>\n<li>The translation banner is no longer shown while the AI assistant is waiting\nfor changes to be approved.</li>\n<li>The AI assistant no longer gets stuck in the &quot;Thinking&quot; state when the\nconnection to the server is lost.</li>\n<li>In the responsive preview, changes to page content are once again updated\nautomatically.</li>\n</ul>\n",
7
+ "de": "<h3>Fehlerbehebungen</h3>\n<ul>\n<li>Hinzugefügte und entfernte Texte werden im Vergleichsmodus auf der Seite\nwieder farblich hervorgehoben.</li>\n<li>Das Sprachbanner wird nicht mehr angezeigt, während der KI-Assistent auf die\nBestätigung von Änderungen wartet.</li>\n<li>Der KI-Assistent bleibt nicht mehr im «Überlegen»-Zustand hängen, wenn die\nVerbindung zum Server unterbrochen wird.</li>\n<li>In der responsiven Vorschau werden Änderungen an Seiteninhalten wieder\nautomatisch aktualisiert</li>\n</ul>\n"
8
+ }
9
+ },
2
10
  {
3
11
  "version": "2.0.0-alpha.55",
4
12
  "date": "2026-04-20",
@@ -43,13 +43,7 @@
43
43
  </template>
44
44
 
45
45
  <script setup>
46
- import {
47
- useBlokkli,
48
- defineBlokkliFeature,
49
- ref,
50
- computed,
51
- onMounted
52
- } from "#imports";
46
+ import { useBlokkli, defineBlokkliFeature, ref, computed } from "#imports";
53
47
  import { PluginViewOption } from "#blokkli/editor/plugins";
54
48
  import { Banner, BannerInner } from "#blokkli/editor/components";
55
49
  import { addElementClasses } from "#blokkli/editor/composables";
@@ -108,9 +102,6 @@ addElementClasses(
108
102
  "bk-hide-interaction-layers",
109
103
  isEnabled
110
104
  );
111
- onMounted(() => {
112
- console.log(fieldMappingValidations.value);
113
- });
114
105
  </script>
115
106
 
116
107
  <script>
@@ -46,8 +46,8 @@ const src = computed(
46
46
  () => route.fullPath.replace("blokkliEditing", "blokkliPreview")
47
47
  );
48
48
  onBlokkliEvent(
49
- "updateMutatedFields",
50
- (e) => frameEventBus.emit("mutatedFields", e.fields)
49
+ "updatePreviewState",
50
+ (e) => frameEventBus.emit("updatePreviewState", e)
51
51
  );
52
52
  onBlokkliEvent("select", (uuids) => {
53
53
  const uuid = Array.isArray(uuids) ? uuids[0] : uuids;
@@ -52,6 +52,7 @@
52
52
  <Teleport to="#bk-banner-list">
53
53
  <Banner
54
54
  v-if="isTranslating"
55
+ v-show="!ui.isApproving.value"
55
56
  :active-language
56
57
  :show-csv="
57
58
  !!adapter.loadTextFieldValuesForLanguage && !!adapter.importTranslationsBatched
@@ -306,7 +306,7 @@ export default {
306
306
 
307
307
  <style>
308
308
  .bk-html-root {
309
- --bk-sidebar-width-right: 100vw;
309
+ --bk-sidebar-width-right: 280px;
310
310
  --bk-toolbar-left-width: 50px;
311
311
  --bk-add-item-icon-padding: 6px;
312
312
  --bk-item-icon-radius-base-toolbar: 4px;
@@ -471,10 +471,17 @@ export default {
471
471
  flex-direction: column;
472
472
  --bk-tw-bg-opacity: 1;
473
473
  background-color: rgb(255 255 255 / var(--bk-tw-bg-opacity, 1));
474
- grid-area: sidebar-right;
474
+ grid-area: viewport;
475
475
  width: var(--bk-sidebar-width-right);
476
476
  }
477
477
 
478
+ @media (min-width: 768px) {
479
+
480
+ .bk.bk-sidebar-right-wrapper {
481
+ grid-area: sidebar-right
482
+ }
483
+ }
484
+
478
485
  .bk.bk-sidebar-right-wrapper > * {
479
486
  pointer-events: auto;
480
487
  }
@@ -216,7 +216,10 @@ export default async function(eventBus, adapter, context, $t, providerKey, permi
216
216
  mutatedItemPropsUuids.forEach((uuid) => {
217
217
  mutatedItemProps[uuid] = void 0;
218
218
  });
219
- eventBus.emit("updateMutatedFields", { fields: newMutatedFields });
219
+ eventBus.emit("updatePreviewState", {
220
+ fields: newMutatedFields,
221
+ mutatedEntity: mutatedEntity.value
222
+ });
220
223
  nextTick(() => {
221
224
  refreshKey.value = Date.now().toString();
222
225
  eventBus.emit("state:reloaded");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blokkli/editor",
3
- "version": "2.0.0-alpha.56",
3
+ "version": "2.0.0-alpha.57",
4
4
  "description": "Interactive page building experience for Nuxt",
5
5
  "keywords": [
6
6
  "cms",
@@ -1,62 +0,0 @@
1
- import { type Ref } from '#imports';
2
- import { type Attachment, type ConversationItem, type ActiveItem, type MutationAction, type PreSeededToolResult, type AutoExecuteTool } from '#blokkli/agent/app/types';
3
- import type { ClientPlanState, UsageTurn, PageContext, Transcript } from '#blokkli/agent/shared/types';
4
- import type { AgentConversationSummary } from '#blokkli/agent/app/features/agent/types';
5
- import type { AgentToolName, AgentToolMap } from '#blokkli-build/agent-client';
6
- import type { BlokkliApp } from '#blokkli/editor/types/app';
7
- import type { FullBlokkliAdapter } from '#blokkli/editor/adapter';
8
- export type PendingMutationState = {
9
- action: MutationAction;
10
- resolve: (approved: boolean) => void;
11
- };
12
- export type PendingToolCall = {
13
- toolName: string;
14
- params: Record<string, unknown>;
15
- };
16
- export type AgentProviderOptions = {
17
- app: BlokkliApp;
18
- adapter: FullBlokkliAdapter<any>;
19
- itemEntityType: string;
20
- };
21
- export type AgentProvider = {
22
- isConnected: Readonly<Ref<boolean>>;
23
- isReady: Readonly<Ref<boolean>>;
24
- hasBeenReady: Readonly<Ref<boolean>>;
25
- connect: () => void;
26
- disconnect: () => void;
27
- conversation: Ref<ConversationItem[]>;
28
- activeItem: Ref<ActiveItem | null>;
29
- isProcessing: Ref<boolean>;
30
- isThinking: Ref<boolean>;
31
- autoApprove: Ref<boolean>;
32
- pendingMutation: Ref<PendingMutationState | null>;
33
- pendingToolCall: Ref<PendingToolCall | null>;
34
- plan: Ref<ClientPlanState | null>;
35
- approvePlan: () => void;
36
- rejectPlan: () => void;
37
- usageTurns: Ref<UsageTurn[]>;
38
- sendPrompt: (text: string, displayPrompt?: string, selectedUuids?: string[], attachments?: Attachment[], autoLoadTools?: string[], autoLoadSkills?: string[], preSeededResults?: PreSeededToolResult[], autoExecuteTools?: AutoExecuteTool[]) => void;
39
- runToolForPrompt: <T extends AgentToolName>(toolName: T, params: AgentToolMap[T]['params']) => Promise<PreSeededToolResult & {
40
- result: AgentToolMap[T]['result'];
41
- }>;
42
- retry: () => void;
43
- approve: () => void;
44
- reject: () => void;
45
- setAutoApprove: (value: boolean) => void;
46
- cancel: () => void;
47
- newConversation: () => void;
48
- getTranscript: () => void;
49
- onToolComponentDone: (result: unknown) => void;
50
- toolDetails: Map<string, unknown>;
51
- transcriptContent: Ref<Transcript | null>;
52
- showTranscript: Ref<boolean>;
53
- conversationList: Ref<AgentConversationSummary[]>;
54
- showConversationList: Ref<boolean>;
55
- activeConversationId: Readonly<Ref<string | null>>;
56
- switchConversation: (id: string) => void;
57
- deleteConversation: (id: string) => void;
58
- refreshConversationList: () => Promise<void>;
59
- feedbackItemIds: Ref<Set<string>>;
60
- pageContext: Ref<PageContext | null>;
61
- };
62
- export default function (app: BlokkliApp, adapter: FullBlokkliAdapter<any>, agentName: string): AgentProvider;