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

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/module.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NuxtModule } from 'nuxt/schema';
2
- import { M as ModuleOptions } from './shared/editor.BTOBvmaz.mjs';
3
- export { a as ModuleHooks } from './shared/editor.BTOBvmaz.mjs';
2
+ import { M as ModuleOptions } from './shared/editor.Bpw1EP57.mjs';
3
+ export { a as ModuleHooks } from './shared/editor.Bpw1EP57.mjs';
4
4
  import 'consola';
5
5
  import '../dist/global/types/definitions.js';
6
6
  import '../dist/global/types/theme.js';
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blokkli/editor",
3
3
  "configKey": "blokkli",
4
- "version": "2.0.0-alpha.57",
4
+ "version": "2.0.0-alpha.58",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.15.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -5,7 +5,7 @@ import MagicString from 'magic-string';
5
5
  import { walk } from 'estree-walker-ts';
6
6
  import { pathToFileURL } from 'node:url';
7
7
  import { parseURL, parseQuery } from 'ufo';
8
- import { C as Collector, a as CollectedFile, b as extractObjectLiteral, p as parseTsObject, t as toValidVariableName, o as onlyUnique, f as falsy, s as sortObjectKeys } from './shared/editor.9vf8ZnOp.mjs';
8
+ import { C as Collector, a as CollectedFile, b as extractObjectLiteral, p as parseTsObject, t as toValidVariableName, o as onlyUnique, f as falsy, s as sortObjectKeys } from './shared/editor.FygP6XeF.mjs';
9
9
  import { dirname, resolve, relative } from 'pathe';
10
10
  import micromatch from 'micromatch';
11
11
  import { hash } from 'ohash';
@@ -19,7 +19,7 @@ import 'typescript';
19
19
  import 'oxc-walker';
20
20
 
21
21
  const name = "@blokkli/editor";
22
- const version = "2.0.0-alpha.57";
22
+ const version = "2.0.0-alpha.58";
23
23
 
24
24
  function validateOption(optionKey, option, icons) {
25
25
  const errors = [];
@@ -1,4 +1,4 @@
1
- import { B as BlokkliModule } from '../../shared/editor.BTOBvmaz.mjs';
1
+ import { B as BlokkliModule } from '../../shared/editor.Bpw1EP57.mjs';
2
2
  import 'nuxt/schema';
3
3
  import 'consola';
4
4
  import '../../../dist/global/types/definitions.js';
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url';
3
3
  import * as path from 'node:path';
4
4
  import { defineBlokkliModule } from '../index.mjs';
5
5
  import * as fs from 'node:fs';
6
- import { C as Collector, a as CollectedFile, e as extractStringProperty } from '../../shared/editor.9vf8ZnOp.mjs';
6
+ import { C as Collector, a as CollectedFile, e as extractStringProperty } from '../../shared/editor.FygP6XeF.mjs';
7
7
  import { d as defineCodeTemplate } from '../../shared/editor.6D5vApr0.mjs';
8
8
  import MagicString from 'magic-string';
9
9
  import { parse } from 'acorn';
@@ -116,45 +116,45 @@ function createClientTemplate(toolCollector, skillsCollector, options, routes) {
116
116
  const rel = (p) => ctx.helper.toModuleBuildRelative(p).replace(/\.ts$/, "");
117
117
  const tools = toolCollector.getItems();
118
118
  const imports = [];
119
- const exports$1 = [];
119
+ const exports = [];
120
120
  for (const tool of tools) {
121
121
  imports.push(`import ${tool.importName} from '${rel(tool.filePath)}'`);
122
122
  }
123
123
  if (tools.length === 0) {
124
- exports$1.push("export const mcpTools = []");
124
+ exports.push("export const mcpTools = []");
125
125
  } else {
126
- exports$1.push(
126
+ exports.push(
127
127
  `export const mcpTools = [
128
128
  ${tools.map((t) => t.importName).join(",\n ")}
129
129
  ]`
130
130
  );
131
131
  }
132
- exports$1.push(
132
+ exports.push(
133
133
  `export const defaultPrompts = ${JSON.stringify(options.defaultPrompts ?? [])}`
134
134
  );
135
- exports$1.push(`export const models = ${JSON.stringify(options.models)}`);
136
- exports$1.push(
135
+ exports.push(`export const models = ${JSON.stringify(options.models)}`);
136
+ exports.push(
137
137
  `export const hasWebFetch = ${JSON.stringify(!!options.allowedFetchOrigins)}`
138
138
  );
139
- exports$1.push(`export const routeAgent = ${JSON.stringify(routes.agent)}`);
140
- exports$1.push(`export const routeFetch = ${JSON.stringify(routes.fetch)}`);
141
- exports$1.push(
139
+ exports.push(`export const routeAgent = ${JSON.stringify(routes.agent)}`);
140
+ exports.push(`export const routeFetch = ${JSON.stringify(routes.fetch)}`);
141
+ exports.push(
142
142
  `export const routeStream = ${JSON.stringify(routes.stream)}`
143
143
  );
144
- exports$1.push(
144
+ exports.push(
145
145
  `export const routeRoute = ${JSON.stringify(routes.routing)}`
146
146
  );
147
- exports$1.push(
147
+ exports.push(
148
148
  `export const toolNames = ${JSON.stringify(toolCollector.getNames())}`
149
149
  );
150
- exports$1.push(
150
+ exports.push(
151
151
  `export const skillNames = ${JSON.stringify(skillsCollector.getNames())}`
152
152
  );
153
153
  const parts = [];
154
154
  if (imports.length > 0) {
155
155
  parts.push(imports.join("\n"));
156
156
  }
157
- parts.push(exports$1.join("\n"));
157
+ parts.push(exports.join("\n"));
158
158
  return parts.join("\n\n") + "\n";
159
159
  },
160
160
  (ctx) => {
@@ -215,29 +215,29 @@ function createPromptsTemplate(promptCollector, options) {
215
215
  const rel = (p) => ctx.helper.toModuleBuildRelative(p).replace(/\.ts$/, "");
216
216
  const prompts = promptCollector.getItems();
217
217
  const imports = [];
218
- const exports$1 = [];
218
+ const exports = [];
219
219
  for (const prompt of prompts) {
220
220
  imports.push(
221
221
  `import ${prompt.importName} from '${rel(prompt.filePath)}'`
222
222
  );
223
223
  }
224
224
  if (prompts.length === 0) {
225
- exports$1.push("export const agentPrompts = []");
225
+ exports.push("export const agentPrompts = []");
226
226
  } else {
227
- exports$1.push(
227
+ exports.push(
228
228
  `export const agentPrompts = [
229
229
  ${prompts.map((p) => p.importName).join(",\n ")}
230
230
  ]`
231
231
  );
232
232
  }
233
- exports$1.push(
233
+ exports.push(
234
234
  `export const agentName = ${JSON.stringify(options.agentName ?? "Superbl\xF6kkli")}`
235
235
  );
236
236
  const parts = [];
237
237
  if (imports.length > 0) {
238
238
  parts.push(imports.join("\n"));
239
239
  }
240
- parts.push(exports$1.join("\n"));
240
+ parts.push(exports.join("\n"));
241
241
  return parts.join("\n\n") + "\n";
242
242
  },
243
243
  () => {
@@ -1,4 +1,4 @@
1
- import { B as BlokkliModule } from '../../shared/editor.BTOBvmaz.mjs';
1
+ import { B as BlokkliModule } from '../../shared/editor.Bpw1EP57.mjs';
2
2
  import 'nuxt/schema';
3
3
  import 'consola';
4
4
  import '../../../dist/global/types/definitions.js';
@@ -1,4 +1,4 @@
1
- import { B as BlokkliModule } from '../../shared/editor.BTOBvmaz.mjs';
1
+ import { B as BlokkliModule } from '../../shared/editor.Bpw1EP57.mjs';
2
2
  import 'nuxt/schema';
3
3
  import 'consola';
4
4
  import '../../../dist/global/types/definitions.js';
@@ -14,7 +14,7 @@ declare const _default: (options?: {
14
14
  * template entity.
15
15
  */
16
16
  templateEditRouteName?: string;
17
- }) => BlokkliModule<{
17
+ } | undefined) => BlokkliModule<{
18
18
  /**
19
19
  * The name of the route that is used for editing template entities.
20
20
  *
@@ -1,4 +1,4 @@
1
- import { B as BlokkliModule } from '../../shared/editor.BTOBvmaz.mjs';
1
+ import { B as BlokkliModule } from '../../shared/editor.Bpw1EP57.mjs';
2
2
  import 'nuxt/schema';
3
3
  import 'consola';
4
4
  import '../../../dist/global/types/definitions.js';
@@ -1,4 +1,4 @@
1
- export { b as Blokkli, B as BlokkliModule, d as defineBlokkliModule } from '../shared/editor.BTOBvmaz.mjs';
1
+ export { b as Blokkli, B as BlokkliModule, d as defineBlokkliModule } from '../shared/editor.Bpw1EP57.mjs';
2
2
  import 'nuxt/schema';
3
3
  import 'consola';
4
4
  import '../../dist/global/types/definitions.js';
@@ -1,4 +1,4 @@
1
- import { B as BlokkliModule } from '../../shared/editor.BTOBvmaz.mjs';
1
+ import { B as BlokkliModule } from '../../shared/editor.Bpw1EP57.mjs';
2
2
  import 'nuxt/schema';
3
3
  import 'consola';
4
4
  import '../../../dist/global/types/definitions.js';
@@ -6,6 +6,6 @@ import '../../../dist/global/types/theme.js';
6
6
  import '@nuxt/kit';
7
7
  import '../../../dist/global/types/features.js';
8
8
 
9
- declare const _default: (options?: object) => BlokkliModule<object>;
9
+ declare const _default: (options?: object | undefined) => BlokkliModule<object>;
10
10
 
11
11
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import { B as BlokkliModule } from '../../shared/editor.BTOBvmaz.mjs';
1
+ import { B as BlokkliModule } from '../../shared/editor.Bpw1EP57.mjs';
2
2
  import 'nuxt/schema';
3
3
  import 'consola';
4
4
  import '../../../dist/global/types/definitions.js';
@@ -6,6 +6,6 @@ import '../../../dist/global/types/theme.js';
6
6
  import '@nuxt/kit';
7
7
  import '../../../dist/global/types/features.js';
8
8
 
9
- declare const _default: (options?: object) => BlokkliModule<object>;
9
+ declare const _default: (options?: object | undefined) => BlokkliModule<object>;
10
10
 
11
11
  export { _default as default };
@@ -80,7 +80,7 @@ declare class BlockCollector extends Collector<CollectedBlockFile> {
80
80
  private patterns;
81
81
  constructor(helper: ModuleHelper, icons: IconCollector);
82
82
  init(): Promise<void>;
83
- runHooks(): any;
83
+ runHooks(): Promise<any>;
84
84
  createCollectedFile(filePath: string, fileContents?: string): CollectedBlockFile;
85
85
  private findBlockForFolderFile;
86
86
  protected handleAdd(filePath: string): Promise<boolean>;
@@ -444,7 +444,7 @@ declare class FeatureCollector extends Collector<CollectedFeatureFile> {
444
444
  constructor(helper: ModuleHelper);
445
445
  getEnabledFeatures(): ExtractedFeatureDefinition[];
446
446
  init(): Promise<void>;
447
- runHooks(): any;
447
+ runHooks(): Promise<any>;
448
448
  createCollectedFile(filePath: string, fileContents?: string): CollectedFeatureFile;
449
449
  applies(filePath: string): Promise<boolean>;
450
450
  getDependencyTypes(): TemplateDependency[];
@@ -541,7 +541,7 @@ declare class IconCollector extends Collector {
541
541
  getValidMaterialIconNames(): string[];
542
542
  handleWatchEvent(event: WatchEvent, filePath: string): Promise<HandleWatchEventResult>;
543
543
  init(): Promise<void>;
544
- runHooks(): any;
544
+ runHooks(): Promise<any>;
545
545
  applies(filePath: string): Promise<boolean>;
546
546
  getDependencyTypes(): TemplateDependency[];
547
547
  createCollectedFile(filePath: string, fileContents?: string): CollectedFile;
@@ -174,11 +174,11 @@ function parseTsObject(tsObjectStr) {
174
174
  const result = ts.transpileModule(source, {
175
175
  compilerOptions: {
176
176
  target: ts.ScriptTarget.ESNext,
177
- module: ts.ModuleKind.None,
177
+ module: ts.ModuleKind.ESNext,
178
178
  removeComments: true
179
179
  }
180
180
  });
181
- const jsCode = result.outputText.trim();
181
+ const jsCode = result.outputText.trim().replace(/^(?:["'][^"'\n]*["']\s*;?\s*)+/, "");
182
182
  const createObj = new Function(`return ${jsCode}`);
183
183
  const object = createObj();
184
184
  return { object, source: jsCode };
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.BTOBvmaz.mjs'
7
+ export { type ModuleHooks } from './shared/editor.Bpw1EP57.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.57",
3
+ "version": "2.0.0-alpha.58",
4
4
  "description": "Interactive page building experience for Nuxt",
5
5
  "keywords": [
6
6
  "cms",
@@ -136,7 +136,6 @@
136
136
  },
137
137
  "dependencies": {
138
138
  "@material-symbols/svg-600": "0.40.2",
139
- "@nuxt/kit": "^4.2.2",
140
139
  "apexcharts": "^5.4.0",
141
140
  "artboard-deluxe": "^0.1.5",
142
141
  "estree-walker-ts": "^1.1.0",
@@ -157,8 +156,9 @@
157
156
  "@ckeditor/ckeditor5-vue": "^7.3.0",
158
157
  "@nuxt/devtools": "^3.1.1",
159
158
  "@nuxt/eslint-config": "^1.12.1",
159
+ "@nuxt/kit": "^4.4.4",
160
160
  "@nuxt/module-builder": "^1.0.2",
161
- "@nuxt/schema": "^4.2.2",
161
+ "@nuxt/schema": "^4.4.4",
162
162
  "@nuxt/test-utils": "^3.21.0",
163
163
  "@nuxtjs/tailwindcss": "^6.14.0",
164
164
  "@tailwindcss/forms": "^0.5.11",
@@ -182,10 +182,12 @@
182
182
  "eslint-plugin-tailwindcss": "^3.18.2",
183
183
  "gettext-parser": "^8.0.0",
184
184
  "happy-dom": "^20.0.11",
185
- "nuxt": "^4.2.2",
185
+ "nuxt": "^4.4.4",
186
186
  "nuxt-graphql-middleware": "^5.3.0",
187
187
  "nuxt-svg-icon-sprite": "^2.0.2",
188
188
  "openai": "^6.17.0",
189
+ "oxc-parser": "^0.98.0",
190
+ "oxc-walker": "^0.7.0",
189
191
  "oxfmt": "^0.20.0",
190
192
  "oxlint": "^1.35.0",
191
193
  "playwright-core": "^1.57.0",
@@ -198,13 +200,15 @@
198
200
  "postcss-selector-parser": "^7.1.1",
199
201
  "postcss-url": "^10.1.3",
200
202
  "prettier": "^3.7.4",
201
- "prettier-plugin-glsl": "^0.2.2",
203
+ "prettier-plugin-glsl": "^0.2.5",
202
204
  "syllable": "^5.0.1",
203
205
  "tailwindcss": "^3.4.17",
204
206
  "tsx": "^4.21.0",
207
+ "turndown": "^7.2.4",
208
+ "typescript": "^6.0.0",
205
209
  "unbuild": "^3.6.1",
206
210
  "vite-plugin-glsl": "^1.5.5",
207
- "vitepress": "^1.6.4",
211
+ "vitepress": "^2.0.0-alpha.17",
208
212
  "vitest": "^3.2.4",
209
213
  "vue-tsc": "^3.1.8"
210
214
  },
@@ -225,7 +229,7 @@
225
229
  "syllable": "*",
226
230
  "tailwindcss": "*",
227
231
  "turndown": "^7.2.2",
228
- "typescript": "^5.0.0"
232
+ "typescript": "^5.0.0 || ^6.0.0"
229
233
  },
230
234
  "peerDependenciesMeta": {
231
235
  "syllable": {
@@ -258,5 +262,24 @@
258
262
  },
259
263
  "engines": {
260
264
  "node": ">=18.0.0"
265
+ },
266
+ "overrides": {
267
+ "lodash": "^4.17.24",
268
+ "@nuxt/module-builder": {
269
+ "typescript": "$typescript"
270
+ },
271
+ "postcss-url": {
272
+ "minimatch": "^10.2.3"
273
+ },
274
+ "eslint-plugin-sonarjs": {
275
+ "minimatch": "^10.2.3"
276
+ },
277
+ "prettier-plugin-glsl": {
278
+ "chevrotain": "^12.0.0",
279
+ "lodash": "^4.17.24"
280
+ },
281
+ "cypress": {
282
+ "@cypress/request": "^4.0.0"
283
+ }
261
284
  }
262
285
  }