@oktis-works/admin 0.4.13 → 0.4.15

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 (127) hide show
  1. package/dist/client/_astro/{ActivityWidget.DeayROhc.js → ActivityWidget.B83CLwGG.js} +2 -2
  2. package/dist/client/_astro/AdminBar.BNESswxs.js +253 -0
  3. package/dist/client/_astro/{AtGlanceWidget.CDFVi_eX.js → AtGlanceWidget.Cqbb9anJ.js} +3 -3
  4. package/dist/client/_astro/BaseLayout.B3A9-IS6.css +1 -0
  5. package/dist/client/_astro/ContentEditor.CBH227Ni.js +1 -0
  6. package/dist/client/_astro/ContentList.hmLCz5_S.js +1 -0
  7. package/dist/client/_astro/CustomFieldsManager.Dzhp_sZl.js +3 -0
  8. package/dist/client/_astro/DashboardHome.DawF-CZ9.js +1 -0
  9. package/dist/client/_astro/DashboardLayout.CEvRGr78.css +1 -0
  10. package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.Ckp0okyg.js +1 -0
  11. package/dist/client/_astro/FieldTypePicker.BEuYPzV8.js +1 -0
  12. package/dist/client/_astro/{Footer.KkyZkNxH.js → Footer.dcA-nmBA.js} +10 -12
  13. package/dist/client/_astro/GeneralSettings.DdAwp-oL.js +1 -0
  14. package/dist/client/_astro/MediaLibrary.B9SPVPYH.js +1 -0
  15. package/dist/client/_astro/PluginManager.DN5xhAsV.js +93 -0
  16. package/dist/client/_astro/PostTypesManager.BZH1eM3c.js +1 -0
  17. package/dist/client/_astro/{QuickDraftWidget.Drp_cL_D.js → QuickDraftWidget.DBvLubay.js} +2 -2
  18. package/dist/client/_astro/ResourceHubs.BvrE39A0.js +1 -0
  19. package/dist/client/_astro/TaxonomiesManager.BrjG05jb.js +1 -0
  20. package/dist/client/_astro/ThemeManager.CsrK3HXj.js +129 -0
  21. package/dist/client/_astro/UserCreateForm.Dxq80Bqx.js +1 -0
  22. package/dist/client/_astro/UsersManager.DmBadxWw.js +1 -0
  23. package/dist/client/_astro/api.BfxYC8bU.js +1 -0
  24. package/dist/client/_astro/ar.DsV0P0EN.js +1 -0
  25. package/dist/client/_astro/{client.C7p516_9.js → client.BY0Z100j.js} +1 -1
  26. package/dist/client/_astro/custom-fields.IjuRIdAC.css +1 -0
  27. package/dist/client/_astro/es-ES.etPSaiLd.js +1 -0
  28. package/dist/client/_astro/extensions.C6GOqTCd.js +1 -0
  29. package/dist/client/_astro/he.U1Vtp3zT.js +1 -0
  30. package/dist/client/_astro/i18n.B4BuieMb.js +1 -0
  31. package/dist/client/_astro/it.DJuI8oO_.js +1 -0
  32. package/dist/client/_astro/ja.Cw8I_NUV.js +1 -0
  33. package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.D6nHqYm6.js → login.astro_astro_type_script_index_0_lang.yH8kNMtD.js} +1 -1
  34. package/dist/client/_astro/pl.Dsz-4G_z.js +1 -0
  35. package/dist/client/_astro/pt-BR.CyQAHnXs.js +1 -0
  36. package/dist/client/_astro/ru.CwIIcTdy.js +1 -0
  37. package/dist/client/_astro/src.HVGUo-fm.js +1 -0
  38. package/dist/client/_astro/sw.DwpL3sb6.js +1 -0
  39. package/dist/client/_astro/tr.CY2JWJ7Y.js +1 -0
  40. package/dist/client/_astro/uk.BudEWIU8.js +1 -0
  41. package/dist/client/_astro/{version.C0f0jrCn.js → version.CilNJ_fk.js} +1 -1
  42. package/dist/client/_astro/{web.D1H9RxZL.js → web.D_vCtCLj.js} +1 -1
  43. package/dist/client/_astro/yo.BmoZs0fO.js +1 -0
  44. package/dist/client/_astro/zh-CN.khaXV6fv.js +1 -0
  45. package/dist/server/chunks/{BaseLayout_BsR68tOH.mjs → BaseLayout_BmkfK9tu.mjs} +19 -2
  46. package/dist/server/chunks/{ContentEditor_BtclxOqH.mjs → ContentEditor_C-kz5cS4.mjs} +31 -101
  47. package/dist/server/chunks/{DashboardLayout_B9pE8ZBQ.mjs → DashboardLayout_KIUq60Dv.mjs} +52 -566
  48. package/dist/server/chunks/FieldTypePicker_CXwpmcQ3.mjs +79 -0
  49. package/dist/server/chunks/{MediaLibrary_DLO2K_4d.mjs → MediaLibrary_C-lJBpPG.mjs} +2 -2
  50. package/dist/server/chunks/ResourceHubs_T-WuZoVF.mjs +453 -0
  51. package/dist/server/chunks/{_slug__yqDK_Ow8.mjs → _slug__DjcyD19w.mjs} +1 -1
  52. package/dist/server/chunks/access_Bjuw_Gvp.mjs +34 -0
  53. package/dist/server/chunks/{ar_DBjdWIJ0.mjs → ar_DMC8HaoP.mjs} +3 -1
  54. package/dist/server/chunks/custom-fields_CxntKU56.mjs +488 -0
  55. package/dist/server/chunks/{edit_0bCUPzfW.mjs → edit_CFKKfQux.mjs} +2 -2
  56. package/dist/server/chunks/{es-ES_TJ4oK1yi.mjs → es-ES_DZvHskAD.mjs} +3 -1
  57. package/dist/server/chunks/{general_D-MMl9p8.mjs → general_CVsJAP2e.mjs} +6 -6
  58. package/dist/server/chunks/{he_TWsuTphz.mjs → he_zy3stNhR.mjs} +3 -1
  59. package/dist/server/chunks/i18n_CH59YTvE.mjs +1406 -0
  60. package/dist/server/chunks/{index_Z7GukanS.mjs → index_2Y9ZC7Gs.mjs} +8 -6
  61. package/dist/server/chunks/{index_CTpEX5iK.mjs → index_Bb3w_UqS.mjs} +2 -2
  62. package/dist/server/chunks/{index_DB6MLU0v.mjs → index_BqyoH4bc.mjs} +3 -3
  63. package/dist/server/chunks/{index_CALAZTDB.mjs → index_G7lx2uke.mjs} +2 -2
  64. package/dist/server/chunks/{index_Bq7o-ZHF.mjs → index_TyNyWm6y.mjs} +1 -1
  65. package/dist/server/chunks/{it_CEVFVWh1.mjs → it_BiUDLszZ.mjs} +3 -1
  66. package/dist/server/chunks/{ja_CqDirMqf.mjs → ja_DjFAG7hL.mjs} +3 -1
  67. package/dist/server/chunks/{login_BcWk_36h.mjs → login_BCjtaOE9.mjs} +1 -2
  68. package/dist/server/chunks/{new_DlqbYYA1.mjs → new_BZOJIQfZ.mjs} +2 -2
  69. package/dist/server/chunks/{new_BbKoexYG.mjs → new_DkHY3O0r.mjs} +2 -2
  70. package/dist/server/chunks/operations_DYc6rwSI.mjs +34 -0
  71. package/dist/server/chunks/{pl_ChIKxfZG.mjs → pl_0Xe9Qom2.mjs} +3 -1
  72. package/dist/server/chunks/{plugins_BLJAzLX4.mjs → plugins_p805vlEb.mjs} +55 -22
  73. package/dist/server/chunks/{post-types_BvVl0hZs.mjs → post-types_C7YAi_V0.mjs} +6 -6
  74. package/dist/server/chunks/{pt-BR_4d4jZWL0.mjs → pt-BR_DIZpU2Mk.mjs} +206 -2
  75. package/dist/server/chunks/resources_BVP5krU_.mjs +34 -0
  76. package/dist/server/chunks/{ru_CIc6O5Q7.mjs → ru_DFvIxd0Y.mjs} +3 -1
  77. package/dist/server/chunks/{sw_Bs3iYVDM.mjs → sw_CmaPgGYa.mjs} +3 -1
  78. package/dist/server/chunks/{taxonomies_Dkx7d-vc.mjs → taxonomies_CWhPYZDq.mjs} +2 -2
  79. package/dist/server/chunks/themes_iwb1637h.mjs +155 -0
  80. package/dist/server/chunks/{tr_C7JbXuoQ.mjs → tr_B_acwl2e.mjs} +3 -1
  81. package/dist/server/chunks/{uk_Dibs8Wkc.mjs → uk_DXnk4imL.mjs} +3 -1
  82. package/dist/server/chunks/{upload_CpGGKDEH.mjs → upload_BE7qzxe7.mjs} +2 -2
  83. package/dist/server/chunks/{yo_B6MPvz_U.mjs → yo_DDQ8a-0v.mjs} +3 -1
  84. package/dist/server/chunks/{zh-CN_G1Dc2b28.mjs → zh-CN_763uzTMQ.mjs} +3 -1
  85. package/dist/server/entry.mjs +149 -25
  86. package/dist/server/virtual_astro_middleware.mjs +6 -3
  87. package/package.json +1 -1
  88. package/dist/client/_astro/AdminBar.DQilvzQe.js +0 -234
  89. package/dist/client/_astro/BaseLayout.B2MfKf6B.css +0 -1
  90. package/dist/client/_astro/ContentEditor.WyLHMY9o.js +0 -1
  91. package/dist/client/_astro/ContentList.BWtiYbDy.js +0 -1
  92. package/dist/client/_astro/DashboardHome.-0s3t1kG.js +0 -1
  93. package/dist/client/_astro/DashboardLayout.DWuCsemN.css +0 -1
  94. package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.Bm7kqhGo.js +0 -1
  95. package/dist/client/_astro/GeneralSettings.CaEyAV2f.js +0 -1
  96. package/dist/client/_astro/HelpTabs.99giF0f1.js +0 -103
  97. package/dist/client/_astro/LanguageSelector.DPBYaSN4.js +0 -14
  98. package/dist/client/_astro/MediaLibrary.DBfw3BM0.js +0 -1
  99. package/dist/client/_astro/PluginManager.BFoAz05U.js +0 -93
  100. package/dist/client/_astro/PostTypesManager.y9aB2d3_.js +0 -1
  101. package/dist/client/_astro/ScreenOptions.C8K8Bufc.js +0 -70
  102. package/dist/client/_astro/TaxonomiesManager.Cj54HB7P.js +0 -1
  103. package/dist/client/_astro/ThemeManager.BuULAG8h.js +0 -124
  104. package/dist/client/_astro/UserCreateForm.BMWIRfb2.js +0 -1
  105. package/dist/client/_astro/UsersManager.BogkOfCQ.js +0 -1
  106. package/dist/client/_astro/api.PfLklAa1.js +0 -1
  107. package/dist/client/_astro/ar.CzsjUutD.js +0 -1
  108. package/dist/client/_astro/en.DmN7xy_a.js +0 -1
  109. package/dist/client/_astro/es-ES.p2TLEMlZ.js +0 -1
  110. package/dist/client/_astro/extensions.DfxrGzbo.js +0 -1
  111. package/dist/client/_astro/he.BnYHiYpn.js +0 -1
  112. package/dist/client/_astro/i18n.BMDVwjZM.js +0 -1
  113. package/dist/client/_astro/it.WrWKBEAD.js +0 -1
  114. package/dist/client/_astro/ja.DxnfhIdt.js +0 -1
  115. package/dist/client/_astro/pl.jUj-RfZS.js +0 -1
  116. package/dist/client/_astro/pt-BR.DtNwEO0i.js +0 -1
  117. package/dist/client/_astro/ru.KFSfdjWn.js +0 -1
  118. package/dist/client/_astro/src.Cgonpfb5.js +0 -1
  119. package/dist/client/_astro/sw.3jlAOLOv.js +0 -1
  120. package/dist/client/_astro/tr.tnLMnGPg.js +0 -1
  121. package/dist/client/_astro/uk.VquHY_xc.js +0 -1
  122. package/dist/client/_astro/yo.Cr8hCb5u.js +0 -1
  123. package/dist/client/_astro/zh-CN.E32QqP4v.js +0 -1
  124. package/dist/server/chunks/en_C750mYKk.mjs +0 -408
  125. package/dist/server/chunks/i18n_Dj2ieo-N.mjs +0 -548
  126. package/dist/server/chunks/script_CPGt5jAh.mjs +0 -19
  127. package/dist/server/chunks/themes_CCDPOhVZ.mjs +0 -127
@@ -1,5 +1,22 @@
1
- import { S as createAstro, f as renderHead, p as addAttribute, s as renderSlot, u as renderTemplate } from "./server_B5N27szj.mjs";
1
+ import { S as createAstro, f as renderHead, m as createRenderInstruction, p as addAttribute, s as renderSlot, u as renderTemplate } from "./server_B5N27szj.mjs";
2
2
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
3
+ //#region ../../node_modules/.bun/astro@7.3.5+3335b8e0b249efdf/node_modules/astro/dist/runtime/server/render/script.js
4
+ async function renderScript(result, id) {
5
+ const inlined = result.inlinedScripts.get(id);
6
+ let content = "";
7
+ if (inlined != null) {
8
+ if (inlined) content = `<script type="module">${inlined}<\/script>`;
9
+ } else {
10
+ const resolved = await result.resolve(id);
11
+ content = `<script type="module" src="${result.userAssetsBase ? (result.base === "/" ? "" : result.base) + result.userAssetsBase : ""}${resolved}"><\/script>`;
12
+ }
13
+ return createRenderInstruction({
14
+ type: "script",
15
+ id,
16
+ content
17
+ });
18
+ }
19
+ //#endregion
3
20
  //#region src/layouts/BaseLayout.astro
4
21
  createAstro("https://astro.build");
5
22
  var $$BaseLayout = createComponent(($$result, $$props, $$slots) => {
@@ -12,4 +29,4 @@ var $$BaseLayout = createComponent(($$result, $$props, $$slots) => {
12
29
  return renderTemplate`<html${addAttribute(htmlLang, "lang")}${addAttribute(dir, "dir")}><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description"${addAttribute(description ?? "OkCMS Admin Dashboard", "content")}><title>${title} | OkCMS</title><link rel="icon" type="image/svg+xml" href="/favicon.svg">${renderHead($$result)}</head><body>${renderSlot($$result, $$slots["default"])}</body></html>`;
13
30
  }, "/home/runner/work/cms/cms/apps/admin/src/layouts/BaseLayout.astro", void 0);
14
31
  //#endregion
15
- export { $$BaseLayout as t };
32
+ export { renderScript as n, $$BaseLayout as t };
@@ -1,5 +1,6 @@
1
- import { n as useTranslation, r as apiClient } from "./i18n_Dj2ieo-N.mjs";
2
- import { a as For2, d as createMemo$1, f as createSignal$1, l as Show2 } from "./DashboardLayout_B9pE8ZBQ.mjs";
1
+ import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
2
+ import { a as For2, d as createMemo$1, f as createSignal$1, l as Show2 } from "./DashboardLayout_KIUq60Dv.mjs";
3
+ import { t as FieldTypePicker } from "./FieldTypePicker_CXwpmcQ3.mjs";
3
4
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
4
5
  import { For, Show, createMemo, createSignal, onMount } from "solid-js";
5
6
  //#region ../../packages/validation/dist/client-validate.js
@@ -512,21 +513,21 @@ function expandCloneFields(fields) {
512
513
  }
513
514
  //#endregion
514
515
  //#region src/components/content/RelationshipPicker.tsx
515
- var _tmpl$$3 = [
516
+ var _tmpl$$2 = [
516
517
  "<ul",
517
518
  " class=\"relationship-picker__selection\">",
518
519
  "</ul>"
519
520
  ];
520
- var _tmpl$2$3 = ["<li", " class=\"relationship-picker__empty\">Buscando...</li>"];
521
- var _tmpl$3$3 = ["<li", " class=\"relationship-picker__empty\">Nenhum resultado</li>"];
522
- var _tmpl$4$3 = [
521
+ var _tmpl$2$2 = ["<li", " class=\"relationship-picker__empty\">Buscando...</li>"];
522
+ var _tmpl$3$2 = ["<li", " class=\"relationship-picker__empty\">Nenhum resultado</li>"];
523
+ var _tmpl$4$2 = [
523
524
  "<ul",
524
525
  " class=\"relationship-picker__results\"><!--$-->",
525
526
  "<!--/--><!--$-->",
526
527
  "<!--/--><!--$-->",
527
528
  "<!--/--></ul>"
528
529
  ];
529
- var _tmpl$5$3 = [
530
+ var _tmpl$5$2 = [
530
531
  "<div",
531
532
  " class=\"relationship-picker\"><!--$-->",
532
533
  "<!--/--><input type=\"search\" class=\"input\"",
@@ -555,12 +556,12 @@ function RelationshipPicker(props) {
555
556
  if (Array.isArray(value)) return value.map(String);
556
557
  return value ? [String(value)] : [];
557
558
  });
558
- return ssr(_tmpl$5$3, ssrHydrationKey(), escape(createComponent(Show2, {
559
+ return ssr(_tmpl$5$2, ssrHydrationKey(), escape(createComponent(Show2, {
559
560
  get when() {
560
561
  return selected().length > 0 || selectedIds().length > 0;
561
562
  },
562
563
  get children() {
563
- return ssr(_tmpl$$3, ssrHydrationKey(), escape(createComponent(For2, {
564
+ return ssr(_tmpl$$2, ssrHydrationKey(), escape(createComponent(For2, {
564
565
  get each() {
565
566
  return selected();
566
567
  },
@@ -572,12 +573,12 @@ function RelationshipPicker(props) {
572
573
  return memo(() => !!open())() && (loading() || results().length > 0);
573
574
  },
574
575
  get children() {
575
- return ssr(_tmpl$4$3, ssrHydrationKey(), escape(createComponent(Show2, {
576
+ return ssr(_tmpl$4$2, ssrHydrationKey(), escape(createComponent(Show2, {
576
577
  get when() {
577
578
  return loading();
578
579
  },
579
580
  get children() {
580
- return ssr(_tmpl$2$3, ssrHydrationKey());
581
+ return ssr(_tmpl$2$2, ssrHydrationKey());
581
582
  }
582
583
  })), escape(createComponent(For2, {
583
584
  get each() {
@@ -589,7 +590,7 @@ function RelationshipPicker(props) {
589
590
  return memo(() => !!!loading())() && results().length === 0;
590
591
  },
591
592
  get children() {
592
- return ssr(_tmpl$3$3, ssrHydrationKey());
593
+ return ssr(_tmpl$3$2, ssrHydrationKey());
593
594
  }
594
595
  })));
595
596
  }
@@ -597,18 +598,18 @@ function RelationshipPicker(props) {
597
598
  }
598
599
  //#endregion
599
600
  //#region src/components/content/FieldRenderer.tsx
600
- var _tmpl$$2 = ["<span", " class=\"field-renderer__required\">*</span>"];
601
- var _tmpl$2$2 = [
601
+ var _tmpl$$1 = ["<span", " class=\"field-renderer__required\">*</span>"];
602
+ var _tmpl$2$1 = [
602
603
  "<p",
603
604
  " class=\"field-renderer__instructions\">",
604
605
  "</p>"
605
606
  ];
606
- var _tmpl$3$2 = [
607
+ var _tmpl$3$1 = [
607
608
  "<p",
608
609
  " class=\"field-renderer__error\" role=\"alert\">",
609
610
  "</p>"
610
611
  ];
611
- var _tmpl$4$2 = [
612
+ var _tmpl$4$1 = [
612
613
  "<div",
613
614
  " class=\"field-renderer\"",
614
615
  "><label class=\"field-renderer__label\"><!--$-->",
@@ -618,7 +619,7 @@ var _tmpl$4$2 = [
618
619
  "<!--/--><!--$-->",
619
620
  "<!--/--></div>"
620
621
  ];
621
- var _tmpl$5$2 = [
622
+ var _tmpl$5$1 = [
622
623
  "<input",
623
624
  " type=\"text\" class=\"input\"",
624
625
  ">"
@@ -787,19 +788,19 @@ function FieldRenderer(props) {
787
788
  return memo(() => !!visible())() && !LAYOUT_ONLY.has(props.field.type);
788
789
  },
789
790
  get children() {
790
- return ssr(_tmpl$4$2, ssrHydrationKey(), ssrAttribute("data-field-type", escape(props.field.type, true), false), escape(props.field.label), escape(createComponent(Show, {
791
+ return ssr(_tmpl$4$1, ssrHydrationKey(), ssrAttribute("data-field-type", escape(props.field.type, true), false), escape(props.field.label), escape(createComponent(Show, {
791
792
  get when() {
792
793
  return props.field.required;
793
794
  },
794
795
  get children() {
795
- return ssr(_tmpl$$2, ssrHydrationKey());
796
+ return ssr(_tmpl$$1, ssrHydrationKey());
796
797
  }
797
798
  })), escape(createComponent(Show, {
798
799
  get when() {
799
800
  return props.field.instructions;
800
801
  },
801
802
  get children() {
802
- return ssr(_tmpl$2$2, ssrHydrationKey(), escape(props.field.instructions));
803
+ return ssr(_tmpl$2$1, ssrHydrationKey(), escape(props.field.instructions));
803
804
  }
804
805
  })), escape(createComponent(FieldControl, {
805
806
  get field() {
@@ -817,7 +818,7 @@ function FieldRenderer(props) {
817
818
  return validationError();
818
819
  },
819
820
  get children() {
820
- return ssr(_tmpl$3$2, ssrHydrationKey(), escape(validationError()));
821
+ return ssr(_tmpl$3$1, ssrHydrationKey(), escape(validationError()));
821
822
  }
822
823
  })));
823
824
  }
@@ -826,7 +827,7 @@ function FieldRenderer(props) {
826
827
  function FieldControl(props) {
827
828
  const config = () => props.field.config ?? {};
828
829
  switch (props.field.type) {
829
- case "text": return ssr(_tmpl$5$2, ssrHydrationKey(), ssrAttribute("maxlength", escape(config()["characterLimit"], true), false));
830
+ case "text": return ssr(_tmpl$5$1, ssrHydrationKey(), ssrAttribute("maxlength", escape(config()["characterLimit"], true), false));
830
831
  case "textarea": return ssr(_tmpl$6$1, ssrHydrationKey(), ssrAttribute("maxlength", escape(config()["characterLimit"], true), false));
831
832
  case "wysiwyg": return ssr(_tmpl$7$1, ssrHydrationKey());
832
833
  case "number":
@@ -1037,82 +1038,6 @@ function RelationshipSelector(props) {
1037
1038
  })));
1038
1039
  }
1039
1040
  //#endregion
1040
- //#region src/components/content/FieldTypePicker.tsx
1041
- var _tmpl$$1 = [
1042
- "<div",
1043
- " class=\"field-type-picker__panel\" role=\"listbox\"><input type=\"search\" class=\"field-type-picker__search\" placeholder=\"Buscar tipo de campo...\"",
1044
- "><!--$-->",
1045
- "<!--/--></div>"
1046
- ];
1047
- var _tmpl$2$1 = [
1048
- "<div",
1049
- " class=\"field-type-picker\"><button type=\"button\" class=\"field-type-picker__trigger\"",
1050
- "><span><!--$-->",
1051
- "<!--/--> <!--$-->",
1052
- "<!--/--></span><span aria-hidden=\"true\">",
1053
- "</span></button><!--$-->",
1054
- "<!--/--></div>"
1055
- ];
1056
- var _tmpl$3$1 = [
1057
- "<div",
1058
- " class=\"field-type-picker__group\"><div class=\"field-type-picker__group-label\"><!--$-->",
1059
- "<!--/--> <!--$-->",
1060
- "<!--/--></div><!--$-->",
1061
- "<!--/--></div>"
1062
- ];
1063
- var _tmpl$4$1 = ["<span", " class=\"field-type-picker__hint\">sem lógica condicional</span>"];
1064
- var _tmpl$5$1 = [
1065
- "<button",
1066
- " type=\"button\" role=\"option\"",
1067
- " class=\"",
1068
- "\"><span>",
1069
- "</span><span>",
1070
- "</span><!--$-->",
1071
- "<!--/--></button>"
1072
- ];
1073
- function FieldTypePicker(props) {
1074
- const [open, setOpen] = createSignal(false);
1075
- const [query, setQuery] = createSignal("");
1076
- const selected = () => props.types.find((type) => type.type === props.value);
1077
- const filteredTypes = () => {
1078
- const q = query().toLowerCase();
1079
- return q ? props.types.filter((type) => type.label.toLowerCase().includes(q) || type.type.includes(q)) : props.types;
1080
- };
1081
- return ssr(_tmpl$2$1, ssrHydrationKey(), ssrAttribute("aria-expanded", escape(open(), true), false), escape(selected()?.icon ?? " "), escape(selected()?.label ?? "Selecione o tipo"), open() ? "▴" : "▾", escape(createComponent(Show, {
1082
- get when() {
1083
- return open();
1084
- },
1085
- get children() {
1086
- return ssr(_tmpl$$1, ssrHydrationKey(), ssrAttribute("value", escape(query(), true), false), escape(createComponent(For, {
1087
- get each() {
1088
- return props.categories;
1089
- },
1090
- children: (category) => {
1091
- const categoryTypes = filteredTypes().filter((type) => type.category === category.id);
1092
- return createComponent(Show, {
1093
- get when() {
1094
- return categoryTypes.length > 0;
1095
- },
1096
- get children() {
1097
- return ssr(_tmpl$3$1, ssrHydrationKey(), escape(category.icon), escape(category.label), escape(createComponent(For, {
1098
- each: categoryTypes,
1099
- children: (type) => ssr(_tmpl$5$1, ssrHydrationKey(), ssrAttribute("aria-selected", escape(props.value, true) === escape(type.type, true), false), `field-type-picker__option ${props.value === type.type ? "is-selected" : ""}`, escape(type.icon), escape(type.label), escape(createComponent(Show, {
1100
- get when() {
1101
- return !type.supportsConditions;
1102
- },
1103
- get children() {
1104
- return ssr(_tmpl$4$1, ssrHydrationKey());
1105
- }
1106
- })))
1107
- })));
1108
- }
1109
- });
1110
- }
1111
- })));
1112
- }
1113
- })));
1114
- }
1115
- //#endregion
1116
1041
  //#region src/components/content/ContentEditor.tsx
1117
1042
  var _tmpl$ = [
1118
1043
  "<div",
@@ -1236,16 +1161,21 @@ function ContentEditor() {
1236
1161
  } catch (err) {
1237
1162
  setErrors([err instanceof Error ? err.message : String(err)]);
1238
1163
  }
1239
- await loadGroups(draft().type);
1164
+ await loadGroups({
1165
+ type: draft().type,
1166
+ slug: draft().slug,
1167
+ status: draft().status
1168
+ });
1240
1169
  });
1241
1170
  const availableLayouts = () => {
1242
1171
  const layouts = /* @__PURE__ */ new Set();
1243
1172
  for (const theme of themes()) for (const layout of theme.manifest?.provides?.layouts ?? []) layouts.add(layout);
1244
1173
  return [...layouts].sort();
1245
1174
  };
1246
- const loadGroups = async (type) => {
1175
+ const loadGroups = async (context) => {
1247
1176
  try {
1248
- const all = await apiClient.getFieldGroups(type ? { type } : void 0);
1177
+ const query = typeof context === "string" ? { type: context } : context;
1178
+ const all = await apiClient.getFieldGroups(query.type ? query : void 0);
1249
1179
  const resolved = await Promise.all(all.filter((group) => group.active).map(async (group) => {
1250
1180
  return (await apiClient.getFieldGroup(group.id)).fields ?? [];
1251
1181
  }));