138 lines
4.4 KiB
JSON
138 lines
4.4 KiB
JSON
{
|
|
"name": "@suaveplan/i18n-detector",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Universal locale-detection chain for the @suaveplan/i18n family. Ships the chain orchestrator, the BCP-47 default negotiator, the getTextDirection / isRtl helpers, and 9 detector implementations (querystring, user-preference, cookie, localStorage, html-lang, Accept-Language, navigator, Cloudflare IP-geo, fallback). Browser-only and server-only detectors gate on runtime probes so the same package runs in either tier without conditional package.json exports.",
|
|
"license": "MIT",
|
|
"author": "Suaveplan Team",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"./chain": {
|
|
"import": {
|
|
"types": "./dist/chain/index.d.ts",
|
|
"default": "./dist/chain/index.js"
|
|
}
|
|
},
|
|
"./direction": {
|
|
"import": {
|
|
"types": "./dist/direction/index.d.ts",
|
|
"default": "./dist/direction/index.js"
|
|
}
|
|
},
|
|
"./detectors/querystring": {
|
|
"import": {
|
|
"types": "./dist/detectors/querystring/index.d.ts",
|
|
"default": "./dist/detectors/querystring/index.js"
|
|
}
|
|
},
|
|
"./detectors/user-preference": {
|
|
"import": {
|
|
"types": "./dist/detectors/user-preference/index.d.ts",
|
|
"default": "./dist/detectors/user-preference/index.js"
|
|
}
|
|
},
|
|
"./detectors/cookie": {
|
|
"import": {
|
|
"types": "./dist/detectors/cookie/index.d.ts",
|
|
"default": "./dist/detectors/cookie/index.js"
|
|
}
|
|
},
|
|
"./detectors/local-storage": {
|
|
"import": {
|
|
"types": "./dist/detectors/local-storage/index.d.ts",
|
|
"default": "./dist/detectors/local-storage/index.js"
|
|
}
|
|
},
|
|
"./detectors/html-lang": {
|
|
"import": {
|
|
"types": "./dist/detectors/html-lang/index.d.ts",
|
|
"default": "./dist/detectors/html-lang/index.js"
|
|
}
|
|
},
|
|
"./detectors/accept-language": {
|
|
"import": {
|
|
"types": "./dist/detectors/accept-language/index.d.ts",
|
|
"default": "./dist/detectors/accept-language/index.js"
|
|
}
|
|
},
|
|
"./detectors/navigator": {
|
|
"import": {
|
|
"types": "./dist/detectors/navigator/index.d.ts",
|
|
"default": "./dist/detectors/navigator/index.js"
|
|
}
|
|
},
|
|
"./detectors/cloudflare-ip-geo": {
|
|
"import": {
|
|
"types": "./dist/detectors/cloudflare-ip-geo/index.d.ts",
|
|
"default": "./dist/detectors/cloudflare-ip-geo/index.js"
|
|
}
|
|
},
|
|
"./detectors/fallback": {
|
|
"import": {
|
|
"types": "./dist/detectors/fallback/index.d.ts",
|
|
"default": "./dist/detectors/fallback/index.js"
|
|
}
|
|
},
|
|
"./default-chain": {
|
|
"import": {
|
|
"types": "./dist/default-chain/index.d.ts",
|
|
"default": "./dist/default-chain/index.js"
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"test": "vitest run --passWithNoTests",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
"lint": "bunx biome check src/",
|
|
"lint:fix": "bunx biome lint --fix --unsafe --max-diagnostics 500 src/",
|
|
"format": "bunx biome format --write --max-diagnostics 500 src/",
|
|
"check": "bunx biome check --write --unsafe --max-diagnostics 500 src/",
|
|
"typecheck": "bunx tsc --noEmit --composite false -p tsconfig.lib.json",
|
|
"docs:check": "bun run ../../../../scripts/docs-check.ts ."
|
|
},
|
|
"dependencies": {
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/i18n-shared": "workspace:^",
|
|
"@suaveplan/locale-data": "workspace:^",
|
|
"@suaveplan/types": "workspace:^",
|
|
"@opentelemetry/api": "catalog:observability",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@suaveplan/testing": "workspace:^",
|
|
"@suaveplan/typescript-config": "workspace:^",
|
|
"@types/node": "catalog:",
|
|
"@vitest/coverage-istanbul": "catalog:testing",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:build",
|
|
"vite-plugin-dts": "catalog:build",
|
|
"vitest": "catalog:testing"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://npmjs.fq.io/",
|
|
"access": "public"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"src",
|
|
"README.md"
|
|
]
|
|
}
|