create-rubrica 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +482 -93
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __export = (target, all) => {
|
|
|
13
13
|
var define_CORE_MODULES_default;
|
|
14
14
|
var init_define_CORE_MODULES = __esm({
|
|
15
15
|
"<define:__CORE_MODULES__>"() {
|
|
16
|
-
define_CORE_MODULES_default = { users: ["isSetupRequired", "me", "list", "create", "setRole", "remove", "suspend", "reactivate", "resetPassword", "changePassword", "actor", "assignRoleInternal", "clearMustChangePassword", "setupRoot", "findPasswordAccount", "afterPasswordReset", "passwordAccountOf", "afterAdminReset", "resetPasswordInternal"], audit: ["recent", "logFromAction", "hitRateLimit", "cleanup"], site: ["snapshot"], settings: ["get", "plugins", "update", "setPlugin", "init"], texts: ["list", "set", "reset"], media: ["generateUploadUrl", "save", "list", "folders", "get", "update", "normalizeFolders", "remove"], pages: ["blockCatalog", "list", "get", "getByPath", "create", "update", "reorderBlocks", "setBlockVisible", "upsertBlock", "removeBlock", "publish", "unpublish", "remove", "restore", "removePermanently"], posts: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], projects: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], services: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], testimonials: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], faq: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], resume: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], routine: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], plans: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], team: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], contacts: ["list", "get", "unreadCount", "markRead", "markUnread", "archive", "unarchive", "remove", "destinations", "setDestinations", "failedDeliveries", "retryDelivery", "publicConfig", "submit", "deliveryContext", "deliver", "recordAttempt", "cleanup"], testimonialIntake: ["list", "approve", "reject", "submit"], privacy: ["exportData", "erase", "policyStatus", "policyDraft", "generatePolicy"], publish: ["status", "trigger", "begin", "finish", "markPublished"], translation: ["translate", "translateDocument", "applyDocument", "prepare", "apply"], commerce: ["notifyAdmin", "siteOrigins", "access", "recordInvalidWebhook", "exportPersonalData", "erasePersonalData"], proposals: ["list", "get", "versions", "getAcceptance", "create", "update", "resetPassword", "remove", "restore", "removePermanently", "getPublic", "checkSession", "generateSignatureUploadUrl", "getAcceptanceByToken", "createSession", "accept", "invalidateSessions", "cleanupExpiredSessions"], contractTemplates: ["list", "get", "getDefault", "create", "update", "remove", "setDefault", "seedDefault"], checkouts: ["status", "list", "get", "create", "remove", "restore", "removePermanently", "linkPlan", "unlinkPlan", "listLinks", "getByLink", "initiatePayment", "startFromLink", "getById", "claimPayment", "releasePayment", "setCustomerId", "clearCharge", "patchGatewayData", "markPaidByLink", "markRefundedByLink", "expireOldCheckouts", "cleanupPaymentEvents"], asaas: ["createCustomer", "createCharge", "deleteCharge", "listCustomers", "adminCreateCustomer", "adminDeleteCustomer", "listCharges", "getCharge", "adminCreateCharge", "cancelCharge", "listInvoices"], aiResumes: ["list", "get", "generate", "remove", "restore", "removePermanently", "cvSource", "save"], panel: ["validatePage", "mediaUsage", "replaceMedia"], seed: ["status", "apply", "patchSettings"] };
|
|
16
|
+
define_CORE_MODULES_default = { users: ["isSetupRequired", "me", "list", "create", "setRole", "remove", "suspend", "reactivate", "resetPassword", "changePassword", "actor", "assignRoleInternal", "clearMustChangePassword", "setupRoot", "findPasswordAccount", "afterPasswordReset", "passwordAccountOf", "afterAdminReset", "resetPasswordInternal"], audit: ["recent", "logFromAction", "hitRateLimit", "cleanup"], site: ["snapshot"], settings: ["get", "plugins", "update", "setPlugin", "init"], texts: ["list", "set", "reset"], media: ["generateUploadUrl", "save", "list", "folders", "get", "update", "normalizeFolders", "remove"], pages: ["blockCatalog", "list", "get", "getByPath", "create", "update", "reorderBlocks", "setBlockVisible", "upsertBlock", "removeBlock", "publish", "unpublish", "remove", "restore", "removePermanently"], posts: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], projects: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], collections: ["upsertProjectBlock", "reorderProjectBlocks", "setProjectBlockVisible", "removeProjectBlock", "migrateSectionsToBlocks"], services: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], testimonials: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], faq: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], resume: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], routine: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], plans: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], team: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], contacts: ["list", "get", "unreadCount", "markRead", "markUnread", "archive", "unarchive", "remove", "destinations", "setDestinations", "failedDeliveries", "retryDelivery", "publicConfig", "submit", "deliveryContext", "deliver", "recordAttempt", "cleanup"], testimonialIntake: ["list", "approve", "reject", "submit"], privacy: ["exportData", "erase", "policyStatus", "policyDraft", "generatePolicy"], publish: ["status", "trigger", "begin", "finish", "markPublished"], translation: ["translate", "translateDocument", "applyDocument", "prepare", "apply"], commerce: ["notifyAdmin", "siteOrigins", "access", "recordInvalidWebhook", "exportPersonalData", "erasePersonalData"], proposals: ["list", "get", "versions", "getAcceptance", "create", "update", "resetPassword", "remove", "restore", "removePermanently", "getPublic", "checkSession", "generateSignatureUploadUrl", "getAcceptanceByToken", "createSession", "accept", "invalidateSessions", "cleanupExpiredSessions"], contractTemplates: ["list", "get", "getDefault", "create", "update", "remove", "setDefault", "seedDefault"], checkouts: ["status", "list", "get", "create", "remove", "restore", "removePermanently", "linkPlan", "unlinkPlan", "listLinks", "getByLink", "initiatePayment", "startFromLink", "getById", "claimPayment", "releasePayment", "setCustomerId", "clearCharge", "patchGatewayData", "markPaidByLink", "markRefundedByLink", "expireOldCheckouts", "cleanupPaymentEvents"], asaas: ["createCustomer", "createCharge", "deleteCharge", "listCustomers", "adminCreateCustomer", "adminDeleteCustomer", "listCharges", "getCharge", "adminCreateCharge", "cancelCharge", "listInvoices"], aiResumes: ["list", "get", "generate", "remove", "restore", "removePermanently", "cvSource", "save"], panel: ["validateProjectBlocks", "validatePage", "mediaUsage", "replaceMedia"], seed: ["status", "apply", "patchSettings"] };
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -496,7 +496,7 @@ var init_telemetry = __esm({
|
|
|
496
496
|
TELEMETRY_DOCS = "https://userubrica.vercel.app/docs/guia/telemetria";
|
|
497
497
|
TELEMETRY_TIMEOUT_MS = 2e3;
|
|
498
498
|
FORMAT_VERSION = 1;
|
|
499
|
-
CLI_VERSION = true ? "2.
|
|
499
|
+
CLI_VERSION = true ? "2.2.0" : "0.0.0";
|
|
500
500
|
OFF_VALUES = ["0", "false", "nao", "n\xE3o", "off", "desligada", "desligado"];
|
|
501
501
|
isOn = (value) => value !== void 0 && value !== "" && !["0", "false"].includes(value.toLowerCase());
|
|
502
502
|
NOTICE = `O Rubrica manda, sem dados pessoais, as escolhas feitas no CLI (tipo, tema, cores, plugins) para saber o que as pessoas mais usam.
|
|
@@ -934,7 +934,7 @@ var init_package = __esm({
|
|
|
934
934
|
"../core/package.json"() {
|
|
935
935
|
package_default = {
|
|
936
936
|
name: "@rubrica/core",
|
|
937
|
-
version: "2.
|
|
937
|
+
version: "2.3.0",
|
|
938
938
|
description: "N\xFAcleo do Rubrica: contrato de blocos e temas, idiomas, integra\xE7\xE3o Astro, backend Convex, painel e MCP.",
|
|
939
939
|
type: "module",
|
|
940
940
|
license: "GPL-3.0-only",
|
|
@@ -1033,7 +1033,7 @@ var init_package2 = __esm({
|
|
|
1033
1033
|
"../mcp/package.json"() {
|
|
1034
1034
|
package_default2 = {
|
|
1035
1035
|
name: "@rubrica/mcp",
|
|
1036
|
-
version: "2.0
|
|
1036
|
+
version: "2.1.0",
|
|
1037
1037
|
description: "Servidor MCP local do Rubrica: o agente edita p\xE1ginas, blocos e cole\xE7\xF5es do site pelo Convex do projeto, com o login de um usu\xE1rio do painel.",
|
|
1038
1038
|
type: "module",
|
|
1039
1039
|
license: "GPL-3.0-only",
|
|
@@ -1687,6 +1687,28 @@ var init_ui_texts = __esm({
|
|
|
1687
1687
|
"video.play": { pt: "Reproduzir o v\xEDdeo", en: "Play the video", es: "Reproducir el video" },
|
|
1688
1688
|
"video.watchOn": { pt: "Assistir no {provider}", en: "Watch on {provider}", es: "Ver en {provider}" },
|
|
1689
1689
|
"video.player": { pt: "V\xEDdeo: {title}", en: "Video: {title}", es: "Video: {title}" },
|
|
1690
|
+
"video.chapters": { pt: "Cap\xEDtulos", en: "Chapters", es: "Cap\xEDtulos" },
|
|
1691
|
+
"video.chapterAt": { pt: "Ir para {time}: {label}", en: "Jump to {time}: {label}", es: "Ir a {time}: {label}" },
|
|
1692
|
+
"video.chaptersOf": { pt: "Cap\xEDtulos: {name}", en: "Chapters: {name}", es: "Cap\xEDtulos: {name}" },
|
|
1693
|
+
"video.chapterChosen": { pt: "{label} (\xFAltimo cap\xEDtulo escolhido)", en: "{label} (last chapter chosen)", es: "{label} (\xFAltimo cap\xEDtulo elegido)" },
|
|
1694
|
+
"beforeAfter.before": { pt: "Antes", en: "Before", es: "Antes" },
|
|
1695
|
+
"beforeAfter.after": { pt: "Depois", en: "After", es: "Despu\xE9s" },
|
|
1696
|
+
"beforeAfter.slider": { pt: "Arraste para comparar o antes e o depois", en: "Drag to compare before and after", es: "Arrastra para comparar el antes y el despu\xE9s" },
|
|
1697
|
+
"palette.contrastWhite": { pt: "Contraste com branco", en: "Contrast with white", es: "Contraste con blanco" },
|
|
1698
|
+
"palette.contrastBlack": { pt: "Contraste com preto", en: "Contrast with black", es: "Contraste con negro" },
|
|
1699
|
+
"type.weights": { pt: "Pesos", en: "Weights", es: "Pesos" },
|
|
1700
|
+
"type.alphabet": { pt: "Aa Bb Cc Dd Ee Ff Gg 0123456789", en: "Aa Bb Cc Dd Ee Ff Gg 0123456789", es: "Aa Bb Cc Dd Ee Ff Gg 0123456789" },
|
|
1701
|
+
"beforeAfter.position": {
|
|
1702
|
+
pt: "{beforeLabel} {before}%, {afterLabel} {after}%",
|
|
1703
|
+
en: "{beforeLabel} {before}%, {afterLabel} {after}%",
|
|
1704
|
+
es: "{beforeLabel} {before}%, {afterLabel} {after}%"
|
|
1705
|
+
},
|
|
1706
|
+
"palette.hex": { pt: "HEX", en: "HEX", es: "HEX" },
|
|
1707
|
+
"palette.rgb": { pt: "RGB", en: "RGB", es: "RGB" },
|
|
1708
|
+
"palette.sample": { pt: "Aa", en: "Aa", es: "Aa" },
|
|
1709
|
+
"palette.large": { pt: "AA s\xF3 texto grande", en: "AA large text only", es: "AA solo texto grande" },
|
|
1710
|
+
"palette.fail": { pt: "N\xE3o passa", en: "Fails", es: "No pasa" },
|
|
1711
|
+
"type.glyph": { pt: "Aa", en: "Aa", es: "Aa" },
|
|
1690
1712
|
"embed.open": { pt: "Abrir no {provider}", en: "Open in {provider}", es: "Abrir en {provider}" },
|
|
1691
1713
|
"compare.caption": { pt: "Comparativo de planos", en: "Plan comparison", es: "Comparativa de planes" },
|
|
1692
1714
|
"compare.feature": { pt: "Recurso", en: "Feature", es: "Caracter\xEDstica" },
|
|
@@ -1852,6 +1874,9 @@ function validateField(def, value, path5, errors) {
|
|
|
1852
1874
|
if (!isObject(value) || typeof value.href !== "string" || !value.href) return fail("link sem endere\xE7o");
|
|
1853
1875
|
if (!isLocalizedString(value.label)) fail("r\xF3tulo do link deve ser um texto por idioma");
|
|
1854
1876
|
return;
|
|
1877
|
+
case "color":
|
|
1878
|
+
if (typeof value !== "string" || !HEX_COLOR.test(value)) fail("cor em hexadecimal, como #7a1f2b");
|
|
1879
|
+
return;
|
|
1855
1880
|
case "list": {
|
|
1856
1881
|
if (!Array.isArray(value)) return fail("deve ser uma lista");
|
|
1857
1882
|
if (def.min !== void 0 && value.length < def.min) fail(`pelo menos ${def.min} itens`);
|
|
@@ -1881,11 +1906,12 @@ function validateFields(fields, values) {
|
|
|
1881
1906
|
validateFieldMap(fields, values, "", errors);
|
|
1882
1907
|
return errors;
|
|
1883
1908
|
}
|
|
1884
|
-
var field;
|
|
1909
|
+
var HEX_COLOR, field;
|
|
1885
1910
|
var init_fields = __esm({
|
|
1886
1911
|
"../core/src/blocks/fields.ts"() {
|
|
1887
1912
|
"use strict";
|
|
1888
1913
|
init_define_CORE_MODULES();
|
|
1914
|
+
HEX_COLOR = /^#[0-9a-fA-F]{6}$/;
|
|
1889
1915
|
field = {
|
|
1890
1916
|
text: (o) => ({ kind: "text", ...o }),
|
|
1891
1917
|
richText: (o) => ({ kind: "richText", ...o }),
|
|
@@ -1894,6 +1920,7 @@ var init_fields = __esm({
|
|
|
1894
1920
|
select: (o) => ({ kind: "select", ...o }),
|
|
1895
1921
|
image: (o) => ({ kind: "image", ...o }),
|
|
1896
1922
|
link: (o) => ({ kind: "link", ...o }),
|
|
1923
|
+
color: (o) => ({ kind: "color", ...o }),
|
|
1897
1924
|
list: (o) => ({ kind: "list", ...o })
|
|
1898
1925
|
};
|
|
1899
1926
|
}
|
|
@@ -1994,6 +2021,15 @@ function parseEmbedUrl(raw) {
|
|
|
1994
2021
|
url.hash = "";
|
|
1995
2022
|
return { provider, src: url.href };
|
|
1996
2023
|
}
|
|
2024
|
+
function chapterSeconds(start) {
|
|
2025
|
+
if (typeof start !== "string") return void 0;
|
|
2026
|
+
const m = /^(?:(\d{1,2}):)?(\d{1,2}):([0-5]\d)$/.exec(start.trim());
|
|
2027
|
+
if (!m) return void 0;
|
|
2028
|
+
const h = m[1] ? Number(m[1]) : 0;
|
|
2029
|
+
const min = Number(m[2]);
|
|
2030
|
+
if (m[1] && min > 59) return void 0;
|
|
2031
|
+
return h * 3600 + min * 60 + Number(m[3]);
|
|
2032
|
+
}
|
|
1997
2033
|
var YT_ID, VIMEO_ID, VIMEO_HASH, YT_HOSTS, VIMEO_HOSTS, VIDEO_FRAME_SOURCES, FORM_SANDBOX, EMBED_PROVIDERS, hostMatches, EMBED_FRAME_SOURCES, BLOCK_FRAME_SOURCES;
|
|
1998
2034
|
var init_media = __esm({
|
|
1999
2035
|
"../core/src/blocks/media.ts"() {
|
|
@@ -2590,6 +2626,94 @@ var init_fonts = __esm({
|
|
|
2590
2626
|
}
|
|
2591
2627
|
});
|
|
2592
2628
|
|
|
2629
|
+
// ../core/src/render/resolve.ts
|
|
2630
|
+
var init_resolve = __esm({
|
|
2631
|
+
"../core/src/render/resolve.ts"() {
|
|
2632
|
+
"use strict";
|
|
2633
|
+
init_define_CORE_MODULES();
|
|
2634
|
+
init_i18n();
|
|
2635
|
+
init_fields();
|
|
2636
|
+
init_sitewide();
|
|
2637
|
+
}
|
|
2638
|
+
});
|
|
2639
|
+
|
|
2640
|
+
// ../core/src/render/text.ts
|
|
2641
|
+
var init_text = __esm({
|
|
2642
|
+
"../core/src/render/text.ts"() {
|
|
2643
|
+
"use strict";
|
|
2644
|
+
init_define_CORE_MODULES();
|
|
2645
|
+
}
|
|
2646
|
+
});
|
|
2647
|
+
|
|
2648
|
+
// ../core/src/render/collections.ts
|
|
2649
|
+
var init_collections = __esm({
|
|
2650
|
+
"../core/src/render/collections.ts"() {
|
|
2651
|
+
"use strict";
|
|
2652
|
+
init_define_CORE_MODULES();
|
|
2653
|
+
init_i18n();
|
|
2654
|
+
init_resolve();
|
|
2655
|
+
init_text();
|
|
2656
|
+
}
|
|
2657
|
+
});
|
|
2658
|
+
|
|
2659
|
+
// ../core/src/render/blocks.ts
|
|
2660
|
+
var init_blocks = __esm({
|
|
2661
|
+
"../core/src/render/blocks.ts"() {
|
|
2662
|
+
"use strict";
|
|
2663
|
+
init_define_CORE_MODULES();
|
|
2664
|
+
init_define();
|
|
2665
|
+
init_contract2();
|
|
2666
|
+
init_collections();
|
|
2667
|
+
init_resolve();
|
|
2668
|
+
}
|
|
2669
|
+
});
|
|
2670
|
+
|
|
2671
|
+
// ../core/src/theme/brand.ts
|
|
2672
|
+
var init_brand = __esm({
|
|
2673
|
+
"../core/src/theme/brand.ts"() {
|
|
2674
|
+
"use strict";
|
|
2675
|
+
init_define_CORE_MODULES();
|
|
2676
|
+
init_fields();
|
|
2677
|
+
init_schemes();
|
|
2678
|
+
init_fonts();
|
|
2679
|
+
}
|
|
2680
|
+
});
|
|
2681
|
+
|
|
2682
|
+
// ../core/src/content/legacy.ts
|
|
2683
|
+
function legacyId(index) {
|
|
2684
|
+
return `secao-${index + 1}`;
|
|
2685
|
+
}
|
|
2686
|
+
function escapeHtml(s) {
|
|
2687
|
+
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2688
|
+
}
|
|
2689
|
+
function sectionToBlock(section, index) {
|
|
2690
|
+
const title = section.title ?? {};
|
|
2691
|
+
const long = Object.values(title).some((t) => typeof t === "string" && t.length > TITLE_MAX);
|
|
2692
|
+
const fields = {};
|
|
2693
|
+
if (long) {
|
|
2694
|
+
const body = {};
|
|
2695
|
+
for (const locale of /* @__PURE__ */ new Set([...Object.keys(title), ...Object.keys(section.body ?? {})])) {
|
|
2696
|
+
const t = title[locale]?.trim();
|
|
2697
|
+
const b = section.body?.[locale] ?? "";
|
|
2698
|
+
body[locale] = `${t ? `<h2>${escapeHtml(t)}</h2>` : ""}${b}`;
|
|
2699
|
+
}
|
|
2700
|
+
fields.body = body;
|
|
2701
|
+
} else {
|
|
2702
|
+
fields.title = title;
|
|
2703
|
+
fields.body = section.body;
|
|
2704
|
+
}
|
|
2705
|
+
if (section.image) fields.image = section.image;
|
|
2706
|
+
return { id: legacyId(index), type: "texto", visible: true, fields };
|
|
2707
|
+
}
|
|
2708
|
+
var TITLE_MAX;
|
|
2709
|
+
var init_legacy = __esm({
|
|
2710
|
+
"../core/src/content/legacy.ts"() {
|
|
2711
|
+
"use strict";
|
|
2712
|
+
init_define_CORE_MODULES();
|
|
2713
|
+
TITLE_MAX = 140;
|
|
2714
|
+
}
|
|
2715
|
+
});
|
|
2716
|
+
|
|
2593
2717
|
// ../core/src/index.ts
|
|
2594
2718
|
var init_src = __esm({
|
|
2595
2719
|
"../core/src/index.ts"() {
|
|
@@ -2607,6 +2731,10 @@ var init_src = __esm({
|
|
|
2607
2731
|
init_sitewide();
|
|
2608
2732
|
init_schemes();
|
|
2609
2733
|
init_fonts();
|
|
2734
|
+
init_fonts();
|
|
2735
|
+
init_blocks();
|
|
2736
|
+
init_brand();
|
|
2737
|
+
init_legacy();
|
|
2610
2738
|
}
|
|
2611
2739
|
});
|
|
2612
2740
|
|
|
@@ -2935,8 +3063,253 @@ var init_app_routes = __esm({
|
|
|
2935
3063
|
}
|
|
2936
3064
|
});
|
|
2937
3065
|
|
|
3066
|
+
// ../core/src/blocks/catalog/marca.ts
|
|
3067
|
+
var M, img, L, LOGO_ITEMS, heading, intro3, anchor, antesDepois, paleta, tipografia, variacoesMarca, imagens;
|
|
3068
|
+
var init_marca = __esm({
|
|
3069
|
+
"../core/src/blocks/catalog/marca.ts"() {
|
|
3070
|
+
"use strict";
|
|
3071
|
+
init_define_CORE_MODULES();
|
|
3072
|
+
init_define();
|
|
3073
|
+
init_fields();
|
|
3074
|
+
M = "/img/marca";
|
|
3075
|
+
img = (file, width, height, alt) => ({ url: `${M}/${file}`, width, height, alt: { "*": alt } });
|
|
3076
|
+
L = (text2) => ({ "*": text2 });
|
|
3077
|
+
LOGO_ITEMS = [
|
|
3078
|
+
{ image: img("principal-crosta.svg", 480, 220, "Selo redondo da Padaria Fermento Lento, cor de crosta, com uma espiga de trigo e o nome ao lado"), label: L("Principal sobre farinha"), background: "#f7efe1", note: L("Uso preferencial: embalagem, papelaria e site.") },
|
|
3079
|
+
{ image: img("principal-farinha.svg", 480, 220, "Selo da Padaria Fermento Lento em tons de farinha, para fundos escuros"), label: L("Principal sobre forno"), background: "#1f1712", note: L("Para fundos escuros e fotos noturnas.") },
|
|
3080
|
+
{ image: img("reduzida.svg", 300, 200, "Vers\xE3o reduzida: selo escuro com a espiga e a sigla PFL"), label: L("Reduzida"), background: "#e9a15a", note: L("Abaixo de 120 px de largura.") },
|
|
3081
|
+
{ image: img("simbolo.svg", 220, 160, "S\xEDmbolo: o selo com a espiga de trigo"), label: L("S\xEDmbolo"), background: "#a4471a", note: L("Avatar, favicon e carimbo.") },
|
|
3082
|
+
{ image: img("mono-preto.svg", 480, 220, "Selo e nome em preto"), label: L("Monocrom\xE1tica"), background: "#ffffff", note: L("Impress\xE3o a uma cor e carimbo.") },
|
|
3083
|
+
{ image: img("mono-branco.svg", 480, 220, "Selo e nome em branco"), label: L("Monocrom\xE1tica negativa"), background: "#000000" }
|
|
3084
|
+
];
|
|
3085
|
+
heading = field.text({ label: "T\xEDtulo", maxLength: 140 });
|
|
3086
|
+
intro3 = field.text({ label: "Texto de apoio", multiline: true, maxLength: 400 });
|
|
3087
|
+
anchor = field.text({
|
|
3088
|
+
label: "\xC2ncora",
|
|
3089
|
+
localized: false,
|
|
3090
|
+
help: "Identificador para links na p\xE1gina (#marca). Opcional.",
|
|
3091
|
+
maxLength: 40
|
|
3092
|
+
});
|
|
3093
|
+
antesDepois = defineBlock({
|
|
3094
|
+
type: "antes-depois",
|
|
3095
|
+
label: "Antes e depois",
|
|
3096
|
+
description: "Duas imagens comparadas: como era e como ficou. Lado a lado ou num comparador deslizante.",
|
|
3097
|
+
guidance: {
|
|
3098
|
+
use: "Mostrar a transforma\xE7\xE3o de um trabalho: o logo antigo e a marca nova, a tela antiga e a nova, a fachada antes da reforma.",
|
|
3099
|
+
avoid: "Para v\xE1rias imagens sem compara\xE7\xE3o, use imagens; para as vers\xF5es de um logo, variacoes-marca.",
|
|
3100
|
+
pairsWith: ["texto", "variacoes-marca", "paleta"]
|
|
3101
|
+
},
|
|
3102
|
+
category: "comum",
|
|
3103
|
+
interactive: true,
|
|
3104
|
+
enhances: true,
|
|
3105
|
+
islandWhen: (f) => f.presentation === "comparador",
|
|
3106
|
+
fields: {
|
|
3107
|
+
anchor,
|
|
3108
|
+
title: heading,
|
|
3109
|
+
intro: intro3,
|
|
3110
|
+
before: field.image({ label: "Imagem de antes", required: true }),
|
|
3111
|
+
beforeLabel: field.text({ label: "R\xF3tulo de antes", maxLength: 40, help: 'Sem ele, "Antes".' }),
|
|
3112
|
+
after: field.image({ label: "Imagem de depois", required: true }),
|
|
3113
|
+
afterLabel: field.text({ label: "R\xF3tulo de depois", maxLength: 40, help: 'Sem ele, "Depois".' }),
|
|
3114
|
+
caption: field.text({ label: "Legenda", multiline: true, maxLength: 300 }),
|
|
3115
|
+
presentation: field.select({
|
|
3116
|
+
label: "Apresenta\xE7\xE3o",
|
|
3117
|
+
options: [
|
|
3118
|
+
{ value: "comparador", label: "Comparador deslizante (sem JavaScript, lado a lado)" },
|
|
3119
|
+
{ value: "lado-a-lado", label: "Lado a lado" }
|
|
3120
|
+
],
|
|
3121
|
+
default: "comparador",
|
|
3122
|
+
help: "O comparador sobrep\xF5e as duas imagens; use imagens com a mesma propor\xE7\xE3o."
|
|
3123
|
+
})
|
|
3124
|
+
},
|
|
3125
|
+
// Cheio: o comparador com rótulos e legenda; curto: lado a lado, rótulos padrão.
|
|
3126
|
+
sample: (mode2) => ({
|
|
3127
|
+
before: img("antes.svg", 800, 600, "Logo antigo: um c\xEDrculo azul com um tri\xE2ngulo e o nome em letra comum"),
|
|
3128
|
+
after: img("depois.svg", 800, 600, "Marca nova: o selo cor de crosta da Padaria Fermento Lento sobre farinha"),
|
|
3129
|
+
beforeLabel: mode2 === "cheio" ? L("Logo de 2009") : void 0,
|
|
3130
|
+
afterLabel: mode2 === "cheio" ? L("Marca de 2026") : void 0
|
|
3131
|
+
})
|
|
3132
|
+
});
|
|
3133
|
+
paleta = defineBlock({
|
|
3134
|
+
type: "paleta",
|
|
3135
|
+
label: "Paleta de cores",
|
|
3136
|
+
description: "As cores de uma marca: nome, c\xF3digo, papel e o contraste de cada uma.",
|
|
3137
|
+
guidance: {
|
|
3138
|
+
use: "Apresentar as cores de uma identidade visual ou de um sistema de design, com o papel de cada cor.",
|
|
3139
|
+
avoid: "Para mudar as cores do pr\xF3prio site ou do case, use a apar\xEAncia ou as cores do cliente no projeto.",
|
|
3140
|
+
pairsWith: ["tipografia", "variacoes-marca", "antes-depois"]
|
|
3141
|
+
},
|
|
3142
|
+
category: "comum",
|
|
3143
|
+
fields: {
|
|
3144
|
+
anchor,
|
|
3145
|
+
title: heading,
|
|
3146
|
+
intro: intro3,
|
|
3147
|
+
colors: field.list({
|
|
3148
|
+
label: "Cores",
|
|
3149
|
+
required: true,
|
|
3150
|
+
itemLabel: "Cor",
|
|
3151
|
+
min: 1,
|
|
3152
|
+
max: 12,
|
|
3153
|
+
of: {
|
|
3154
|
+
name: field.text({ label: "Nome", required: true, maxLength: 40 }),
|
|
3155
|
+
hex: field.color({ label: "Cor", required: true }),
|
|
3156
|
+
role: field.text({ label: "Papel", maxLength: 60, help: "Ex.: principal, apoio, fundo." }),
|
|
3157
|
+
usage: field.text({ label: "Uso", multiline: true, maxLength: 200 })
|
|
3158
|
+
}
|
|
3159
|
+
}),
|
|
3160
|
+
showContrast: field.boolean({ label: "Mostrar o contraste com branco e preto", default: true })
|
|
3161
|
+
},
|
|
3162
|
+
sample: (mode2) => ({
|
|
3163
|
+
colors: mode2 === "cheio" ? [
|
|
3164
|
+
{ name: L("Crosta"), hex: "#a4471a", role: L("Principal"), usage: L("Selo, t\xEDtulos e chamadas. A cor que todo mundo lembra.") },
|
|
3165
|
+
{ name: L("Farinha"), hex: "#f7efe1", role: L("Fundo"), usage: L("Fundo do site, embalagem e o texto sobre a crosta.") },
|
|
3166
|
+
{ name: L("Mel"), hex: "#e9a15a", role: L("Destaque"), usage: L("Frisos, \xEDcones e detalhes. Nunca em texto pequeno.") },
|
|
3167
|
+
{ name: L("Caf\xE9"), hex: "#2a1e16", role: L("Texto"), usage: L("Texto corrido e fundos escuros.") },
|
|
3168
|
+
{ name: L("Massa"), hex: "#f5ead9", role: L("Apoio"), usage: L("Cart\xF5es, faixas e \xE1reas de destaque suave.") }
|
|
3169
|
+
] : [{ name: L("Crosta"), hex: "#a4471a" }]
|
|
3170
|
+
})
|
|
3171
|
+
});
|
|
3172
|
+
tipografia = defineBlock({
|
|
3173
|
+
type: "tipografia",
|
|
3174
|
+
label: "Tipografia",
|
|
3175
|
+
description: "As fontes de uma marca, com papel, pesos e uma amostra escrita na pr\xF3pria fonte.",
|
|
3176
|
+
guidance: {
|
|
3177
|
+
use: "Apresentar as fam\xEDlias tipogr\xE1ficas de uma identidade visual: a de t\xEDtulos, a de texto, a de apoio.",
|
|
3178
|
+
avoid: "Para trocar a fonte do site, use a apar\xEAncia. Fonte fora do Google Fonts: mande a amostra como imagem.",
|
|
3179
|
+
pairsWith: ["paleta", "variacoes-marca"]
|
|
3180
|
+
},
|
|
3181
|
+
category: "comum",
|
|
3182
|
+
fields: {
|
|
3183
|
+
anchor,
|
|
3184
|
+
title: heading,
|
|
3185
|
+
intro: intro3,
|
|
3186
|
+
fonts: field.list({
|
|
3187
|
+
label: "Fontes",
|
|
3188
|
+
required: true,
|
|
3189
|
+
itemLabel: "Fonte",
|
|
3190
|
+
min: 1,
|
|
3191
|
+
max: 4,
|
|
3192
|
+
of: {
|
|
3193
|
+
family: field.text({
|
|
3194
|
+
label: "Fam\xEDlia",
|
|
3195
|
+
localized: false,
|
|
3196
|
+
required: true,
|
|
3197
|
+
maxLength: 60,
|
|
3198
|
+
help: "Nome no Google Fonts (ex.: Oswald). O site baixa a fonte no build."
|
|
3199
|
+
}),
|
|
3200
|
+
role: field.text({ label: "Papel", maxLength: 60, help: "Ex.: t\xEDtulos, texto corrido." }),
|
|
3201
|
+
weights: field.text({ label: "Pesos", localized: false, maxLength: 40, help: "Ex.: 400, 700. Sem eles, 400 e 700." }),
|
|
3202
|
+
sample: field.text({ label: "Amostra", multiline: true, maxLength: 120, help: "Frase escrita na fonte. Sem ela, o alfabeto." }),
|
|
3203
|
+
specimen: field.image({ label: "Amostra em imagem", help: "Para fontes fora do Google Fonts, ou se a fonte n\xE3o carregar." })
|
|
3204
|
+
}
|
|
3205
|
+
})
|
|
3206
|
+
},
|
|
3207
|
+
sample: (mode2) => ({
|
|
3208
|
+
fonts: mode2 === "cheio" ? [
|
|
3209
|
+
{ family: "Bricolage Grotesque", role: L("T\xEDtulos e selo"), weights: "400, 800", sample: L("P\xE3o de fermenta\xE7\xE3o lenta, desde 1987") },
|
|
3210
|
+
{ family: "Space Grotesk", role: L("Texto corrido"), weights: "400, 500, 700", sample: L("A massa n\xE3o tem pressa: cada fornada descansa a noite toda antes de ir ao forno.") },
|
|
3211
|
+
{ family: "JetBrains Mono", role: L("Etiquetas e pre\xE7os"), weights: "400, 700", sample: L("LOTE 1987 \xB7 R$ 18,00") },
|
|
3212
|
+
{ family: "Fermento Serif", role: L("Apoio (fonte pr\xF3pria, em imagem)"), weights: "400", specimen: img("especime.svg", 800, 300, "Amostra da fonte Fermento Serif: Ag, o nome e o alfabeto") }
|
|
3213
|
+
] : [{ family: "Fraunces" }]
|
|
3214
|
+
})
|
|
3215
|
+
});
|
|
3216
|
+
variacoesMarca = defineBlock({
|
|
3217
|
+
type: "variacoes-marca",
|
|
3218
|
+
label: "Varia\xE7\xF5es de marca",
|
|
3219
|
+
description: "As vers\xF5es de um logo, cada uma sobre a sua cor de fundo: principal, reduzida, \xEDcone, positivo e negativo.",
|
|
3220
|
+
guidance: {
|
|
3221
|
+
use: "Mostrar o sistema de um logo: vers\xF5es (principal, reduzida, s\xEDmbolo) e as cores em que cada uma pode aparecer.",
|
|
3222
|
+
avoid: "Para logos de clientes atendidos, use logos-clientes; para fotos e telas, imagens.",
|
|
3223
|
+
pairsWith: ["paleta", "antes-depois", "tipografia"]
|
|
3224
|
+
},
|
|
3225
|
+
category: "comum",
|
|
3226
|
+
fields: {
|
|
3227
|
+
anchor,
|
|
3228
|
+
title: heading,
|
|
3229
|
+
intro: intro3,
|
|
3230
|
+
items: field.list({
|
|
3231
|
+
label: "Varia\xE7\xF5es",
|
|
3232
|
+
required: true,
|
|
3233
|
+
itemLabel: "Varia\xE7\xE3o",
|
|
3234
|
+
min: 1,
|
|
3235
|
+
max: 24,
|
|
3236
|
+
of: {
|
|
3237
|
+
image: field.image({ label: "Imagem (SVG ou PNG transparente)", required: true }),
|
|
3238
|
+
label: field.text({ label: "Nome", maxLength: 60, help: "Ex.: principal sobre farinha." }),
|
|
3239
|
+
background: field.color({ label: "Cor de fundo", help: "Sem ela, o fundo do site." }),
|
|
3240
|
+
note: field.text({ label: "Observa\xE7\xE3o", multiline: true, maxLength: 160 })
|
|
3241
|
+
}
|
|
3242
|
+
}),
|
|
3243
|
+
columns: field.select({
|
|
3244
|
+
label: "Colunas",
|
|
3245
|
+
options: [
|
|
3246
|
+
{ value: "2", label: "2" },
|
|
3247
|
+
{ value: "3", label: "3" },
|
|
3248
|
+
{ value: "4", label: "4" }
|
|
3249
|
+
],
|
|
3250
|
+
default: "3"
|
|
3251
|
+
})
|
|
3252
|
+
},
|
|
3253
|
+
// Instâncias: 2 colunas (4 itens), curta (1 item sem fundo nem rótulo) e 4 colunas (6 itens).
|
|
3254
|
+
sample: (mode2, i) => ({
|
|
3255
|
+
items: mode2 === "curto" ? [{ image: LOGO_ITEMS[0].image }] : i === 0 ? LOGO_ITEMS.slice(0, 4) : LOGO_ITEMS
|
|
3256
|
+
})
|
|
3257
|
+
});
|
|
3258
|
+
imagens = defineBlock({
|
|
3259
|
+
type: "imagens",
|
|
3260
|
+
label: "Imagens",
|
|
3261
|
+
description: "Um conjunto de imagens com legenda: telas, mockups, grafismos, anima\xE7\xF5es em GIF.",
|
|
3262
|
+
guidance: {
|
|
3263
|
+
use: "Mostrar v\xE1rias imagens de um trabalho dentro da narrativa: telas, mockups, aplica\xE7\xF5es da marca, anima\xE7\xF5es curtas (GIF).",
|
|
3264
|
+
avoid: "Para fotos do dia a dia da empresa (cole\xE7\xE3o de rotina), use galeria; para comparar duas imagens, antes-depois; para v\xEDdeo, video.",
|
|
3265
|
+
pairsWith: ["texto", "antes-depois", "video"]
|
|
3266
|
+
},
|
|
3267
|
+
category: "comum",
|
|
3268
|
+
interactive: true,
|
|
3269
|
+
enhances: true,
|
|
3270
|
+
islandWhen: (f) => f.layout === "carrossel",
|
|
3271
|
+
fields: {
|
|
3272
|
+
anchor,
|
|
3273
|
+
title: heading,
|
|
3274
|
+
intro: intro3,
|
|
3275
|
+
items: field.list({
|
|
3276
|
+
label: "Imagens",
|
|
3277
|
+
required: true,
|
|
3278
|
+
itemLabel: "Imagem",
|
|
3279
|
+
min: 1,
|
|
3280
|
+
max: 30,
|
|
3281
|
+
of: {
|
|
3282
|
+
image: field.image({ label: "Imagem", required: true }),
|
|
3283
|
+
caption: field.text({ label: "Legenda", maxLength: 200 })
|
|
3284
|
+
}
|
|
3285
|
+
}),
|
|
3286
|
+
layout: field.select({
|
|
3287
|
+
label: "Disposi\xE7\xE3o",
|
|
3288
|
+
options: [
|
|
3289
|
+
{ value: "grade", label: "Grade" },
|
|
3290
|
+
{ value: "mosaico", label: "Mosaico (a primeira maior)" },
|
|
3291
|
+
{ value: "carrossel", label: "Carrossel (sem JavaScript, faixa com rolagem)" }
|
|
3292
|
+
],
|
|
3293
|
+
default: "grade"
|
|
3294
|
+
})
|
|
3295
|
+
},
|
|
3296
|
+
// Inclui um GIF animado: a imagem vai como está, sem conversão.
|
|
3297
|
+
sample: (mode2) => {
|
|
3298
|
+
const all = [
|
|
3299
|
+
{ image: img("selo-animado.gif", 480, 300, "Anima\xE7\xE3o do selo: os pontos de mel giram em volta e a espiga de trigo cresce"), caption: L("Anima\xE7\xE3o de abertura (GIF)") },
|
|
3300
|
+
{ image: img("mockup.svg", 800, 600, "Tela do site novo com o cabe\xE7alho cor de crosta"), caption: L("Site: p\xE1gina inicial") },
|
|
3301
|
+
{ image: img("grafismo.svg", 800, 600, "Grafismo de espigas de trigo cor de mel e farinha sobre crosta"), caption: L("Grafismo: espigas") },
|
|
3302
|
+
{ image: img("depois.svg", 800, 600, "O selo aplicado sobre farinha, com o nome embaixo"), caption: L("Aplica\xE7\xE3o na embalagem") },
|
|
3303
|
+
{ image: img("antes.svg", 800, 600, "O logo antigo, para refer\xEAncia") }
|
|
3304
|
+
];
|
|
3305
|
+
return { items: mode2 === "cheio" ? all : all.slice(0, 4).map(({ image }) => ({ image })) };
|
|
3306
|
+
}
|
|
3307
|
+
});
|
|
3308
|
+
}
|
|
3309
|
+
});
|
|
3310
|
+
|
|
2938
3311
|
// ../core/src/blocks/catalog/index.ts
|
|
2939
|
-
var
|
|
3312
|
+
var heading2, intro4, anchor2, hero, texto, numeros, listaItens, cases, servicos, depoimentos, faq, postsRecentes, cta, contato, galeria, curriculo, precos, equipe, localizacao, logosClientes, embedLabels, chapterLabel, VIDEO_CHAPTERS_SAMPLE, video, incorporacao, linhaDoTempo, comparativoPlanos, ROWS_SAMPLE, CORE_BLOCKS;
|
|
2940
3313
|
var init_catalog = __esm({
|
|
2941
3314
|
"../core/src/blocks/catalog/index.ts"() {
|
|
2942
3315
|
"use strict";
|
|
@@ -2944,10 +3317,12 @@ var init_catalog = __esm({
|
|
|
2944
3317
|
init_define();
|
|
2945
3318
|
init_fields();
|
|
2946
3319
|
init_media();
|
|
3320
|
+
init_marca();
|
|
3321
|
+
init_marca();
|
|
2947
3322
|
init_media();
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
3323
|
+
heading2 = field.text({ label: "T\xEDtulo", maxLength: 140 });
|
|
3324
|
+
intro4 = field.text({ label: "Texto de apoio", multiline: true, maxLength: 400 });
|
|
3325
|
+
anchor2 = field.text({
|
|
2951
3326
|
label: "\xC2ncora",
|
|
2952
3327
|
localized: false,
|
|
2953
3328
|
help: "Identificador para links na p\xE1gina (#contato). Opcional.",
|
|
@@ -2963,6 +3338,7 @@ var init_catalog = __esm({
|
|
|
2963
3338
|
pairsWith: ["numeros", "logos-clientes", "cases", "servicos"]
|
|
2964
3339
|
},
|
|
2965
3340
|
category: "comum",
|
|
3341
|
+
contexts: ["page"],
|
|
2966
3342
|
fields: {
|
|
2967
3343
|
eyebrow: field.text({ label: "Sobret\xEDtulo", maxLength: 80 }),
|
|
2968
3344
|
title: field.text({ label: "T\xEDtulo", required: true, maxLength: 160 }),
|
|
@@ -2985,8 +3361,8 @@ var init_catalog = __esm({
|
|
|
2985
3361
|
},
|
|
2986
3362
|
category: "comum",
|
|
2987
3363
|
fields: {
|
|
2988
|
-
anchor,
|
|
2989
|
-
title:
|
|
3364
|
+
anchor: anchor2,
|
|
3365
|
+
title: heading2,
|
|
2990
3366
|
body: field.richText({ label: "Texto", required: true }),
|
|
2991
3367
|
image: field.image({ label: "Imagem" }),
|
|
2992
3368
|
imagePosition: field.select({
|
|
@@ -3010,9 +3386,9 @@ var init_catalog = __esm({
|
|
|
3010
3386
|
},
|
|
3011
3387
|
category: "comum",
|
|
3012
3388
|
fields: {
|
|
3013
|
-
anchor,
|
|
3014
|
-
title:
|
|
3015
|
-
intro:
|
|
3389
|
+
anchor: anchor2,
|
|
3390
|
+
title: heading2,
|
|
3391
|
+
intro: intro4,
|
|
3016
3392
|
items: field.list({
|
|
3017
3393
|
label: "N\xFAmeros",
|
|
3018
3394
|
itemLabel: "N\xFAmero",
|
|
@@ -3038,9 +3414,9 @@ var init_catalog = __esm({
|
|
|
3038
3414
|
},
|
|
3039
3415
|
category: "comum",
|
|
3040
3416
|
fields: {
|
|
3041
|
-
anchor,
|
|
3042
|
-
title:
|
|
3043
|
-
intro:
|
|
3417
|
+
anchor: anchor2,
|
|
3418
|
+
title: heading2,
|
|
3419
|
+
intro: intro4,
|
|
3044
3420
|
numbered: field.boolean({ label: "Numerar itens", default: false }),
|
|
3045
3421
|
items: field.list({
|
|
3046
3422
|
label: "Itens",
|
|
@@ -3066,12 +3442,13 @@ var init_catalog = __esm({
|
|
|
3066
3442
|
pairsWith: ["depoimentos", "logos-clientes", "cta"]
|
|
3067
3443
|
},
|
|
3068
3444
|
category: "comum",
|
|
3445
|
+
contexts: ["page"],
|
|
3069
3446
|
plugin: "portfolio",
|
|
3070
3447
|
source: { collections: ["projects"], default: { collection: "projects", featured: true, limit: 3, sort: "order" } },
|
|
3071
3448
|
fields: {
|
|
3072
|
-
anchor,
|
|
3073
|
-
title:
|
|
3074
|
-
intro:
|
|
3449
|
+
anchor: anchor2,
|
|
3450
|
+
title: heading2,
|
|
3451
|
+
intro: intro4,
|
|
3075
3452
|
cta: field.link({ label: "Link para ver todos" })
|
|
3076
3453
|
}
|
|
3077
3454
|
});
|
|
@@ -3087,9 +3464,9 @@ var init_catalog = __esm({
|
|
|
3087
3464
|
category: "comum",
|
|
3088
3465
|
source: { collections: ["services"], default: { collection: "services", sort: "order" } },
|
|
3089
3466
|
fields: {
|
|
3090
|
-
anchor,
|
|
3091
|
-
title:
|
|
3092
|
-
intro:
|
|
3467
|
+
anchor: anchor2,
|
|
3468
|
+
title: heading2,
|
|
3469
|
+
intro: intro4,
|
|
3093
3470
|
cta: field.link({ label: "Bot\xE3o" })
|
|
3094
3471
|
}
|
|
3095
3472
|
});
|
|
@@ -3108,9 +3485,9 @@ var init_catalog = __esm({
|
|
|
3108
3485
|
islandWhen: (f, plugins) => f.allowSubmission === true && plugins.has("testimonials-intake"),
|
|
3109
3486
|
source: { collections: ["testimonials"], default: { collection: "testimonials", featured: true, limit: 6, sort: "order" } },
|
|
3110
3487
|
fields: {
|
|
3111
|
-
anchor,
|
|
3112
|
-
title:
|
|
3113
|
-
intro:
|
|
3488
|
+
anchor: anchor2,
|
|
3489
|
+
title: heading2,
|
|
3490
|
+
intro: intro4,
|
|
3114
3491
|
allowSubmission: field.boolean({
|
|
3115
3492
|
label: "Convidar a enviar depoimento",
|
|
3116
3493
|
default: false,
|
|
@@ -3131,9 +3508,9 @@ var init_catalog = __esm({
|
|
|
3131
3508
|
category: "comum",
|
|
3132
3509
|
source: { collections: ["faq"], default: { collection: "faq", sort: "order" } },
|
|
3133
3510
|
fields: {
|
|
3134
|
-
anchor,
|
|
3135
|
-
title:
|
|
3136
|
-
intro:
|
|
3511
|
+
anchor: anchor2,
|
|
3512
|
+
title: heading2,
|
|
3513
|
+
intro: intro4
|
|
3137
3514
|
}
|
|
3138
3515
|
});
|
|
3139
3516
|
postsRecentes = defineBlock({
|
|
@@ -3154,9 +3531,9 @@ var init_catalog = __esm({
|
|
|
3154
3531
|
islandWhen: (f) => f.showSearch === true,
|
|
3155
3532
|
source: { collections: ["posts"], default: { collection: "posts", limit: 3, sort: "recent" } },
|
|
3156
3533
|
fields: {
|
|
3157
|
-
anchor,
|
|
3158
|
-
title:
|
|
3159
|
-
intro:
|
|
3534
|
+
anchor: anchor2,
|
|
3535
|
+
title: heading2,
|
|
3536
|
+
intro: intro4,
|
|
3160
3537
|
cta: field.link({ label: "Link para o blog" }),
|
|
3161
3538
|
showTagFilter: field.boolean({ label: "Filtro por etiqueta", default: false }),
|
|
3162
3539
|
showSearch: field.boolean({ label: "Busca por texto", default: false, help: "Campo que filtra os posts pelo t\xEDtulo, resumo e etiquetas (p\xE1gina do blog)." }),
|
|
@@ -3178,9 +3555,9 @@ var init_catalog = __esm({
|
|
|
3178
3555
|
},
|
|
3179
3556
|
category: "comum",
|
|
3180
3557
|
fields: {
|
|
3181
|
-
anchor,
|
|
3558
|
+
anchor: anchor2,
|
|
3182
3559
|
title: field.text({ label: "T\xEDtulo", required: true, maxLength: 140 }),
|
|
3183
|
-
body:
|
|
3560
|
+
body: intro4,
|
|
3184
3561
|
primary: field.link({ label: "Bot\xE3o principal", required: true }),
|
|
3185
3562
|
secondary: field.link({ label: "Bot\xE3o secund\xE1rio" })
|
|
3186
3563
|
}
|
|
@@ -3195,12 +3572,13 @@ var init_catalog = __esm({
|
|
|
3195
3572
|
pairsWith: ["localizacao", "faq", "cta"]
|
|
3196
3573
|
},
|
|
3197
3574
|
category: "comum",
|
|
3575
|
+
contexts: ["page"],
|
|
3198
3576
|
interactive: true,
|
|
3199
3577
|
islandWhen: (f, plugins) => f.mode !== "channels" && plugins.has("contact-wizard"),
|
|
3200
3578
|
fields: {
|
|
3201
|
-
anchor,
|
|
3202
|
-
title:
|
|
3203
|
-
intro:
|
|
3579
|
+
anchor: anchor2,
|
|
3580
|
+
title: heading2,
|
|
3581
|
+
intro: intro4,
|
|
3204
3582
|
mode: field.select({
|
|
3205
3583
|
label: "Formato",
|
|
3206
3584
|
options: [
|
|
@@ -3277,9 +3655,9 @@ var init_catalog = __esm({
|
|
|
3277
3655
|
category: "comum",
|
|
3278
3656
|
source: { collections: ["routine"], default: { collection: "routine", sort: "order" } },
|
|
3279
3657
|
fields: {
|
|
3280
|
-
anchor,
|
|
3281
|
-
title:
|
|
3282
|
-
intro:
|
|
3658
|
+
anchor: anchor2,
|
|
3659
|
+
title: heading2,
|
|
3660
|
+
intro: intro4
|
|
3283
3661
|
}
|
|
3284
3662
|
});
|
|
3285
3663
|
curriculo = defineBlock({
|
|
@@ -3297,9 +3675,9 @@ var init_catalog = __esm({
|
|
|
3297
3675
|
islandWhen: (f) => f.showDownload !== false,
|
|
3298
3676
|
source: { collections: ["resume"], default: { collection: "resume", sort: "order" } },
|
|
3299
3677
|
fields: {
|
|
3300
|
-
anchor,
|
|
3301
|
-
title:
|
|
3302
|
-
intro:
|
|
3678
|
+
anchor: anchor2,
|
|
3679
|
+
title: heading2,
|
|
3680
|
+
intro: intro4,
|
|
3303
3681
|
showDownload: field.boolean({ label: "Bot\xE3o de baixar PDF", default: true })
|
|
3304
3682
|
}
|
|
3305
3683
|
});
|
|
@@ -3315,9 +3693,9 @@ var init_catalog = __esm({
|
|
|
3315
3693
|
category: "empresa",
|
|
3316
3694
|
source: { collections: ["plans"], default: { collection: "plans", sort: "order" } },
|
|
3317
3695
|
fields: {
|
|
3318
|
-
anchor,
|
|
3319
|
-
title:
|
|
3320
|
-
intro:
|
|
3696
|
+
anchor: anchor2,
|
|
3697
|
+
title: heading2,
|
|
3698
|
+
intro: intro4,
|
|
3321
3699
|
note: field.text({ label: "Observa\xE7\xE3o", multiline: true, maxLength: 300, help: "Ex.: valores sem impostos." })
|
|
3322
3700
|
}
|
|
3323
3701
|
});
|
|
@@ -3333,9 +3711,9 @@ var init_catalog = __esm({
|
|
|
3333
3711
|
category: "empresa",
|
|
3334
3712
|
source: { collections: ["team"], default: { collection: "team", sort: "order" } },
|
|
3335
3713
|
fields: {
|
|
3336
|
-
anchor,
|
|
3337
|
-
title:
|
|
3338
|
-
intro:
|
|
3714
|
+
anchor: anchor2,
|
|
3715
|
+
title: heading2,
|
|
3716
|
+
intro: intro4
|
|
3339
3717
|
}
|
|
3340
3718
|
});
|
|
3341
3719
|
localizacao = defineBlock({
|
|
@@ -3349,9 +3727,9 @@ var init_catalog = __esm({
|
|
|
3349
3727
|
},
|
|
3350
3728
|
category: "empresa",
|
|
3351
3729
|
fields: {
|
|
3352
|
-
anchor,
|
|
3353
|
-
title:
|
|
3354
|
-
intro:
|
|
3730
|
+
anchor: anchor2,
|
|
3731
|
+
title: heading2,
|
|
3732
|
+
intro: intro4,
|
|
3355
3733
|
showMap: field.boolean({ label: "Mostrar mapa", default: true }),
|
|
3356
3734
|
showHours: field.boolean({ label: "Mostrar hor\xE1rio", default: true })
|
|
3357
3735
|
}
|
|
@@ -3367,8 +3745,8 @@ var init_catalog = __esm({
|
|
|
3367
3745
|
},
|
|
3368
3746
|
category: "empresa",
|
|
3369
3747
|
fields: {
|
|
3370
|
-
anchor,
|
|
3371
|
-
title:
|
|
3748
|
+
anchor: anchor2,
|
|
3749
|
+
title: heading2,
|
|
3372
3750
|
logos: field.list({
|
|
3373
3751
|
label: "Logos",
|
|
3374
3752
|
itemLabel: "Logo",
|
|
@@ -3384,6 +3762,12 @@ var init_catalog = __esm({
|
|
|
3384
3762
|
}
|
|
3385
3763
|
});
|
|
3386
3764
|
embedLabels = EMBED_PROVIDERS.map((p) => p.label).join(", ");
|
|
3765
|
+
chapterLabel = (pt2, en2) => ({ "pt-BR": pt2, en: en2, "en-US": en2, es: pt2 });
|
|
3766
|
+
VIDEO_CHAPTERS_SAMPLE = [
|
|
3767
|
+
{ start: "0:00", label: chapterLabel("Abertura", "Opening") },
|
|
3768
|
+
{ start: "0:42", label: chapterLabel("Como funciona", "How it works") },
|
|
3769
|
+
{ start: "2:15", label: chapterLabel("Resultados", "Results") }
|
|
3770
|
+
];
|
|
3387
3771
|
video = defineBlock({
|
|
3388
3772
|
type: "video",
|
|
3389
3773
|
label: "V\xEDdeo",
|
|
@@ -3398,9 +3782,9 @@ var init_catalog = __esm({
|
|
|
3398
3782
|
enhances: true,
|
|
3399
3783
|
islandWhen: (f) => parseVideoUrl(f.url) !== void 0,
|
|
3400
3784
|
fields: {
|
|
3401
|
-
anchor,
|
|
3402
|
-
title:
|
|
3403
|
-
intro:
|
|
3785
|
+
anchor: anchor2,
|
|
3786
|
+
title: heading2,
|
|
3787
|
+
intro: intro4,
|
|
3404
3788
|
url: field.text({
|
|
3405
3789
|
label: "Endere\xE7o do v\xEDdeo",
|
|
3406
3790
|
localized: false,
|
|
@@ -3426,11 +3810,29 @@ var init_catalog = __esm({
|
|
|
3426
3810
|
{ value: "9:16", label: "9:16 (vertical, Shorts e Reels)" }
|
|
3427
3811
|
],
|
|
3428
3812
|
default: "16:9"
|
|
3813
|
+
}),
|
|
3814
|
+
chapters: field.list({
|
|
3815
|
+
label: "Cap\xEDtulos",
|
|
3816
|
+
itemLabel: "Cap\xEDtulo",
|
|
3817
|
+
max: 20,
|
|
3818
|
+
help: "Pontos do v\xEDdeo com nome: cada um abre o v\xEDdeo no tempo certo.",
|
|
3819
|
+
of: {
|
|
3820
|
+
start: field.text({ label: "In\xEDcio (m:ss)", localized: false, required: true, maxLength: 8, help: "Ex.: 1:05 ou 1:02:30." }),
|
|
3821
|
+
label: field.text({ label: "Nome", required: true, maxLength: 80 })
|
|
3822
|
+
}
|
|
3429
3823
|
})
|
|
3430
3824
|
},
|
|
3431
|
-
validate: (f) =>
|
|
3825
|
+
validate: (f) => [
|
|
3826
|
+
...parseVideoUrl(f.url) ? [] : [{ path: "url", message: "Endere\xE7o do v\xEDdeo: use um link do YouTube ou do Vimeo" }],
|
|
3827
|
+
...(Array.isArray(f.chapters) ? f.chapters : []).flatMap(
|
|
3828
|
+
(c, i) => chapterSeconds(c.start) === void 0 ? [{ path: `chapters.${i}.start`, message: "In\xEDcio do cap\xEDtulo: use m:ss ou h:mm:ss (ex.: 1:05)" }] : []
|
|
3829
|
+
)
|
|
3830
|
+
],
|
|
3432
3831
|
// Cheia com miniatura própria, curta com a do YouTube, Vimeo com e sem imagem.
|
|
3433
|
-
sample: (
|
|
3832
|
+
sample: (mode2, i) => ({
|
|
3833
|
+
...i < 2 ? { url: "https://www.youtube.com/watch?v=M7lc1UVf-VE" } : { url: "https://vimeo.com/76979871", ...i === 3 ? { poster: void 0 } : {} },
|
|
3834
|
+
chapters: mode2 === "cheio" ? VIDEO_CHAPTERS_SAMPLE : void 0
|
|
3835
|
+
})
|
|
3434
3836
|
});
|
|
3435
3837
|
incorporacao = defineBlock({
|
|
3436
3838
|
type: "incorporacao",
|
|
@@ -3443,9 +3845,9 @@ var init_catalog = __esm({
|
|
|
3443
3845
|
},
|
|
3444
3846
|
category: "comum",
|
|
3445
3847
|
fields: {
|
|
3446
|
-
anchor,
|
|
3447
|
-
title:
|
|
3448
|
-
intro:
|
|
3848
|
+
anchor: anchor2,
|
|
3849
|
+
title: heading2,
|
|
3850
|
+
intro: intro4,
|
|
3449
3851
|
url: field.text({
|
|
3450
3852
|
label: "Endere\xE7o da incorpora\xE7\xE3o",
|
|
3451
3853
|
localized: false,
|
|
@@ -3479,9 +3881,9 @@ var init_catalog = __esm({
|
|
|
3479
3881
|
},
|
|
3480
3882
|
category: "comum",
|
|
3481
3883
|
fields: {
|
|
3482
|
-
anchor,
|
|
3483
|
-
title:
|
|
3484
|
-
intro:
|
|
3884
|
+
anchor: anchor2,
|
|
3885
|
+
title: heading2,
|
|
3886
|
+
intro: intro4,
|
|
3485
3887
|
items: field.list({
|
|
3486
3888
|
label: "Marcos",
|
|
3487
3889
|
itemLabel: "Marco",
|
|
@@ -3510,9 +3912,9 @@ var init_catalog = __esm({
|
|
|
3510
3912
|
plugin: "pricing",
|
|
3511
3913
|
source: { collections: ["plans"], default: { collection: "plans", sort: "order" } },
|
|
3512
3914
|
fields: {
|
|
3513
|
-
anchor,
|
|
3514
|
-
title:
|
|
3515
|
-
intro:
|
|
3915
|
+
anchor: anchor2,
|
|
3916
|
+
title: heading2,
|
|
3917
|
+
intro: intro4,
|
|
3516
3918
|
caption: field.text({
|
|
3517
3919
|
label: "Legenda da tabela",
|
|
3518
3920
|
maxLength: 160,
|
|
@@ -3596,7 +3998,12 @@ var init_catalog = __esm({
|
|
|
3596
3998
|
video,
|
|
3597
3999
|
incorporacao,
|
|
3598
4000
|
linhaDoTempo,
|
|
3599
|
-
comparativoPlanos
|
|
4001
|
+
comparativoPlanos,
|
|
4002
|
+
antesDepois,
|
|
4003
|
+
paleta,
|
|
4004
|
+
tipografia,
|
|
4005
|
+
variacoesMarca,
|
|
4006
|
+
imagens
|
|
3600
4007
|
];
|
|
3601
4008
|
}
|
|
3602
4009
|
});
|
|
@@ -3885,7 +4292,7 @@ var init_files = __esm({
|
|
|
3885
4292
|
PEERS = package_default.peerDependencies;
|
|
3886
4293
|
MCP_VERSION = package_default2.version;
|
|
3887
4294
|
defaultDependencySpecs = () => ({ core: `^${CORE_VERSION}`, theme: `^${CORE_VERSION}`, cli: `^${CLI_PACKAGE_VERSION}`, mcp: `^${MCP_VERSION}` });
|
|
3888
|
-
CLI_PACKAGE_VERSION = true ? "2.
|
|
4295
|
+
CLI_PACKAGE_VERSION = true ? "2.2.0" : CORE_VERSION;
|
|
3889
4296
|
MARK = {
|
|
3890
4297
|
themeStart: "// rubrica:tema:inicio",
|
|
3891
4298
|
themeEnd: "// rubrica:tema:fim",
|
|
@@ -4519,24 +4926,6 @@ var init_setup = __esm({
|
|
|
4519
4926
|
}
|
|
4520
4927
|
});
|
|
4521
4928
|
|
|
4522
|
-
// ../core/src/render/text.ts
|
|
4523
|
-
var init_text = __esm({
|
|
4524
|
-
"../core/src/render/text.ts"() {
|
|
4525
|
-
"use strict";
|
|
4526
|
-
init_define_CORE_MODULES();
|
|
4527
|
-
}
|
|
4528
|
-
});
|
|
4529
|
-
|
|
4530
|
-
// ../core/src/render/resolve.ts
|
|
4531
|
-
var init_resolve = __esm({
|
|
4532
|
-
"../core/src/render/resolve.ts"() {
|
|
4533
|
-
"use strict";
|
|
4534
|
-
init_define_CORE_MODULES();
|
|
4535
|
-
init_i18n();
|
|
4536
|
-
init_sitewide();
|
|
4537
|
-
}
|
|
4538
|
-
});
|
|
4539
|
-
|
|
4540
4929
|
// ../core/src/seo/analytics.ts
|
|
4541
4930
|
function analyticsScriptUrl(src) {
|
|
4542
4931
|
const value = src?.trim();
|
|
@@ -7944,7 +8333,7 @@ function convertProjects(ctx, docs) {
|
|
|
7944
8333
|
title: loc(d.title, d.titleTranslations),
|
|
7945
8334
|
summary: loc(d.description, d.descriptionTranslations),
|
|
7946
8335
|
content: mapLoc(loc(d.longDescription, d.longDescriptionTranslations), toHtml),
|
|
7947
|
-
|
|
8336
|
+
blocks: sections.length ? sections.map((sec, i) => sectionToBlock(sec, i)) : void 0,
|
|
7948
8337
|
metrics: metrics.length ? metrics : void 0,
|
|
7949
8338
|
cover,
|
|
7950
8339
|
gallery: gallery.length ? gallery : void 0,
|
|
@@ -8261,9 +8650,9 @@ function buildUiTexts(ctx, report, now, plugins = {}) {
|
|
|
8261
8650
|
out.push({ key: "hero.available", value: fromHome, updatedAt: now });
|
|
8262
8651
|
report.texts.ui.push({ v1: "homeContent.availability_status", v2: "hero.available" });
|
|
8263
8652
|
}
|
|
8264
|
-
const
|
|
8265
|
-
if (
|
|
8266
|
-
out.push({ key: "proposal.intro", value: { [PT]:
|
|
8653
|
+
const intro5 = typeof ctx.contact?.proposalIntro === "string" ? ctx.contact.proposalIntro.trim() : "";
|
|
8654
|
+
if (intro5) {
|
|
8655
|
+
out.push({ key: "proposal.intro", value: { [PT]: intro5 }, updatedAt: now });
|
|
8267
8656
|
report.texts.ui.push({ v1: "contactInfo.proposalIntro", v2: "proposal.intro" });
|
|
8268
8657
|
}
|
|
8269
8658
|
for (const key of ctx.textKeys()) {
|
|
@@ -9189,7 +9578,7 @@ var init_customizations = __esm({
|
|
|
9189
9578
|
return `Na v2 a p\xE1gina \xE9 uma lista de blocos (${PAGE_BLOCKS[page]}), editada no painel. Se\xE7\xE3o que n\xE3o existe no cat\xE1logo: bloco pr\xF3prio em src/blocks/. Marca\xE7\xE3o diferente de um bloco que existe: npx create-rubrica ejetar <bloco>.`;
|
|
9190
9579
|
}
|
|
9191
9580
|
},
|
|
9192
|
-
{ test: (p) => /^src\/pages\/(BlogPost|ProjectCaseStudy|NotFound)\.tsx$/.test(p), area: "template do tema", suggestion: () => "Post, case e 404 s\xE3o templates do tema na v2 (ainda n\xE3o se ejetam): leve o ajuste para o tema ou abra uma issue." },
|
|
9581
|
+
{ test: (p) => /^src\/pages\/(BlogPost|ProjectCaseStudy|NotFound)\.tsx$/.test(p), area: "template do tema", suggestion: () => "Post, case e 404 s\xE3o templates do tema na v2 (ainda n\xE3o se ejetam): leve o ajuste para o tema ou abra uma issue. O corpo do case \xE9 uma lista de blocos (os campos do case da v1 viram blocos de texto), editada no painel." },
|
|
9193
9582
|
{ test: (p) => /^src\/pages\/admin\//.test(p), area: "painel", suggestion: () => "O painel vem do @rubrica/core na v2. Tela pr\xF3pria: abra uma issue ou um plugin; ajuste de texto: Textos." },
|
|
9194
9583
|
{ test: (p, k) => /^src\/components\/[^/]+\.tsx$/.test(p) && k === "novo", area: "componente pr\xF3prio", suggestion: () => "Vira bloco pr\xF3prio em src/blocks/ (defini\xE7\xE3o com defineBlock + componente React puro, s\xF3 props)." },
|
|
9195
9584
|
{ test: (p) => /^src\/components\/(ui|admin)\//.test(p), area: "componentes base", suggestion: () => "Componentes base da v1 (shadcn, painel) n\xE3o v\xE3o para a v2. Se um bloco pr\xF3prio usa, copie o necess\xE1rio para src/blocks/." },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rubrica",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "CLI do Rubrica v2: cria, configura, publica, atualiza e migra sites feitos com @rubrica/core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tsup": "^8.3.0",
|
|
47
47
|
"typescript": "^5.9.0",
|
|
48
48
|
"vitest": "^3.2.4",
|
|
49
|
-
"@rubrica/core": "^2.
|
|
49
|
+
"@rubrica/core": "^2.3.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsup",
|