@sonicjs-cms/core 2.12.1 → 2.14.0

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 (57) hide show
  1. package/dist/{chunk-3V2CQFIR.js → chunk-23DP6TO5.js} +89 -49
  2. package/dist/chunk-23DP6TO5.js.map +1 -0
  3. package/dist/{chunk-RBXFXT7H.cjs → chunk-3QCEYJLK.cjs} +9 -9
  4. package/dist/{chunk-RBXFXT7H.cjs.map → chunk-3QCEYJLK.cjs.map} +1 -1
  5. package/dist/{chunk-UFWE3MEJ.js → chunk-AFGOH2F6.js} +3 -3
  6. package/dist/{chunk-UFWE3MEJ.js.map → chunk-AFGOH2F6.js.map} +1 -1
  7. package/dist/{chunk-BWZBKLOC.js → chunk-CB7ONLGB.js} +3 -3
  8. package/dist/{chunk-BWZBKLOC.js.map → chunk-CB7ONLGB.js.map} +1 -1
  9. package/dist/{chunk-DHTCZZUB.cjs → chunk-DRWSHIFG.cjs} +252 -212
  10. package/dist/chunk-DRWSHIFG.cjs.map +1 -0
  11. package/dist/{chunk-673VROB3.js → chunk-GAVTTYMC.js} +5 -5
  12. package/dist/{chunk-673VROB3.js.map → chunk-GAVTTYMC.js.map} +1 -1
  13. package/dist/{chunk-6C6W54QP.js → chunk-JKNKO6LA.js} +22 -5
  14. package/dist/chunk-JKNKO6LA.js.map +1 -0
  15. package/dist/{chunk-76TX6XND.js → chunk-JTUCC6WZ.js} +18 -10
  16. package/dist/chunk-JTUCC6WZ.js.map +1 -0
  17. package/dist/{chunk-XK3TKOLQ.cjs → chunk-KZ2MFGET.cjs} +22 -5
  18. package/dist/chunk-KZ2MFGET.cjs.map +1 -0
  19. package/dist/{chunk-H4NHRZ6Y.cjs → chunk-QP3OHHON.cjs} +18 -10
  20. package/dist/chunk-QP3OHHON.cjs.map +1 -0
  21. package/dist/{chunk-IKBAY2M2.cjs → chunk-YULUPQZV.cjs} +5 -5
  22. package/dist/{chunk-IKBAY2M2.cjs.map → chunk-YULUPQZV.cjs.map} +1 -1
  23. package/dist/{chunk-HBUFGLEX.cjs → chunk-YYMPHM3I.cjs} +4 -4
  24. package/dist/{chunk-HBUFGLEX.cjs.map → chunk-YYMPHM3I.cjs.map} +1 -1
  25. package/dist/index.cjs +887 -121
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +2 -2
  28. package/dist/index.d.ts +2 -2
  29. package/dist/index.js +779 -13
  30. package/dist/index.js.map +1 -1
  31. package/dist/middleware.cjs +28 -28
  32. package/dist/middleware.js +2 -2
  33. package/dist/migrations-F7KVA74T.cjs +13 -0
  34. package/dist/{migrations-MIZFGFNS.cjs.map → migrations-F7KVA74T.cjs.map} +1 -1
  35. package/dist/migrations-WKONKRN7.js +4 -0
  36. package/dist/{migrations-AH2XIFSA.js.map → migrations-WKONKRN7.js.map} +1 -1
  37. package/dist/{plugin-bootstrap-DVGLQrcO.d.cts → plugin-bootstrap-BGwBraaN.d.cts} +1 -0
  38. package/dist/{plugin-bootstrap-CZ1GDum7.d.ts → plugin-bootstrap-Drns7X9w.d.ts} +1 -0
  39. package/dist/routes.cjs +28 -28
  40. package/dist/routes.js +5 -5
  41. package/dist/services.cjs +2 -2
  42. package/dist/services.d.cts +1 -1
  43. package/dist/services.d.ts +1 -1
  44. package/dist/services.js +1 -1
  45. package/dist/templates.cjs +19 -19
  46. package/dist/templates.js +2 -2
  47. package/dist/utils.cjs +11 -11
  48. package/dist/utils.js +1 -1
  49. package/package.json +3 -3
  50. package/dist/chunk-3V2CQFIR.js.map +0 -1
  51. package/dist/chunk-6C6W54QP.js.map +0 -1
  52. package/dist/chunk-76TX6XND.js.map +0 -1
  53. package/dist/chunk-DHTCZZUB.cjs.map +0 -1
  54. package/dist/chunk-H4NHRZ6Y.cjs.map +0 -1
  55. package/dist/chunk-XK3TKOLQ.cjs.map +0 -1
  56. package/dist/migrations-AH2XIFSA.js +0 -4
  57. package/dist/migrations-MIZFGFNS.cjs +0 -13
@@ -1,10 +1,10 @@
1
1
  import { getCacheService, CACHE_CONFIGS, SettingsService, getLogger, getAppInstance, buildRouteList, CATEGORY_INFO } from './chunk-TBJY2FF7.js';
2
- import { requireAuth, requireRole, isPluginActive, optionalAuth, rateLimit, AuthManager, logActivity, generateCsrfToken } from './chunk-UFWE3MEJ.js';
2
+ import { requireAuth, requireRole, isPluginActive, optionalAuth, rateLimit, AuthManager, logActivity, generateCsrfToken } from './chunk-AFGOH2F6.js';
3
3
  import { PluginService, createContentFromSubmission } from './chunk-H3XXBAMO.js';
4
- import { MigrationService } from './chunk-6C6W54QP.js';
5
- import { init_admin_layout_catalyst_template, renderDesignPage, renderCheckboxPage, renderTestimonialsList, renderCodeExamplesList, renderAlert, renderTable, renderPagination, renderConfirmationDialog, getConfirmationDialogScript, renderAdminLayoutCatalyst, renderAdminLayout, adminLayoutV2, renderForm } from './chunk-76TX6XND.js';
4
+ import { MigrationService } from './chunk-JKNKO6LA.js';
5
+ import { init_admin_layout_catalyst_template, renderDesignPage, renderCheckboxPage, renderTestimonialsList, renderCodeExamplesList, renderAlert, renderTable, renderPagination, renderConfirmationDialog, getConfirmationDialogScript, renderAdminLayoutCatalyst, renderAdminLayout, adminLayoutV2, renderForm } from './chunk-JTUCC6WZ.js';
6
6
  import { PluginBuilder, TurnstileService } from './chunk-J5WGMRSU.js';
7
- import { QueryFilterBuilder, getCoreVersion, getBlocksFieldConfig, parseBlocksValue } from './chunk-673VROB3.js';
7
+ import { QueryFilterBuilder, getCoreVersion, getBlocksFieldConfig, parseBlocksValue } from './chunk-GAVTTYMC.js';
8
8
  import { metricsTracker } from './chunk-FICTAGD4.js';
9
9
  import { escapeHtml, sanitizeRichText, sanitizeInput } from './chunk-TQABQWOP.js';
10
10
  import { Hono } from 'hono';
@@ -1136,8 +1136,8 @@ apiMediaRoutes.post("/upload", async (c) => {
1136
1136
  }
1137
1137
  const bucketName = c.env.BUCKET_NAME || "sonicjs-media-dev";
1138
1138
  const publicUrl = `https://pub-${bucketName}.r2.dev/${r2Key}`;
1139
- let width;
1140
- let height;
1139
+ let width = null;
1140
+ let height = null;
1141
1141
  if (file.type.startsWith("image/") && !file.type.includes("svg")) {
1142
1142
  try {
1143
1143
  const dimensions = await getImageDimensions(arrayBuffer);
@@ -1147,7 +1147,7 @@ apiMediaRoutes.post("/upload", async (c) => {
1147
1147
  console.warn("Failed to extract image dimensions:", error);
1148
1148
  }
1149
1149
  }
1150
- let thumbnailUrl;
1150
+ let thumbnailUrl = null;
1151
1151
  if (file.type.startsWith("image/") && c.env.IMAGES_ACCOUNT_ID) {
1152
1152
  thumbnailUrl = `https://imagedelivery.net/${c.env.IMAGES_ACCOUNT_ID}/${r2Key}/thumbnail`;
1153
1153
  }
@@ -1179,12 +1179,12 @@ apiMediaRoutes.post("/upload", async (c) => {
1179
1179
  mediaRecord.original_name,
1180
1180
  mediaRecord.mime_type,
1181
1181
  mediaRecord.size,
1182
- mediaRecord.width ?? null,
1183
- mediaRecord.height ?? null,
1182
+ mediaRecord.width,
1183
+ mediaRecord.height,
1184
1184
  mediaRecord.folder,
1185
1185
  mediaRecord.r2_key,
1186
1186
  mediaRecord.public_url,
1187
- mediaRecord.thumbnail_url ?? null,
1187
+ mediaRecord.thumbnail_url,
1188
1188
  mediaRecord.uploaded_by,
1189
1189
  mediaRecord.uploaded_at
1190
1190
  ).run();
@@ -1267,8 +1267,8 @@ apiMediaRoutes.post("/upload-multiple", async (c) => {
1267
1267
  }
1268
1268
  const bucketName = c.env.BUCKET_NAME || "sonicjs-media-dev";
1269
1269
  const publicUrl = `https://pub-${bucketName}.r2.dev/${r2Key}`;
1270
- let width;
1271
- let height;
1270
+ let width = null;
1271
+ let height = null;
1272
1272
  if (file.type.startsWith("image/") && !file.type.includes("svg")) {
1273
1273
  try {
1274
1274
  const dimensions = await getImageDimensions(arrayBuffer);
@@ -1278,7 +1278,7 @@ apiMediaRoutes.post("/upload-multiple", async (c) => {
1278
1278
  console.warn("Failed to extract image dimensions:", error);
1279
1279
  }
1280
1280
  }
1281
- let thumbnailUrl;
1281
+ let thumbnailUrl = null;
1282
1282
  if (file.type.startsWith("image/") && c.env.IMAGES_ACCOUNT_ID) {
1283
1283
  thumbnailUrl = `https://imagedelivery.net/${c.env.IMAGES_ACCOUNT_ID}/${r2Key}/thumbnail`;
1284
1284
  }
@@ -1309,12 +1309,12 @@ apiMediaRoutes.post("/upload-multiple", async (c) => {
1309
1309
  mediaRecord.original_name,
1310
1310
  mediaRecord.mime_type,
1311
1311
  mediaRecord.size,
1312
- mediaRecord.width ?? null,
1313
- mediaRecord.height ?? null,
1312
+ mediaRecord.width,
1313
+ mediaRecord.height,
1314
1314
  mediaRecord.folder,
1315
1315
  mediaRecord.r2_key,
1316
1316
  mediaRecord.public_url,
1317
- mediaRecord.thumbnail_url ?? null,
1317
+ mediaRecord.thumbnail_url,
1318
1318
  mediaRecord.uploaded_by,
1319
1319
  mediaRecord.uploaded_at
1320
1320
  ).run();
@@ -2350,7 +2350,7 @@ adminApiRoutes.delete("/collections/:id", async (c) => {
2350
2350
  });
2351
2351
  adminApiRoutes.get("/migrations/status", async (c) => {
2352
2352
  try {
2353
- const { MigrationService: MigrationService2 } = await import('./migrations-AH2XIFSA.js');
2353
+ const { MigrationService: MigrationService2 } = await import('./migrations-WKONKRN7.js');
2354
2354
  const db = c.env.DB;
2355
2355
  const migrationService = new MigrationService2(db);
2356
2356
  const status = await migrationService.getMigrationStatus();
@@ -2375,26 +2375,29 @@ adminApiRoutes.post("/migrations/run", async (c) => {
2375
2375
  error: "Unauthorized. Admin access required."
2376
2376
  }, 403);
2377
2377
  }
2378
- const { MigrationService: MigrationService2 } = await import('./migrations-AH2XIFSA.js');
2378
+ const { MigrationService: MigrationService2 } = await import('./migrations-WKONKRN7.js');
2379
2379
  const db = c.env.DB;
2380
2380
  const migrationService = new MigrationService2(db);
2381
2381
  const result = await migrationService.runPendingMigrations();
2382
2382
  return c.json({
2383
2383
  success: result.success,
2384
2384
  message: result.message,
2385
- applied: result.applied
2385
+ applied: result.applied,
2386
+ errors: result.errors
2386
2387
  });
2387
2388
  } catch (error) {
2388
2389
  console.error("Error running migrations:", error);
2390
+ const errorMessage = error instanceof Error ? error.message : String(error);
2389
2391
  return c.json({
2390
2392
  success: false,
2391
- error: "Failed to run migrations"
2393
+ error: `Failed to run migrations: ${errorMessage}`,
2394
+ errors: [errorMessage]
2392
2395
  }, 500);
2393
2396
  }
2394
2397
  });
2395
2398
  adminApiRoutes.get("/migrations/validate", async (c) => {
2396
2399
  try {
2397
- const { MigrationService: MigrationService2 } = await import('./migrations-AH2XIFSA.js');
2400
+ const { MigrationService: MigrationService2 } = await import('./migrations-WKONKRN7.js');
2398
2401
  const db = c.env.DB;
2399
2402
  const migrationService = new MigrationService2(db);
2400
2403
  const validation = await migrationService.validateSchema();
@@ -3622,7 +3625,10 @@ function renderDynamicField(field, options = {}) {
3622
3625
  `;
3623
3626
  break;
3624
3627
  case "select":
3625
- const selectOptions = opts.options || [];
3628
+ const selectOptions = opts.options || (Array.isArray(opts.enum) ? opts.enum.map((optionValue, index) => ({
3629
+ value: optionValue,
3630
+ label: opts.enumLabels?.[index] || optionValue
3631
+ })) : []);
3626
3632
  const multiple = opts.multiple ? "multiple" : "";
3627
3633
  const selectedValues = Array.isArray(value) ? value : [value];
3628
3634
  fieldHTML = `
@@ -5053,7 +5059,7 @@ function renderCustomProfileSection(config, customData) {
5053
5059
  }).join("\n");
5054
5060
  return `
5055
5061
  <!-- Custom Profile Fields -->
5056
- <div class="pt-6 border-t border-zinc-950/5 dark:border-white/5">
5062
+ <div class="py-6 border-t border-b border-zinc-950/5 dark:border-white/5">
5057
5063
  <h3 class="text-base font-semibold text-zinc-950 dark:text-white mb-4">Custom Profile Fields</h3>
5058
5064
  <div class="space-y-4">
5059
5065
  ${fieldsHtml}
@@ -13553,7 +13559,7 @@ userRoutes.put("/users/:id", async (c) => {
13553
13559
  await updatePasswordStmt.bind(passwordHash, Date.now(), userId).run();
13554
13560
  }
13555
13561
  const hasProfileData = profileDisplayName || profileBio || profileCompany || profileJobTitle || profileWebsite || profileLocation || profileDateOfBirth;
13556
- if (hasProfileData) {
13562
+ if (hasProfileData || customDataJson !== null) {
13557
13563
  const now = Date.now();
13558
13564
  const profileCheckStmt = db.prepare(`SELECT id FROM user_profiles WHERE user_id = ?`);
13559
13565
  const existingProfile = await profileCheckStmt.bind(userId).first();
@@ -18214,7 +18220,7 @@ var AVAILABLE_PLUGINS = [
18214
18220
  version: "2.0.0",
18215
18221
  author: "Community Developer",
18216
18222
  category: "content",
18217
- icon: "\u2753",
18223
+ icon: "\xE2\x9D\x93",
18218
18224
  permissions: ["manage:faqs"],
18219
18225
  dependencies: [],
18220
18226
  is_core: false
@@ -18227,7 +18233,7 @@ var AVAILABLE_PLUGINS = [
18227
18233
  version: "1.0.0-beta.1",
18228
18234
  author: "SonicJS",
18229
18235
  category: "demo",
18230
- icon: "\u{1F3AF}",
18236
+ icon: "\xF0\x9F\x8E\xAF",
18231
18237
  permissions: [],
18232
18238
  dependencies: [],
18233
18239
  is_core: false
@@ -18240,7 +18246,7 @@ var AVAILABLE_PLUGINS = [
18240
18246
  version: "1.0.0-beta.1",
18241
18247
  author: "SonicJS Team",
18242
18248
  category: "system",
18243
- icon: "\u{1F5C4}\uFE0F",
18249
+ icon: "\xF0\x9F\x97\x84\xEF\xB8\x8F",
18244
18250
  permissions: ["manage:database", "admin"],
18245
18251
  dependencies: [],
18246
18252
  is_core: false
@@ -18253,7 +18259,7 @@ var AVAILABLE_PLUGINS = [
18253
18259
  version: "1.0.0-beta.1",
18254
18260
  author: "SonicJS Team",
18255
18261
  category: "development",
18256
- icon: "\u{1F331}",
18262
+ icon: "\xF0\x9F\x8C\xB1",
18257
18263
  permissions: ["admin"],
18258
18264
  dependencies: [],
18259
18265
  is_core: false
@@ -18266,7 +18272,7 @@ var AVAILABLE_PLUGINS = [
18266
18272
  version: "1.0.0",
18267
18273
  author: "SonicJS Team",
18268
18274
  category: "editor",
18269
- icon: "\u270D\uFE0F",
18275
+ icon: "\xE2\x9C\x8D\xEF\xB8\x8F",
18270
18276
  permissions: [],
18271
18277
  dependencies: [],
18272
18278
  is_core: true
@@ -18279,7 +18285,7 @@ var AVAILABLE_PLUGINS = [
18279
18285
  version: "1.0.0",
18280
18286
  author: "SonicJS Team",
18281
18287
  category: "editor",
18282
- icon: "\u{1F4DD}",
18288
+ icon: "\xF0\x9F\x93\x9D",
18283
18289
  permissions: [],
18284
18290
  dependencies: [],
18285
18291
  is_core: false
@@ -18292,7 +18298,7 @@ var AVAILABLE_PLUGINS = [
18292
18298
  version: "1.0.0",
18293
18299
  author: "SonicJS Team",
18294
18300
  category: "editor",
18295
- icon: "\u{1F4DD}",
18301
+ icon: "\xF0\x9F\x93\x9D",
18296
18302
  permissions: [],
18297
18303
  dependencies: [],
18298
18304
  is_core: false
@@ -18305,7 +18311,7 @@ var AVAILABLE_PLUGINS = [
18305
18311
  version: "1.0.0",
18306
18312
  author: "SonicJS Team",
18307
18313
  category: "security",
18308
- icon: "\u{1F6E1}\uFE0F",
18314
+ icon: "\xF0\x9F\x9B\xA1\xEF\xB8\x8F",
18309
18315
  permissions: [],
18310
18316
  dependencies: [],
18311
18317
  is_core: true
@@ -18318,7 +18324,7 @@ var AVAILABLE_PLUGINS = [
18318
18324
  version: "1.0.0-beta.1",
18319
18325
  author: "SonicJS Team",
18320
18326
  category: "security",
18321
- icon: "\u{1F6E1}\uFE0F",
18327
+ icon: "\xF0\x9F\x9B\xA1\xEF\xB8\x8F",
18322
18328
  permissions: ["security-audit:view", "security-audit:manage"],
18323
18329
  dependencies: [],
18324
18330
  is_core: false
@@ -18331,10 +18337,23 @@ var AVAILABLE_PLUGINS = [
18331
18337
  version: "1.0.0",
18332
18338
  author: "SonicJS Team",
18333
18339
  category: "search",
18334
- icon: "\u{1F50D}",
18340
+ icon: "\xF0\x9F\x94\x8D",
18335
18341
  permissions: [],
18336
18342
  dependencies: [],
18337
18343
  is_core: true
18344
+ },
18345
+ {
18346
+ id: "form-builder",
18347
+ name: "form-builder",
18348
+ display_name: "Form Builder",
18349
+ description: "Drag-and-drop form builder with conditional logic, file uploads, and email notifications. Create contact forms, surveys, and data collection forms.",
18350
+ version: "1.0.0",
18351
+ author: "SonicJS Team",
18352
+ category: "content",
18353
+ icon: "\u{1F4DD}",
18354
+ permissions: ["forms:create", "forms:manage", "forms:submissions"],
18355
+ dependencies: [],
18356
+ is_core: false
18338
18357
  }
18339
18358
  ];
18340
18359
  adminPluginRoutes.get("/", async (c) => {
@@ -18540,7 +18559,7 @@ adminPluginRoutes.post("/install", async (c) => {
18540
18559
  version: "2.0.0",
18541
18560
  author: "Community Developer",
18542
18561
  category: "content",
18543
- icon: "\u2753",
18562
+ icon: "\xE2\x9D\x93",
18544
18563
  permissions: ["manage:faqs"],
18545
18564
  dependencies: [],
18546
18565
  settings: {
@@ -18560,7 +18579,7 @@ adminPluginRoutes.post("/install", async (c) => {
18560
18579
  version: "1.0.0-beta.1",
18561
18580
  author: "SonicJS",
18562
18581
  category: "demo",
18563
- icon: "\u{1F3AF}",
18582
+ icon: "\xF0\x9F\x8E\xAF",
18564
18583
  permissions: [],
18565
18584
  dependencies: [],
18566
18585
  settings: {
@@ -18580,7 +18599,7 @@ adminPluginRoutes.post("/install", async (c) => {
18580
18599
  version: "1.0.0-beta.1",
18581
18600
  author: "SonicJS Team",
18582
18601
  category: "security",
18583
- icon: "\u{1F510}",
18602
+ icon: "\xF0\x9F\x94\x90",
18584
18603
  permissions: ["manage:users", "manage:roles", "manage:permissions"],
18585
18604
  dependencies: [],
18586
18605
  is_core: true,
@@ -18597,7 +18616,7 @@ adminPluginRoutes.post("/install", async (c) => {
18597
18616
  version: "1.0.0-beta.1",
18598
18617
  author: "SonicJS Team",
18599
18618
  category: "media",
18600
- icon: "\u{1F4F8}",
18619
+ icon: "\xF0\x9F\x93\xB8",
18601
18620
  permissions: ["manage:media", "upload:files"],
18602
18621
  dependencies: [],
18603
18622
  is_core: true,
@@ -18614,7 +18633,7 @@ adminPluginRoutes.post("/install", async (c) => {
18614
18633
  version: "1.0.0-beta.1",
18615
18634
  author: "SonicJS Team",
18616
18635
  category: "content",
18617
- icon: "\u{1F504}",
18636
+ icon: "\xF0\x9F\x94\x84",
18618
18637
  permissions: ["manage:workflows", "approve:content"],
18619
18638
  dependencies: [],
18620
18639
  is_core: true,
@@ -18631,7 +18650,7 @@ adminPluginRoutes.post("/install", async (c) => {
18631
18650
  version: "1.0.0-beta.1",
18632
18651
  author: "SonicJS Team",
18633
18652
  category: "system",
18634
- icon: "\u{1F5C4}\uFE0F",
18653
+ icon: "\xF0\x9F\x97\x84\xEF\xB8\x8F",
18635
18654
  permissions: ["manage:database", "admin"],
18636
18655
  dependencies: [],
18637
18656
  is_core: false,
@@ -18653,7 +18672,7 @@ adminPluginRoutes.post("/install", async (c) => {
18653
18672
  version: "1.0.0-beta.1",
18654
18673
  author: "SonicJS Team",
18655
18674
  category: "development",
18656
- icon: "\u{1F331}",
18675
+ icon: "\xF0\x9F\x8C\xB1",
18657
18676
  permissions: ["admin"],
18658
18677
  dependencies: [],
18659
18678
  is_core: false,
@@ -18674,7 +18693,7 @@ adminPluginRoutes.post("/install", async (c) => {
18674
18693
  version: "1.0.0",
18675
18694
  author: "SonicJS Team",
18676
18695
  category: "editor",
18677
- icon: "\u270D\uFE0F",
18696
+ icon: "\xE2\x9C\x8D\xEF\xB8\x8F",
18678
18697
  permissions: [],
18679
18698
  dependencies: [],
18680
18699
  is_core: true,
@@ -18696,7 +18715,7 @@ adminPluginRoutes.post("/install", async (c) => {
18696
18715
  version: "1.0.0",
18697
18716
  author: "SonicJS Team",
18698
18717
  category: "editor",
18699
- icon: "\u{1F4DD}",
18718
+ icon: "\xF0\x9F\x93\x9D",
18700
18719
  permissions: [],
18701
18720
  dependencies: [],
18702
18721
  is_core: false,
@@ -18718,7 +18737,7 @@ adminPluginRoutes.post("/install", async (c) => {
18718
18737
  version: "1.0.0",
18719
18738
  author: "SonicJS Team",
18720
18739
  category: "editor",
18721
- icon: "\u{1F4DD}",
18740
+ icon: "\xF0\x9F\x93\x9D",
18722
18741
  permissions: [],
18723
18742
  dependencies: [],
18724
18743
  is_core: false,
@@ -18740,7 +18759,7 @@ adminPluginRoutes.post("/install", async (c) => {
18740
18759
  version: "1.0.0-beta.1",
18741
18760
  author: "SonicJS Team",
18742
18761
  category: "security",
18743
- icon: "\u{1F6E1}\uFE0F",
18762
+ icon: "\xF0\x9F\x9B\xA1\xEF\xB8\x8F",
18744
18763
  permissions: ["security-audit:view", "security-audit:manage"],
18745
18764
  dependencies: [],
18746
18765
  is_core: false,
@@ -18788,7 +18807,7 @@ adminPluginRoutes.post("/install", async (c) => {
18788
18807
  version: "1.0.0",
18789
18808
  author: "SonicJS Team",
18790
18809
  category: "search",
18791
- icon: "\u{1F50D}",
18810
+ icon: "\xF0\x9F\x94\x8D",
18792
18811
  permissions: [],
18793
18812
  dependencies: [],
18794
18813
  is_core: true,
@@ -18805,7 +18824,7 @@ adminPluginRoutes.post("/install", async (c) => {
18805
18824
  version: "1.0.0",
18806
18825
  author: "SonicJS Team",
18807
18826
  category: "security",
18808
- icon: "\u{1F6E1}\uFE0F",
18827
+ icon: "\xF0\x9F\x9B\xA1\xEF\xB8\x8F",
18809
18828
  permissions: [],
18810
18829
  dependencies: [],
18811
18830
  is_core: true,
@@ -18823,6 +18842,27 @@ adminPluginRoutes.post("/install", async (c) => {
18823
18842
  });
18824
18843
  return c.json({ success: true, plugin: turnstilePlugin });
18825
18844
  }
18845
+ if (body.name === "form-builder") {
18846
+ const formBuilderPlugin = await pluginService.installPlugin({
18847
+ id: "form-builder",
18848
+ name: "form-builder",
18849
+ display_name: "Form Builder",
18850
+ description: "Drag-and-drop form builder with conditional logic, file uploads, and email notifications. Create contact forms, surveys, and data collection forms.",
18851
+ version: "1.0.0",
18852
+ author: "SonicJS Team",
18853
+ category: "content",
18854
+ icon: "\u{1F4DD}",
18855
+ permissions: ["forms:create", "forms:manage", "forms:submissions"],
18856
+ dependencies: [],
18857
+ settings: {
18858
+ enableNotifications: true,
18859
+ enableFileUploads: true,
18860
+ maxSubmissionsPerForm: 0,
18861
+ submissionRetentionDays: 90
18862
+ }
18863
+ });
18864
+ return c.json({ success: true, plugin: formBuilderPlugin });
18865
+ }
18826
18866
  return c.json({ error: "Plugin not found in registry" }, 404);
18827
18867
  } catch (error) {
18828
18868
  console.error("Error installing plugin:", error);
@@ -29350,5 +29390,5 @@ var ROUTES_INFO = {
29350
29390
  };
29351
29391
 
29352
29392
  export { ROUTES_INFO, adminCheckboxRoutes, adminCollectionsRoutes, adminDesignRoutes, adminFormsRoutes, adminLogsRoutes, adminMediaRoutes, adminPluginRoutes, adminSettingsRoutes, admin_api_default, admin_code_examples_default, admin_content_default, admin_testimonials_default, api_content_crud_default, api_default, api_media_default, api_system_default, auth_default, createUserProfilesPlugin, defineUserProfile, getConfirmationDialogScript2 as getConfirmationDialogScript, getUserProfileConfig, public_forms_default, renderConfirmationDialog2 as renderConfirmationDialog, router, router2, test_cleanup_default, userProfilesPlugin, userRoutes };
29353
- //# sourceMappingURL=chunk-3V2CQFIR.js.map
29354
- //# sourceMappingURL=chunk-3V2CQFIR.js.map
29393
+ //# sourceMappingURL=chunk-23DP6TO5.js.map
29394
+ //# sourceMappingURL=chunk-23DP6TO5.js.map