@cloro-dev/response-parser 0.1.6 → 0.2.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.
- package/README.md +149 -102
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/ai-mode.d.ts.map +1 -1
- package/package.json +4 -29
- package/dist/react/components/AiResponseRenderer.d.ts +0 -24
- package/dist/react/components/AiResponseRenderer.d.ts.map +0 -1
- package/dist/react/components/IframeRenderer.d.ts +0 -12
- package/dist/react/components/IframeRenderer.d.ts.map +0 -1
- package/dist/react/components/ResponseRenderer.d.ts +0 -24
- package/dist/react/components/ResponseRenderer.d.ts.map +0 -1
- package/dist/react/core/detector.d.ts +0 -17
- package/dist/react/core/detector.d.ts.map +0 -1
- package/dist/react/core/parser.d.ts +0 -40
- package/dist/react/core/parser.d.ts.map +0 -1
- package/dist/react/core/types.d.ts +0 -34
- package/dist/react/core/types.d.ts.map +0 -1
- package/dist/react/hooks/useAiResponse.d.ts +0 -19
- package/dist/react/hooks/useAiResponse.d.ts.map +0 -1
- package/dist/react/hooks/useResponse.d.ts +0 -19
- package/dist/react/hooks/useResponse.d.ts.map +0 -1
- package/dist/react/index.d.ts +0 -86
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.esm.js +0 -2
- package/dist/react/index.esm.js.map +0 -1
- package/dist/react/index.js +0 -2
- package/dist/react/index.js.map +0 -1
- package/dist/react/providers/ai-mode.d.ts +0 -21
- package/dist/react/providers/ai-mode.d.ts.map +0 -1
- package/dist/react/providers/ai-overview.d.ts +0 -21
- package/dist/react/providers/ai-overview.d.ts.map +0 -1
- package/dist/react/providers/base-provider.d.ts +0 -34
- package/dist/react/providers/base-provider.d.ts.map +0 -1
- package/dist/react/providers/chatgpt.d.ts +0 -22
- package/dist/react/providers/chatgpt.d.ts.map +0 -1
- package/dist/react/providers/copilot.d.ts +0 -25
- package/dist/react/providers/copilot.d.ts.map +0 -1
- package/dist/react/providers/gemini.d.ts +0 -21
- package/dist/react/providers/gemini.d.ts.map +0 -1
- package/dist/react/providers/grok.d.ts +0 -17
- package/dist/react/providers/grok.d.ts.map +0 -1
- package/dist/react/providers/perplexity.d.ts +0 -17
- package/dist/react/providers/perplexity.d.ts.map +0 -1
- package/dist/react/react/components/AiResponseRenderer.d.ts +0 -24
- package/dist/react/react/components/AiResponseRenderer.d.ts.map +0 -1
- package/dist/react/react/components/IframeRenderer.d.ts +0 -12
- package/dist/react/react/components/IframeRenderer.d.ts.map +0 -1
- package/dist/react/react/components/ResponseRenderer.d.ts +0 -24
- package/dist/react/react/components/ResponseRenderer.d.ts.map +0 -1
- package/dist/react/react/hooks/useAiResponse.d.ts +0 -19
- package/dist/react/react/hooks/useAiResponse.d.ts.map +0 -1
- package/dist/react/react/hooks/useResponse.d.ts +0 -19
- package/dist/react/react/hooks/useResponse.d.ts.map +0 -1
- package/dist/react/react/index.d.ts +0 -7
- package/dist/react/react/index.d.ts.map +0 -1
- package/dist/react/styles/index.d.ts +0 -1
- package/dist/react/styles/index.d.ts.map +0 -1
- package/dist/react/utils/helpers.d.ts +0 -28
- package/dist/react/utils/helpers.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
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,UAAU,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,GAAG,EACb,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CA+EnB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { ResponseRenderer, IframeRenderer, } from "./components/ResponseRenderer";
|
|
2
|
-
export type { ResponseRendererProps } from "./components/ResponseRenderer";
|
|
3
|
-
export type { IframeRendererProps } from "./components/IframeRenderer";
|
|
4
|
-
export { useResponse } from "./hooks/useResponse";
|
|
5
|
-
export type { UseResponseOptions, UseResponseReturn, } from "./hooks/useResponse";
|
|
6
|
-
export type { AIProvider, ParsedResponse, ParseOptions, ProviderConfig, DetectedProvider, StyleOptions, ContentExtraction, } from "../core/types";
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,cAAc,GACf,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,YAAY,EACV,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,GAClB,MAAM,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":""}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for AI response parsing
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Check if a string is likely HTML
|
|
6
|
-
*/
|
|
7
|
-
export declare function isLikelyHtml(str: string): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Extract URLs from text
|
|
10
|
-
*/
|
|
11
|
-
export declare function extractUrls(text: string): string[];
|
|
12
|
-
/**
|
|
13
|
-
* Safely parse JSON with error handling
|
|
14
|
-
*/
|
|
15
|
-
export declare function safeJsonParse<T = any>(str: string, fallback: T): T;
|
|
16
|
-
/**
|
|
17
|
-
* Decode HTML entities
|
|
18
|
-
*/
|
|
19
|
-
export declare function decodeHtmlEntities(str: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* Truncate text to a specified length
|
|
22
|
-
*/
|
|
23
|
-
export declare function truncateText(text: string, maxLength: number, suffix?: string): string;
|
|
24
|
-
/**
|
|
25
|
-
* Generate a unique ID for rendering
|
|
26
|
-
*/
|
|
27
|
-
export declare function generateId(): string;
|
|
28
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOjD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAGlD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAMlE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAItD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAQ,GAAG,MAAM,CAGpF;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
|