@sonicjs-cms/core 2.12.1 → 2.13.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 (49) hide show
  1. package/dist/{chunk-RBXFXT7H.cjs → chunk-3QCEYJLK.cjs} +9 -9
  2. package/dist/{chunk-RBXFXT7H.cjs.map → chunk-3QCEYJLK.cjs.map} +1 -1
  3. package/dist/{chunk-6C6W54QP.js → chunk-3VAKUFNQ.js} +2 -2
  4. package/dist/{chunk-6C6W54QP.js.map → chunk-3VAKUFNQ.js.map} +1 -1
  5. package/dist/{chunk-BWZBKLOC.js → chunk-CB7ONLGB.js} +3 -3
  6. package/dist/{chunk-BWZBKLOC.js.map → chunk-CB7ONLGB.js.map} +1 -1
  7. package/dist/{chunk-673VROB3.js → chunk-CO4B5EYF.js} +5 -5
  8. package/dist/{chunk-673VROB3.js.map → chunk-CO4B5EYF.js.map} +1 -1
  9. package/dist/{chunk-UFWE3MEJ.js → chunk-DB2GJJTM.js} +3 -3
  10. package/dist/{chunk-UFWE3MEJ.js.map → chunk-DB2GJJTM.js.map} +1 -1
  11. package/dist/{chunk-HBUFGLEX.cjs → chunk-EGUDIX6Q.cjs} +4 -4
  12. package/dist/{chunk-HBUFGLEX.cjs.map → chunk-EGUDIX6Q.cjs.map} +1 -1
  13. package/dist/{chunk-DHTCZZUB.cjs → chunk-HVTSE2SF.cjs} +247 -210
  14. package/dist/chunk-HVTSE2SF.cjs.map +1 -0
  15. package/dist/{chunk-3V2CQFIR.js → chunk-IYFSNRZN.js} +84 -47
  16. package/dist/chunk-IYFSNRZN.js.map +1 -0
  17. package/dist/{chunk-76TX6XND.js → chunk-JTUCC6WZ.js} +18 -10
  18. package/dist/chunk-JTUCC6WZ.js.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-XK3TKOLQ.cjs → chunk-SER23XI4.cjs} +2 -2
  22. package/dist/{chunk-XK3TKOLQ.cjs.map → chunk-SER23XI4.cjs.map} +1 -1
  23. package/dist/{chunk-IKBAY2M2.cjs → chunk-XCP5GCBE.cjs} +5 -5
  24. package/dist/{chunk-IKBAY2M2.cjs.map → chunk-XCP5GCBE.cjs.map} +1 -1
  25. package/dist/index.cjs +131 -119
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.js +23 -11
  28. package/dist/index.js.map +1 -1
  29. package/dist/middleware.cjs +28 -28
  30. package/dist/middleware.js +2 -2
  31. package/dist/migrations-GMHTJI7D.cjs +13 -0
  32. package/dist/{migrations-MIZFGFNS.cjs.map → migrations-GMHTJI7D.cjs.map} +1 -1
  33. package/dist/migrations-IVFIDOSO.js +4 -0
  34. package/dist/{migrations-AH2XIFSA.js.map → migrations-IVFIDOSO.js.map} +1 -1
  35. package/dist/routes.cjs +28 -28
  36. package/dist/routes.js +5 -5
  37. package/dist/services.cjs +2 -2
  38. package/dist/services.js +1 -1
  39. package/dist/templates.cjs +19 -19
  40. package/dist/templates.js +2 -2
  41. package/dist/utils.cjs +11 -11
  42. package/dist/utils.js +1 -1
  43. package/package.json +3 -3
  44. package/dist/chunk-3V2CQFIR.js.map +0 -1
  45. package/dist/chunk-76TX6XND.js.map +0 -1
  46. package/dist/chunk-DHTCZZUB.cjs.map +0 -1
  47. package/dist/chunk-H4NHRZ6Y.cjs.map +0 -1
  48. package/dist/migrations-AH2XIFSA.js +0 -4
  49. 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-DB2GJJTM.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-3VAKUFNQ.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-CO4B5EYF.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-IVFIDOSO.js');
2354
2354
  const db = c.env.DB;
2355
2355
  const migrationService = new MigrationService2(db);
2356
2356
  const status = await migrationService.getMigrationStatus();
@@ -2375,7 +2375,7 @@ 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-IVFIDOSO.js');
2379
2379
  const db = c.env.DB;
2380
2380
  const migrationService = new MigrationService2(db);
2381
2381
  const result = await migrationService.runPendingMigrations();
@@ -2394,7 +2394,7 @@ adminApiRoutes.post("/migrations/run", async (c) => {
2394
2394
  });
2395
2395
  adminApiRoutes.get("/migrations/validate", async (c) => {
2396
2396
  try {
2397
- const { MigrationService: MigrationService2 } = await import('./migrations-AH2XIFSA.js');
2397
+ const { MigrationService: MigrationService2 } = await import('./migrations-IVFIDOSO.js');
2398
2398
  const db = c.env.DB;
2399
2399
  const migrationService = new MigrationService2(db);
2400
2400
  const validation = await migrationService.validateSchema();
@@ -3622,7 +3622,10 @@ function renderDynamicField(field, options = {}) {
3622
3622
  `;
3623
3623
  break;
3624
3624
  case "select":
3625
- const selectOptions = opts.options || [];
3625
+ const selectOptions = opts.options || (Array.isArray(opts.enum) ? opts.enum.map((optionValue, index) => ({
3626
+ value: optionValue,
3627
+ label: opts.enumLabels?.[index] || optionValue
3628
+ })) : []);
3626
3629
  const multiple = opts.multiple ? "multiple" : "";
3627
3630
  const selectedValues = Array.isArray(value) ? value : [value];
3628
3631
  fieldHTML = `
@@ -5053,7 +5056,7 @@ function renderCustomProfileSection(config, customData) {
5053
5056
  }).join("\n");
5054
5057
  return `
5055
5058
  <!-- Custom Profile Fields -->
5056
- <div class="pt-6 border-t border-zinc-950/5 dark:border-white/5">
5059
+ <div class="py-6 border-t border-b border-zinc-950/5 dark:border-white/5">
5057
5060
  <h3 class="text-base font-semibold text-zinc-950 dark:text-white mb-4">Custom Profile Fields</h3>
5058
5061
  <div class="space-y-4">
5059
5062
  ${fieldsHtml}
@@ -13553,7 +13556,7 @@ userRoutes.put("/users/:id", async (c) => {
13553
13556
  await updatePasswordStmt.bind(passwordHash, Date.now(), userId).run();
13554
13557
  }
13555
13558
  const hasProfileData = profileDisplayName || profileBio || profileCompany || profileJobTitle || profileWebsite || profileLocation || profileDateOfBirth;
13556
- if (hasProfileData) {
13559
+ if (hasProfileData || customDataJson !== null) {
13557
13560
  const now = Date.now();
13558
13561
  const profileCheckStmt = db.prepare(`SELECT id FROM user_profiles WHERE user_id = ?`);
13559
13562
  const existingProfile = await profileCheckStmt.bind(userId).first();
@@ -18214,7 +18217,7 @@ var AVAILABLE_PLUGINS = [
18214
18217
  version: "2.0.0",
18215
18218
  author: "Community Developer",
18216
18219
  category: "content",
18217
- icon: "\u2753",
18220
+ icon: "\xE2\x9D\x93",
18218
18221
  permissions: ["manage:faqs"],
18219
18222
  dependencies: [],
18220
18223
  is_core: false
@@ -18227,7 +18230,7 @@ var AVAILABLE_PLUGINS = [
18227
18230
  version: "1.0.0-beta.1",
18228
18231
  author: "SonicJS",
18229
18232
  category: "demo",
18230
- icon: "\u{1F3AF}",
18233
+ icon: "\xF0\x9F\x8E\xAF",
18231
18234
  permissions: [],
18232
18235
  dependencies: [],
18233
18236
  is_core: false
@@ -18240,7 +18243,7 @@ var AVAILABLE_PLUGINS = [
18240
18243
  version: "1.0.0-beta.1",
18241
18244
  author: "SonicJS Team",
18242
18245
  category: "system",
18243
- icon: "\u{1F5C4}\uFE0F",
18246
+ icon: "\xF0\x9F\x97\x84\xEF\xB8\x8F",
18244
18247
  permissions: ["manage:database", "admin"],
18245
18248
  dependencies: [],
18246
18249
  is_core: false
@@ -18253,7 +18256,7 @@ var AVAILABLE_PLUGINS = [
18253
18256
  version: "1.0.0-beta.1",
18254
18257
  author: "SonicJS Team",
18255
18258
  category: "development",
18256
- icon: "\u{1F331}",
18259
+ icon: "\xF0\x9F\x8C\xB1",
18257
18260
  permissions: ["admin"],
18258
18261
  dependencies: [],
18259
18262
  is_core: false
@@ -18266,7 +18269,7 @@ var AVAILABLE_PLUGINS = [
18266
18269
  version: "1.0.0",
18267
18270
  author: "SonicJS Team",
18268
18271
  category: "editor",
18269
- icon: "\u270D\uFE0F",
18272
+ icon: "\xE2\x9C\x8D\xEF\xB8\x8F",
18270
18273
  permissions: [],
18271
18274
  dependencies: [],
18272
18275
  is_core: true
@@ -18279,7 +18282,7 @@ var AVAILABLE_PLUGINS = [
18279
18282
  version: "1.0.0",
18280
18283
  author: "SonicJS Team",
18281
18284
  category: "editor",
18282
- icon: "\u{1F4DD}",
18285
+ icon: "\xF0\x9F\x93\x9D",
18283
18286
  permissions: [],
18284
18287
  dependencies: [],
18285
18288
  is_core: false
@@ -18292,7 +18295,7 @@ var AVAILABLE_PLUGINS = [
18292
18295
  version: "1.0.0",
18293
18296
  author: "SonicJS Team",
18294
18297
  category: "editor",
18295
- icon: "\u{1F4DD}",
18298
+ icon: "\xF0\x9F\x93\x9D",
18296
18299
  permissions: [],
18297
18300
  dependencies: [],
18298
18301
  is_core: false
@@ -18305,7 +18308,7 @@ var AVAILABLE_PLUGINS = [
18305
18308
  version: "1.0.0",
18306
18309
  author: "SonicJS Team",
18307
18310
  category: "security",
18308
- icon: "\u{1F6E1}\uFE0F",
18311
+ icon: "\xF0\x9F\x9B\xA1\xEF\xB8\x8F",
18309
18312
  permissions: [],
18310
18313
  dependencies: [],
18311
18314
  is_core: true
@@ -18318,7 +18321,7 @@ var AVAILABLE_PLUGINS = [
18318
18321
  version: "1.0.0-beta.1",
18319
18322
  author: "SonicJS Team",
18320
18323
  category: "security",
18321
- icon: "\u{1F6E1}\uFE0F",
18324
+ icon: "\xF0\x9F\x9B\xA1\xEF\xB8\x8F",
18322
18325
  permissions: ["security-audit:view", "security-audit:manage"],
18323
18326
  dependencies: [],
18324
18327
  is_core: false
@@ -18331,10 +18334,23 @@ var AVAILABLE_PLUGINS = [
18331
18334
  version: "1.0.0",
18332
18335
  author: "SonicJS Team",
18333
18336
  category: "search",
18334
- icon: "\u{1F50D}",
18337
+ icon: "\xF0\x9F\x94\x8D",
18335
18338
  permissions: [],
18336
18339
  dependencies: [],
18337
18340
  is_core: true
18341
+ },
18342
+ {
18343
+ id: "form-builder",
18344
+ name: "form-builder",
18345
+ display_name: "Form Builder",
18346
+ description: "Drag-and-drop form builder with conditional logic, file uploads, and email notifications. Create contact forms, surveys, and data collection forms.",
18347
+ version: "1.0.0",
18348
+ author: "SonicJS Team",
18349
+ category: "content",
18350
+ icon: "\u{1F4DD}",
18351
+ permissions: ["forms:create", "forms:manage", "forms:submissions"],
18352
+ dependencies: [],
18353
+ is_core: false
18338
18354
  }
18339
18355
  ];
18340
18356
  adminPluginRoutes.get("/", async (c) => {
@@ -18540,7 +18556,7 @@ adminPluginRoutes.post("/install", async (c) => {
18540
18556
  version: "2.0.0",
18541
18557
  author: "Community Developer",
18542
18558
  category: "content",
18543
- icon: "\u2753",
18559
+ icon: "\xE2\x9D\x93",
18544
18560
  permissions: ["manage:faqs"],
18545
18561
  dependencies: [],
18546
18562
  settings: {
@@ -18560,7 +18576,7 @@ adminPluginRoutes.post("/install", async (c) => {
18560
18576
  version: "1.0.0-beta.1",
18561
18577
  author: "SonicJS",
18562
18578
  category: "demo",
18563
- icon: "\u{1F3AF}",
18579
+ icon: "\xF0\x9F\x8E\xAF",
18564
18580
  permissions: [],
18565
18581
  dependencies: [],
18566
18582
  settings: {
@@ -18580,7 +18596,7 @@ adminPluginRoutes.post("/install", async (c) => {
18580
18596
  version: "1.0.0-beta.1",
18581
18597
  author: "SonicJS Team",
18582
18598
  category: "security",
18583
- icon: "\u{1F510}",
18599
+ icon: "\xF0\x9F\x94\x90",
18584
18600
  permissions: ["manage:users", "manage:roles", "manage:permissions"],
18585
18601
  dependencies: [],
18586
18602
  is_core: true,
@@ -18597,7 +18613,7 @@ adminPluginRoutes.post("/install", async (c) => {
18597
18613
  version: "1.0.0-beta.1",
18598
18614
  author: "SonicJS Team",
18599
18615
  category: "media",
18600
- icon: "\u{1F4F8}",
18616
+ icon: "\xF0\x9F\x93\xB8",
18601
18617
  permissions: ["manage:media", "upload:files"],
18602
18618
  dependencies: [],
18603
18619
  is_core: true,
@@ -18614,7 +18630,7 @@ adminPluginRoutes.post("/install", async (c) => {
18614
18630
  version: "1.0.0-beta.1",
18615
18631
  author: "SonicJS Team",
18616
18632
  category: "content",
18617
- icon: "\u{1F504}",
18633
+ icon: "\xF0\x9F\x94\x84",
18618
18634
  permissions: ["manage:workflows", "approve:content"],
18619
18635
  dependencies: [],
18620
18636
  is_core: true,
@@ -18631,7 +18647,7 @@ adminPluginRoutes.post("/install", async (c) => {
18631
18647
  version: "1.0.0-beta.1",
18632
18648
  author: "SonicJS Team",
18633
18649
  category: "system",
18634
- icon: "\u{1F5C4}\uFE0F",
18650
+ icon: "\xF0\x9F\x97\x84\xEF\xB8\x8F",
18635
18651
  permissions: ["manage:database", "admin"],
18636
18652
  dependencies: [],
18637
18653
  is_core: false,
@@ -18653,7 +18669,7 @@ adminPluginRoutes.post("/install", async (c) => {
18653
18669
  version: "1.0.0-beta.1",
18654
18670
  author: "SonicJS Team",
18655
18671
  category: "development",
18656
- icon: "\u{1F331}",
18672
+ icon: "\xF0\x9F\x8C\xB1",
18657
18673
  permissions: ["admin"],
18658
18674
  dependencies: [],
18659
18675
  is_core: false,
@@ -18674,7 +18690,7 @@ adminPluginRoutes.post("/install", async (c) => {
18674
18690
  version: "1.0.0",
18675
18691
  author: "SonicJS Team",
18676
18692
  category: "editor",
18677
- icon: "\u270D\uFE0F",
18693
+ icon: "\xE2\x9C\x8D\xEF\xB8\x8F",
18678
18694
  permissions: [],
18679
18695
  dependencies: [],
18680
18696
  is_core: true,
@@ -18696,7 +18712,7 @@ adminPluginRoutes.post("/install", async (c) => {
18696
18712
  version: "1.0.0",
18697
18713
  author: "SonicJS Team",
18698
18714
  category: "editor",
18699
- icon: "\u{1F4DD}",
18715
+ icon: "\xF0\x9F\x93\x9D",
18700
18716
  permissions: [],
18701
18717
  dependencies: [],
18702
18718
  is_core: false,
@@ -18718,7 +18734,7 @@ adminPluginRoutes.post("/install", async (c) => {
18718
18734
  version: "1.0.0",
18719
18735
  author: "SonicJS Team",
18720
18736
  category: "editor",
18721
- icon: "\u{1F4DD}",
18737
+ icon: "\xF0\x9F\x93\x9D",
18722
18738
  permissions: [],
18723
18739
  dependencies: [],
18724
18740
  is_core: false,
@@ -18740,7 +18756,7 @@ adminPluginRoutes.post("/install", async (c) => {
18740
18756
  version: "1.0.0-beta.1",
18741
18757
  author: "SonicJS Team",
18742
18758
  category: "security",
18743
- icon: "\u{1F6E1}\uFE0F",
18759
+ icon: "\xF0\x9F\x9B\xA1\xEF\xB8\x8F",
18744
18760
  permissions: ["security-audit:view", "security-audit:manage"],
18745
18761
  dependencies: [],
18746
18762
  is_core: false,
@@ -18788,7 +18804,7 @@ adminPluginRoutes.post("/install", async (c) => {
18788
18804
  version: "1.0.0",
18789
18805
  author: "SonicJS Team",
18790
18806
  category: "search",
18791
- icon: "\u{1F50D}",
18807
+ icon: "\xF0\x9F\x94\x8D",
18792
18808
  permissions: [],
18793
18809
  dependencies: [],
18794
18810
  is_core: true,
@@ -18805,7 +18821,7 @@ adminPluginRoutes.post("/install", async (c) => {
18805
18821
  version: "1.0.0",
18806
18822
  author: "SonicJS Team",
18807
18823
  category: "security",
18808
- icon: "\u{1F6E1}\uFE0F",
18824
+ icon: "\xF0\x9F\x9B\xA1\xEF\xB8\x8F",
18809
18825
  permissions: [],
18810
18826
  dependencies: [],
18811
18827
  is_core: true,
@@ -18823,6 +18839,27 @@ adminPluginRoutes.post("/install", async (c) => {
18823
18839
  });
18824
18840
  return c.json({ success: true, plugin: turnstilePlugin });
18825
18841
  }
18842
+ if (body.name === "form-builder") {
18843
+ const formBuilderPlugin = await pluginService.installPlugin({
18844
+ id: "form-builder",
18845
+ name: "form-builder",
18846
+ display_name: "Form Builder",
18847
+ description: "Drag-and-drop form builder with conditional logic, file uploads, and email notifications. Create contact forms, surveys, and data collection forms.",
18848
+ version: "1.0.0",
18849
+ author: "SonicJS Team",
18850
+ category: "content",
18851
+ icon: "\u{1F4DD}",
18852
+ permissions: ["forms:create", "forms:manage", "forms:submissions"],
18853
+ dependencies: [],
18854
+ settings: {
18855
+ enableNotifications: true,
18856
+ enableFileUploads: true,
18857
+ maxSubmissionsPerForm: 0,
18858
+ submissionRetentionDays: 90
18859
+ }
18860
+ });
18861
+ return c.json({ success: true, plugin: formBuilderPlugin });
18862
+ }
18826
18863
  return c.json({ error: "Plugin not found in registry" }, 404);
18827
18864
  } catch (error) {
18828
18865
  console.error("Error installing plugin:", error);
@@ -29350,5 +29387,5 @@ var ROUTES_INFO = {
29350
29387
  };
29351
29388
 
29352
29389
  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
29390
+ //# sourceMappingURL=chunk-IYFSNRZN.js.map
29391
+ //# sourceMappingURL=chunk-IYFSNRZN.js.map