@dnaproje/identity 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  DNA Proje ve Yazılım A.Ş. kurumsal kimliği tek pakette: Palet v3 renkleri, yazı tipleri, logolar, kurumsal bilgiler, standart metinler ve e-posta imzası. Kaynak `identity/tokens.json`; `dist/` altındaki her dosya `npm run build` ile üretilir, elle düzenlenmez.
4
4
 
5
- > Durum: 0.1.0, henüz npm'e yayınlanmadı (`dnaproje` npm organizasyonu bekleniyor). O zamana kadar repo içinden göreli yol ya da `npm install ../dna-identity/packages/identity` ile kullanılır.
5
+ Genel npm'de yayınlı: `npm install @dnaproje/identity`. Sürümler ve değişiklikler repo kökündeki `CHANGELOG.md`'de.
6
6
 
7
7
  ## Kullanım
8
8
 
@@ -35,9 +35,9 @@ CSS ve Tailwind 4:
35
35
  | `dist/tokens.{js,cjs,d.ts,json}` | Tüm token'lar; `color` düz ad → hex haritası |
36
36
  | `dist/tokens.css`, `dist/tailwind.css`, `dist/fonts.css` | CSS değişkenleri, Tailwind 4 `@theme`, `@font-face` |
37
37
  | `dist/logos.{js,cjs,d.ts}`, `dist/svg/` | Pervane, beyaz pervane, wordmark SVG'leri |
38
- | `dist/png/` | Office ve HTML için logo PNG seti (dna-doc ölçüleri: 1000×910 pervane, 1400×693 wordmark, 120×5940 sol şerit, 1000×4 çizgi) |
38
+ | `dist/png/` | Office ve HTML için logo PNG seti (dna-doc ölçüleri: 1000×910 pervane, 1400×693 wordmark, 120×5940 sol şerit, 1000×4 çizgi) ve e-posta imzası pervanesi `dna-mark-email.png` (144×144 kare, şeffaf) |
39
39
  | `dist/fonts/` | Üç yazı tipinin Regular ve Bold TTF'leri (SIL OFL) |
40
- | `src/email-signature.js` | E-posta imzası: HTML (varyant A/B), düz metin, kısa yanıt, mobil, koyu mod önizlemesi |
40
+ | `src/email-signature.{js,d.ts}` | E-posta imzası: HTML (varyant A/B), düz metin, kısa yanıt, mobil, koyu mod önizlemesi |
41
41
 
42
42
  ## E-posta imzası
43
43
 
@@ -45,4 +45,6 @@ CSS ve Tailwind 4:
45
45
  const html = emailSignatureHtml({ name: 'Ayşe Yılmaz', titleTr: 'ERP Danışmanı', titleEn: 'ERP Consultant', gsm: '0532 455 33 62', phone: '+90 216 455 33 62', variant: 'A' })
46
46
  ```
47
47
 
48
+ İmzadaki logo `LOGO_URL` (`https://dna.com.tr/assets/dna-mark-flat.png`) adresinden gelir ve 48×48 kutuda gösterilir. Sitede o adreste duracak dosya `@dnaproje/identity/png/dna-mark-email.png`'dir; olduğu gibi kopyalayın.
49
+
48
50
  Kurallar `identity/spec/50-email-signature.md`'dedir: tablo tabanlı, yalnız satır içi stil, web font yok, şirket adı ve e-posta adresi yazılmaz. Testler: `npm test` (repo kökünden).
Binary file
package/package.json CHANGED
@@ -1,17 +1,32 @@
1
1
  {
2
2
  "name": "@dnaproje/identity",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "DNA Proje ve Yazılım A.Ş. kurumsal kimliği: renkler, yazı tipleri, logolar, kurumsal bilgiler, standart metinler ve e-posta imzası.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
7
- "repository": { "type": "git", "url": "git+https://github.com/DNAProje/dna-identity.git", "directory": "packages/identity" },
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/DNAProje/dna-identity.git",
10
+ "directory": "packages/identity"
11
+ },
8
12
  "main": "./dist/tokens.cjs",
9
13
  "module": "./dist/tokens.js",
10
14
  "types": "./dist/tokens.d.ts",
11
15
  "exports": {
12
- ".": { "types": "./dist/tokens.d.ts", "import": "./dist/tokens.js", "require": "./dist/tokens.cjs" },
13
- "./logos": { "types": "./dist/logos.d.ts", "import": "./dist/logos.js", "require": "./dist/logos.cjs" },
14
- "./email-signature": "./src/email-signature.js",
16
+ ".": {
17
+ "types": "./dist/tokens.d.ts",
18
+ "import": "./dist/tokens.js",
19
+ "require": "./dist/tokens.cjs"
20
+ },
21
+ "./logos": {
22
+ "types": "./dist/logos.d.ts",
23
+ "import": "./dist/logos.js",
24
+ "require": "./dist/logos.cjs"
25
+ },
26
+ "./email-signature": {
27
+ "types": "./src/email-signature.d.ts",
28
+ "default": "./src/email-signature.js"
29
+ },
15
30
  "./tokens.json": "./dist/tokens.json",
16
31
  "./tokens.css": "./dist/tokens.css",
17
32
  "./fonts.css": "./dist/fonts.css",
@@ -20,7 +35,15 @@
20
35
  "./svg/*": "./dist/svg/*",
21
36
  "./fonts/*": "./dist/fonts/*"
22
37
  },
23
- "files": ["dist", "src", "README.md"],
24
- "sideEffects": ["*.css"],
25
- "publishConfig": { "access": "public" }
38
+ "files": [
39
+ "dist",
40
+ "src",
41
+ "README.md"
42
+ ],
43
+ "sideEffects": [
44
+ "*.css"
45
+ ],
46
+ "publishConfig": {
47
+ "access": "public"
48
+ }
26
49
  }
@@ -0,0 +1,28 @@
1
+ // Types for email-signature.js (hand written next to it; test/email-signature.test.js checks the export list).
2
+
3
+ export interface EmailSignatureData {
4
+ name: string
5
+ titleTr: string
6
+ titleEn: string
7
+ gsm: string
8
+ phone?: string
9
+ variant?: 'A' | 'B'
10
+ }
11
+
12
+ /** Absolute URL of the signature mark (tokens.logo.webMarkUrl). */
13
+ export const LOGO_URL: string
14
+ /** Background colour of the dark mode preview. */
15
+ export const DARK_PREVIEW_BACKGROUND: string
16
+
17
+ /** Normalises a Turkish mobile number to "+90 5XX XXX XX XX"; leaves anything else as typed. */
18
+ export function normalizeGsm(input: string): string
19
+ /** HTML signature to paste into Gmail or Outlook. logoUrl must be absolute in a copied signature. */
20
+ export function emailSignatureHtml(data: EmailSignatureData, options?: { logoUrl?: string }): string
21
+ /** Plain-text twin of the HTML signature. */
22
+ export function emailSignatureText(data: EmailSignatureData): string
23
+ /** Two-line reply signature: name, then "DNA · GSM". */
24
+ export function shortReplySignature(data: Pick<EmailSignatureData, 'name' | 'gsm'>): string
25
+ /** Mobile signature: "Name — DNA", then GSM. */
26
+ export function mobileSignature(data: Pick<EmailSignatureData, 'name' | 'gsm'>): string
27
+ /** Preview only: recolours the signature the way mail clients do in dark mode. */
28
+ export function darkPreview(html: string): string