wrapguard-mcp 0.1.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.
@@ -0,0 +1,80 @@
1
+ export type LocaleSetting = "auto" | "ko" | "en";
2
+ export interface WrapGuardConfig {
3
+ serverName: string;
4
+ defaultLocale: LocaleSetting;
5
+ viewports: number[];
6
+ allowedHosts: string[];
7
+ allowedFileRoots: string[];
8
+ ignoreSelectors: string[];
9
+ ignorePatterns: string[];
10
+ timeoutMs: number;
11
+ browserHeadless: boolean;
12
+ browserChannel: "auto" | "chromium" | "chrome" | "msedge";
13
+ allowRemoteUrls: boolean;
14
+ allowWrites: boolean;
15
+ }
16
+ export interface AuditRequest {
17
+ target: string;
18
+ viewports?: number[] | undefined;
19
+ locale?: LocaleSetting | undefined;
20
+ ignoreSelectors?: string[] | undefined;
21
+ screenshotDir?: string | undefined;
22
+ }
23
+ export type WrapIssueKind = "avoidable_midword_wrap" | "unavoidable_long_token" | "forced_newline_inside_word";
24
+ export interface WrapCssSnapshot {
25
+ wordBreak: string;
26
+ overflowWrap: string;
27
+ lineBreak: string;
28
+ whiteSpace: string;
29
+ hyphens: string;
30
+ textWrap: string;
31
+ }
32
+ export interface WrapIssue {
33
+ kind: WrapIssueKind;
34
+ severity: "error" | "warning";
35
+ token: string;
36
+ locale: "ko" | "en" | "mixed";
37
+ selector: string;
38
+ viewport: number;
39
+ lineCount: number;
40
+ lineTops: number[];
41
+ elementWidth: number;
42
+ estimatedTokenWidth: number;
43
+ context: string;
44
+ css: WrapCssSnapshot;
45
+ suggestion: string;
46
+ }
47
+ export interface ViewportAudit {
48
+ viewport: number;
49
+ issueCount: number;
50
+ errorCount: number;
51
+ warningCount: number;
52
+ screenshot?: string;
53
+ }
54
+ export interface AuditReport {
55
+ version: string;
56
+ target: string;
57
+ resolvedTarget: string;
58
+ serverName: string;
59
+ generatedAt: string;
60
+ locale: LocaleSetting;
61
+ passed: boolean;
62
+ counts: {
63
+ errors: number;
64
+ warnings: number;
65
+ total: number;
66
+ };
67
+ viewports: ViewportAudit[];
68
+ issues: WrapIssue[];
69
+ }
70
+ export interface CssInspection {
71
+ selector: string;
72
+ matched: boolean;
73
+ computed?: WrapCssSnapshot;
74
+ matchingRules: Array<{
75
+ selector: string;
76
+ declarations: Partial<WrapCssSnapshot>;
77
+ source: string;
78
+ }>;
79
+ }
80
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC1D,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,MAAM,aAAa,GACrB,wBAAwB,GACxB,wBAAwB,GACxB,4BAA4B,CAAC;AAEjC,MAAM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Aa,EAAE,CAAC;IAC3B,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,EAAE,KAAK,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;QACvC,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "wrapguard-mcp",
3
+ "version": "0.1.0",
4
+ "description": "MCP server and CLI that detect unnatural Korean and English mid-word wrapping in responsive web pages.",
5
+ "mcpName": "io.github.yuni9959/wrapguard-mcp",
6
+ "type": "module",
7
+ "bin": {
8
+ "wrapguard-mcp": "dist/stdio.js",
9
+ "wrapguard": "dist/cli.js",
10
+ "wrapguard-http": "dist/http.js"
11
+ },
12
+ "exports": {
13
+ ".": "./dist/index.js"
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE",
19
+ "SECURITY.md",
20
+ "wrapguard.config.example.json"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.json",
24
+ "check": "tsc -p tsconfig.json --noEmit",
25
+ "test": "vitest run",
26
+ "test:watch": "vitest",
27
+ "start": "node dist/stdio.js",
28
+ "start:http": "node dist/http.js",
29
+ "audit": "node dist/cli.js audit",
30
+ "prepublishOnly": "npm run check && npm test && npm run build"
31
+ },
32
+ "engines": {
33
+ "node": ">=22.0.0"
34
+ },
35
+ "keywords": [
36
+ "mcp",
37
+ "playwright",
38
+ "responsive",
39
+ "typography",
40
+ "korean",
41
+ "word-wrap",
42
+ "accessibility"
43
+ ],
44
+ "license": "MIT",
45
+ "author": "WrapGuard MCP contributors",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/Yuni9959/wrapguard-mcp.git"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/Yuni9959/wrapguard-mcp/issues"
52
+ },
53
+ "homepage": "https://github.com/Yuni9959/wrapguard-mcp#readme",
54
+ "dependencies": {
55
+ "@modelcontextprotocol/node": "^2.0.0",
56
+ "@modelcontextprotocol/server": "^2.0.0",
57
+ "playwright": "^1.62.1",
58
+ "zod": "^4.5.4"
59
+ },
60
+ "devDependencies": {
61
+ "@modelcontextprotocol/client": "^2.0.0",
62
+ "@types/node": "^24.3.0",
63
+ "tsx": "^4.20.5",
64
+ "typescript": "^7.0.2",
65
+ "vitest": "^4.1.11"
66
+ }
67
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "serverName": "WrapGuard MCP",
3
+ "defaultLocale": "auto",
4
+ "viewports": [320, 375, 768, 1024],
5
+ "allowedHosts": ["localhost", "127.0.0.1"],
6
+ "allowedFileRoots": ["./fixtures"],
7
+ "ignoreSelectors": [
8
+ "code",
9
+ "pre",
10
+ "kbd",
11
+ "samp",
12
+ "[data-wrapguard-ignore]"
13
+ ],
14
+ "ignorePatterns": [
15
+ "https?://\\S+",
16
+ "^SHA-?\\d+",
17
+ "\\b[0-9a-fA-F]{32,}\\b"
18
+ ],
19
+ "timeoutMs": 30000,
20
+ "browserHeadless": true,
21
+ "browserChannel": "auto",
22
+ "allowRemoteUrls": false,
23
+ "allowWrites": false
24
+ }