@sonicjs-cms/core 2.0.8 → 2.0.10

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 (63) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-CHMO2DOC.cjs → chunk-3PHG75W4.cjs} +3 -3
  3. package/dist/chunk-3PHG75W4.cjs.map +1 -0
  4. package/dist/chunk-6FR25MPC.js.map +1 -1
  5. package/dist/{chunk-KHNSPJ6X.cjs → chunk-CAP6QQR2.cjs} +5 -5
  6. package/dist/{chunk-KHNSPJ6X.cjs.map → chunk-CAP6QQR2.cjs.map} +1 -1
  7. package/dist/{chunk-4MBTSUI6.js → chunk-COBUPOMD.js} +22 -6
  8. package/dist/chunk-COBUPOMD.js.map +1 -0
  9. package/dist/chunk-DOR2IU73.cjs.map +1 -1
  10. package/dist/{chunk-HJZOA2O5.cjs → chunk-F5ESJXI2.cjs} +25 -3
  11. package/dist/chunk-F5ESJXI2.cjs.map +1 -0
  12. package/dist/chunk-FICTAGD4.js.map +1 -1
  13. package/dist/{chunk-LS5CMDNL.js → chunk-FTMKKKNH.js} +3 -3
  14. package/dist/{chunk-LS5CMDNL.js.map → chunk-FTMKKKNH.js.map} +1 -1
  15. package/dist/{chunk-EAELJXRV.js → chunk-HKEK7UNV.js} +25 -3
  16. package/dist/chunk-HKEK7UNV.js.map +1 -0
  17. package/dist/{chunk-3R7EQNGO.cjs → chunk-HXA5QSI3.cjs} +15 -11
  18. package/dist/chunk-HXA5QSI3.cjs.map +1 -0
  19. package/dist/{chunk-YHLLVUJC.js → chunk-LW33AOBF.js} +6 -8
  20. package/dist/chunk-LW33AOBF.js.map +1 -0
  21. package/dist/{chunk-7XEESVSX.cjs → chunk-MU3MR2QR.cjs} +6 -8
  22. package/dist/chunk-MU3MR2QR.cjs.map +1 -0
  23. package/dist/{chunk-Z2CZC6TC.js → chunk-MXJJN4IA.js} +3 -3
  24. package/dist/chunk-MXJJN4IA.js.map +1 -0
  25. package/dist/{chunk-YGVWY6KO.cjs → chunk-NBDPIRQS.cjs} +22 -5
  26. package/dist/chunk-NBDPIRQS.cjs.map +1 -0
  27. package/dist/{chunk-GN7Q6V5C.cjs → chunk-Q7SL7U43.cjs} +397 -273
  28. package/dist/chunk-Q7SL7U43.cjs.map +1 -0
  29. package/dist/chunk-RCQ2HIQD.cjs.map +1 -1
  30. package/dist/{chunk-O7LMFJMZ.js → chunk-YHG45LMU.js} +13 -9
  31. package/dist/chunk-YHG45LMU.js.map +1 -0
  32. package/dist/{chunk-CUEIM4FE.js → chunk-Z4H6DBVF.js} +241 -117
  33. package/dist/chunk-Z4H6DBVF.js.map +1 -0
  34. package/dist/index.cjs +108 -104
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.js +12 -12
  37. package/dist/index.js.map +1 -1
  38. package/dist/middleware.cjs +23 -23
  39. package/dist/middleware.js +2 -2
  40. package/dist/plugins.cjs +7 -7
  41. package/dist/plugins.js +1 -1
  42. package/dist/routes.cjs +25 -25
  43. package/dist/routes.js +5 -5
  44. package/dist/services.cjs +18 -14
  45. package/dist/services.js +1 -1
  46. package/dist/templates.cjs +18 -18
  47. package/dist/templates.js +2 -2
  48. package/dist/utils.cjs +11 -11
  49. package/dist/utils.js +1 -1
  50. package/migrations/019_remove_blog_posts_collection.sql +15 -0
  51. package/package.json +1 -1
  52. package/dist/chunk-3R7EQNGO.cjs.map +0 -1
  53. package/dist/chunk-4MBTSUI6.js.map +0 -1
  54. package/dist/chunk-7XEESVSX.cjs.map +0 -1
  55. package/dist/chunk-CHMO2DOC.cjs.map +0 -1
  56. package/dist/chunk-CUEIM4FE.js.map +0 -1
  57. package/dist/chunk-EAELJXRV.js.map +0 -1
  58. package/dist/chunk-GN7Q6V5C.cjs.map +0 -1
  59. package/dist/chunk-HJZOA2O5.cjs.map +0 -1
  60. package/dist/chunk-O7LMFJMZ.js.map +0 -1
  61. package/dist/chunk-YGVWY6KO.cjs.map +0 -1
  62. package/dist/chunk-YH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IAAA,CAAK,EAAE,CAAC;AAAA;AAAA,QAAA,CAAA,GAEX,EAAE;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA,CAAA;AA2Bd;;;AC5DA,mCAAA,EAAA;AAKA,kBAAA,EAAA","file":"chunk-LS5CMDNL.js","sourcesContent":["export interface FilterOption {\n value: string\n label: string\n selected?: boolean\n color?: string\n}\n\nexport interface Filter {\n name: string\n label: string\n options: FilterOption[]\n}\n\nexport interface FilterBarData {\n filters: Filter[]\n actions?: Array<{\n label: string\n className?: string\n onclick?: string\n hxGet?: string\n hxTarget?: string\n }>\n bulkActions?: Array<{\n label: string\n value: string\n icon?: string\n className?: string\n }>\n}\n\nexport function renderFilterBar(data: FilterBarData): string {\n return `\n <div class=\"rounded-xl bg-white dark:bg-zinc-900 shadow-sm ring-1 ring-zinc-950/5 dark:ring-white/10 p-6 mb-6\">\n <form id=\"filter-form\" class=\"flex flex-wrap gap-4 items-center\">\n ${data.filters.map(filter => `\n <div class=\"flex items-center space-x-2\">\n <label class=\"text-sm font-medium text-zinc-500 dark:text-zinc-400\">${filter.label}:</label>\n <select\n name=\"${filter.name}\"\n class=\"rounded-lg bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-950 dark:text-white ring-1 ring-inset ring-zinc-950/10 dark:ring-white/10 focus:ring-2 focus:ring-blue-600 dark:focus:ring-blue-500 focus:outline-none transition-colors\"\n onchange=\"updateFilters()\"\n >\n ${filter.options.map(option => `\n <option value=\"${option.value}\" ${option.selected ? 'selected' : ''}>\n ${option.label}\n </option>\n `).join('')}\n </select>\n </div>\n `).join('')}\n\n ${data.actions && data.actions.length > 0 ? `\n <div class=\"flex items-center space-x-2 ml-auto\">\n ${data.actions.map(action => `\n <button\n type=\"button\"\n class=\"inline-flex items-center rounded-lg bg-white dark:bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-950 dark:text-white ring-1 ring-inset ring-zinc-950/10 dark:ring-white/10 hover:bg-zinc-50 dark:hover:bg-zinc-700 transition-colors\"\n ${action.onclick ? `onclick=\"${action.onclick}\"` : ''}\n ${action.hxGet ? `hx-get=\"${action.hxGet}\"` : ''}\n ${action.hxTarget ? `hx-target=\"${action.hxTarget}\"` : ''}\n >\n ${action.label}\n </button>\n `).join('')}\n </div>\n ` : ''}\n </form>\n\n <script>\n function updateFilters() {\n const form = document.getElementById('filter-form');\n const formData = new FormData(form);\n const params = new URLSearchParams(window.location.search);\n\n // Update params with form values\n for (const [key, value] of formData.entries()) {\n if (value) {\n params.set(key, value);\n } else {\n params.delete(key);\n }\n }\n\n // Reset to page 1 when filters change\n params.set('page', '1');\n\n // Update URL and reload\n window.location.href = window.location.pathname + '?' + params.toString();\n }\n </script>\n </div>\n `\n}","/**\n * Templates Module Exports\n *\n * Reusable HTML template components for SonicJS\n */\n\n// Form templates\nexport { renderForm, renderFormField } from './form.template'\nexport type { FormField, FormData } from './form.template'\n\n// Table templates\nexport { renderTable } from './table.template'\nexport type { TableColumn, TableData } from './table.template'\n\n// Pagination templates\nexport { renderPagination } from './pagination.template'\nexport type { PaginationData } from './pagination.template'\n\n// Alert templates\nexport { renderAlert } from './alert.template'\nexport type { AlertData } from './alert.template'\n\n// Confirmation dialog templates\nexport { renderConfirmationDialog, getConfirmationDialogScript } from './confirmation-dialog.template'\nexport type { ConfirmationDialogOptions } from './confirmation-dialog.template'\n\n// Filter bar templates\nexport { renderFilterBar } from './filter-bar.template'\nexport type { FilterBarData, Filter, FilterOption } from './filter-bar.template'\n\n// Layout templates\nexport { renderAdminLayout } from './layouts/admin-layout-v2.template'\nexport { renderAdminLayoutCatalyst } from './layouts/admin-layout-catalyst.template'\nexport type { AdminLayoutData } from './layouts/admin-layout-v2.template'\nexport type { AdminLayoutCatalystData } from './layouts/admin-layout-catalyst.template'\n\n// Component templates\nexport { renderLogo } from './components/logo.template'\n\n// Page templates - Admin\nexport { renderDesignPage } from './pages/admin-design.template'\nexport type { DesignPageData } from './pages/admin-design.template'\nexport { renderCheckboxPage } from './pages/admin-checkboxes.template'\nexport type { CheckboxPageData } from './pages/admin-checkboxes.template'\nexport { renderFAQList } from './pages/admin-faq-list.template'\nexport { renderTestimonialsList } from './pages/admin-testimonials-list.template'\nexport { renderCodeExamplesList } from './pages/admin-code-examples-list.template'\n"]}
1
+ {"version":3,"sources":["../src/templates/filter-bar.template.ts","../src/templates/index.ts"],"names":[],"mappings":";;;AA8BO,SAAS,gBAAgB,IAAA,EAA6B;AAC3D,EAAA,OAAO;AAAA;AAAA;AAAA,QAAA,EAGC,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAI,CAAA,MAAA,KAAU;AAAA;AAAA,gFAAA,EAE6C,OAAO,KAAK,CAAA;AAAA;AAAA,oBAAA,EAExE,OAAO,IAAI,CAAA;AAAA;AAAA;AAAA;AAAA,cAAA,EAIjB,MAAA,CAAO,OAAA,CAAQ,GAAA,CAAI,CAAA,MAAA,KAAU;AAAA,+BAAA,EACZ,OAAO,KAAK,CAAA,EAAA,EAAK,MAAA,CAAO,QAAA,GAAW,aAAa,EAAE,CAAA;AAAA,kBAAA,EAC/D,OAAO,KAAK;AAAA;AAAA,cAAA,CAEjB,CAAA,CAAE,IAAA,CAAK,EAAE,CAAC;AAAA;AAAA;AAAA,QAAA,CAGhB,CAAA,CAAE,IAAA,CAAK,EAAE,CAAC;;AAAA,QAAA,EAET,IAAA,CAAK,OAAA,IAAW,IAAA,CAAK,OAAA,CAAQ,SAAS,CAAA,GAAI;AAAA;AAAA,YAAA,EAEtC,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAI,CAAA,MAAA,KAAU;AAAA;AAAA;AAAA;AAAA,gBAAA,EAIvB,OAAO,OAAA,GAAU,CAAA,SAAA,EAAY,MAAA,CAAO,OAAO,MAAM,EAAE;AAAA,gBAAA,EACnD,OAAO,KAAA,GAAQ,CAAA,QAAA,EAAW,MAAA,CAAO,KAAK,MAAM,EAAE;AAAA,gBAAA,EAC9C,OAAO,QAAA,GAAW,CAAA,WAAA,EAAc,MAAA,CAAO,QAAQ,MAAM,EAAE;AAAA;AAAA,gBAAA,EAEvD,OAAO,KAAK;AAAA;AAAA,YAAA,CAEjB,CAAA,CAAE,IAAA,CAAK,EAAE,CAAC;AAAA;AAAA,QAAA,CAAA,GAEX,EAAE;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA,CAAA;AA2Bd;;;AC5DA,mCAAA,EAAA;AAKA,kBAAA,EAAA","file":"chunk-FTMKKKNH.js","sourcesContent":["export interface FilterOption {\n value: string\n label: string\n selected?: boolean\n color?: string\n}\n\nexport interface Filter {\n name: string\n label: string\n options: FilterOption[]\n}\n\nexport interface FilterBarData {\n filters: Filter[]\n actions?: Array<{\n label: string\n className?: string\n onclick?: string\n hxGet?: string\n hxTarget?: string\n }>\n bulkActions?: Array<{\n label: string\n value: string\n icon?: string\n className?: string\n }>\n}\n\nexport function renderFilterBar(data: FilterBarData): string {\n return `\n <div class=\"rounded-xl bg-white dark:bg-zinc-900 shadow-sm ring-1 ring-zinc-950/5 dark:ring-white/10 p-6 mb-6\">\n <form id=\"filter-form\" class=\"flex flex-wrap gap-4 items-center\">\n ${data.filters.map(filter => `\n <div class=\"flex items-center space-x-2\">\n <label class=\"text-sm font-medium text-zinc-500 dark:text-zinc-400\">${filter.label}:</label>\n <select\n name=\"${filter.name}\"\n class=\"rounded-lg bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-950 dark:text-white ring-1 ring-inset ring-zinc-950/10 dark:ring-white/10 focus:ring-2 focus:ring-blue-600 dark:focus:ring-blue-500 focus:outline-none transition-colors\"\n onchange=\"updateFilters()\"\n >\n ${filter.options.map(option => `\n <option value=\"${option.value}\" ${option.selected ? 'selected' : ''}>\n ${option.label}\n </option>\n `).join('')}\n </select>\n </div>\n `).join('')}\n\n ${data.actions && data.actions.length > 0 ? `\n <div class=\"flex items-center space-x-2 ml-auto\">\n ${data.actions.map(action => `\n <button\n type=\"button\"\n class=\"inline-flex items-center rounded-lg bg-white dark:bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-950 dark:text-white ring-1 ring-inset ring-zinc-950/10 dark:ring-white/10 hover:bg-zinc-50 dark:hover:bg-zinc-700 transition-colors\"\n ${action.onclick ? `onclick=\"${action.onclick}\"` : ''}\n ${action.hxGet ? `hx-get=\"${action.hxGet}\"` : ''}\n ${action.hxTarget ? `hx-target=\"${action.hxTarget}\"` : ''}\n >\n ${action.label}\n </button>\n `).join('')}\n </div>\n ` : ''}\n </form>\n\n <script>\n function updateFilters() {\n const form = document.getElementById('filter-form');\n const formData = new FormData(form);\n const params = new URLSearchParams(window.location.search);\n\n // Update params with form values\n for (const [key, value] of formData.entries()) {\n if (value) {\n params.set(key, value);\n } else {\n params.delete(key);\n }\n }\n\n // Reset to page 1 when filters change\n params.set('page', '1');\n\n // Update URL and reload\n window.location.href = window.location.pathname + '?' + params.toString();\n }\n </script>\n </div>\n `\n}","/**\n * Templates Module Exports\n *\n * Reusable HTML template components for SonicJS\n */\n\n// Form templates\nexport { renderForm, renderFormField } from './form.template'\nexport type { FormField, FormData } from './form.template'\n\n// Table templates\nexport { renderTable } from './table.template'\nexport type { TableColumn, TableData } from './table.template'\n\n// Pagination templates\nexport { renderPagination } from './pagination.template'\nexport type { PaginationData } from './pagination.template'\n\n// Alert templates\nexport { renderAlert } from './alert.template'\nexport type { AlertData } from './alert.template'\n\n// Confirmation dialog templates\nexport { renderConfirmationDialog, getConfirmationDialogScript } from './confirmation-dialog.template'\nexport type { ConfirmationDialogOptions } from './confirmation-dialog.template'\n\n// Filter bar templates\nexport { renderFilterBar } from './filter-bar.template'\nexport type { FilterBarData, Filter, FilterOption } from './filter-bar.template'\n\n// Layout templates\nexport { renderAdminLayout } from './layouts/admin-layout-v2.template'\nexport { renderAdminLayoutCatalyst } from './layouts/admin-layout-catalyst.template'\nexport type { AdminLayoutData } from './layouts/admin-layout-v2.template'\nexport type { AdminLayoutCatalystData } from './layouts/admin-layout-catalyst.template'\n\n// Component templates\nexport { renderLogo } from './components/logo.template'\n\n// Page templates - Admin\nexport { renderDesignPage } from './pages/admin-design.template'\nexport type { DesignPageData } from './pages/admin-design.template'\nexport { renderCheckboxPage } from './pages/admin-checkboxes.template'\nexport type { CheckboxPageData } from './pages/admin-checkboxes.template'\nexport { renderFAQList } from './pages/admin-faq-list.template'\nexport { renderTestimonialsList } from './pages/admin-testimonials-list.template'\nexport { renderCodeExamplesList } from './pages/admin-code-examples-list.template'\n"]}
@@ -153,6 +153,9 @@ var require_identifiers = __commonJS({
153
153
  "../../node_modules/semver/internal/identifiers.js"(exports, module) {
154
154
  var numeric = /^[0-9]+$/;
155
155
  var compareIdentifiers = (a, b) => {
156
+ if (typeof a === "number" && typeof b === "number") {
157
+ return a === b ? 0 : a < b ? -1 : 1;
158
+ }
156
159
  const anum = numeric.test(a);
157
160
  const bnum = numeric.test(b);
158
161
  if (anum && bnum) {
@@ -258,7 +261,25 @@ var require_semver = __commonJS({
258
261
  if (!(other instanceof _SemVer)) {
259
262
  other = new _SemVer(other, this.options);
260
263
  }
261
- return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
264
+ if (this.major < other.major) {
265
+ return -1;
266
+ }
267
+ if (this.major > other.major) {
268
+ return 1;
269
+ }
270
+ if (this.minor < other.minor) {
271
+ return -1;
272
+ }
273
+ if (this.minor > other.minor) {
274
+ return 1;
275
+ }
276
+ if (this.patch < other.patch) {
277
+ return -1;
278
+ }
279
+ if (this.patch > other.patch) {
280
+ return 1;
281
+ }
282
+ return 0;
262
283
  }
263
284
  comparePre(other) {
264
285
  if (!(other instanceof _SemVer)) {
@@ -994,6 +1015,7 @@ var require_range = __commonJS({
994
1015
  return result;
995
1016
  };
996
1017
  var parseComparator = (comp, options) => {
1018
+ comp = comp.replace(re[t.BUILD], "");
997
1019
  debug("comp", comp, options);
998
1020
  comp = replaceCarets(comp, options);
999
1021
  debug("caret", comp);
@@ -3060,5 +3082,5 @@ var PluginManager = class {
3060
3082
  };
3061
3083
 
3062
3084
  export { HookSystemImpl, HookUtils, PluginManager, PluginRegistryImpl, PluginValidator, ScopedHookSystem };
3063
- //# sourceMappingURL=chunk-EAELJXRV.js.map
3064
- //# sourceMappingURL=chunk-EAELJXRV.js.map
3085
+ //# sourceMappingURL=chunk-HKEK7UNV.js.map
3086
+ //# sourceMappingURL=chunk-HKEK7UNV.js.map