@blokkli/editor 2.0.0-alpha.35 → 2.0.0-alpha.36
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 +9 -2
- package/dist/global/types/definitions.d.ts +12 -5
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +56 -4
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +38 -20
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +2 -2
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +34 -60
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.d.vue.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +138 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue.d.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +175 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +5 -0
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +10 -1
- package/dist/modules/agent/runtime/app/tools/schemas.js +36 -23
- package/dist/modules/agent/runtime/server/Session.d.ts +4 -2
- package/dist/modules/agent/runtime/server/Session.js +61 -57
- package/dist/modules/agent/runtime/server/agentPrompt.d.ts +9 -1
- package/dist/modules/agent/runtime/server/agentPrompt.js +26 -0
- package/dist/modules/agent/runtime/shared/types.d.ts +35 -1
- package/dist/modules/charts/index.d.mts +35 -0
- package/dist/modules/charts/index.mjs +43 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.js +42 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +63 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +98 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +86 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +74 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +42 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +101 -0
- package/dist/modules/charts/runtime/chartTypes/area.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/area.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/bar.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/bar.js +76 -0
- package/dist/modules/charts/runtime/chartTypes/define.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/define.js +3 -0
- package/dist/modules/charts/runtime/chartTypes/donut.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/donut.js +45 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.js +54 -0
- package/dist/modules/charts/runtime/chartTypes/index.d.ts +21 -0
- package/dist/modules/charts/runtime/chartTypes/index.js +47 -0
- package/dist/modules/charts/runtime/chartTypes/line.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/line.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/pie.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/pie.js +28 -0
- package/dist/modules/charts/runtime/chartTypes/radar.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/radar.js +52 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.js +44 -0
- package/dist/modules/charts/runtime/chartTypes/shared.d.ts +52 -0
- package/dist/modules/charts/runtime/chartTypes/shared.js +103 -0
- package/dist/modules/charts/runtime/chartTypes/types.d.ts +29 -0
- package/dist/modules/charts/runtime/chartTypes/types.js +0 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +4 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +120 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +4 -0
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.vue +29 -0
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.d.vue.ts +15 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue +97 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +15 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +34 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.d.vue.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +49 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue.d.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.d.vue.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +90 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue.d.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.d.vue.ts +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +224 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue.d.ts +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.d.vue.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +61 -0
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue.d.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +8 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +8 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +243 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +90 -0
- package/dist/modules/charts/runtime/features/charts/index.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/features/charts/index.vue +72 -0
- package/dist/modules/charts/runtime/features/charts/index.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/helpers/index.d.ts +1 -0
- package/dist/modules/charts/runtime/helpers/index.js +17 -0
- package/dist/modules/charts/runtime/types.d.ts +51 -0
- package/dist/modules/charts/runtime/types.js +64 -0
- package/dist/modules/drupal/graphql/features/fragments.graphql +2 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.js +12 -8
- package/dist/modules/table-of-contents/index.d.mts +11 -0
- package/dist/modules/table-of-contents/index.mjs +24 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.d.vue.ts +44 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue +43 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue.d.ts +44 -0
- package/dist/modules/table-of-contents/runtime/types/index.d.ts +4 -0
- package/dist/modules/table-of-contents/runtime/types/index.js +0 -0
- package/dist/runtime/components/Blocks/Fragment/index.vue +6 -2
- package/dist/runtime/components/BlokkliItem.vue +8 -3
- package/dist/runtime/components/BlokkliProvider.d.vue.ts +7 -0
- package/dist/runtime/components/BlokkliProvider.vue +7 -1
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +7 -0
- package/dist/runtime/composables/useBlokkliHelper.js +4 -2
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +4 -20
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +12 -2
- package/dist/runtime/editor/components/Banner/index.vue +4 -2
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +12 -2
- package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +27 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +107 -0
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +27 -0
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue +1 -1
- package/dist/runtime/editor/components/EditProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/EditProvider.vue +4 -3
- package/dist/runtime/editor/components/EditProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/Form/Radio/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Radio/index.vue +3 -2
- package/dist/runtime/editor/components/Form/Radio/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/ItemIcon/index.vue +10 -2
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +13 -3
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +15 -7
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +13 -3
- package/dist/runtime/editor/components/PreviewProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
- package/dist/runtime/editor/components/PreviewProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/ShortcutIndicator/index.vue +1 -1
- package/dist/runtime/editor/components/index.d.ts +3 -1
- package/dist/runtime/editor/components/index.js +4 -0
- package/dist/runtime/editor/composables/onElementResize.js +0 -1
- package/dist/runtime/editor/composables/useEditableFieldOverride.js +4 -5
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +7 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue +5 -2
- package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
- package/dist/runtime/editor/features/clipboard/index.vue +1 -1
- package/dist/runtime/editor/features/debug/index.vue +1 -1
- package/dist/runtime/editor/features/dev-mode/index.vue +86 -2
- package/dist/runtime/editor/features/edit/index.vue +20 -0
- package/dist/runtime/editor/features/fragments/types.d.ts +1 -0
- package/dist/runtime/editor/features/hover/Renderer/index.vue +30 -3
- package/dist/runtime/editor/features/hover/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/Checkbox/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +3 -3
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +5 -5
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Item.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Item.vue +14 -48
- package/dist/runtime/editor/features/options/Form/Item.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Number/index.d.vue.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Number/index.vue +7 -17
- package/dist/runtime/editor/features/options/Form/Number/index.vue.d.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Range/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Range/index.vue +4 -4
- package/dist/runtime/editor/features/options/Form/Range/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/index.vue +10 -5
- package/dist/runtime/editor/features/selection/index.vue +2 -2
- package/dist/runtime/editor/features/transform/index.vue +1 -3
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +1 -1
- package/dist/runtime/editor/providers/definition.d.ts +2 -2
- package/dist/runtime/editor/providers/definition.js +7 -1
- package/dist/runtime/editor/providers/dom.d.ts +5 -0
- package/dist/runtime/editor/providers/dom.js +11 -2
- package/dist/runtime/editor/providers/fields.d.ts +19 -1
- package/dist/runtime/editor/providers/fields.js +54 -2
- package/dist/runtime/editor/translations/de.json +269 -1
- package/dist/runtime/editor/translations/fr.json +269 -1
- package/dist/runtime/editor/translations/gsw_CH.json +269 -1
- package/dist/runtime/editor/translations/it.json +269 -1
- package/dist/runtime/helpers/imports/index.d.ts +8 -1
- package/dist/runtime/helpers/imports/index.js +15 -6
- package/dist/runtime/helpers/injections.d.ts +5 -1
- package/dist/runtime/helpers/injections.js +3 -0
- package/dist/runtime/helpers/runtimeHelpers/index.js +14 -0
- package/dist/runtime/types/definitions.d.ts +8 -5
- package/dist/runtime/types/provider.d.ts +2 -0
- package/dist/shared/editor.6D5vApr0.mjs +30 -0
- package/dist/shared/{editor.DMFfaLVE.mjs → editor.BFIzNSQM.mjs} +1 -30
- package/dist/shared/{editor.Iax3GCvt.d.mts → editor.CWQIFIEQ.d.mts} +22 -0
- package/dist/types.d.mts +1 -1
- package/package.json +17 -1
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +0 -104
- /package/dist/modules/agent/runtime/app/tools/{get_available_bundles → get_bundle_info}/index.d.ts +0 -0
- /package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.d.vue.ts +0 -0
- /package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue.d.ts +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
|
-
const paramsSchema = z.object({
|
|
4
|
-
parentUuid: z.string().describe("The parent entity UUID"),
|
|
5
|
-
field: z.string().describe("The field name")
|
|
6
|
-
});
|
|
7
|
-
const bundleSchema = z.object({
|
|
8
|
-
bundle: z.string().describe("The paragraph type identifier"),
|
|
9
|
-
label: z.string().describe("Human-readable label"),
|
|
10
|
-
description: z.string().optional().describe("Bundle description if available"),
|
|
11
|
-
contentFields: z.array(
|
|
12
|
-
z.object({
|
|
13
|
-
name: z.string().describe("The field name"),
|
|
14
|
-
type: z.string().describe("Field type: plain, markup, reference, or link")
|
|
15
|
-
})
|
|
16
|
-
).describe("Content fields (text, media, links) on this bundle"),
|
|
17
|
-
paragraphFields: z.array(
|
|
18
|
-
z.object({
|
|
19
|
-
name: z.string().describe("The field name"),
|
|
20
|
-
label: z.string().describe("Human-readable label"),
|
|
21
|
-
allowedBundles: z.array(z.string()).describe("Paragraph types allowed in this field"),
|
|
22
|
-
cardinality: z.number().describe("Max paragraphs allowed (-1 = unlimited)")
|
|
23
|
-
})
|
|
24
|
-
).describe("Paragraph fields (for nested paragraphs) on this bundle")
|
|
25
|
-
});
|
|
26
|
-
const resultSchema = z.object({
|
|
27
|
-
fieldLabel: z.string().describe("Human-readable field label"),
|
|
28
|
-
cardinality: z.number().describe("Max paragraphs allowed (-1 = unlimited)"),
|
|
29
|
-
currentCount: z.number().describe("Current number of paragraphs in the field"),
|
|
30
|
-
bundles: z.array(bundleSchema).describe("Available paragraph types"),
|
|
31
|
-
nestingInfo: z.string().optional().describe(
|
|
32
|
-
"Summary of which bundles have paragraph fields for nested paragraphs. Use get_child_paragraphs after adding these bundles to populate their nested fields."
|
|
33
|
-
)
|
|
34
|
-
});
|
|
35
|
-
export default defineBlokkliAgentTool({
|
|
36
|
-
name: "get_bundle_info",
|
|
37
|
-
description: "Get detailed information about which paragraph types can be added to a specific field, including their content fields and paragraph fields (for nested paragraphs).",
|
|
38
|
-
category: "query",
|
|
39
|
-
modes: ["readonly", "editing", "translating", "review"],
|
|
40
|
-
label($t) {
|
|
41
|
-
return $t("aiAgentGetBundleInfoRunning", "Getting bundle info...");
|
|
42
|
-
},
|
|
43
|
-
paramsSchema,
|
|
44
|
-
resultSchema,
|
|
45
|
-
execute(ctx, params) {
|
|
46
|
-
const { fields, types, state, $t } = ctx.app;
|
|
47
|
-
const label = $t(
|
|
48
|
-
"aiAgentGetBundleInfoDone",
|
|
49
|
-
"Got bundle info for @field"
|
|
50
|
-
).replace("@field", params.field);
|
|
51
|
-
const field = fields.find(params.parentUuid, params.field);
|
|
52
|
-
if (!field) {
|
|
53
|
-
return {
|
|
54
|
-
label,
|
|
55
|
-
result: {
|
|
56
|
-
fieldLabel: params.field,
|
|
57
|
-
cardinality: -1,
|
|
58
|
-
currentCount: 0,
|
|
59
|
-
bundles: []
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
const fieldKey = `${params.parentUuid}:${params.field}`;
|
|
64
|
-
const currentCount = state.getFieldBlockCount(fieldKey);
|
|
65
|
-
const bundles = field.allowedBundles.map((bundle) => {
|
|
66
|
-
const bundleDefinition = types.getBlockBundleDefinition(bundle);
|
|
67
|
-
const editableConfigs = types.editableFieldConfig.forEntityTypeAndBundle(ctx.itemEntityType, bundle).filter((c) => c.type !== "table").map((c) => ({
|
|
68
|
-
name: c.name,
|
|
69
|
-
type: c.type === "frame" || c.type === "markup" ? "markup" : "plain"
|
|
70
|
-
}));
|
|
71
|
-
const droppableConfigs = types.droppableFieldConfig.forEntityTypeAndBundle(ctx.itemEntityType, bundle).map((c) => ({
|
|
72
|
-
name: c.name,
|
|
73
|
-
type: c.type
|
|
74
|
-
}));
|
|
75
|
-
const blockFieldConfigs = types.fieldConfig.forEntityTypeAndBundle(ctx.itemEntityType, bundle).map((c) => ({
|
|
76
|
-
name: c.name,
|
|
77
|
-
label: c.label,
|
|
78
|
-
allowedBundles: c.allowedBundles,
|
|
79
|
-
cardinality: c.cardinality
|
|
80
|
-
}));
|
|
81
|
-
return {
|
|
82
|
-
bundle,
|
|
83
|
-
label: bundleDefinition?.label ?? bundle,
|
|
84
|
-
description: bundleDefinition?.description,
|
|
85
|
-
contentFields: [...editableConfigs, ...droppableConfigs],
|
|
86
|
-
paragraphFields: blockFieldConfigs
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
const nestingBundles = bundles.filter((b) => b.paragraphFields.length > 0);
|
|
90
|
-
const nestingInfo = nestingBundles.length ? nestingBundles.map(
|
|
91
|
-
(b) => `${b.bundle} has paragraph fields: ${b.paragraphFields.map((f) => `${f.name} (${f.allowedBundles.join(", ")})`).join(", ")}`
|
|
92
|
-
).join("; ") : void 0;
|
|
93
|
-
return {
|
|
94
|
-
label,
|
|
95
|
-
result: {
|
|
96
|
-
fieldLabel: field.label,
|
|
97
|
-
cardinality: field.cardinality,
|
|
98
|
-
currentCount,
|
|
99
|
-
bundles,
|
|
100
|
-
nestingInfo
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
});
|
/package/dist/modules/agent/runtime/app/tools/{get_available_bundles → get_bundle_info}/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|