@blokkli/editor 2.0.0-alpha.47 → 2.0.0-alpha.49
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/chunks/tailwindConfig.mjs +222 -0
- package/dist/global/types/definitions.d.ts +1 -1
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +164 -16
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +6 -29
- package/dist/modules/charts/index.d.mts +1 -1
- package/dist/modules/charts/index.mjs +3 -3
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +50 -53
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +1 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/index.mjs +1 -1
- package/dist/modules/index.d.mts +7 -0
- package/dist/{shared/editor.CGf7C_0M.mjs → modules/index.mjs} +1 -1
- package/dist/modules/table-of-contents/index.d.mts +1 -1
- package/dist/modules/table-of-contents/index.mjs +1 -1
- package/dist/modules/tailwind/index.d.mts +5 -0
- package/dist/modules/tailwind/index.mjs +2 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +4 -4
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/features/add-list/index.vue +1 -1
- package/dist/runtime/editor/features/anchors/Overlay/index.vue +25 -7
- package/dist/runtime/editor/features/changelog/changelog.json +9 -1
- package/dist/runtime/editor/features/complex-options/index.vue +98 -0
- package/dist/runtime/editor/features/dragging-overlay/index.vue +29 -13
- package/dist/runtime/editor/features/media-library/Library/FilterSelect/index.d.vue.ts +15 -0
- package/dist/runtime/editor/features/media-library/Library/FilterSelect/index.vue +168 -0
- package/dist/runtime/editor/features/media-library/Library/FilterSelect/index.vue.d.ts +15 -0
- package/dist/runtime/editor/features/media-library/Library/index.vue +21 -16
- package/dist/runtime/editor/providers/keyboard.js +8 -5
- package/dist/runtime/editor/translations/de.json +22 -14
- package/dist/runtime/editor/translations/fr.json +21 -13
- package/dist/runtime/editor/translations/gsw_CH.json +459 -451
- package/dist/runtime/editor/translations/it.json +21 -13
- package/dist/shared/{editor.BVregnEC.d.mts → editor.DsGJIlGn.d.mts} +19 -2
- package/dist/types.d.mts +1 -1
- package/package.json +36 -1
- package/dist/modules/charts/runtime/features/charts/index.vue +0 -72
- /package/dist/{modules/charts/runtime/features/charts → runtime/editor/features/complex-options}/index.d.vue.ts +0 -0
- /package/dist/{modules/charts/runtime/features/charts → runtime/editor/features/complex-options}/index.vue.d.ts +0 -0
|
@@ -1267,10 +1267,6 @@
|
|
|
1267
1267
|
"source": "Edit chart...",
|
|
1268
1268
|
"translation": ""
|
|
1269
1269
|
},
|
|
1270
|
-
"chartsEditorSaveError": {
|
|
1271
|
-
"source": "The chart could not be saved.",
|
|
1272
|
-
"translation": ""
|
|
1273
|
-
},
|
|
1274
1270
|
"chartsEditorTitle": {
|
|
1275
1271
|
"source": "Edit chart",
|
|
1276
1272
|
"translation": ""
|
|
@@ -1523,6 +1519,10 @@
|
|
|
1523
1519
|
"source": "Shows all comments for the current page.",
|
|
1524
1520
|
"translation": ""
|
|
1525
1521
|
},
|
|
1522
|
+
"complexOptionsSaveError": {
|
|
1523
|
+
"source": "The data could not be saved.",
|
|
1524
|
+
"translation": ""
|
|
1525
|
+
},
|
|
1526
1526
|
"conversionsConvertTo": {
|
|
1527
1527
|
"source": "Convert to: @bundle",
|
|
1528
1528
|
"translation": ""
|
|
@@ -1851,14 +1851,6 @@
|
|
|
1851
1851
|
"source": "Changelog",
|
|
1852
1852
|
"translation": ""
|
|
1853
1853
|
},
|
|
1854
|
-
"feature_charts_description": {
|
|
1855
|
-
"source": "Add and edit interactive charts.",
|
|
1856
|
-
"translation": ""
|
|
1857
|
-
},
|
|
1858
|
-
"feature_charts_label": {
|
|
1859
|
-
"source": "Charts",
|
|
1860
|
-
"translation": ""
|
|
1861
|
-
},
|
|
1862
1854
|
"feature_clipboard_description": {
|
|
1863
1855
|
"source": "Provides clipboard integration to copy/paste existing blocks or paste supported clipboard content like text or images.",
|
|
1864
1856
|
"translation": "Fornisce l'integrazione degli appunti per copiare/incollare blocchi esistenti o incollare contenuti supportati come testo o immagini."
|
|
@@ -1883,6 +1875,14 @@
|
|
|
1883
1875
|
"source": "Comments",
|
|
1884
1876
|
"translation": "Commenti"
|
|
1885
1877
|
},
|
|
1878
|
+
"feature_complex-options_description": {
|
|
1879
|
+
"source": "Edit complex option types such as charts.",
|
|
1880
|
+
"translation": ""
|
|
1881
|
+
},
|
|
1882
|
+
"feature_complex-options_label": {
|
|
1883
|
+
"source": "Complex Options",
|
|
1884
|
+
"translation": ""
|
|
1885
|
+
},
|
|
1886
1886
|
"feature_conversions_description": {
|
|
1887
1887
|
"source": "Provides block actions to convert one or more blocks to a different bundle.",
|
|
1888
1888
|
"translation": "Fornisce azioni di blocco per convertire uno o più blocchi in un tipo diverso."
|
|
@@ -2259,6 +2259,14 @@
|
|
|
2259
2259
|
"source": "This field is required",
|
|
2260
2260
|
"translation": "Questo campo è obbligatorio"
|
|
2261
2261
|
},
|
|
2262
|
+
"filterSelectNoResults": {
|
|
2263
|
+
"source": "No results",
|
|
2264
|
+
"translation": ""
|
|
2265
|
+
},
|
|
2266
|
+
"filterSelectSearch": {
|
|
2267
|
+
"source": "Search...",
|
|
2268
|
+
"translation": ""
|
|
2269
|
+
},
|
|
2262
2270
|
"fragmentsAddFragmentAction": {
|
|
2263
2271
|
"source": "Fragment",
|
|
2264
2272
|
"translation": ""
|
|
@@ -2460,7 +2468,7 @@
|
|
|
2460
2468
|
"translation": ""
|
|
2461
2469
|
},
|
|
2462
2470
|
"libraryItemEditOverlayBackWithPage": {
|
|
2463
|
-
"source": "
|
|
2471
|
+
"source": "Save and go back to \"@label\"",
|
|
2464
2472
|
"translation": ""
|
|
2465
2473
|
},
|
|
2466
2474
|
"libraryItemEditOverlayTitle": {
|
|
@@ -6,7 +6,7 @@ import { Resolver } from '@nuxt/kit';
|
|
|
6
6
|
import { FeatureDefinitionBase } from '../../dist/global/types/features.js';
|
|
7
7
|
|
|
8
8
|
type TemplateCallback = (context: ModuleContext) => string | Promise<string>;
|
|
9
|
-
type TemplateDependency = 'icons' | 'features' | 'block-content' | 'block-path' | 'block-global-options' | 'agent-mcp-tools' | 'agent-server' | 'agent-prompts';
|
|
9
|
+
type TemplateDependency = 'icons' | 'features' | 'block-content' | 'block-path' | 'block-global-options' | 'agent-mcp-tools' | 'agent-server' | 'agent-prompts' | 'module-css';
|
|
10
10
|
/**
|
|
11
11
|
* Where the template should be available:
|
|
12
12
|
* - 'app': Only in app context (default)
|
|
@@ -400,6 +400,14 @@ declare class ModuleHelper implements ValidationInterface {
|
|
|
400
400
|
addComponent(name: string): void;
|
|
401
401
|
addComposable(name: string): void;
|
|
402
402
|
addAlias(name: string, path: string): void;
|
|
403
|
+
/**
|
|
404
|
+
* Add a directory to the app TypeScript tsconfig includes.
|
|
405
|
+
*/
|
|
406
|
+
addAppTsInclude(absolutePath: string): void;
|
|
407
|
+
/**
|
|
408
|
+
* Add a directory to the server/Nitro TypeScript tsconfig includes.
|
|
409
|
+
*/
|
|
410
|
+
addServerTsInclude(absolutePath: string): void;
|
|
403
411
|
/**
|
|
404
412
|
* Add a path to Nitro's externals.inline for server-side usage.
|
|
405
413
|
* @see https://github.com/nuxt/nuxt/issues/28995
|
|
@@ -557,6 +565,7 @@ interface ComplexOptionTypeDefinition {
|
|
|
557
565
|
editorComponentPath: string;
|
|
558
566
|
editorButtonLabel: string;
|
|
559
567
|
editorIcon: string;
|
|
568
|
+
editorTitle?: string;
|
|
560
569
|
}
|
|
561
570
|
declare class ModuleContext {
|
|
562
571
|
helper: ModuleHelper;
|
|
@@ -569,8 +578,14 @@ declare class ModuleContext {
|
|
|
569
578
|
private adapterExtensions;
|
|
570
579
|
private featureFragments;
|
|
571
580
|
private complexOptionTypes;
|
|
581
|
+
private cssFiles;
|
|
582
|
+
private additionalIcons;
|
|
572
583
|
collectors: Collector[];
|
|
573
584
|
constructor(helper: ModuleHelper, icons: IconCollector, features: FeatureCollector, blocks: BlockCollector, theme: ThemeData);
|
|
585
|
+
addCSS(filePath: string): void;
|
|
586
|
+
getCSSFiles(): string[];
|
|
587
|
+
addIcon(...names: string[]): void;
|
|
588
|
+
getAdditionalIcons(): string[];
|
|
574
589
|
addFeatureFragment(name: string): void;
|
|
575
590
|
getFeatureFragmentNames(): string[];
|
|
576
591
|
registerComplexOptionType(def: ComplexOptionTypeDefinition): void;
|
|
@@ -610,5 +625,7 @@ type BlokkliModule<O extends object = object> = {
|
|
|
610
625
|
options?: O;
|
|
611
626
|
init: BlokkliModuleInit<O>;
|
|
612
627
|
};
|
|
628
|
+
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>;
|
|
613
629
|
|
|
614
|
-
export
|
|
630
|
+
export { defineBlokkliModule as d };
|
|
631
|
+
export type { BlokkliModule as B, ModuleOptions as M, ModuleHooks as a, Blokkli as b };
|
package/dist/types.d.mts
CHANGED
|
@@ -4,6 +4,6 @@ declare module '@nuxt/schema' {
|
|
|
4
4
|
interface NuxtHooks extends ModuleHooks {}
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export { type ModuleHooks } from './shared/editor.
|
|
7
|
+
export { type ModuleHooks } from './shared/editor.DsGJIlGn.mjs'
|
|
8
8
|
|
|
9
9
|
export { type ModuleOptions, default } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blokkli/editor",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.49",
|
|
4
4
|
"description": "Interactive page building experience for Nuxt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -48,6 +48,12 @@
|
|
|
48
48
|
],
|
|
49
49
|
"charts": [
|
|
50
50
|
"./dist/modules/charts/index.d.mts"
|
|
51
|
+
],
|
|
52
|
+
"modules": [
|
|
53
|
+
"./dist/modules/index.d.mts"
|
|
54
|
+
],
|
|
55
|
+
"tailwind": [
|
|
56
|
+
"./dist/modules/tailwind/index.d.mts"
|
|
51
57
|
]
|
|
52
58
|
}
|
|
53
59
|
},
|
|
@@ -71,6 +77,15 @@
|
|
|
71
77
|
"./charts": {
|
|
72
78
|
"types": "./dist/modules/charts/index.d.mts",
|
|
73
79
|
"import": "./dist/modules/charts/index.mjs"
|
|
80
|
+
},
|
|
81
|
+
"./modules": {
|
|
82
|
+
"types": "./dist/modules/index.d.mts",
|
|
83
|
+
"import": "./dist/modules/index.mjs"
|
|
84
|
+
},
|
|
85
|
+
"./tailwind": {
|
|
86
|
+
"types": "./dist/modules/tailwind/index.d.mts",
|
|
87
|
+
"require": "./dist/modules/tailwind/index.mjs",
|
|
88
|
+
"import": "./dist/modules/tailwind/index.mjs"
|
|
74
89
|
}
|
|
75
90
|
},
|
|
76
91
|
"scripts": {
|
|
@@ -173,6 +188,7 @@
|
|
|
173
188
|
"peerDependencies": {
|
|
174
189
|
"@anthropic-ai/sdk": "^0.71.2",
|
|
175
190
|
"@lunarisapp/readability": "^1.0.2",
|
|
191
|
+
"@thedutchcoder/postcss-rem-to-px": "^0.0.2",
|
|
176
192
|
"acorn": "^8.0.0",
|
|
177
193
|
"axe-core": "^4.10.0",
|
|
178
194
|
"esbuild": ">=0.20.0",
|
|
@@ -181,6 +197,10 @@
|
|
|
181
197
|
"micromatch": "^4.0.0",
|
|
182
198
|
"openai": "^4.0.0",
|
|
183
199
|
"oxc-walker": "^0.5.0",
|
|
200
|
+
"postcss": "^8.4.0",
|
|
201
|
+
"postcss-import": "^16.0.0",
|
|
202
|
+
"postcss-replace": "^2.0.0",
|
|
203
|
+
"tailwindcss": "^3.4.0",
|
|
184
204
|
"turndown": "^7.2.2",
|
|
185
205
|
"typescript": "^5.0.0"
|
|
186
206
|
},
|
|
@@ -188,6 +208,9 @@
|
|
|
188
208
|
"@lunarisapp/readability": {
|
|
189
209
|
"optional": true
|
|
190
210
|
},
|
|
211
|
+
"@thedutchcoder/postcss-rem-to-px": {
|
|
212
|
+
"optional": true
|
|
213
|
+
},
|
|
191
214
|
"axe-core": {
|
|
192
215
|
"optional": true
|
|
193
216
|
},
|
|
@@ -196,6 +219,18 @@
|
|
|
196
219
|
},
|
|
197
220
|
"@anthropic-ai/sdk": {
|
|
198
221
|
"optional": true
|
|
222
|
+
},
|
|
223
|
+
"postcss": {
|
|
224
|
+
"optional": true
|
|
225
|
+
},
|
|
226
|
+
"postcss-import": {
|
|
227
|
+
"optional": true
|
|
228
|
+
},
|
|
229
|
+
"postcss-replace": {
|
|
230
|
+
"optional": true
|
|
231
|
+
},
|
|
232
|
+
"tailwindcss": {
|
|
233
|
+
"optional": true
|
|
199
234
|
}
|
|
200
235
|
},
|
|
201
236
|
"engines": {
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<NestedEditorOverlay
|
|
3
|
-
v-if="uuid"
|
|
4
|
-
:uuid
|
|
5
|
-
:title="$t('chartsEditorTitle', 'Edit chart')"
|
|
6
|
-
icon="bk_mdi_area_chart"
|
|
7
|
-
theme="accent"
|
|
8
|
-
:element
|
|
9
|
-
@submit="onSubmit"
|
|
10
|
-
@close="onSubmit"
|
|
11
|
-
>
|
|
12
|
-
<ChartsEditor ref="editorRef" :uuid :option-key="optionKey" />
|
|
13
|
-
</NestedEditorOverlay>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup>
|
|
17
|
-
import { onBlokkliEvent } from "#blokkli/editor/composables";
|
|
18
|
-
import {
|
|
19
|
-
defineBlokkliFeature,
|
|
20
|
-
ref,
|
|
21
|
-
useTemplateRef,
|
|
22
|
-
useBlokkli,
|
|
23
|
-
computed
|
|
24
|
-
} from "#imports";
|
|
25
|
-
import { NestedEditorOverlay } from "#blokkli/editor/components";
|
|
26
|
-
import ChartsEditor from "./Editor/index.vue";
|
|
27
|
-
defineBlokkliFeature({
|
|
28
|
-
id: "charts",
|
|
29
|
-
icon: "bk_mdi_area_chart",
|
|
30
|
-
label: "Charts",
|
|
31
|
-
description: "Add and edit interactive charts.",
|
|
32
|
-
requiredAdapterMethods: ["updateOptions"]
|
|
33
|
-
});
|
|
34
|
-
const { $t, state, adapter, dom, blocks } = useBlokkli();
|
|
35
|
-
const uuid = ref(null);
|
|
36
|
-
const optionKey = ref("data");
|
|
37
|
-
const element = computed(() => {
|
|
38
|
-
if (!uuid.value) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
const block = blocks.getBlock(uuid.value);
|
|
42
|
-
if (!block) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
return dom.getDragElement(block);
|
|
46
|
-
});
|
|
47
|
-
const isLoading = ref(false);
|
|
48
|
-
const editorRef = useTemplateRef("editorRef");
|
|
49
|
-
async function onSubmit() {
|
|
50
|
-
if (!uuid.value || !editorRef.value) return;
|
|
51
|
-
const chartData = editorRef.value.getData();
|
|
52
|
-
isLoading.value = true;
|
|
53
|
-
await state.mutateWithLoadingState(
|
|
54
|
-
() => adapter.updateOptions([
|
|
55
|
-
{
|
|
56
|
-
uuid: uuid.value,
|
|
57
|
-
key: optionKey.value,
|
|
58
|
-
value: JSON.stringify(chartData)
|
|
59
|
-
}
|
|
60
|
-
]),
|
|
61
|
-
$t("chartsEditorSaveError", "The chart could not be saved.")
|
|
62
|
-
);
|
|
63
|
-
isLoading.value = false;
|
|
64
|
-
uuid.value = null;
|
|
65
|
-
}
|
|
66
|
-
onBlokkliEvent("option:edit-complex", (data) => {
|
|
67
|
-
if (data.dataType === "chart") {
|
|
68
|
-
uuid.value = data.uuid;
|
|
69
|
-
optionKey.value = data.key;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
</script>
|
|
File without changes
|
|
File without changes
|