From b5378365937d9ac1e45038c53ecdd36746cc8149 Mon Sep 17 00:00:00 2001 From: A-PachecoT Date: Wed, 2 Dec 2026 13:50:40 -0500 Subject: [PATCH 1/3] =?UTF-8?q?feat(brand):=20lockup=20por=20aplicaci?= =?UTF-8?q?=C3=B3n=20de=20Cofoundy=20Identity,=20generado=20desde=20una=20?= =?UTF-8?q?lista?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit André no distinguía las aplicaciones de id.cofoundy.dev: todas usan el mismo lockup «Cofoundy Identity». Pidió que cada una diga también su nombre («Oficina Virtual») y que la marca la diseñe este paquete, fácil de cambiar. Una plantilla (scripts/gen-identity-lockups.ts: isologo + «Cofoundy Identity» + el nombre de la app, que es lo que manda) y una lista (src/assets/brand/identity/apps.json). Los SVG son solo trazos (Space Grotesk 600 vía opentype.js, OFL), así se ven igual en el del login de Casdoor sin la fuente. El deploy los publica en ui.cofoundy.dev/brand/identity/.svg; Casdoor apunta su `logo` ahí, así que cambiar el diseño es regenerar y desplegar, sin tocar Casdoor. verify:lockups en CI bloquea un SVG que no coincide con la lista o un nombre que no cabe (> 6:1, ilegible a los 250 px del login). Claude-Session: https://claude.ai/code/session_01BdVVyXbYvpgjYJhA4mQUrG --- .storybook/main.ts | 2 + CLAUDE.md | 4 + package.json | 6 +- scripts/fonts/OFL-space-grotesk.txt | 93 ++++++++++++ .../fonts/space-grotesk-latin-600-normal.woff | Bin 0 -> 16884 bytes scripts/gen-identity-lockups.ts | 140 ++++++++++++++++++ src/__tests__/identity-lockups.test.ts | 25 ++++ src/assets/brand/identity/apps.json | 14 ++ src/assets/brand/identity/basalt-ia.svg | 17 +++ src/assets/brand/identity/basalt.svg | 17 +++ src/assets/brand/identity/forms-ia.svg | 17 +++ src/assets/brand/identity/forms.svg | 17 +++ src/assets/brand/identity/gateway-ia.svg | 17 +++ src/assets/brand/identity/gateway.svg | 17 +++ src/assets/brand/identity/identity.svg | 16 ++ src/assets/brand/identity/motor-comercial.svg | 17 +++ src/assets/brand/identity/oficina.svg | 17 +++ src/types/opentype.d.ts | 16 ++ 18 files changed, 450 insertions(+), 2 deletions(-) create mode 100644 scripts/fonts/OFL-space-grotesk.txt create mode 100644 scripts/fonts/space-grotesk-latin-600-normal.woff create mode 100644 scripts/gen-identity-lockups.ts create mode 100644 src/__tests__/identity-lockups.test.ts create mode 100644 src/assets/brand/identity/apps.json create mode 100644 src/assets/brand/identity/basalt-ia.svg create mode 100644 src/assets/brand/identity/basalt.svg create mode 100644 src/assets/brand/identity/forms-ia.svg create mode 100644 src/assets/brand/identity/forms.svg create mode 100644 src/assets/brand/identity/gateway-ia.svg create mode 100644 src/assets/brand/identity/gateway.svg create mode 100644 src/assets/brand/identity/identity.svg create mode 100644 src/assets/brand/identity/motor-comercial.svg create mode 100644 src/assets/brand/identity/oficina.svg create mode 100644 src/types/opentype.d.ts diff --git a/.storybook/main.ts b/.storybook/main.ts index b28e10f..dbe4909 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -7,6 +7,8 @@ const config: StorybookConfig = { '@storybook/addon-essentials', '@storybook/addon-interactions', ], + // Lockups de Cofoundy Identity → https://ui.cofoundy.dev/brand/identity/.svg (Casdoor los usa como logo). + staticDirs: [{ from: '../src/assets/brand/identity', to: '/brand/identity' }], framework: { name: '@storybook/react-vite', options: {}, diff --git a/CLAUDE.md b/CLAUDE.md index a82667e..4cf44cc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,6 +17,10 @@ npm test # Run tests npm run test:watch # Watch mode npm run test:coverage # Coverage report +# Lockup de cada app de Cofoundy Identity (id.cofoundy.dev): una línea en +# src/assets/brand/identity/apps.json → SVG en ui.cofoundy.dev/brand/identity/.svg +npm run gen:lockups # verify:lockups en CI + # Build IIFE (standalone widget) npm run build:iife diff --git a/package.json b/package.json index 1e529e3..7450766 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "test:watch": "vitest", "test:coverage": "vitest run --coverage", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build", + "build-storybook": "npm run verify:lockups && storybook build", "build:iife": "vite build --config vite.config.iife.ts", "build:iife:watch": "vite build --config vite.config.iife.ts --watch", "build:ds": "vite build -c vite.config.ds.ts && vite build -c vite.config.ds.ts --mode react && vite build -c vite.config.ds.ts --mode react-dom", @@ -109,6 +109,8 @@ "gen:agents": "tsx scripts/gen-atelier-agents-md.ts", "verify:agents": "tsx scripts/gen-atelier-agents-md.ts --check", "gen:springs": "tsx scripts/gen-spring-tokens.ts", - "verify:springs": "tsx scripts/gen-spring-tokens.ts --check" + "verify:springs": "tsx scripts/gen-spring-tokens.ts --check", + "gen:lockups": "tsx scripts/gen-identity-lockups.ts", + "verify:lockups": "tsx scripts/gen-identity-lockups.ts --check" } } diff --git a/scripts/fonts/OFL-space-grotesk.txt b/scripts/fonts/OFL-space-grotesk.txt new file mode 100644 index 0000000..d5666d7 --- /dev/null +++ b/scripts/fonts/OFL-space-grotesk.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Space Grotesk Project Authors (https://github.com/floriankarsten/space-grotesk) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/scripts/fonts/space-grotesk-latin-600-normal.woff b/scripts/fonts/space-grotesk-latin-600-normal.woff new file mode 100644 index 0000000000000000000000000000000000000000..b9da83fdf5ed793be1b49739158f6833493bc947 GIT binary patch literal 16884 zcmYhi1CVCF6E^yeZQHhO?%1|%+qP}nv%?+Rws))@d+z-H-*<1_)alCUr#hYFBq!BL zy4~f)#Q{KopCt4EK=?2BWBlR&hy2I=|C5BMm^c6cr166d{^XP-zBs263i8ST05C29 z0P_w2kP>2SJP}GLs|o`E@R&ciB>(_A6YCz$EU(PK3;-a8{FIgbAp=wrv{PjjA(bC& z>4(SuAzTj!ix^{DLx&&i_D6s2PkF7FE9ZT4L+2k1IpIeJ^8XT|xs9jU50(J{kZb+4 zU5^wIU*5vh&;$VBeE5-J|BtX2A1Ew-KmdS?_J=3@AyP;^U`7jD7mpuI=10HOPx}H` z7Z_7)?2Uiqcz*N&)BKR|TI<-Ft)a(Hy?jGI<$n4HAOvCp^xGNQn*LyWKkfVZM!?MU z;PQeF_RcN<0RIsH0D=erfSGNSTQGQR(8ZC-fE%ES&3-z#}>^(na2CtbsXkF;H!p>iEfZ9 zNV7w$%MFjWB=c*_uGYG26DpjfM30qk)!k_;+KYn7y1~@CLGZZ=h&)9g8OLl+irZk5 zoj~Dcz{<&jpXjWuk_T(!`@T&@-}4YWr6UQ5f80rgO{j<~v|9O4gLJqNLFABs-(4JO z@21%g106^*xB)yiOcq5jafJ{C_tp7uHrs6f&y(jA`M)`-4Y9Gi3{(I8Q)9>;C>gJ? zq{4f$I-RsdPgYjR5CwT6RJ6l-b-A9);qss!nF@zk&)K5_Lq~^|0=-itf=@~Xa_rn5 z+RAu!vMxojoKo%!H`vFyu6o+$Pnm#|(|$H#Z#svLESrLTt3-DT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h-+4Q&&i?|(v`FX=!?eoS7ss?rnTMt+sxXS8DJ)TvqA8Ab8^NS#=Y__i zkii?%=-6{a7>pU)@z(vGEr6lOw5*cu?_^!3 za`1bd^dOYIoF~uHXIbS-`@I}@{luST8+K-zWt+w&A4f6n^1{%ztPxAowoXA$*0yX= zm+Q1mYgyMc>!t7*;W}@bXUB$Yufa6`= zP1<*T{?o6Jz%NGuMHqnx0|5H;u6u2>TWxWi+hAOC$=xnDns53FNk-*zxSg*DN@-T@ zwmO|}`im)M^}4<8uLsK+cKtrUs|~JZ|0pydp(CN8q$i{#r6r~&t1GA|sVS-|ug)zk ztjsSjaxk(ovoo==v^TV<0;2UR;t@~^WSK4G5W$OX3u}W)@x4wf6-<$H2lkHczc@Ksn*QEfLLF2|R&&(UR)Tmzd2Tsad2zZlg@ zx0aV_paHkS-^U zI17zQjJOA2Z=+G)5CO2!gO&UaZ=T&*TmZ7}o)EX@RWd;n^>Tc5U_.svg. + * El deploy los publica en https://ui.cofoundy.dev/brand/identity/.svg y Casdoor los usa como `logo`. + * + * npm run gen:lockups # regenera + * npm run verify:lockups # CI: falla si un SVG no coincide con la lista o un nombre no cabe + * + * Cambiar el diseño = editar LAYOUT/INK aquí y regenerar: todas las apps cambian a la vez, sin tocar Casdoor. + */ +import { readFileSync, readdirSync, writeFileSync, unlinkSync } from "node:fs"; +import { resolve } from "node:path"; +import opentype, { type Font } from "opentype.js"; + +const ROOT = resolve(import.meta.dirname, ".."); +const OUT = resolve(ROOT, "src/assets/brand/identity"); +const LIST = resolve(OUT, "apps.json"); +const ISOLOGO = resolve(ROOT, "src/assets/brand/Isologo.svg"); +const TOKENS = resolve(ROOT, "src/styles/index.css"); + +/** Medidas en unidades del viewBox (alto total 240, como el lockup PNG anterior). */ +export const LAYOUT = { + height: 240, + isologo: 240, // lado del isologo (es cuadrado) + gap: 40, // isologo → texto + line1: { size: 64, baseline: 74 }, // «Cofoundy Identity», la marca común + line2: { size: 96, baseline: 198 }, // nombre de la app: lo que distingue una tarjeta de otra + oneLine: { size: 88, baseline: 152 }, // sin nombre: «Cofoundy Identity» solo, centrado en el isologo + tracking: -0.02, // em, igual que el Wordmark (logo-header.tsx) + padRight: 8, + maxRatio: 6, // ancho/alto: más ancho se vuelve ilegible a 250 px (login) y se corta en la tarjeta de /apps +}; + +/** Tintas: el azul de «Identity» es el token --cf-primary; las otras salen de las caras del isologo. */ +function ink() { + const iso = readFileSync(ISOLOGO, "utf8"); + const css = readFileSync(TOKENS, "utf8"); + const primary = css.match(/--cf-primary:\s*(#[0-9A-Fa-f]{6})/)?.[1]; + const need = (hex: string) => { + if (!iso.includes(`fill="${hex}"`)) throw new Error(`${hex} ya no es una cara de Isologo.svg: actualiza INK`); + return hex; + }; + if (!primary) throw new Error("no encontré --cf-primary en src/styles/index.css"); + return { cofoundy: need("#103D5C"), identity: primary, app: need("#103D5C") }; +} + +const font600 = opentype.parse(toArrayBuffer(readFileSync(resolve(ROOT, "scripts/fonts/space-grotesk-latin-600-normal.woff")))); + +function toArrayBuffer(b: Buffer): ArrayBuffer { + return b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength) as ArrayBuffer; +} + +function text(font: Font, s: string, x: number, y: number, size: number, fill: string) { + const opts = { letterSpacing: LAYOUT.tracking }; + const d = font.getPath(s, x, y, size, opts).toPathData(2); + const width = font.getAdvanceWidth(s, size, opts); + return { svg: ``, width }; +} + +function isologoInner(): string { + const iso = readFileSync(ISOLOGO, "utf8"); + const inner = iso.replace(/^[\s\S]*?]*>/, "").replace(/<\/svg>\s*$/, "").trim(); + const scale = LAYOUT.isologo / 701; + return `${inner}`; +} + +export function renderLockup(name: string): string { + const c = ink(); + const x = LAYOUT.isologo + LAYOUT.gap; + const l1 = name ? LAYOUT.line1 : LAYOUT.oneLine; + const a = text(font600, "Cofoundy", x, l1.baseline, l1.size, c.cofoundy); + const space = font600.getAdvanceWidth(" ", l1.size); + const b = text(font600, "Identity", x + a.width + space, l1.baseline, l1.size, c.identity); + const parts = [a.svg, b.svg]; + let textWidth = a.width + space + b.width; + if (name) { + const n = text(font600, name, x, LAYOUT.line2.baseline, LAYOUT.line2.size, c.app); + parts.push(n.svg); + textWidth = Math.max(textWidth, n.width); + } + const width = Math.ceil(x + textWidth + LAYOUT.padRight); + const label = name ? `Cofoundy Identity · ${name}` : "Cofoundy Identity"; + return [ + ``, + ``, + `${label}`, + isologoInner(), + ...parts, + ``, + "", + ].join("\n"); +} + +export function readApps(): Record { + const apps = JSON.parse(readFileSync(LIST, "utf8")).apps as Record; + for (const slug of Object.keys(apps)) { + if (!/^[a-z0-9-]+$/.test(slug)) throw new Error(`slug inválido: «${slug}» (solo a-z, 0-9 y guiones: va en la URL)`); + } + return apps; +} + +function main() { + const check = process.argv.includes("--check"); + const apps = readApps(); + const problems: string[] = []; + const expected = new Set(); + for (const [slug, name] of Object.entries(apps)) { + const svg = renderLockup(name); + const w = Number(svg.match(/viewBox="0 0 (\d+) /)?.[1]); + if (w / LAYOUT.height > LAYOUT.maxRatio) { + problems.push(`«${name}» no cabe (${(w / LAYOUT.height).toFixed(1)}:1 > ${LAYOUT.maxRatio}:1): acórtalo`); + continue; + } + const file = resolve(OUT, `${slug}.svg`); + expected.add(`${slug}.svg`); + if (check) { + let current = ""; + try { + current = readFileSync(file, "utf8"); + } catch { + /* falta */ + } + if (current !== svg) problems.push(`${slug}.svg no coincide con apps.json: corre npm run gen:lockups`); + } else { + writeFileSync(file, svg); + } + } + for (const f of readdirSync(OUT).filter((f) => f.endsWith(".svg") && !expected.has(f))) { + if (check) problems.push(`${f} sobra (no está en apps.json)`); + else unlinkSync(resolve(OUT, f)); + } + if (problems.length) { + console.error(problems.join("\n")); + process.exit(1); + } + console.log(`${check ? "ok" : "escritos"}: ${expected.size} lockups en src/assets/brand/identity/`); +} + +if (import.meta.url === `file://${process.argv[1]}`) main(); diff --git a/src/__tests__/identity-lockups.test.ts b/src/__tests__/identity-lockups.test.ts new file mode 100644 index 0000000..1e79aa0 --- /dev/null +++ b/src/__tests__/identity-lockups.test.ts @@ -0,0 +1,25 @@ +import { describe, expect, it } from "vitest"; +import { LAYOUT, readApps, renderLockup } from "../../scripts/gen-identity-lockups"; + +const ratio = (svg: string) => Number(svg.match(/viewBox="0 0 (\d+) /)?.[1]) / LAYOUT.height; + +describe("lockups de Cofoundy Identity", () => { + it("cada app de la lista cabe y lleva su nombre como texto accesible", () => { + for (const [, name] of Object.entries(readApps())) { + const svg = renderLockup(name); + expect(ratio(svg)).toBeLessThanOrEqual(LAYOUT.maxRatio); + expect(svg).toContain(name ? `Cofoundy Identity · ${name}` : "Cofoundy Identity"); + expect(svg).not.toMatch(/ { + expect(ratio(renderLockup("x".repeat(80)))).toBeGreaterThan(LAYOUT.maxRatio); + }); + + it("sin nombre: solo «Cofoundy Identity», sin segunda línea", () => { + const svg = renderLockup(""); + expect(svg).toContain('aria-label="Cofoundy Identity"'); + expect(svg.split("\n").filter((l) => l.startsWith(".svg", + "apps": { + "identity": "", + "oficina": "Oficina Virtual", + "basalt": "Basalt", + "basalt-ia": "Basalt · Conector IA", + "forms": "Forms", + "forms-ia": "Forms · Conector IA", + "gateway": "Meeting Hub", + "gateway-ia": "Bóveda · Conector IA", + "motor-comercial": "Motor Comercial" + } +} diff --git a/src/assets/brand/identity/basalt-ia.svg b/src/assets/brand/identity/basalt-ia.svg new file mode 100644 index 0000000..3d9a15f --- /dev/null +++ b/src/assets/brand/identity/basalt-ia.svg @@ -0,0 +1,17 @@ + + +Cofoundy Identity · Basalt · Conector IA + + + + + + + + + + + + + + diff --git a/src/assets/brand/identity/basalt.svg b/src/assets/brand/identity/basalt.svg new file mode 100644 index 0000000..2e519a0 --- /dev/null +++ b/src/assets/brand/identity/basalt.svg @@ -0,0 +1,17 @@ + + +Cofoundy Identity · Basalt + + + + + + + + + + + + + + diff --git a/src/assets/brand/identity/forms-ia.svg b/src/assets/brand/identity/forms-ia.svg new file mode 100644 index 0000000..906d745 --- /dev/null +++ b/src/assets/brand/identity/forms-ia.svg @@ -0,0 +1,17 @@ + + +Cofoundy Identity · Forms · Conector IA + + + + + + + + + + + + + + diff --git a/src/assets/brand/identity/forms.svg b/src/assets/brand/identity/forms.svg new file mode 100644 index 0000000..becb972 --- /dev/null +++ b/src/assets/brand/identity/forms.svg @@ -0,0 +1,17 @@ + + +Cofoundy Identity · Forms + + + + + + + + + + + + + + diff --git a/src/assets/brand/identity/gateway-ia.svg b/src/assets/brand/identity/gateway-ia.svg new file mode 100644 index 0000000..9edaa73 --- /dev/null +++ b/src/assets/brand/identity/gateway-ia.svg @@ -0,0 +1,17 @@ + + +Cofoundy Identity · Bóveda · Conector IA + + + + + + + + + + + + + + diff --git a/src/assets/brand/identity/gateway.svg b/src/assets/brand/identity/gateway.svg new file mode 100644 index 0000000..6e8a090 --- /dev/null +++ b/src/assets/brand/identity/gateway.svg @@ -0,0 +1,17 @@ + + +Cofoundy Identity · Meeting Hub + + + + + + + + + + + + + + diff --git a/src/assets/brand/identity/identity.svg b/src/assets/brand/identity/identity.svg new file mode 100644 index 0000000..240fdb5 --- /dev/null +++ b/src/assets/brand/identity/identity.svg @@ -0,0 +1,16 @@ + + +Cofoundy Identity + + + + + + + + + + + + + diff --git a/src/assets/brand/identity/motor-comercial.svg b/src/assets/brand/identity/motor-comercial.svg new file mode 100644 index 0000000..9884b51 --- /dev/null +++ b/src/assets/brand/identity/motor-comercial.svg @@ -0,0 +1,17 @@ + + +Cofoundy Identity · Motor Comercial + + + + + + + + + + + + + + diff --git a/src/assets/brand/identity/oficina.svg b/src/assets/brand/identity/oficina.svg new file mode 100644 index 0000000..0d381e7 --- /dev/null +++ b/src/assets/brand/identity/oficina.svg @@ -0,0 +1,17 @@ + + +Cofoundy Identity · Oficina Virtual + + + + + + + + + + + + + + diff --git a/src/types/opentype.d.ts b/src/types/opentype.d.ts new file mode 100644 index 0000000..8bddfc2 --- /dev/null +++ b/src/types/opentype.d.ts @@ -0,0 +1,16 @@ +// Tipos mínimos de opentype.js (sin @types en el repo) para scripts/gen-identity-lockups.ts. +declare module "opentype.js" { + interface RenderOptions { + kerning?: boolean; + letterSpacing?: number; + } + export interface Path { + toPathData(decimalPlaces?: number): string; + } + export interface Font { + getPath(text: string, x: number, y: number, fontSize: number, options?: RenderOptions): Path; + getAdvanceWidth(text: string, fontSize: number, options?: RenderOptions): number; + } + const opentype: { parse(buffer: ArrayBuffer): Font }; + export default opentype; +} From e50654cc22e6c609b088c26c3309c8d870c70ead Mon Sep 17 00:00:00 2001 From: A-PachecoT Date: Wed, 2 Dec 2026 13:57:30 -0500 Subject: [PATCH 2/3] chore(scripts): retira text-to-svg.cjs, reemplazado por gen-identity-lockups.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convertía texto a trazos con Recoleta desde una ruta del Mac de André y nadie lo llamaba. El generador de lockups hace lo mismo con la fuente versionada. Claude-Session: https://claude.ai/code/session_01BdVVyXbYvpgjYJhA4mQUrG --- scripts/text-to-svg.cjs | 80 ----------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 scripts/text-to-svg.cjs diff --git a/scripts/text-to-svg.cjs b/scripts/text-to-svg.cjs deleted file mode 100644 index 70c1f23..0000000 --- a/scripts/text-to-svg.cjs +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Convert text to SVG paths using a font file - * - * Usage: - * 1. Download font file (e.g., Recoleta-Bold.otf) - * 2. Place it in this directory - * 3. Run: node text-to-svg.js - * - * Dependencies: npm install opentype.js - */ - -const opentype = require('opentype.js'); -const fs = require('fs'); -const path = require('path'); - -// Configuration -const CONFIG = { - text: 'Cofoundy', - fontFile: '/Users/styreep/cofoundy/cotizations/resources/fonts/recoleta/Recoleta Regular.otf', - fontSize: 72, - outputFile: 'cofoundy-wordmark.svg', -}; - -async function textToSvg() { - const fontPath = CONFIG.fontFile.startsWith('/') ? CONFIG.fontFile : path.join(__dirname, CONFIG.fontFile); - - // Check if font file exists - if (!fs.existsSync(fontPath)) { - console.error(`\n❌ Font file not found: ${CONFIG.fontFile}`); - console.log('\nTo use this script:'); - console.log('1. Download Recoleta font from https://www.type.network/fonts/recoleta'); - console.log(' (They offer a free trial)'); - console.log(`2. Place the .otf or .ttf file in: ${__dirname}`); - console.log(`3. Update CONFIG.fontFile if the filename is different`); - console.log('4. Run this script again\n'); - process.exit(1); - } - - try { - // Load the font - const font = await opentype.load(fontPath); - - // Create path from text - const textPath = font.getPath(CONFIG.text, 0, CONFIG.fontSize, CONFIG.fontSize); - - // Get bounding box - const bbox = textPath.getBoundingBox(); - const width = Math.ceil(bbox.x2 - bbox.x1); - const height = Math.ceil(bbox.y2 - bbox.y1); - - // Generate SVG - const svg = ` - -`; - - // Also generate a version with the brand color - const svgBrand = ` - -`; - - // Save files - const outputPath = path.join(__dirname, CONFIG.outputFile); - const outputPathBrand = path.join(__dirname, CONFIG.outputFile.replace('.svg', '-brand.svg')); - - fs.writeFileSync(outputPath, svg); - fs.writeFileSync(outputPathBrand, svgBrand); - - console.log('\n✅ SVG wordmarks generated!'); - console.log(` ${outputPath} (currentColor)`); - console.log(` ${outputPathBrand} (brand blue)`); - console.log(`\n Size: ${width}x${height}px`); - console.log(` Font: ${font.names.fullName.en}`); - - } catch (error) { - console.error('Error:', error.message); - process.exit(1); - } -} - -textToSvg(); From 151915c85a0ef3e13b741138e2791b9e4c224e7e Mon Sep 17 00:00:00 2001 From: A-PachecoT Date: Wed, 2 Dec 2026 14:14:13 -0500 Subject: [PATCH 3/3] =?UTF-8?q?fix(lockups):=20legibles=20en=20modo=20oscu?= =?UTF-8?q?ro,=20nombre=20escapado=20y=20=C2=ABGateway=C2=BB=20(no=20Meeti?= =?UTF-8?q?ng=20Hub)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El login de Casdoor pone fondo #0a1626 con prefers-color-scheme: dark; la tinta navy del nombre casi no se veía (crítica ronda 2). Ahora un `; + +function esc(s: string): string { + return s.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); } function isologoInner(): string { @@ -69,22 +77,23 @@ export function renderLockup(name: string): string { const c = ink(); const x = LAYOUT.isologo + LAYOUT.gap; const l1 = name ? LAYOUT.line1 : LAYOUT.oneLine; - const a = text(font600, "Cofoundy", x, l1.baseline, l1.size, c.cofoundy); + const a = text(font600, "Cofoundy", x, l1.baseline, l1.size, c.cofoundy, "ink"); const space = font600.getAdvanceWidth(" ", l1.size); const b = text(font600, "Identity", x + a.width + space, l1.baseline, l1.size, c.identity); const parts = [a.svg, b.svg]; let textWidth = a.width + space + b.width; if (name) { - const n = text(font600, name, x, LAYOUT.line2.baseline, LAYOUT.line2.size, c.app); + const n = text(font600, name, x, LAYOUT.line2.baseline, LAYOUT.line2.size, c.app, "ink"); parts.push(n.svg); textWidth = Math.max(textWidth, n.width); } const width = Math.ceil(x + textWidth + LAYOUT.padRight); - const label = name ? `Cofoundy Identity · ${name}` : "Cofoundy Identity"; + const label = esc(name ? `Cofoundy Identity · ${name}` : "Cofoundy Identity"); return [ ``, ``, `${label}`, + DARK, isologoInner(), ...parts, ``, diff --git a/src/__tests__/identity-lockups.test.ts b/src/__tests__/identity-lockups.test.ts index 1e79aa0..bad6678 100644 --- a/src/__tests__/identity-lockups.test.ts +++ b/src/__tests__/identity-lockups.test.ts @@ -20,6 +20,13 @@ describe("lockups de Cofoundy Identity", () => { it("sin nombre: solo «Cofoundy Identity», sin segunda línea", () => { const svg = renderLockup(""); expect(svg).toContain('aria-label="Cofoundy Identity"'); - expect(svg.split("\n").filter((l) => l.startsWith(" /^ { + const svg = renderLockup("A & B"); + expect(svg).toContain("prefers-color-scheme: dark"); + expect(svg.match(/class="ink"/g)?.length).toBe(2); // «Cofoundy» + el nombre + expect(svg).toContain('aria-label="Cofoundy Identity · A & B"'); }); }); diff --git a/src/assets/brand/identity/apps.json b/src/assets/brand/identity/apps.json index ddba49d..435ac5a 100644 --- a/src/assets/brand/identity/apps.json +++ b/src/assets/brand/identity/apps.json @@ -7,7 +7,7 @@ "basalt-ia": "Basalt · Conector IA", "forms": "Forms", "forms-ia": "Forms · Conector IA", - "gateway": "Meeting Hub", + "gateway": "Gateway", "gateway-ia": "Bóveda · Conector IA", "motor-comercial": "Motor Comercial" } diff --git a/src/assets/brand/identity/basalt-ia.svg b/src/assets/brand/identity/basalt-ia.svg index 3d9a15f..aed96f2 100644 --- a/src/assets/brand/identity/basalt-ia.svg +++ b/src/assets/brand/identity/basalt-ia.svg @@ -1,6 +1,7 @@ Cofoundy Identity · Basalt · Conector IA + @@ -11,7 +12,7 @@ - + - + diff --git a/src/assets/brand/identity/basalt.svg b/src/assets/brand/identity/basalt.svg index 2e519a0..d06066d 100644 --- a/src/assets/brand/identity/basalt.svg +++ b/src/assets/brand/identity/basalt.svg @@ -1,6 +1,7 @@ Cofoundy Identity · Basalt + @@ -11,7 +12,7 @@ - + - + diff --git a/src/assets/brand/identity/forms-ia.svg b/src/assets/brand/identity/forms-ia.svg index 906d745..1302cc1 100644 --- a/src/assets/brand/identity/forms-ia.svg +++ b/src/assets/brand/identity/forms-ia.svg @@ -1,6 +1,7 @@ Cofoundy Identity · Forms · Conector IA + @@ -11,7 +12,7 @@ - + - + diff --git a/src/assets/brand/identity/forms.svg b/src/assets/brand/identity/forms.svg index becb972..e86e59b 100644 --- a/src/assets/brand/identity/forms.svg +++ b/src/assets/brand/identity/forms.svg @@ -1,6 +1,7 @@ Cofoundy Identity · Forms + @@ -11,7 +12,7 @@ - + - + diff --git a/src/assets/brand/identity/gateway-ia.svg b/src/assets/brand/identity/gateway-ia.svg index 9edaa73..c7d47db 100644 --- a/src/assets/brand/identity/gateway-ia.svg +++ b/src/assets/brand/identity/gateway-ia.svg @@ -1,6 +1,7 @@ Cofoundy Identity · Bóveda · Conector IA + @@ -11,7 +12,7 @@ - + - + diff --git a/src/assets/brand/identity/gateway.svg b/src/assets/brand/identity/gateway.svg index 6e8a090..b5f105f 100644 --- a/src/assets/brand/identity/gateway.svg +++ b/src/assets/brand/identity/gateway.svg @@ -1,6 +1,7 @@ - -Cofoundy Identity · Meeting Hub + +Cofoundy Identity · Gateway + @@ -11,7 +12,7 @@ - + - + diff --git a/src/assets/brand/identity/identity.svg b/src/assets/brand/identity/identity.svg index 240fdb5..9c225e7 100644 --- a/src/assets/brand/identity/identity.svg +++ b/src/assets/brand/identity/identity.svg @@ -1,6 +1,7 @@ Cofoundy Identity + @@ -11,6 +12,6 @@ - + diff --git a/src/assets/brand/identity/motor-comercial.svg b/src/assets/brand/identity/motor-comercial.svg index 9884b51..ff0a3f4 100644 --- a/src/assets/brand/identity/motor-comercial.svg +++ b/src/assets/brand/identity/motor-comercial.svg @@ -1,6 +1,7 @@ Cofoundy Identity · Motor Comercial + @@ -11,7 +12,7 @@ - + - + diff --git a/src/assets/brand/identity/oficina.svg b/src/assets/brand/identity/oficina.svg index 0d381e7..a56443c 100644 --- a/src/assets/brand/identity/oficina.svg +++ b/src/assets/brand/identity/oficina.svg @@ -1,6 +1,7 @@ Cofoundy Identity · Oficina Virtual + @@ -11,7 +12,7 @@ - + - +