@oktis-works/admin 0.4.10 → 0.4.14
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/client/_astro/{ActivityWidget.CSfbsvBc.js → ActivityWidget.C2ETg6u_.js} +2 -2
- package/dist/client/_astro/AdminBar.Dc_oT_my.js +234 -0
- package/dist/client/_astro/{AtGlanceWidget.olHTd5cS.js → AtGlanceWidget.BVCJB3QT.js} +3 -3
- package/dist/client/_astro/BaseLayout.B3A9-IS6.css +1 -0
- package/dist/client/_astro/ContentEditor.CoCaseap.js +1 -0
- package/dist/client/_astro/ContentList.Qp90yZEx.js +1 -0
- package/dist/client/_astro/CustomFieldsManager.B2JEuxBb.js +3 -0
- package/dist/client/_astro/DashboardHome.CgDrZavo.js +1 -0
- package/dist/client/_astro/DashboardLayout.CEvRGr78.css +1 -0
- package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.nXh9K0OY.js +1 -0
- package/dist/client/_astro/FieldTypePicker.BEuYPzV8.js +1 -0
- package/dist/client/_astro/{Footer.A_wTlAMd.js → Footer.BpxMjlJE.js} +3 -5
- package/dist/client/_astro/GeneralSettings.BVFwXCbR.js +1 -0
- package/dist/client/_astro/MediaLibrary.CGzXvUbD.js +1 -0
- package/dist/client/_astro/PluginManager.CQW7_Hl-.js +93 -0
- package/dist/client/_astro/PostTypesManager.CFX0sR5p.js +1 -0
- package/dist/client/_astro/{QuickDraftWidget.BUK9R8iq.js → QuickDraftWidget.DLaU-WiG.js} +2 -2
- package/dist/client/_astro/ResourceHubs.DasaSiMK.js +1 -0
- package/dist/client/_astro/TaxonomiesManager.CralM7Ne.js +1 -0
- package/dist/client/_astro/ThemeManager.C9mBa-po.js +129 -0
- package/dist/client/_astro/UserCreateForm.D6rRUn0J.js +1 -0
- package/dist/client/_astro/UsersManager.DdpgI0mN.js +1 -0
- package/dist/client/_astro/api.CDW61rqX.js +1 -0
- package/dist/client/_astro/ar.DsV0P0EN.js +1 -0
- package/dist/client/_astro/{client.C7p516_9.js → client.BY0Z100j.js} +1 -1
- package/dist/client/_astro/custom-fields.IjuRIdAC.css +1 -0
- package/dist/client/_astro/es-ES.etPSaiLd.js +1 -0
- package/dist/client/_astro/extensions.roNfOg-_.js +1 -0
- package/dist/client/_astro/he.U1Vtp3zT.js +1 -0
- package/dist/client/_astro/i18n.D0KNEGgP.js +1 -0
- package/dist/client/_astro/it.DJuI8oO_.js +1 -0
- package/dist/client/_astro/ja.Cw8I_NUV.js +1 -0
- package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.CLM9X6sQ.js → login.astro_astro_type_script_index_0_lang.CdYoT76J.js} +1 -1
- package/dist/client/_astro/pl.Dsz-4G_z.js +1 -0
- package/dist/client/_astro/pt-BR.CyQAHnXs.js +1 -0
- package/dist/client/_astro/ru.CwIIcTdy.js +1 -0
- package/dist/client/_astro/src.DyLYQxi2.js +1 -0
- package/dist/client/_astro/sw.DwpL3sb6.js +1 -0
- package/dist/client/_astro/tr.CY2JWJ7Y.js +1 -0
- package/dist/client/_astro/uk.BudEWIU8.js +1 -0
- package/dist/client/_astro/{version.DdQxNnVi.js → version.CoiXQYz6.js} +1 -1
- package/dist/client/_astro/{web.D1H9RxZL.js → web.D_vCtCLj.js} +1 -1
- package/dist/client/_astro/yo.BmoZs0fO.js +1 -0
- package/dist/client/_astro/zh-CN.khaXV6fv.js +1 -0
- package/dist/server/chunks/{BaseLayout_GUKuUGNt.mjs → BaseLayout_4yJ0PQCS.mjs} +2 -19
- package/dist/server/chunks/{ContentEditor_D9pMXYZY.mjs → ContentEditor_Dtmf4Zk6.mjs} +31 -101
- package/dist/server/chunks/{DashboardLayout_D5cpVFW2.mjs → DashboardLayout_DnE23ArY.mjs} +54 -564
- package/dist/server/chunks/FieldTypePicker_CXwpmcQ3.mjs +79 -0
- package/dist/server/chunks/{MediaLibrary_BRwD3_Ik.mjs → MediaLibrary_CKvvgCI6.mjs} +2 -2
- package/dist/server/chunks/ResourceHubs_Aoy5L4qj.mjs +453 -0
- package/dist/server/chunks/{_slug__B0_Nwmjh.mjs → _slug__DtzYz9Uz.mjs} +1 -1
- package/dist/server/chunks/access_BNFcmbp2.mjs +34 -0
- package/dist/server/chunks/{ar_DBjdWIJ0.mjs → ar_DMC8HaoP.mjs} +3 -1
- package/dist/server/chunks/custom-fields_90Jyw521.mjs +488 -0
- package/dist/server/chunks/{edit_Cf30wdZ0.mjs → edit_BmWxJDZa.mjs} +2 -2
- package/dist/server/chunks/{es-ES_TJ4oK1yi.mjs → es-ES_DZvHskAD.mjs} +3 -1
- package/dist/server/chunks/{general_CQ4Jb4sC.mjs → general_AGjbJVe-.mjs} +6 -6
- package/dist/server/chunks/{he_TWsuTphz.mjs → he_zy3stNhR.mjs} +3 -1
- package/dist/server/chunks/i18n_Csb4GGX2.mjs +1326 -0
- package/dist/server/chunks/{index_DvroAJAZ.mjs → index_BKm7s1bn.mjs} +2 -2
- package/dist/server/chunks/{index_BoNMua8M.mjs → index_C7yZO-zD.mjs} +2 -2
- package/dist/server/chunks/{index_B541nJoz.mjs → index_CUsSNKEq.mjs} +8 -6
- package/dist/server/chunks/{index_C7yO7uAx.mjs → index_D5IP16pU.mjs} +3 -3
- package/dist/server/chunks/{index_BiJh6n-r.mjs → index_b00ttelz.mjs} +1 -1
- package/dist/server/chunks/{it_CEVFVWh1.mjs → it_BiUDLszZ.mjs} +3 -1
- package/dist/server/chunks/{ja_CqDirMqf.mjs → ja_DjFAG7hL.mjs} +3 -1
- package/dist/server/chunks/{login_B7FSWUaM.mjs → login_lEEcbYs3.mjs} +2 -1
- package/dist/server/chunks/{new_CP8lvbKz.mjs → new_BDjFzd-l.mjs} +2 -2
- package/dist/server/chunks/{new_Circ7nxk.mjs → new_BjtzqhsE.mjs} +2 -2
- package/dist/server/chunks/operations_D7TMl0mB.mjs +34 -0
- package/dist/server/chunks/{pl_ChIKxfZG.mjs → pl_0Xe9Qom2.mjs} +3 -1
- package/dist/server/chunks/plugins_KhRV7kiu.mjs +152 -0
- package/dist/server/chunks/{post-types__UNdVC6h.mjs → post-types_DfXwkNIg.mjs} +6 -6
- package/dist/server/chunks/{pt-BR_4d4jZWL0.mjs → pt-BR_DIZpU2Mk.mjs} +206 -2
- package/dist/server/chunks/resources_BbhlUSXs.mjs +34 -0
- package/dist/server/chunks/{ru_CIc6O5Q7.mjs → ru_DFvIxd0Y.mjs} +3 -1
- package/dist/server/chunks/script_CPGt5jAh.mjs +19 -0
- package/dist/server/chunks/{sw_Bs3iYVDM.mjs → sw_CmaPgGYa.mjs} +3 -1
- package/dist/server/chunks/{taxonomies_CVMK3JxL.mjs → taxonomies_CF7qpKG3.mjs} +2 -2
- package/dist/server/chunks/themes_RAw8tJmy.mjs +151 -0
- package/dist/server/chunks/{tr_C7JbXuoQ.mjs → tr_B_acwl2e.mjs} +3 -1
- package/dist/server/chunks/{uk_Dibs8Wkc.mjs → uk_DXnk4imL.mjs} +3 -1
- package/dist/server/chunks/{upload_BN1-_I0F.mjs → upload_BBZ9ttmU.mjs} +2 -2
- package/dist/server/chunks/{yo_B6MPvz_U.mjs → yo_DDQ8a-0v.mjs} +3 -1
- package/dist/server/chunks/{zh-CN_G1Dc2b28.mjs → zh-CN_763uzTMQ.mjs} +3 -1
- package/dist/server/entry.mjs +200 -22
- package/dist/server/virtual_astro_middleware.mjs +6 -3
- package/package.json +1 -1
- package/dist/client/_astro/AdminBar.DzMuNBYF.js +0 -234
- package/dist/client/_astro/BaseLayout.B2MfKf6B.css +0 -1
- package/dist/client/_astro/ContentEditor.uJ5F6gSs.js +0 -1
- package/dist/client/_astro/ContentList.CVy_dKZZ.js +0 -1
- package/dist/client/_astro/DashboardHome.DZVGJl33.js +0 -1
- package/dist/client/_astro/DashboardLayout.DrKf2Klk.css +0 -1
- package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.BrC4PbPa.js +0 -1
- package/dist/client/_astro/GeneralSettings.BS1F1fbv.js +0 -1
- package/dist/client/_astro/HelpTabs.CHwVYwbx.js +0 -103
- package/dist/client/_astro/LanguageSelector.C-0zi24B.js +0 -14
- package/dist/client/_astro/MediaLibrary.BG_XuGSC.js +0 -1
- package/dist/client/_astro/PostTypesManager.kgLZEJjr.js +0 -1
- package/dist/client/_astro/ScreenOptions.CtkDOZLA.js +0 -70
- package/dist/client/_astro/TaxonomiesManager.BBL0hyRa.js +0 -1
- package/dist/client/_astro/UserCreateForm.PVLoPXwZ.js +0 -1
- package/dist/client/_astro/UsersManager.CG61mqGd.js +0 -1
- package/dist/client/_astro/api.DTNuyqvx.js +0 -1
- package/dist/client/_astro/ar.CzsjUutD.js +0 -1
- package/dist/client/_astro/en.DmN7xy_a.js +0 -1
- package/dist/client/_astro/es-ES.p2TLEMlZ.js +0 -1
- package/dist/client/_astro/extensions.DfxrGzbo.js +0 -1
- package/dist/client/_astro/he.BnYHiYpn.js +0 -1
- package/dist/client/_astro/i18n.DJXYgZ8Z.js +0 -1
- package/dist/client/_astro/it.WrWKBEAD.js +0 -1
- package/dist/client/_astro/ja.DxnfhIdt.js +0 -1
- package/dist/client/_astro/pl.jUj-RfZS.js +0 -1
- package/dist/client/_astro/pt-BR.DtNwEO0i.js +0 -1
- package/dist/client/_astro/ru.KFSfdjWn.js +0 -1
- package/dist/client/_astro/src.Cgonpfb5.js +0 -1
- package/dist/client/_astro/sw.3jlAOLOv.js +0 -1
- package/dist/client/_astro/tr.tnLMnGPg.js +0 -1
- package/dist/client/_astro/uk.VquHY_xc.js +0 -1
- package/dist/client/_astro/yo.Cr8hCb5u.js +0 -1
- package/dist/client/_astro/zh-CN.E32QqP4v.js +0 -1
- package/dist/server/chunks/en_C750mYKk.mjs +0 -408
- package/dist/server/chunks/i18n_DnHqy5K-.mjs +0 -527
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, p as addAttribute, s as renderSlot, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./
|
|
4
|
+
import { t as renderScript } from "./script_CPGt5jAh.mjs";
|
|
5
|
+
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_Csb4GGX2.mjs";
|
|
6
|
+
import { t as $$BaseLayout } from "./BaseLayout_4yJ0PQCS.mjs";
|
|
6
7
|
import { t as require_semver } from "./semver_WbqCUY_o.mjs";
|
|
7
|
-
import { createComponent, escape,
|
|
8
|
-
import { For, For as For2, Show, Show as Show2, createMemo as createMemo$1, createSignal, createSignal as createSignal$1,
|
|
8
|
+
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey, ssrStyle } from "solid-js/web";
|
|
9
|
+
import { For, For as For2, Show, Show as Show2, createMemo as createMemo$1, createSignal, createSignal as createSignal$1, onMount, onMount as onMount$1 } from "solid-js";
|
|
9
10
|
require_semver();
|
|
10
11
|
//#endregion
|
|
11
12
|
//#region ../../packages/ui/dist/server.js
|
|
12
|
-
var _tmpl$$
|
|
13
|
-
var _tmpl$2$
|
|
13
|
+
var _tmpl$$7 = ["<span", " class=\"spinner\" aria-label=\"Carregando\"></span>"];
|
|
14
|
+
var _tmpl$2$6 = [
|
|
14
15
|
"<button",
|
|
15
16
|
"",
|
|
16
17
|
">",
|
|
17
18
|
"</button>"
|
|
18
19
|
];
|
|
19
|
-
var _tmpl$3$
|
|
20
|
+
var _tmpl$3$4 = [
|
|
20
21
|
"<label",
|
|
21
22
|
" class=\"field__label\"><!--$-->",
|
|
22
23
|
"<!--/--><!--$-->",
|
|
@@ -25,7 +26,7 @@ var _tmpl$3$7 = [
|
|
|
25
26
|
"",
|
|
26
27
|
"></label>"
|
|
27
28
|
];
|
|
28
|
-
var _tmpl$4$
|
|
29
|
+
var _tmpl$4$4 = [
|
|
29
30
|
"<input",
|
|
30
31
|
" class=\"input\"",
|
|
31
32
|
"",
|
|
@@ -139,7 +140,7 @@ function Button(props) {
|
|
|
139
140
|
props.size === "sm" ? "btn-sm" : "",
|
|
140
141
|
props.class ?? ""
|
|
141
142
|
].filter(Boolean).join(" ");
|
|
142
|
-
return ssr(_tmpl$2$
|
|
143
|
+
return ssr(_tmpl$2$6, ssrHydrationKey() + ssrAttribute("type", escape(props.type ?? "button", true), false) + ssrAttribute("class", escape(classes(), true), false), ssrAttribute("disabled", props.disabled || props.loading, true), escape(createComponent(Show, {
|
|
143
144
|
get when() {
|
|
144
145
|
return props.loading;
|
|
145
146
|
},
|
|
@@ -147,7 +148,7 @@ function Button(props) {
|
|
|
147
148
|
return props.children;
|
|
148
149
|
},
|
|
149
150
|
get children() {
|
|
150
|
-
return ssr(_tmpl$$
|
|
151
|
+
return ssr(_tmpl$$7, ssrHydrationKey());
|
|
151
152
|
}
|
|
152
153
|
})));
|
|
153
154
|
}
|
|
@@ -157,14 +158,14 @@ function Input(props) {
|
|
|
157
158
|
return props.label;
|
|
158
159
|
},
|
|
159
160
|
get children() {
|
|
160
|
-
return ssr(_tmpl$3$
|
|
161
|
+
return ssr(_tmpl$3$4, ssrHydrationKey(), escape(props.label), props.required ? _tmpl$7$2[0] + ssrHydrationKey() + _tmpl$7$2[1] : escape(null), ssrAttribute("type", escape(props.type ?? "text", true), false) + ssrAttribute("name", escape(props.name, true), false) + ssrAttribute("value", escape(props.value ?? "", true), false) + ssrAttribute("placeholder", escape(props.placeholder, true), false), ssrAttribute("disabled", props.disabled, true), ssrAttribute("required", props.required, true));
|
|
161
162
|
}
|
|
162
163
|
})), escape(createComponent(Show, {
|
|
163
164
|
get when() {
|
|
164
165
|
return !props.label;
|
|
165
166
|
},
|
|
166
167
|
get children() {
|
|
167
|
-
return ssr(_tmpl$4$
|
|
168
|
+
return ssr(_tmpl$4$4, ssrHydrationKey(), ssrAttribute("type", escape(props.type ?? "text", true), false) + ssrAttribute("name", escape(props.name, true), false) + ssrAttribute("value", escape(props.value ?? "", true), false) + ssrAttribute("placeholder", escape(props.placeholder, true), false), ssrAttribute("disabled", props.disabled, true), ssrAttribute("required", props.required, true));
|
|
168
169
|
}
|
|
169
170
|
})), escape(createComponent(Show, {
|
|
170
171
|
get when() {
|
|
@@ -286,14 +287,14 @@ function Pagination(props) {
|
|
|
286
287
|
}
|
|
287
288
|
//#endregion
|
|
288
289
|
//#region src/ext/slots.tsx
|
|
289
|
-
var _tmpl$$
|
|
290
|
+
var _tmpl$$6 = [
|
|
290
291
|
"<a",
|
|
291
292
|
" href=\"",
|
|
292
293
|
"\" class=\"sidebar__link\"><!--$-->",
|
|
293
294
|
"<!--/--> <!--$-->",
|
|
294
295
|
"<!--/--></a>"
|
|
295
296
|
];
|
|
296
|
-
var _tmpl$2$
|
|
297
|
+
var _tmpl$2$5 = [
|
|
297
298
|
"<span",
|
|
298
299
|
" aria-hidden=\"true\">",
|
|
299
300
|
"</span>"
|
|
@@ -309,18 +310,18 @@ function AdminSidebarSlot(props) {
|
|
|
309
310
|
get each() {
|
|
310
311
|
return allowedPages();
|
|
311
312
|
},
|
|
312
|
-
children: (page) => ssr(_tmpl$$
|
|
313
|
+
children: (page) => ssr(_tmpl$$6, ssrHydrationKey(), `/plugins/${escape(page.slug, true)}`, page.icon ? ssr(_tmpl$2$5, ssrHydrationKey(), escape(page.icon)) : escape(null), escape(page.label))
|
|
313
314
|
});
|
|
314
315
|
}
|
|
315
316
|
//#endregion
|
|
316
317
|
//#region src/ext/extensions.tsx
|
|
317
|
-
var _tmpl$$
|
|
318
|
+
var _tmpl$$5 = [
|
|
318
319
|
"<div",
|
|
319
320
|
" class=\"sidebar-plugins\" data-extensions=\"sidebar\"><!--$-->",
|
|
320
321
|
"<!--/--><!--$-->",
|
|
321
322
|
"<!--/--></div>"
|
|
322
323
|
];
|
|
323
|
-
var _tmpl$2$
|
|
324
|
+
var _tmpl$2$4 = [
|
|
324
325
|
"<div",
|
|
325
326
|
" class=\"",
|
|
326
327
|
"\"",
|
|
@@ -343,7 +344,7 @@ function emptyExtensionsState() {
|
|
|
343
344
|
function extensionsFromPlugins(plugins) {
|
|
344
345
|
const state = emptyExtensionsState();
|
|
345
346
|
for (const plugin of plugins) {
|
|
346
|
-
if (plugin.status !== "ACTIVE") continue;
|
|
347
|
+
if (plugin.status !== "ACTIVE" && plugin.status !== "ACTIVATED") continue;
|
|
347
348
|
const admin = plugin.manifest?.admin;
|
|
348
349
|
if (!admin) continue;
|
|
349
350
|
const pluginSlug = plugin.slug ?? plugin.name;
|
|
@@ -368,9 +369,7 @@ function PluginExtensionsSlot() {
|
|
|
368
369
|
const [extensions, setExtensions] = createSignal$1(emptyExtensionsState());
|
|
369
370
|
onMount$1(async () => {
|
|
370
371
|
try {
|
|
371
|
-
const
|
|
372
|
-
if (!response.ok) return;
|
|
373
|
-
const plugins = await response.json();
|
|
372
|
+
const plugins = await apiClient.getPlugins();
|
|
374
373
|
setExtensions(extensionsFromPlugins(plugins));
|
|
375
374
|
} catch {}
|
|
376
375
|
});
|
|
@@ -380,11 +379,11 @@ function PluginExtensionsSlot() {
|
|
|
380
379
|
return extensions().menuPages.length > 0;
|
|
381
380
|
},
|
|
382
381
|
get children() {
|
|
383
|
-
return ssr(_tmpl$$
|
|
382
|
+
return ssr(_tmpl$$5, ssrHydrationKey(), escape(createComponent(For2, {
|
|
384
383
|
get each() {
|
|
385
384
|
return extensions().notices;
|
|
386
385
|
},
|
|
387
|
-
children: (notice) => ssr(_tmpl$2$
|
|
386
|
+
children: (notice) => ssr(_tmpl$2$4, ssrHydrationKey(), `notice notice--${escape(notice.level, true)}`, ssrAttribute("data-plugin", escape(notice.id.split(":")[0], true), false), escape(notice.message))
|
|
388
387
|
})), escape(createComponent(AdminSidebarSlot, {
|
|
389
388
|
get extensions() {
|
|
390
389
|
return extensions();
|
|
@@ -395,69 +394,21 @@ function PluginExtensionsSlot() {
|
|
|
395
394
|
});
|
|
396
395
|
}
|
|
397
396
|
//#endregion
|
|
398
|
-
//#region src/components/LanguageSelector.tsx
|
|
399
|
-
var _tmpl$$7 = [
|
|
400
|
-
"<ul",
|
|
401
|
-
" class=\"language-dropdown\" role=\"menu\"",
|
|
402
|
-
">",
|
|
403
|
-
"</ul>"
|
|
404
|
-
];
|
|
405
|
-
var _tmpl$2$6 = [
|
|
406
|
-
"<div",
|
|
407
|
-
" class=\"language-selector\"><button class=\"btn btn-secondary btn-sm language-trigger\"",
|
|
408
|
-
" type=\"button\"><span class=\"flag\">",
|
|
409
|
-
"</span><span>",
|
|
410
|
-
"</span><svg class=\"chevron\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M6 9l6 6 6-6\"></path></svg></button><!--$-->",
|
|
411
|
-
"<!--/--><style>\n .language-selector { position: relative; }\n .language-trigger { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; min-width: 140px; justify-content: space-between; }\n .language-trigger .flag { font-size: 1rem; }\n .language-trigger .chevron { flex-shrink: 0; transition: transform 0.15s; }\n .language-trigger[aria-expanded=\"true\"] .chevron { transform: rotate(180deg); }\n .language-dropdown { position: absolute; top: calc(100% + 0.25rem); right: 0; z-index: 100; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 160px; overflow: hidden; animation: dropdown-in 0.1s ease-out; }\n @keyframes dropdown-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }\n .language-dropdown li { list-style: none; }\n .language-dropdown button { width: 100%; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: none; border: none; text-align: left; color: var(--color-text); cursor: pointer; }\n .language-dropdown button:hover { background: var(--color-bg-tertiary); }\n .language-dropdown button.active { background: var(--color-primary); color: var(--color-primary-contrast); font-weight: 500; }\n .language-dropdown .flag { font-size: 1rem; }\n </style></div>"
|
|
412
|
-
];
|
|
413
|
-
var _tmpl$3$6 = [
|
|
414
|
-
"<li",
|
|
415
|
-
" role=\"menuitem\"><button",
|
|
416
|
-
" type=\"button\"><span class=\"flag\">",
|
|
417
|
-
"</span><!--$-->",
|
|
418
|
-
"<!--/--></button></li>"
|
|
419
|
-
];
|
|
420
|
-
function LanguageSelector() {
|
|
421
|
-
const { locale, changeLocale, t } = useTranslation();
|
|
422
|
-
const [open, setOpen] = createSignal(false);
|
|
423
|
-
const handleClickOutside = (e) => {
|
|
424
|
-
if (!e.target.closest(".language-selector")) setOpen(false);
|
|
425
|
-
};
|
|
426
|
-
onMount(() => {
|
|
427
|
-
if (isServer) return;
|
|
428
|
-
document.addEventListener("click", handleClickOutside);
|
|
429
|
-
});
|
|
430
|
-
onCleanup(() => {
|
|
431
|
-
if (isServer) return;
|
|
432
|
-
document.removeEventListener("click", handleClickOutside);
|
|
433
|
-
});
|
|
434
|
-
const currentLocale = locale;
|
|
435
|
-
const translate = t;
|
|
436
|
-
return ssr(_tmpl$2$6, ssrHydrationKey(), ssrAttribute("aria-expanded", escape(open(), true), false) + ssrAttribute("aria-label", escape(translate("common.language") ?? "Language", true), false), escape(LOCALE_FLAGS[currentLocale] ?? "🌐"), escape(LOCALE_LABELS[currentLocale] ?? currentLocale), escape(createComponent(Show, {
|
|
437
|
-
get when() {
|
|
438
|
-
return open();
|
|
439
|
-
},
|
|
440
|
-
get children() {
|
|
441
|
-
return ssr(_tmpl$$7, ssrHydrationKey(), ssrAttribute("aria-label", escape(translate("common.language") ?? "Language", true), false), escape(SUPPORTED_LOCALES.map((loc) => ssr(_tmpl$3$6, ssrHydrationKey(), ssrAttribute("class", currentLocale === loc ? "active" : "", false), escape(LOCALE_FLAGS[loc] ?? "🌐"), escape(LOCALE_LABELS[loc] ?? loc)))));
|
|
442
|
-
}
|
|
443
|
-
})));
|
|
444
|
-
}
|
|
445
|
-
//#endregion
|
|
446
397
|
//#region src/components/admin-bar/AdminBar.tsx
|
|
447
|
-
var _tmpl$$
|
|
448
|
-
var _tmpl$2$
|
|
398
|
+
var _tmpl$$4 = ["<style", ">\n #admin-bar {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 46px;\n background: #0A0A0A;\n border-bottom: 1px solid #333;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 1rem;\n z-index: 2000;\n font-family: inherit;\n }\n #admin-bar * { box-sizing: border-box; }\n .admin-bar-left, .admin-bar-right {\n display: flex;\n align-items: center;\n gap: 1rem;\n }\n .admin-bar-brand {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n color: #FAF5E8;\n font-weight: 600;\n font-size: 1.125rem;\n text-decoration: none;\n padding: 0.375rem 0.75rem;\n border-radius: 0.375rem;\n transition: background 0.15s;\n }\n .admin-bar-brand:hover {\n background: rgba(255,255,255,0.08);\n }\n .admin-bar-brand svg { width: 28px; height: 28px; }\n .admin-bar-separator { width: 1px; height: 24px; background: #333; }\n .admin-bar-menu { display: flex; gap: 0.25rem; }\n .admin-bar-menu-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.375rem 0.75rem;\n color: rgba(255,255,255,0.7);\n font-size: 0.8125rem;\n font-weight: 500;\n border-radius: 0.375rem;\n text-decoration: none;\n transition: all 0.15s;\n }\n .admin-bar-menu-item:hover {\n background: rgba(255,255,255,0.1);\n color: #fff;\n }\n .admin-bar-menu-item svg { width: 18px; height: 18px; }\n .admin-bar-right { gap: 0.75rem; }\n .notifications-btn {\n position: relative;\n background: none;\n border: none;\n color: rgba(255,255,255,0.7);\n padding: 0.375rem;\n border-radius: 0.375rem;\n cursor: pointer;\n transition: all 0.15s;\n }\n .notifications-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }\n .notifications-badge {\n position: absolute;\n top: 2px;\n right: 2px;\n min-width: 16px;\n height: 16px;\n background: #EF4444;\n color: #fff;\n font-size: 0.625rem;\n font-weight: 600;\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n }\n .notifications-dropdown { position: relative; }\n .notifications-panel {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 280px;\n max-width: 90vw;\n background: #FFFFFF;\n border: 1px solid #DCDCDE;\n border-radius: 0.5rem;\n box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);\n z-index: 2100;\n overflow: hidden;\n animation: slideIn 0.15s ease-out;\n }\n .notifications-header {\n padding: 0.75rem 1rem;\n font-size: 0.6875rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: #646970;\n border-bottom: 1px solid #DCDCDE;\n }\n .notifications-item {\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n padding: 0.625rem 1rem;\n border-bottom: 1px solid #F6F7F7;\n }\n .notifications-item:last-child { border-bottom: none; }\n .notifications-action {\n font-size: 0.8125rem;\n font-weight: 600;\n color: #2C3338;\n font-family: ui-monospace, SFMono-Regular, monospace;\n word-break: break-word;\n }\n .notifications-meta {\n display: flex;\n justify-content: space-between;\n gap: 0.75rem;\n font-size: 0.6875rem;\n color: #646970;\n }\n .notifications-empty { padding: 1rem; margin: 0; font-size: 0.8125rem; color: #646970; }\n .user-menu-trigger {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n background: none;\n border: none;\n color: #fff;\n padding: 0.375rem 0.75rem;\n border-radius: 0.375rem;\n cursor: pointer;\n font-size: 0.8125rem;\n font-weight: 500;\n transition: background 0.15s;\n }\n .user-menu-trigger:hover { background: rgba(255,255,255,0.1); }\n .user-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: linear-gradient(135deg, #D8B45E 0%, #B99542 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: 0.875rem;\n color: #0A0A0A;\n }\n .user-menu-dropdown {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 200px;\n background: #FFFFFF;\n border: 1px solid #DCDCDE;\n border-radius: 0.5rem;\n box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);\n z-index: 2100;\n overflow: hidden;\n animation: slideIn 0.15s ease-out;\n }\n @keyframes slideIn { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: translateY(0); } }\n .user-menu-header {\n padding: 1rem;\n border-bottom: 1px solid #DCDCDE;\n }\n .user-menu-name { font-weight: 600; color: #0A0A0A; font-size: 0.875rem; }\n .user-menu-email { color: #646970; font-size: 0.75rem; margin-top: 0.125rem; }\n .user-menu-divider { height: 1px; background: #DCDCDE; }\n .user-menu-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n padding: 0.625rem 1rem;\n background: none;\n border: none;\n color: #2C3338;\n font-size: 0.8125rem;\n font-weight: 500;\n text-align: left;\n cursor: pointer;\n transition: background 0.15s;\n }\n .user-menu-item:hover { background: #F6F7F7; }\n .user-menu-item svg { width: 18px; height: 18px; color: #646970; }\n .user-menu-item.danger { color: #EF4444; }\n .user-menu-item.danger:hover { background: #FEF2F2; }\n .lang-menu-dropdown {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 180px;\n background: #FFFFFF;\n border: 1px solid #DCDCDE;\n border-radius: 0.5rem;\n box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);\n z-index: 2100;\n overflow: hidden;\n animation: slideIn 0.15s ease-out;\n }\n @keyframes slideIn { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: translateY(0); } }\n .lang-menu-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n padding: 0.625rem 1rem;\n background: none;\n border: none;\n color: #2C3338;\n font-size: 0.8125rem;\n font-weight: 500;\n text-align: left;\n cursor: pointer;\n }\n .lang-menu-item:hover { background: #F6F7F7; }\n .lang-menu-item.active { background: #FAF5E8; color: #B99542; font-weight: 600; }\n .lang-menu-item .flag { font-size: 1rem; }\n @media (max-width: 782px) {\n .admin-bar-menu { display: none; }\n }\n </style>"];
|
|
399
|
+
var _tmpl$2$3 = [
|
|
449
400
|
"<span",
|
|
450
401
|
" class=\"notifications-badge\">",
|
|
451
402
|
"</span>"
|
|
452
403
|
];
|
|
453
|
-
var _tmpl$3$
|
|
404
|
+
var _tmpl$3$3 = [
|
|
454
405
|
"<div",
|
|
455
406
|
" class=\"notifications-panel\" role=\"menu\"",
|
|
456
407
|
"><div class=\"notifications-header\">",
|
|
457
408
|
"</div><!--$-->",
|
|
458
409
|
"<!--/--></div>"
|
|
459
410
|
];
|
|
460
|
-
var _tmpl$4$
|
|
411
|
+
var _tmpl$4$3 = [
|
|
461
412
|
"<div",
|
|
462
413
|
" class=\"lang-menu-dropdown\" role=\"menu\"",
|
|
463
414
|
">",
|
|
@@ -576,19 +527,19 @@ function AdminBar(props) {
|
|
|
576
527
|
year: "numeric"
|
|
577
528
|
});
|
|
578
529
|
};
|
|
579
|
-
return [ssr(_tmpl$$
|
|
530
|
+
return [ssr(_tmpl$$4, ssrHydrationKey()), ssr(_tmpl$8$1, ssrHydrationKey(), ssrAttribute("aria-label", escape(t("layout.appName"), true), false), ssrAttribute("aria-label", escape(t("adminBar.mainMenu"), true), false), escape(t("layout.nav.content")), escape(t("layout.nav.media")), escape(t("layout.nav.settings")), ssrAttribute("aria-label", escape(t("adminBar.notifications"), true), false) + ssrAttribute("aria-expanded", escape(showNotifications(), true), false), escape(createComponent(Show, {
|
|
580
531
|
get when() {
|
|
581
532
|
return notifications().length > 0;
|
|
582
533
|
},
|
|
583
534
|
get children() {
|
|
584
|
-
return ssr(_tmpl$2$
|
|
535
|
+
return ssr(_tmpl$2$3, ssrHydrationKey(), escape(notifications().length));
|
|
585
536
|
}
|
|
586
537
|
})), escape(createComponent(Show, {
|
|
587
538
|
get when() {
|
|
588
539
|
return showNotifications();
|
|
589
540
|
},
|
|
590
541
|
get children() {
|
|
591
|
-
return ssr(_tmpl$3$
|
|
542
|
+
return ssr(_tmpl$3$3, ssrHydrationKey(), ssrAttribute("aria-label", escape(t("adminBar.notifications"), true), false), escape(t("adminBar.notifications")), escape(createComponent(Show, {
|
|
592
543
|
get when() {
|
|
593
544
|
return notifications().length > 0;
|
|
594
545
|
},
|
|
@@ -605,7 +556,7 @@ function AdminBar(props) {
|
|
|
605
556
|
return showLangMenu();
|
|
606
557
|
},
|
|
607
558
|
get children() {
|
|
608
|
-
return ssr(_tmpl$4$
|
|
559
|
+
return ssr(_tmpl$4$3, ssrHydrationKey(), ssrAttribute("aria-label", escape(t("common.language"), true), false), escape(SUPPORTED_LOCALES.map((loc) => ssr(_tmpl$1, ssrHydrationKey() + ssrAttribute("class", currentLocale === loc ? "lang-menu-item active" : "lang-menu-item", false), escape(LOCALE_FLAGS[loc] ?? "🌐"), escape(LOCALE_LABELS[loc] ?? loc)))));
|
|
609
560
|
}
|
|
610
561
|
})), escape(createComponent(Show, {
|
|
611
562
|
get when() {
|
|
@@ -631,438 +582,11 @@ function AdminBar(props) {
|
|
|
631
582
|
})), ssrAttribute("aria-label", escape(t("adminBar.toggleSidebar"), true), false))];
|
|
632
583
|
}
|
|
633
584
|
//#endregion
|
|
634
|
-
//#region src/components/screen-options/ScreenOptions.tsx
|
|
635
|
-
var _tmpl$$5 = [
|
|
636
|
-
"<div",
|
|
637
|
-
" class=\"screen-options-panel\" role=\"region\"",
|
|
638
|
-
"><div class=\"screen-options-header\"><h3>",
|
|
639
|
-
"</h3><button class=\"screen-options-close\"",
|
|
640
|
-
" type=\"button\"><svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button></div><div class=\"screen-options-content\"><fieldset><legend>",
|
|
641
|
-
"</legend><div class=\"screen-options-checkboxes\">",
|
|
642
|
-
"</div></fieldset><div class=\"screen-options-footer\"><button class=\"btn btn-primary\">",
|
|
643
|
-
"</button></div></div></div>"
|
|
644
|
-
];
|
|
645
|
-
var _tmpl$2$4 = [
|
|
646
|
-
"<div",
|
|
647
|
-
" class=\"screen-options\"><button class=\"screen-options-trigger\"",
|
|
648
|
-
" type=\"button\"><svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path d=\"M6 9l6 6 6-6\"></path></svg><span>",
|
|
649
|
-
"</span><svg class=\"chevron\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path d=\"M6 9l6 6 6-6\"></path></svg></button><!--$-->",
|
|
650
|
-
"<!--/--></div>"
|
|
651
|
-
];
|
|
652
|
-
var _tmpl$3$4 = ["<style", ">\n .screen-options { position: relative; }\n .screen-options-trigger {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.375rem 0.75rem;\n background: var(--color-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n color: var(--color-text);\n font-size: 0.8125rem;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s;\n }\n .screen-options-trigger:hover {\n background: var(--color-surface-hover);\n border-color: var(--color-primary);\n }\n .screen-options-trigger .chevron {\n transition: transform 0.15s;\n flex-shrink: 0;\n }\n .screen-options-trigger[aria-expanded=\"true\"] .chevron {\n transform: rotate(180deg);\n }\n .screen-options-panel {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 280px;\n background: var(--color-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-xl);\n z-index: 1000;\n animation: slideIn 0.15s ease-out;\n }\n @keyframes slideIn { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: translateY(0); } }\n .screen-options-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 1rem;\n border-bottom: 1px solid var(--color-border);\n }\n .screen-options-header h3 { font-size: 0.875rem; font-weight: 600; }\n .screen-options-close {\n background: none; border: none; padding: 0.25rem;\n color: var(--color-muted); cursor: pointer; border-radius: var(--radius-sm);\n }\n .screen-options-close:hover { background: var(--color-background); color: var(--color-text); }\n .screen-options-content { padding: 1rem; }\n .screen-options-content fieldset { border: none; margin: 0; padding: 0; }\n .screen-options-content legend {\n font-size: 0.75rem; font-weight: 600; text-transform: uppercase;\n color: var(--color-muted); letter-spacing: 0.04em; margin-bottom: 0.75rem;\n }\n .screen-options-checkboxes { display: flex; flex-direction: column; gap: 0.5rem; }\n .screen-options-checkbox {\n display: flex; align-items: center; gap: 0.5rem;\n padding: 0.5rem; border-radius: var(--radius-md);\n cursor: pointer; transition: background 0.15s;\n }\n .screen-options-checkbox:hover { background: var(--color-background); }\n .screen-options-checkbox input { width: 16px; height: 16px; accent-color: var(--color-primary); }\n .screen-options-checkbox span { font-size: 0.8125rem; color: var(--color-text); }\n .screen-options-footer { display: flex; justify-content: flex-end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }\n </style>"];
|
|
653
|
-
var _tmpl$4$4 = [
|
|
654
|
-
"<label",
|
|
655
|
-
" class=\"screen-options-checkbox\"><input type=\"checkbox\"",
|
|
656
|
-
"><span>",
|
|
657
|
-
"</span></label>"
|
|
658
|
-
];
|
|
659
|
-
var STORAGE_KEY = "screen-options";
|
|
660
|
-
/** Preferências salvas (localStorage) — precedem o default do painel. */
|
|
661
|
-
function loadPrefs() {
|
|
662
|
-
try {
|
|
663
|
-
return JSON.parse(localStorage.getItem(STORAGE_KEY) ?? "{}");
|
|
664
|
-
} catch {
|
|
665
|
-
return {};
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
function ScreenOptions(props) {
|
|
669
|
-
const { t } = useTranslation();
|
|
670
|
-
const [open, setOpen] = createSignal(false);
|
|
671
|
-
const [enabled, setEnabled] = createSignal({
|
|
672
|
-
...Object.fromEntries(props.panels.map((p) => [p.id, p.defaultOpen !== false])),
|
|
673
|
-
...loadPrefs()
|
|
674
|
-
});
|
|
675
|
-
const handleClickOutside = (e) => {
|
|
676
|
-
if (!e.target.closest(".screen-options")) setOpen(false);
|
|
677
|
-
};
|
|
678
|
-
onMount(() => {
|
|
679
|
-
if (isServer) return;
|
|
680
|
-
document.addEventListener("click", handleClickOutside);
|
|
681
|
-
});
|
|
682
|
-
onCleanup(() => {
|
|
683
|
-
if (isServer) return;
|
|
684
|
-
document.removeEventListener("click", handleClickOutside);
|
|
685
|
-
});
|
|
686
|
-
return [ssr(_tmpl$2$4, ssrHydrationKey(), ssrAttribute("aria-expanded", escape(open(), true), false) + ssrAttribute("aria-label", escape(t("screenOptions.label"), true), false), escape(t("screenOptions.title")), escape(createComponent(Show, {
|
|
687
|
-
get when() {
|
|
688
|
-
return open();
|
|
689
|
-
},
|
|
690
|
-
get children() {
|
|
691
|
-
return ssr(_tmpl$$5, ssrHydrationKey(), ssrAttribute("aria-label", escape(t("screenOptions.title"), true), false), escape(t("screenOptions.title")), ssrAttribute("aria-label", escape(t("common.close"), true), false), escape(t("screenOptions.showOnScreen")), escape(props.panels.map((panel) => ssr(_tmpl$4$4, ssrHydrationKey(), ssrAttribute("checked", enabled()[panel.id] ?? panel.defaultOpen !== false, true), escape(panel.label)))), escape(t("common.close")));
|
|
692
|
-
}
|
|
693
|
-
}))), ssr(_tmpl$3$4, ssrHydrationKey())];
|
|
694
|
-
}
|
|
695
|
-
//#endregion
|
|
696
|
-
//#region src/lib/sanitize.ts
|
|
697
|
-
/**
|
|
698
|
-
* Sanitizador de HTML em allowlist para pontos de injeção (innerHTML).
|
|
699
|
-
*
|
|
700
|
-
* O admin injeta HTML apenas no conteúdo das abas de ajuda (HelpTabs), que
|
|
701
|
-
* vem do i18n — mas todo innerHTML passa por aqui por defesa em profundidade.
|
|
702
|
-
*
|
|
703
|
-
* Garantias:
|
|
704
|
-
* - Allowlist de tags e atributos (script/style/svg/iframe/form são removidos,
|
|
705
|
-
* incluindo o conteúdo de tags de texto bruto como <script> e <style>).
|
|
706
|
-
* - Atributos de evento (on*), style e demais fora da allowlist são descartados.
|
|
707
|
-
* - href/src têm o protocolo validado DEPOIS de decodificar entidades e remover
|
|
708
|
-
* tab/newline — o valor emitido é re-escapado a partir do valor decodificado,
|
|
709
|
-
* de modo que o que o navegador decodifica é exatamente o que foi validado
|
|
710
|
-
* (bloqueia `javascript:`, `javascript:`, `javascript:`, etc).
|
|
711
|
-
* - Texto é escapado (& < >), preservando entidades já válidas.
|
|
712
|
-
* - Tags de fechamento sem âncora são ignoradas: conteúdo malicioso não consegue
|
|
713
|
-
* "escapar" do container nem desbalancear a árvore (o quebra-cabeça de abas
|
|
714
|
-
* e widgets continua íntegro).
|
|
715
|
-
*
|
|
716
|
-
* Puro JavaScript, sem APIs de DOM: roda igual no SSR (Node) e no navegador.
|
|
717
|
-
*/
|
|
718
|
-
/** Tags permitidas (conteúdo rico simples: ajuda, títulos, listas, links). */
|
|
719
|
-
var ALLOWED_TAGS = /* @__PURE__ */ new Set([
|
|
720
|
-
"a",
|
|
721
|
-
"abbr",
|
|
722
|
-
"b",
|
|
723
|
-
"blockquote",
|
|
724
|
-
"br",
|
|
725
|
-
"code",
|
|
726
|
-
"dd",
|
|
727
|
-
"div",
|
|
728
|
-
"dl",
|
|
729
|
-
"dt",
|
|
730
|
-
"em",
|
|
731
|
-
"figcaption",
|
|
732
|
-
"figure",
|
|
733
|
-
"h1",
|
|
734
|
-
"h2",
|
|
735
|
-
"h3",
|
|
736
|
-
"h4",
|
|
737
|
-
"h5",
|
|
738
|
-
"h6",
|
|
739
|
-
"hr",
|
|
740
|
-
"i",
|
|
741
|
-
"img",
|
|
742
|
-
"li",
|
|
743
|
-
"ol",
|
|
744
|
-
"p",
|
|
745
|
-
"pre",
|
|
746
|
-
"q",
|
|
747
|
-
"s",
|
|
748
|
-
"span",
|
|
749
|
-
"strong",
|
|
750
|
-
"sub",
|
|
751
|
-
"sup",
|
|
752
|
-
"u",
|
|
753
|
-
"ul"
|
|
754
|
-
]);
|
|
755
|
-
/** Tags vazias (emitidas com fechamento próprio, nunca empilhadas). */
|
|
756
|
-
var VOID_TAGS = /* @__PURE__ */ new Set([
|
|
757
|
-
"br",
|
|
758
|
-
"hr",
|
|
759
|
-
"img"
|
|
760
|
-
]);
|
|
761
|
-
/**
|
|
762
|
-
* Tags cujo conteúdo é texto bruto no HTML. Ao encontrá-las abertas, todo o
|
|
763
|
-
* miolo é descartado até o fechamento correspondente (senão, o conteúdo do
|
|
764
|
-
* <script> viraria texto visível ou vetor de parse).
|
|
765
|
-
*/
|
|
766
|
-
var RAW_TEXT_TAGS = /* @__PURE__ */ new Set([
|
|
767
|
-
"script",
|
|
768
|
-
"style",
|
|
769
|
-
"iframe",
|
|
770
|
-
"object",
|
|
771
|
-
"embed",
|
|
772
|
-
"svg",
|
|
773
|
-
"math",
|
|
774
|
-
"textarea",
|
|
775
|
-
"title",
|
|
776
|
-
"noscript",
|
|
777
|
-
"template"
|
|
778
|
-
]);
|
|
779
|
-
/** Atributos permitidos (globais; validação extra por atributo abaixo). */
|
|
780
|
-
var ALLOWED_ATTRS = /* @__PURE__ */ new Set([
|
|
781
|
-
"class",
|
|
782
|
-
"title",
|
|
783
|
-
"alt",
|
|
784
|
-
"width",
|
|
785
|
-
"height",
|
|
786
|
-
"href",
|
|
787
|
-
"src",
|
|
788
|
-
"target",
|
|
789
|
-
"rel"
|
|
790
|
-
]);
|
|
791
|
-
/** Esquemas aceitos em href (links externos, e-mail, telefone). */
|
|
792
|
-
var HREF_SCHEMES = /* @__PURE__ */ new Set([
|
|
793
|
-
"http",
|
|
794
|
-
"https",
|
|
795
|
-
"mailto",
|
|
796
|
-
"tel"
|
|
797
|
-
]);
|
|
798
|
-
/** Esquemas aceitos em src (somente rede). */
|
|
799
|
-
var SRC_SCHEMES = /* @__PURE__ */ new Set(["http", "https"]);
|
|
800
|
-
/** Entidades nomeadas relevantes (as que poderiam alterar a validação de URL). */
|
|
801
|
-
var NAMED_ENTITIES = {
|
|
802
|
-
amp: "&",
|
|
803
|
-
lt: "<",
|
|
804
|
-
gt: ">",
|
|
805
|
-
quot: "\"",
|
|
806
|
-
apos: "'",
|
|
807
|
-
colon: ":",
|
|
808
|
-
tab: " ",
|
|
809
|
-
newline: "\n",
|
|
810
|
-
sol: "/",
|
|
811
|
-
lpar: "(",
|
|
812
|
-
rpar: ")",
|
|
813
|
-
num: "#",
|
|
814
|
-
period: ".",
|
|
815
|
-
excl: "!",
|
|
816
|
-
comma: ","
|
|
817
|
-
};
|
|
818
|
-
/** Decodifica referências numéricas e nomeadas (uma passada, como o navegador). */
|
|
819
|
-
function decodeEntities(value) {
|
|
820
|
-
return value.replace(/&#x([0-9a-fA-F]+);?/g, (_m, hex) => fromCodePoint(parseInt(hex, 16))).replace(/&#(\d+);?/g, (_m, dec) => fromCodePoint(parseInt(dec, 10))).replace(/&([a-zA-Z][a-zA-Z0-9]{1,30});?/g, (m, name) => {
|
|
821
|
-
return NAMED_ENTITIES[name in NAMED_ENTITIES ? name : name.toLowerCase()] ?? m;
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
function fromCodePoint(cp) {
|
|
825
|
-
if (!Number.isFinite(cp) || cp < 0 || cp > 1114111) return "";
|
|
826
|
-
try {
|
|
827
|
-
return String.fromCodePoint(cp);
|
|
828
|
-
} catch {
|
|
829
|
-
return "";
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
/** Escapa valor para uso dentro de atributo entre aspas duplas. */
|
|
833
|
-
function escapeAttr(value) {
|
|
834
|
-
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
835
|
-
}
|
|
836
|
-
/**
|
|
837
|
-
* Escapa texto preservando entidades já válidas (evita exibir `&`
|
|
838
|
-
* literalmente quando a tradução usa `&` de propósito).
|
|
839
|
-
*/
|
|
840
|
-
function escapeText(text) {
|
|
841
|
-
return text.replace(/&(?![a-zA-Z][a-zA-Z0-9]{1,30};|#[0-9]{1,7};|#[xX][0-9a-fA-F]{1,6};)|[<>]/g, (m) => m === "&" ? "&" : m === "<" ? "<" : ">");
|
|
842
|
-
}
|
|
843
|
-
/**
|
|
844
|
-
* Valida URL decodificando entidades e removendo tab/newline (mesmo tratamento
|
|
845
|
-
* do parser de URL do navegador) antes de inspecionar o esquema.
|
|
846
|
-
*/
|
|
847
|
-
function isSafeUrl(raw, allowedSchemes) {
|
|
848
|
-
const decoded = decodeEntities(raw).replace(/[\t\n\r]/g, "").trim();
|
|
849
|
-
const scheme = /^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(decoded);
|
|
850
|
-
if (!scheme) return true;
|
|
851
|
-
return allowedSchemes.has(scheme[1].toLowerCase());
|
|
852
|
-
}
|
|
853
|
-
/** Normaliza valor de atributo: decodifica (como o navegador faria) e re-escapa. */
|
|
854
|
-
function normalizeAttrValue(raw) {
|
|
855
|
-
return escapeAttr(decodeEntities(raw));
|
|
856
|
-
}
|
|
857
|
-
/**
|
|
858
|
-
* Extrai pares nome/valor de uma tag, respeitando aspas (um `>` dentro de
|
|
859
|
-
* aspas não termina a tag) e valores não-aspados do HTML.
|
|
860
|
-
*/
|
|
861
|
-
function parseAttrs(body) {
|
|
862
|
-
const pairs = [];
|
|
863
|
-
const n = body.length;
|
|
864
|
-
let i = 0;
|
|
865
|
-
const isWs = (c) => c === " " || c === " " || c === "\n" || c === "\r" || c === "\f";
|
|
866
|
-
while (i < n) {
|
|
867
|
-
while (i < n && (isWs(body.charAt(i)) || body.charAt(i) === "/")) i++;
|
|
868
|
-
if (i >= n) break;
|
|
869
|
-
let name = "";
|
|
870
|
-
while (i < n && !isWs(body.charAt(i)) && body.charAt(i) !== "=" && body.charAt(i) !== ">" && body.charAt(i) !== "/" && body.charAt(i) !== "<") {
|
|
871
|
-
name += body.charAt(i);
|
|
872
|
-
i++;
|
|
873
|
-
}
|
|
874
|
-
if (!name) {
|
|
875
|
-
i++;
|
|
876
|
-
continue;
|
|
877
|
-
}
|
|
878
|
-
let value = "";
|
|
879
|
-
let j = i;
|
|
880
|
-
while (j < n && isWs(body.charAt(j))) j++;
|
|
881
|
-
if (j < n && body.charAt(j) === "=") {
|
|
882
|
-
j++;
|
|
883
|
-
while (j < n && isWs(body.charAt(j))) j++;
|
|
884
|
-
if (j < n && (body.charAt(j) === "\"" || body.charAt(j) === "'")) {
|
|
885
|
-
const quote = body.charAt(j);
|
|
886
|
-
j++;
|
|
887
|
-
const start = j;
|
|
888
|
-
while (j < n && body.charAt(j) !== quote) j++;
|
|
889
|
-
value = body.slice(start, j);
|
|
890
|
-
j++;
|
|
891
|
-
} else {
|
|
892
|
-
const start = j;
|
|
893
|
-
while (j < n && !isWs(body.charAt(j)) && body.charAt(j) !== ">") j++;
|
|
894
|
-
value = body.slice(start, j);
|
|
895
|
-
}
|
|
896
|
-
i = j;
|
|
897
|
-
}
|
|
898
|
-
pairs.push([name.toLowerCase(), value]);
|
|
899
|
-
}
|
|
900
|
-
return pairs;
|
|
901
|
-
}
|
|
902
|
-
/** Filtra atributos: allowlist + validação de protocolo; força rel seguro. */
|
|
903
|
-
function filterAttrs(tag, pairs) {
|
|
904
|
-
const kept = [];
|
|
905
|
-
const seen = /* @__PURE__ */ new Set();
|
|
906
|
-
let targetBlank = false;
|
|
907
|
-
for (const [name, raw] of pairs) {
|
|
908
|
-
if (!ALLOWED_ATTRS.has(name) || seen.has(name)) continue;
|
|
909
|
-
if (name === "href" && !isSafeUrl(raw, HREF_SCHEMES)) continue;
|
|
910
|
-
if (name === "src" && !isSafeUrl(raw, SRC_SCHEMES)) continue;
|
|
911
|
-
if (name === "target") {
|
|
912
|
-
if (normalizeAttrValue(raw) !== "_blank") continue;
|
|
913
|
-
targetBlank = true;
|
|
914
|
-
continue;
|
|
915
|
-
}
|
|
916
|
-
if (name === "rel") continue;
|
|
917
|
-
seen.add(name);
|
|
918
|
-
kept.push(`${name}="${normalizeAttrValue(raw)}"`);
|
|
919
|
-
}
|
|
920
|
-
if (tag === "a" && targetBlank) {
|
|
921
|
-
kept.push("target=\"_blank\"");
|
|
922
|
-
kept.push("rel=\"noopener noreferrer\"");
|
|
923
|
-
}
|
|
924
|
-
return kept.length > 0 ? ` ${kept.join(" ")}` : "";
|
|
925
|
-
}
|
|
926
|
-
/**
|
|
927
|
-
* Sanitiza uma string de HTML. Retorna apenas marcação da allowlist.
|
|
928
|
-
* Idempotente e sem dependências de DOM (seguro no SSR e no cliente).
|
|
929
|
-
*/
|
|
930
|
-
function sanitizeHtml(input) {
|
|
931
|
-
if (typeof input !== "string" || input.length === 0) return "";
|
|
932
|
-
const lower = input.toLowerCase();
|
|
933
|
-
const n = input.length;
|
|
934
|
-
const stack = [];
|
|
935
|
-
let out = "";
|
|
936
|
-
let i = 0;
|
|
937
|
-
while (i < n) {
|
|
938
|
-
const lt = input.indexOf("<", i);
|
|
939
|
-
if (lt === -1) {
|
|
940
|
-
out += escapeText(input.slice(i));
|
|
941
|
-
break;
|
|
942
|
-
}
|
|
943
|
-
if (lt > i) out += escapeText(input.slice(i, lt));
|
|
944
|
-
if (input.startsWith("<!--", lt)) {
|
|
945
|
-
const end = input.indexOf("-->", lt + 4);
|
|
946
|
-
i = end === -1 ? n : end + 3;
|
|
947
|
-
continue;
|
|
948
|
-
}
|
|
949
|
-
if (input.charAt(lt + 1) === "!" || input.charAt(lt + 1) === "?") {
|
|
950
|
-
const end = input.indexOf(">", lt + 2);
|
|
951
|
-
i = end === -1 ? n : end + 1;
|
|
952
|
-
continue;
|
|
953
|
-
}
|
|
954
|
-
const tagMatch = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)(?=[\s/>])/.exec(input.slice(lt, Math.min(lt + 64, n)));
|
|
955
|
-
if (!tagMatch) {
|
|
956
|
-
out += "<";
|
|
957
|
-
i = lt + 1;
|
|
958
|
-
continue;
|
|
959
|
-
}
|
|
960
|
-
const isClosing = tagMatch[1] === "/";
|
|
961
|
-
const tag = tagMatch[2].toLowerCase();
|
|
962
|
-
let j = lt + tagMatch[0].length;
|
|
963
|
-
let quote = "";
|
|
964
|
-
while (j < n) {
|
|
965
|
-
const ch = input[j];
|
|
966
|
-
if (quote) {
|
|
967
|
-
if (ch === quote) quote = "";
|
|
968
|
-
} else if (ch === "\"" || ch === "'") quote = ch;
|
|
969
|
-
else if (ch === ">") break;
|
|
970
|
-
j++;
|
|
971
|
-
}
|
|
972
|
-
if (j >= n) break;
|
|
973
|
-
const body = input.slice(lt + tagMatch[0].length, j);
|
|
974
|
-
i = j + 1;
|
|
975
|
-
if (!isClosing && RAW_TEXT_TAGS.has(tag)) {
|
|
976
|
-
const closeAt = lower.indexOf(`</${tag}`, i);
|
|
977
|
-
if (closeAt === -1) break;
|
|
978
|
-
const closeEnd = input.indexOf(">", closeAt);
|
|
979
|
-
i = closeEnd === -1 ? n : closeEnd + 1;
|
|
980
|
-
continue;
|
|
981
|
-
}
|
|
982
|
-
if (isClosing) {
|
|
983
|
-
const anchor = stack.lastIndexOf(tag);
|
|
984
|
-
if (anchor !== -1) {
|
|
985
|
-
for (let k = stack.length - 1; k >= anchor; k--) out += `</${stack[k]}>`;
|
|
986
|
-
stack.length = anchor;
|
|
987
|
-
}
|
|
988
|
-
continue;
|
|
989
|
-
}
|
|
990
|
-
if (!ALLOWED_TAGS.has(tag)) continue;
|
|
991
|
-
const attrs = filterAttrs(tag, parseAttrs(body));
|
|
992
|
-
if (VOID_TAGS.has(tag)) out += `<${tag}${attrs} />`;
|
|
993
|
-
else {
|
|
994
|
-
out += `<${tag}${attrs}>`;
|
|
995
|
-
stack.push(tag);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
for (let k = stack.length - 1; k >= 0; k--) out += `</${stack[k]}>`;
|
|
999
|
-
return out;
|
|
1000
|
-
}
|
|
1001
|
-
//#endregion
|
|
1002
|
-
//#region src/components/screen-options/HelpTabs.tsx
|
|
1003
|
-
var _tmpl$$4 = [
|
|
1004
|
-
"<div",
|
|
1005
|
-
" class=\"help-tabs-panel\" role=\"dialog\"",
|
|
1006
|
-
"><div class=\"help-tabs-header\"><h3>",
|
|
1007
|
-
"</h3><button class=\"help-tabs-close\"",
|
|
1008
|
-
" type=\"button\"><svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button></div><div class=\"help-tabs-nav\" role=\"tablist\"",
|
|
1009
|
-
">",
|
|
1010
|
-
"</div><div class=\"help-tabs-panels\">",
|
|
1011
|
-
"</div><div class=\"help-tabs-footer\"><button class=\"btn btn-primary\">",
|
|
1012
|
-
"</button></div></div>"
|
|
1013
|
-
];
|
|
1014
|
-
var _tmpl$2$3 = [
|
|
1015
|
-
"<div",
|
|
1016
|
-
" class=\"help-tabs-wrapper\"><div class=\"help-tabs\"><button class=\"help-tabs-trigger\"",
|
|
1017
|
-
" type=\"button\"><svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"10\"></circle><path d=\"M12 16v-4M12 8h.01\"></path></svg><span>",
|
|
1018
|
-
"</span><svg class=\"chevron\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path d=\"M6 9l6 6 6-6\"></path></svg></button><!--$-->",
|
|
1019
|
-
"<!--/--></div><style>\n .help-tabs-wrapper { position: relative; }\n .help-tabs { position: relative; }\n .help-tabs-trigger {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.375rem 0.75rem;\n background: var(--color-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n color: var(--color-text);\n font-size: 0.8125rem;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s;\n }\n .help-tabs-trigger:hover {\n background: var(--color-surface-hover);\n border-color: var(--color-primary);\n }\n .help-tabs-trigger .chevron {\n transition: transform 0.15s;\n flex-shrink: 0;\n }\n .help-tabs-trigger[aria-expanded=\"true\"] .chevron {\n transform: rotate(180deg);\n }\n .help-tabs-panel {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n width: 480px;\n max-width: 90vw;\n max-height: 70vh;\n background: var(--color-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-xl);\n z-index: 1000;\n display: flex;\n flex-direction: column;\n animation: slideIn 0.15s ease-out;\n overflow: hidden;\n }\n @keyframes slideIn { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: translateY(0); } }\n .help-tabs-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 1rem;\n border-bottom: 1px solid var(--color-border);\n }\n .help-tabs-header h3 { font-size: 0.875rem; font-weight: 600; }\n .help-tabs-close {\n background: none; border: none; padding: 0.25rem;\n color: var(--color-muted); cursor: pointer; border-radius: var(--radius-sm);\n }\n .help-tabs-close:hover { background: var(--color-background); color: var(--color-text); }\n .help-tabs-nav {\n display: flex;\n border-bottom: 1px solid var(--color-border);\n overflow-x: auto;\n }\n .help-tabs-tab {\n padding: 0.75rem 1rem;\n background: none; border: none;\n color: var(--color-muted); font-size: 0.8125rem; font-weight: 500;\n cursor: pointer; white-space: nowrap;\n border-bottom: 2px solid transparent;\n transition: all 0.15s;\n }\n .help-tabs-tab:hover { color: var(--color-text); background: var(--color-background); }\n .help-tabs-tab.active {\n color: var(--color-primary);\n border-bottom-color: var(--color-primary);\n font-weight: 600;\n }\n .help-tabs-panels {\n flex: 1; overflow-y: auto; padding: 1.5rem;\n }\n .help-tabs-panel { display: none; }\n .help-tabs-panel.active { display: block; animation: fadeIn 0.15s ease-out; }\n @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }\n .help-tabs-content { line-height: 1.6; color: var(--color-text); }\n .help-tabs-content h4 { font-size: 0.9375rem; font-weight: 600; margin: 1rem 0 0.5rem; color: var(--color-text); }\n .help-tabs-content h4:first-child { margin-top: 0; }\n .help-tabs-content p { margin: 0 0 0.75rem; color: var(--color-muted); }\n .help-tabs-content ul { margin: 0 0 0.75rem 1.25rem; color: var(--color-text); }\n .help-tabs-content li { margin-bottom: 0.375rem; }\n .help-tabs-content code {\n background: var(--color-background); padding: 0.125rem 0.375rem;\n border-radius: var(--radius-sm); font-size: 0.8125rem;\n font-family: ui-monospace, SFMono-Regular, monospace;\n }\n .help-tabs-content a { color: var(--color-primary); text-decoration: underline; }\n .help-tabs-footer {\n display: flex; justify-content: flex-end;\n padding: 1rem; border-top: 1px solid var(--color-border);\n }\n </style></div>"
|
|
1020
|
-
];
|
|
1021
|
-
var _tmpl$3$3 = [
|
|
1022
|
-
"<button",
|
|
1023
|
-
" role=\"tab\"",
|
|
1024
|
-
" aria-controls=\"",
|
|
1025
|
-
"\" id=\"",
|
|
1026
|
-
"\" type=\"button\">",
|
|
1027
|
-
"</button>"
|
|
1028
|
-
];
|
|
1029
|
-
var _tmpl$4$3 = [
|
|
1030
|
-
"<div",
|
|
1031
|
-
" role=\"tabpanel\" id=\"",
|
|
1032
|
-
"\" aria-labelledby=\"",
|
|
1033
|
-
"\"><div class=\"help-tabs-content\">",
|
|
1034
|
-
"</div></div>"
|
|
1035
|
-
];
|
|
1036
|
-
function HelpTabs(props) {
|
|
1037
|
-
const { t } = useTranslation();
|
|
1038
|
-
const [open, setOpen] = createSignal(false);
|
|
1039
|
-
const [activeTab, setActiveTab] = createSignal(props.tabs[0]?.id ?? "");
|
|
1040
|
-
const handleClickOutside = (e) => {
|
|
1041
|
-
if (!e.target.closest(".help-tabs")) setOpen(false);
|
|
1042
|
-
};
|
|
1043
|
-
onMount(() => {
|
|
1044
|
-
if (isServer) return;
|
|
1045
|
-
document.addEventListener("click", handleClickOutside);
|
|
1046
|
-
});
|
|
1047
|
-
onCleanup(() => {
|
|
1048
|
-
if (isServer) return;
|
|
1049
|
-
document.removeEventListener("click", handleClickOutside);
|
|
1050
|
-
});
|
|
1051
|
-
return ssr(_tmpl$2$3, ssrHydrationKey(), ssrAttribute("aria-expanded", escape(open(), true), false) + ssrAttribute("aria-label", escape(t("helpTabs.label"), true), false), escape(t("helpTabs.title")), escape(createComponent(Show, {
|
|
1052
|
-
get when() {
|
|
1053
|
-
return open();
|
|
1054
|
-
},
|
|
1055
|
-
get children() {
|
|
1056
|
-
return ssr(_tmpl$$4, ssrHydrationKey(), ssrAttribute("aria-label", escape(t("helpTabs.title"), true), false), escape(t("helpTabs.title")), ssrAttribute("aria-label", escape(t("common.close"), true), false), ssrAttribute("aria-label", escape(t("helpTabs.tabs"), true), false), escape(props.tabs.map((tab) => ssr(_tmpl$3$3, ssrHydrationKey() + ssrAttribute("class", activeTab() === tab.id ? "help-tabs-tab active" : "help-tabs-tab", false), ssrAttribute("aria-selected", escape(activeTab(), true) === escape(tab.id, true), false), `help-panel-${escape(tab.id, true)}`, `help-tab-${escape(tab.id, true)}`, escape(tab.label)))), escape(props.tabs.map((tab) => ssr(_tmpl$4$3, ssrHydrationKey() + ssrAttribute("class", activeTab() === tab.id ? "help-tabs-panel active" : "help-tabs-panel", false), `help-panel-${escape(tab.id, true)}`, `help-tab-${escape(tab.id, true)}`, sanitizeHtml(tab.content)))), escape(t("common.close")));
|
|
1057
|
-
}
|
|
1058
|
-
})));
|
|
1059
|
-
}
|
|
1060
|
-
//#endregion
|
|
1061
585
|
//#region src/lib/version.ts
|
|
1062
586
|
/** Versão do release atual (ex.: "0.4.0"). */
|
|
1063
587
|
var APP_VERSION = {
|
|
1064
588
|
name: "okcms",
|
|
1065
|
-
version: "0.4.
|
|
589
|
+
version: "0.4.14",
|
|
1066
590
|
"private": true,
|
|
1067
591
|
description: "Hybrid, modular, API-first CMS",
|
|
1068
592
|
engines: {
|
|
@@ -1427,19 +951,18 @@ function ActivityWidget() {
|
|
|
1427
951
|
var _tmpl$ = [
|
|
1428
952
|
"<footer",
|
|
1429
953
|
" class=\"admin-footer\" role=\"contentinfo\"><div class=\"footer-content\"><div class=\"footer-left\"><p class=\"footer-version\"><span class=\"product-name\">OkCMS</span><span class=\"version-badge\">v<!--$-->",
|
|
1430
|
-
"<!--/--></span></p><
|
|
1431
|
-
"</p></div><nav class=\"footer-links\"",
|
|
954
|
+
"<!--/--></span></p></div><nav class=\"footer-links\"",
|
|
1432
955
|
"><a href=\"https://oktisworks.com\" target=\"_blank\" rel=\"noopener noreferrer\">",
|
|
1433
956
|
"</a><a href=\"https://github.com/oktis-works/cms\" target=\"_blank\" rel=\"noopener noreferrer\">",
|
|
1434
957
|
"</a><a href=\"https://docs.oktisworks.com\" target=\"_blank\" rel=\"noopener noreferrer\">",
|
|
1435
958
|
"</a><a href=\"https://oktisworks.com/community\" target=\"_blank\" rel=\"noopener noreferrer\">",
|
|
1436
959
|
"</a></nav><div class=\"footer-right\"><p class=\"footer-powered\">",
|
|
1437
|
-
"</p></div></div><style>\n .admin-footer {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n height: 48px;\n background:
|
|
960
|
+
"</p></div></div><style>\n .admin-footer {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n height: 48px;\n background: #2d2d2d;\n border-top: 1px solid var(--color-border);\n padding: 0 1.5rem;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.75rem;\n color: var(--color-muted);\n }\n\n .footer-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n max-width: 1400px;\n margin: 0 auto;\n gap: 1.5rem;\n }\n\n .footer-left { display: flex; flex-direction: column; gap: 0.125rem; }\n\n .footer-version {\n display: flex; align-items: center; gap: 0.5rem;\n font-weight: 600; color: var(--color-text); font-size: 0.8125rem;\n }\n\n .version-badge {\n background: var(--color-primary-soft);\n color: var(--color-primary-hover);\n padding: 0.125rem 0.375rem;\n border-radius: var(--radius-sm);\n font-size: 0.6875rem;\n font-weight: 700;\n }\n\n .footer-links {\n display: flex; gap: 1.5rem;\n }\n\n .footer-links a {\n color: var(--color-muted);\n font-size: 0.75rem;\n font-weight: 500;\n text-decoration: none;\n transition: color 0.15s;\n }\n\n .footer-links a:hover { color: var(--color-primary); }\n\n .footer-right { text-align: right; }\n .footer-powered { font-size: 0.6875rem; color: var(--color-muted); }\n\n @media (max-width: 768px) {\n .admin-footer { flex-direction: column; height: auto; padding: 0.75rem 1rem; gap: 0.5rem; }\n .footer-content { flex-direction: column; gap: 0.5rem; }\n .footer-links { flex-wrap: wrap; justify-content: center; }\n }\n\n /* RTL adjustments */\n [dir=\"rtl\"] .footer-links { flex-direction: row-reverse; }\n [dir=\"rtl\"] .footer-right { text-align: left; }\n [dir=\"rtl\"] .footer-left { align-items: flex-end; }\n </style></footer>"
|
|
1438
961
|
];
|
|
1439
962
|
function Footer() {
|
|
1440
963
|
const { t } = useTranslation();
|
|
1441
964
|
const version = APP_VERSION;
|
|
1442
|
-
return ssr(_tmpl$, ssrHydrationKey(), escape(version),
|
|
965
|
+
return ssr(_tmpl$, ssrHydrationKey(), escape(version), ssrAttribute("aria-label", escape(t("footer.links"), true), false), escape(t("footer.website")), escape(t("footer.github")), escape(t("footer.docs")), escape(t("footer.community")), escape(t("footer.poweredBy")));
|
|
1443
966
|
}
|
|
1444
967
|
//#endregion
|
|
1445
968
|
//#region src/layouts/DashboardLayout.astro
|
|
@@ -1448,7 +971,7 @@ var $$DashboardLayout = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
1448
971
|
const Astro = $$result.createAstro($$props, $$slots);
|
|
1449
972
|
Astro.self = $$DashboardLayout;
|
|
1450
973
|
const { title, description } = Astro.props;
|
|
1451
|
-
const { t
|
|
974
|
+
const { t } = Astro.locals;
|
|
1452
975
|
const pathname = Astro.url.pathname;
|
|
1453
976
|
const isActive = (href) => href === "/" ? pathname === "/" : pathname === href || pathname.startsWith(`${href}/`);
|
|
1454
977
|
const navActive = {
|
|
@@ -1456,7 +979,9 @@ var $$DashboardLayout = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
1456
979
|
content: isActive("/content"),
|
|
1457
980
|
media: isActive("/media"),
|
|
1458
981
|
users: isActive("/users"),
|
|
1459
|
-
settings: isActive("/settings")
|
|
982
|
+
settings: isActive("/settings"),
|
|
983
|
+
plugins: isActive("/plugins"),
|
|
984
|
+
themes: isActive("/themes")
|
|
1460
985
|
};
|
|
1461
986
|
const settingsChildren = [
|
|
1462
987
|
{
|
|
@@ -1469,44 +994,30 @@ var $$DashboardLayout = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
1469
994
|
label: t("settings.postTypes.title"),
|
|
1470
995
|
active: isActive("/settings/post-types")
|
|
1471
996
|
},
|
|
997
|
+
{
|
|
998
|
+
href: "/settings/custom-fields",
|
|
999
|
+
label: t("settings.customFields.title"),
|
|
1000
|
+
active: isActive("/settings/custom-fields")
|
|
1001
|
+
},
|
|
1472
1002
|
{
|
|
1473
1003
|
href: "/settings/taxonomies",
|
|
1474
1004
|
label: t("settings.taxonomies.title"),
|
|
1475
1005
|
active: isActive("/settings/taxonomies")
|
|
1476
|
-
}
|
|
1477
|
-
];
|
|
1478
|
-
const screenOptionsPanels = [
|
|
1479
|
-
{
|
|
1480
|
-
id: "at-glance",
|
|
1481
|
-
label: t("dashboard.widgets.atGlance"),
|
|
1482
|
-
defaultOpen: true
|
|
1483
1006
|
},
|
|
1484
1007
|
{
|
|
1485
|
-
|
|
1486
|
-
label: t("
|
|
1487
|
-
|
|
1488
|
-
},
|
|
1489
|
-
{
|
|
1490
|
-
id: "quick-draft",
|
|
1491
|
-
label: t("dashboard.widgets.quickDraft.title"),
|
|
1492
|
-
defaultOpen: true
|
|
1493
|
-
}
|
|
1494
|
-
];
|
|
1495
|
-
const helpTabs = [
|
|
1496
|
-
{
|
|
1497
|
-
id: "overview",
|
|
1498
|
-
label: t("helpTabs.topics.overview.label"),
|
|
1499
|
-
content: t("helpTabs.topics.overview.content")
|
|
1008
|
+
href: "/settings/resources",
|
|
1009
|
+
label: t("resources.title"),
|
|
1010
|
+
active: isActive("/settings/resources")
|
|
1500
1011
|
},
|
|
1501
1012
|
{
|
|
1502
|
-
|
|
1503
|
-
label: t("
|
|
1504
|
-
|
|
1013
|
+
href: "/settings/access",
|
|
1014
|
+
label: t("access.title"),
|
|
1015
|
+
active: isActive("/settings/access")
|
|
1505
1016
|
},
|
|
1506
1017
|
{
|
|
1507
|
-
|
|
1508
|
-
label: t("
|
|
1509
|
-
|
|
1018
|
+
href: "/settings/operations",
|
|
1019
|
+
label: t("operations.title"),
|
|
1020
|
+
active: isActive("/settings/operations")
|
|
1510
1021
|
}
|
|
1511
1022
|
];
|
|
1512
1023
|
return renderTemplate`${renderComponent($$result, "BaseLayout", $$BaseLayout, {
|
|
@@ -1519,34 +1030,13 @@ var $$DashboardLayout = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
1519
1030
|
"client:component-hydration": "load",
|
|
1520
1031
|
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/admin-bar/AdminBar.tsx",
|
|
1521
1032
|
"client:component-export": "AdminBar"
|
|
1522
|
-
})}${maybeRenderHead($$result)}<div class="layout" data-astro-cid-ynf3rr4n><!-- Sidebar
|
|
1033
|
+
})}${maybeRenderHead($$result)}<div class="layout" data-astro-cid-ynf3rr4n><!-- Sidebar colapsavel — o estado (body.sidebar-collapsed) e aplicado pelo script abaixo --><aside class="sidebar" data-astro-cid-ynf3rr4n><div class="sidebar-header" data-astro-cid-ynf3rr4n><span class="sidebar-collapsed-brand"${addAttribute(t("layout.appName"), "title")} data-astro-cid-ynf3rr4n><svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="28" height="28" data-astro-cid-ynf3rr4n><rect width="32" height="32" rx="8" fill="url(#grad)" data-astro-cid-ynf3rr4n></rect><path d="M8 10h16M8 16h12M8 22h8" stroke="#0A0A0A" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n></path><defs data-astro-cid-ynf3rr4n><linearGradient id="grad" x1="0" y1="0" x2="32" y2="32" gradientUnits="userSpaceOnUse" data-astro-cid-ynf3rr4n><stop offset="0%" stop-color="#D8B45E" data-astro-cid-ynf3rr4n></stop><stop offset="100%" stop-color="#B99542" data-astro-cid-ynf3rr4n></stop></linearGradient></defs></svg></span></div><nav class="sidebar-nav" data-astro-cid-ynf3rr4n><a href="/"${addAttribute(["nav-item", { active: navActive.dashboard }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><rect x="3" y="3" width="7" height="7" data-astro-cid-ynf3rr4n></rect><rect x="14" y="3" width="7" height="7" data-astro-cid-ynf3rr4n></rect><rect x="14" y="14" width="7" height="7" data-astro-cid-ynf3rr4n></rect><rect x="3" y="14" width="7" height="7" data-astro-cid-ynf3rr4n></rect></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.dashboard")}</span></a><a href="/content"${addAttribute(["nav-item", { active: navActive.content }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-astro-cid-ynf3rr4n></path><polyline points="14 2 14 8 20 8" data-astro-cid-ynf3rr4n></polyline><line x1="16" y1="13" x2="8" y2="13" data-astro-cid-ynf3rr4n></line><line x1="16" y1="17" x2="8" y2="17" data-astro-cid-ynf3rr4n></line><polyline points="10 9 9 9 8 9" data-astro-cid-ynf3rr4n></polyline></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.content")}</span></a><a href="/media"${addAttribute(["nav-item", { active: navActive.media }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><rect x="3" y="3" width="18" height="18" rx="2" ry="2" data-astro-cid-ynf3rr4n></rect><circle cx="8.5" cy="8.5" r="1.5" data-astro-cid-ynf3rr4n></circle><polyline points="21 15 16 10 5 21" data-astro-cid-ynf3rr4n></polyline></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.media")}</span></a><a href="/users"${addAttribute(["nav-item", { active: navActive.users }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" data-astro-cid-ynf3rr4n></path><circle cx="9" cy="7" r="4" data-astro-cid-ynf3rr4n></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87" data-astro-cid-ynf3rr4n></path><path d="M16 3.13a4 4 0 0 1 0 7.75" data-astro-cid-ynf3rr4n></path></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.users")}</span></a><a href="/settings"${addAttribute(["nav-item", { active: navActive.settings }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><circle cx="12" cy="12" r="3" data-astro-cid-ynf3rr4n></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06-.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1.82-.33l-.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0-2.83l-.06-.06a1.65 1.65 0 0 0-.33-1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" data-astro-cid-ynf3rr4n></path></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.settings")}</span></a><!-- Submenu de configurações fica agrupado diretamente sob Settings. --><div class="nav-submenu" data-astro-cid-ynf3rr4n>${settingsChildren.map((child) => renderTemplate`<a${addAttribute(child.href, "href")}${addAttribute(["nav-subitem", { active: child.active }], "class:list")} data-astro-cid-ynf3rr4n>${child.label}</a>`)}</div><a href="/plugins"${addAttribute(["nav-item", { active: navActive.plugins }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><rect x="2" y="2" width="20" height="20" rx="2" ry="2" data-astro-cid-ynf3rr4n></rect><path d="M15 7h4a2 2 0 0 1 2 2v4" data-astro-cid-ynf3rr4n></path><path d="M9 17H5a2 2 0 0 1-2-2V9" data-astro-cid-ynf3rr4n></path><line x1="8" y1="12" x2="16" y2="12" data-astro-cid-ynf3rr4n></line></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.plugins")}</span></a><a href="/themes"${addAttribute(["nav-item", { active: navActive.themes }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><circle cx="12" cy="12" r="10" data-astro-cid-ynf3rr4n></circle><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" data-astro-cid-ynf3rr4n></path><path d="M2 12h20" data-astro-cid-ynf3rr4n></path></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.themes")}</span></a><!-- D1: slots de extensao — paginas de menu declaradas por plugins ativos -->${renderComponent($$result, "PluginExtensionsSlot", PluginExtensionsSlot, {
|
|
1523
1034
|
"client:load": true,
|
|
1524
1035
|
"data-astro-cid-ynf3rr4n": true,
|
|
1525
1036
|
"client:component-hydration": "load",
|
|
1526
1037
|
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/ext/extensions.tsx",
|
|
1527
1038
|
"client:component-export": "PluginExtensionsSlot"
|
|
1528
|
-
})}</nav></aside><main class="main-content" data-astro-cid-ynf3rr4n><!--
|
|
1529
|
-
"client:load": true,
|
|
1530
|
-
"panels": screenOptionsPanels,
|
|
1531
|
-
"data-astro-cid-ynf3rr4n": true,
|
|
1532
|
-
"client:component-hydration": "load",
|
|
1533
|
-
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/screen-options/ScreenOptions.tsx",
|
|
1534
|
-
"client:component-export": "ScreenOptions"
|
|
1535
|
-
})}${renderComponent($$result, "HelpTabs", HelpTabs, {
|
|
1536
|
-
"client:load": true,
|
|
1537
|
-
"tabs": helpTabs,
|
|
1538
|
-
"data-astro-cid-ynf3rr4n": true,
|
|
1539
|
-
"client:component-hydration": "load",
|
|
1540
|
-
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/screen-options/HelpTabs.tsx",
|
|
1541
|
-
"client:component-export": "HelpTabs"
|
|
1542
|
-
})}</div><div class="content-wrapper" data-astro-cid-ynf3rr4n><header class="main-header" data-astro-cid-ynf3rr4n><h1 class="text-lg font-bold" data-astro-cid-ynf3rr4n>${title}</h1><div class="header-actions" data-astro-cid-ynf3rr4n>${renderComponent($$result, "LanguageSelector", LanguageSelector, {
|
|
1543
|
-
"client:load": true,
|
|
1544
|
-
"locale": locale,
|
|
1545
|
-
"data-astro-cid-ynf3rr4n": true,
|
|
1546
|
-
"client:component-hydration": "load",
|
|
1547
|
-
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/LanguageSelector.tsx",
|
|
1548
|
-
"client:component-export": "LanguageSelector"
|
|
1549
|
-
})}<button class="btn btn-secondary btn-sm" id="logout-btn" data-astro-cid-ynf3rr4n>${t("layout.actions.logout")}</button></div></header><div class="content" data-astro-cid-ynf3rr4n>${renderSlot($$result, $$slots["default"])}</div><!-- Dashboard Widgets (only on dashboard page) -->${pathname === "/" && renderTemplate`<div class="dashboard-widgets-area" data-astro-cid-ynf3rr4n><div class="dashboard-widgets-grid" data-astro-cid-ynf3rr4n>${renderComponent($$result, "AtGlanceWidget", AtGlanceWidget, {
|
|
1039
|
+
})}</nav></aside><main class="main-content" data-astro-cid-ynf3rr4n><div class="content-wrapper" data-astro-cid-ynf3rr4n><div class="content" data-astro-cid-ynf3rr4n>${renderSlot($$result, $$slots["default"])}</div><!-- Dashboard Widgets (only on dashboard page) -->${pathname === "/" && renderTemplate`<div class="dashboard-widgets-area" data-astro-cid-ynf3rr4n><div class="dashboard-widgets-grid" data-astro-cid-ynf3rr4n>${renderComponent($$result, "AtGlanceWidget", AtGlanceWidget, {
|
|
1550
1040
|
"client:load": true,
|
|
1551
1041
|
"data-astro-cid-ynf3rr4n": true,
|
|
1552
1042
|
"client:component-hydration": "load",
|