@cloro-dev/response-parser 0.1.3 → 0.1.4
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 +54 -28
- package/dist/core/types.d.ts +3 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +72 -8
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/ai-mode.d.ts +14 -3
- package/dist/providers/ai-mode.d.ts.map +1 -1
- package/dist/providers/ai-overview.d.ts +14 -3
- package/dist/providers/ai-overview.d.ts.map +1 -1
- package/dist/providers/base-provider.d.ts +0 -1
- package/dist/providers/base-provider.d.ts.map +1 -1
- package/dist/providers/chatgpt.d.ts +15 -3
- package/dist/providers/chatgpt.d.ts.map +1 -1
- package/dist/providers/copilot.d.ts +12 -1
- package/dist/providers/copilot.d.ts.map +1 -1
- package/dist/providers/gemini.d.ts +12 -1
- package/dist/providers/gemini.d.ts.map +1 -1
- package/dist/providers/perplexity.d.ts +8 -1
- package/dist/providers/perplexity.d.ts.map +1 -1
- package/dist/react/core/types.d.ts +3 -1
- package/dist/react/core/types.d.ts.map +1 -1
- package/dist/react/hooks/useResponse.d.ts.map +1 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.esm.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/providers/ai-mode.d.ts +14 -3
- package/dist/react/providers/ai-mode.d.ts.map +1 -1
- package/dist/react/providers/ai-overview.d.ts +14 -3
- package/dist/react/providers/ai-overview.d.ts.map +1 -1
- package/dist/react/providers/base-provider.d.ts +0 -1
- package/dist/react/providers/base-provider.d.ts.map +1 -1
- package/dist/react/providers/chatgpt.d.ts +15 -3
- package/dist/react/providers/chatgpt.d.ts.map +1 -1
- package/dist/react/providers/copilot.d.ts +12 -1
- package/dist/react/providers/copilot.d.ts.map +1 -1
- package/dist/react/providers/gemini.d.ts +12 -1
- package/dist/react/providers/gemini.d.ts.map +1 -1
- package/dist/react/providers/perplexity.d.ts +8 -1
- package/dist/react/providers/perplexity.d.ts.map +1 -1
- package/dist/react/react/hooks/useResponse.d.ts.map +1 -1
- package/package.json +11 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatgpt.d.ts","sourceRoot":"","sources":["../../src/providers/chatgpt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"chatgpt.d.ts","sourceRoot":"","sources":["../../src/providers/chatgpt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAEvB,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAa;IACtC,QAAQ,CAAC,OAAO,yBAAyB;IAGzC,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,iBAAiB;IAkChD;;;OAGG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAgBjC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAanC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IA0ClC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc;CA8E7D"}
|
|
@@ -3,8 +3,19 @@ import { AIProvider, ParsedResponse, ParseOptions, ContentExtraction } from '../
|
|
|
3
3
|
export declare class CopilotProvider extends BaseProvider {
|
|
4
4
|
readonly name: AIProvider;
|
|
5
5
|
readonly baseUrl = "https://copilot.microsoft.com";
|
|
6
|
-
readonly defaultStyles = "\n /* Copilot Sidebar & Header */\n div:has(> [data-testid=\"sidebar-container\"]),\n [data-testid=\"sidebar-container\"],\n [data-testid=\"sticky-header\"],\n .side-nav-menu-button {\n display: none !important;\n }\n\n /* General Layout Fixes */\n main {\n width: 100% !important;\n max-width: 100% !important;\n margin: 0 !important;\n }\n ";
|
|
7
6
|
extractContent(response: any): ContentExtraction;
|
|
7
|
+
/**
|
|
8
|
+
* Remove Copilot header/navbar from HTML
|
|
9
|
+
*/
|
|
10
|
+
removeHeader(html: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Remove Copilot footer/followup input box from HTML
|
|
13
|
+
*/
|
|
14
|
+
removeFooter(html: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Remove Copilot sidebar from HTML
|
|
17
|
+
*/
|
|
18
|
+
removeSidebar(html: string): string;
|
|
8
19
|
parse(response: any, options?: ParseOptions): ParsedResponse;
|
|
9
20
|
}
|
|
10
21
|
//# sourceMappingURL=copilot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../src/providers/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE5F,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAa;IACtC,QAAQ,CAAC,OAAO,mCAAmC;
|
|
1
|
+
{"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../src/providers/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE5F,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAa;IACtC,QAAQ,CAAC,OAAO,mCAAmC;IAGnD,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,iBAAiB;IAkChD;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IASlC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAiBlC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAWnC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc;CAsD7D"}
|
|
@@ -3,8 +3,19 @@ import { AIProvider, ParsedResponse, ParseOptions, ContentExtraction } from '../
|
|
|
3
3
|
export declare class GeminiProvider extends BaseProvider {
|
|
4
4
|
readonly name: AIProvider;
|
|
5
5
|
readonly baseUrl = "https://gemini.google.com";
|
|
6
|
-
readonly defaultStyles = "\n /* Gemini Dark Mode Variable Overrides */\n :root {\n --gem-sys-color--surface: #131314 !important;\n --gem-sys-color--surface-container: #1e1f20 !important;\n --gem-sys-color--on-surface: #e3e3e3 !important;\n --bard-color-synthetic--chat-window-surface: #131314 !important;\n --bard-color-surface-dim-tmp: #131314 !important;\n }\n\n /* UI hiding - Gemini */\n bard-sidenav, mat-sidenav, .mat-drawer-backdrop, .side-nav-menu-button,\n\n /* Gemini \"About Gemini\" footer/navigation block */\n .gb_5a, .gb_5c, .gb_5d, .gb_5e,\n .gb_Uc, .gb_Vc, .gb_Wc,\n a[href*=\"about\"],\n a[href*=\"subscriptions\"],\n a[href*=\"business\"],\n div[class*=\"gb_5\"],\n .gb_Pd, .gb_Qd, .gb_Rd,\n .gb_Sd, .gb_Td, .gb_Ud, .gb_Vd,\n [aria-label*=\"About\"],\n [aria-label*=\"Gemini App\"],\n [aria-label*=\"Subscriptions\"],\n [aria-label*=\"For Business\"],\n *:contains(\"About Gemini\"),\n *:contains(\"Gemini App\"),\n *:contains(\"Subscriptions\"),\n *:contains(\"For Business\") {\n display: none !important;\n }\n\n /* General Layout */\n main { width: 100% !important; max-width: 100% !important; margin: 0 !important; }\n\n /* Force Dark Mode on Body and Gemini Containers */\n body, .content-container, chat-app, .main-content, .chat-container {\n background-color: #131314 !important;\n color: #e3e3e3 !important;\n }\n ";
|
|
7
6
|
extractContent(response: any): ContentExtraction;
|
|
7
|
+
/**
|
|
8
|
+
* Remove Gemini header/navbar from HTML
|
|
9
|
+
*/
|
|
10
|
+
removeHeader(html: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Remove Gemini footer/follow-up input box from HTML
|
|
13
|
+
*/
|
|
14
|
+
removeFooter(html: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Remove Gemini sidebar from HTML
|
|
17
|
+
*/
|
|
18
|
+
removeSidebar(html: string): string;
|
|
8
19
|
parse(response: any, options?: ParseOptions): ParsedResponse;
|
|
9
20
|
}
|
|
10
21
|
//# sourceMappingURL=gemini.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../src/providers/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE5F,qBAAa,cAAe,SAAQ,YAAY;IAC9C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAY;IACrC,QAAQ,CAAC,OAAO,+BAA+B;
|
|
1
|
+
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../src/providers/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE5F,qBAAa,cAAe,SAAQ,YAAY;IAC9C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAY;IACrC,QAAQ,CAAC,OAAO,+BAA+B;IAG/C,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,iBAAiB;IAyChD;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAkBlC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKlC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKnC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc;CAwD7D"}
|
|
@@ -3,8 +3,15 @@ import { AIProvider, ParsedResponse, ParseOptions, ContentExtraction } from "../
|
|
|
3
3
|
export declare class PerplexityProvider extends BaseProvider {
|
|
4
4
|
readonly name: AIProvider;
|
|
5
5
|
readonly baseUrl = "https://www.perplexity.ai";
|
|
6
|
-
readonly defaultStyles = "\n html {\n filter: invert(1) hue-rotate(180deg);\n background-color: white !important;\n }\n ";
|
|
7
6
|
extractContent(response: any): ContentExtraction;
|
|
7
|
+
/**
|
|
8
|
+
* Remove Perplexity header/navbar from HTML
|
|
9
|
+
*/
|
|
10
|
+
removeHeader(html: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Remove Perplexity footer/followup input from HTML
|
|
13
|
+
*/
|
|
14
|
+
removeFooter(html: string): string;
|
|
8
15
|
parse(response: any, options?: ParseOptions): ParsedResponse;
|
|
9
16
|
}
|
|
10
17
|
//# sourceMappingURL=perplexity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perplexity.d.ts","sourceRoot":"","sources":["../../src/providers/perplexity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAEvB,qBAAa,kBAAmB,SAAQ,YAAY;IAClD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAgB;IACzC,QAAQ,CAAC,OAAO,+BAA+B;IAE/C,
|
|
1
|
+
{"version":3,"file":"perplexity.d.ts","sourceRoot":"","sources":["../../src/providers/perplexity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAEvB,qBAAa,kBAAmB,SAAQ,YAAY;IAClD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAgB;IACzC,QAAQ,CAAC,OAAO,+BAA+B;IAE/C,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,iBAAiB;IAkChD;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAMlC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAMlC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc;CAwD7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResponse.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/useResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAExG,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,UAA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I,CAAC;CAC1D;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,GAAG,EACb,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CAgFnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloro-dev/response-parser",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Parse and render AI model responses from ChatGPT, Gemini, Perplexity, and more",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,6 +22,15 @@
|
|
|
22
22
|
"dist",
|
|
23
23
|
"README.md"
|
|
24
24
|
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "rollup -c",
|
|
27
|
+
"dev": "rollup -c -w",
|
|
28
|
+
"test": "jest",
|
|
29
|
+
"test:watch": "jest --watch",
|
|
30
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
31
|
+
"type-check": "tsc --noEmit",
|
|
32
|
+
"prepublishOnly": "npm run build"
|
|
33
|
+
},
|
|
25
34
|
"keywords": [
|
|
26
35
|
"ai",
|
|
27
36
|
"cloro",
|
|
@@ -72,13 +81,5 @@
|
|
|
72
81
|
},
|
|
73
82
|
"publishConfig": {
|
|
74
83
|
"access": "public"
|
|
75
|
-
},
|
|
76
|
-
"scripts": {
|
|
77
|
-
"build": "rollup -c",
|
|
78
|
-
"dev": "rollup -c -w",
|
|
79
|
-
"test": "jest",
|
|
80
|
-
"test:watch": "jest --watch",
|
|
81
|
-
"lint": "eslint src --ext .ts,.tsx",
|
|
82
|
-
"type-check": "tsc --noEmit"
|
|
83
84
|
}
|
|
84
|
-
}
|
|
85
|
+
}
|