ordify-chat-widget 1.0.26 → 1.0.28

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/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.27] - 2024-12-19
9
+
10
+ ### Added
11
+ - **System Context Support**: New `initialContext` prop allows sending hidden system information to AI agents
12
+ - **GitHub Packages Mirror**: Package now automatically mirrors to GitHub Packages after NPM publishing
13
+ - **Automated Publishing**: GitHub Actions workflow for seamless publishing on main branch merges
14
+ - **Enhanced Documentation**: Updated README with proper registry usage instructions
15
+
16
+ ### Changed
17
+ - Package name updated to `@ordify-ai/chat-widget` for GitHub Packages compatibility
18
+ - Improved auto-scroll behavior with better conversation component structure
19
+ - Enhanced floating button positioning with proper prop support
20
+
21
+ ### Technical
22
+ - Added `.npmrc` configuration for GitHub Packages registry
23
+ - Created GitHub Actions workflow for NPM-first publishing with GitHub Packages mirroring
24
+ - Updated package.json with proper scoped naming and publishConfig
25
+ - **NPM remains the single source of truth** for versioning
26
+
8
27
  ## [1.0.0] - 2024-01-16
9
28
 
10
29
  ### Added
package/README.md CHANGED
@@ -14,6 +14,8 @@ A professional, production-ready React chat widget that enables seamless integra
14
14
 
15
15
  Before integrating the chat widget, ensure you have:
16
16
 
17
+ - **Node.js**: 18.0.0 or higher
18
+ - **npm**: 9.0.0 or higher
17
19
  - **API Key**: Available in your Ordify dashboard (Account → Settings → API)
18
20
  - **Agent ID**: Found in your agent configuration panel within the Ordify application
19
21
  - **React Application**: Compatible with React 18+ and modern build tools
@@ -38,14 +40,26 @@ Before integrating the chat widget, ensure you have:
38
40
 
39
41
  ### 1. Install the Library
40
42
 
43
+ **From NPM (Recommended):**
41
44
  ```bash
42
45
  npm install ordify-chat-widget
43
46
  ```
44
47
 
48
+ **From GitHub Packages (Mirror):**
49
+ ```bash
50
+ npm install @ordify-ai/chat-widget
51
+ ```
52
+
45
53
  ### 2. Add to Your React App
46
54
 
55
+ **If using NPM package (recommended):**
47
56
  ```tsx
48
57
  import { OrdifyChat } from 'ordify-chat-widget'
58
+ ```
59
+
60
+ **If using GitHub Packages mirror:**
61
+ ```tsx
62
+ import { OrdifyChat } from '@ordify-ai/chat-widget'
49
63
 
50
64
  function App() {
51
65
  return (
@@ -62,6 +76,23 @@ function App() {
62
76
 
63
77
  **That's it!** No CSS imports, no additional setup. The library includes all necessary styles automatically.
64
78
 
79
+ ### GitHub Packages Setup (Optional)
80
+
81
+ GitHub Packages serves as a mirror of the NPM package. If you need to use it, configure authentication:
82
+
83
+ 1. **Create a Personal Access Token** with `read:packages` scope
84
+ 2. **Configure npm authentication:**
85
+ ```bash
86
+ npm login --scope=@ordify-ai --auth-type=legacy --registry=https://npm.pkg.github.com
87
+ ```
88
+ 3. **Or add to your `.npmrc` file:**
89
+ ```
90
+ @ordify-ai:registry=https://npm.pkg.github.com
91
+ //npm.pkg.github.com/:_authToken=YOUR_TOKEN
92
+ ```
93
+
94
+ > **Note**: We recommend using the NPM version (`ordify-chat-widget`) as it's the primary registry and source of truth.
95
+
65
96
  ## 🎨 Chat Modes
66
97
 
67
98
  ### Floating Chat (Recommended for websites)
@@ -345,6 +376,11 @@ export default function HomePage() {
345
376
 
346
377
  ### Setup
347
378
  ```bash
379
+ # Ensure you have Node.js 18+ and npm 9+
380
+ node --version # Should be 18.0.0 or higher
381
+ npm --version # Should be 9.0.0 or higher
382
+
383
+ # Clone and setup
348
384
  git clone https://github.com/ordify-ai/chat-widget.git
349
385
  cd chat-widget
350
386
  npm install
@@ -356,6 +392,23 @@ npm run dev
356
392
  npm run build
357
393
  ```
358
394
 
395
+ ### Publishing
396
+
397
+ **Automatic Publishing**: This package is automatically published to NPM when changes are merged to the `main` branch, with GitHub Packages serving as a mirror.
398
+
399
+ - **NPM**: Primary registry (`ordify-chat-widget`) - **source of truth**
400
+ - **GitHub Packages**: Mirror registry (`@ordify-ai/chat-widget`) - automatic backup
401
+ - **Version Sync**: GitHub Packages mirrors NPM versions exactly
402
+
403
+ **Manual Publishing** (if needed):
404
+ ```bash
405
+ # Publish to NPM
406
+ npm publish --registry=https://registry.npmjs.org/
407
+
408
+ # Publish to GitHub Packages
409
+ npm publish --registry=https://npm.pkg.github.com
410
+ ```
411
+
359
412
  ### Integration Examples
360
413
  See the [`examples/integration/`](./examples/integration/) directory for ready-to-copy code snippets for different frameworks and use cases.
361
414
 
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddedChat.d.ts","sourceRoot":"","sources":["../../src/components/EmbeddedChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAe3D,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAgH/D"}
1
+ {"version":3,"file":"EmbeddedChat.d.ts","sourceRoot":"","sources":["../../src/components/EmbeddedChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAe3D,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAyH/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingChat.d.ts","sourceRoot":"","sources":["../../src/components/FloatingChat.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAiB3D,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAiK/D"}
1
+ {"version":3,"file":"FloatingChat.d.ts","sourceRoot":"","sources":["../../src/components/FloatingChat.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAiB3D,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CA2L/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownRenderer.tsx"],"names":[],"mappings":"AAEA,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,qBAAqB,2CAqG7E"}
1
+ {"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownRenderer.tsx"],"names":[],"mappings":"AA2CA,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,qBAAqB,2CA8K7E"}
@@ -5,7 +5,10 @@ export declare const ChatMessage: import('styled-components/dist/types').IStyled
5
5
  export declare const ChatInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
6
  export declare const ProfessionalInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never>> & string;
7
7
  export declare const SendButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
8
- export declare const FloatingButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
8
+ export declare const FloatingButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
9
+ $position?: string;
10
+ $primaryColor?: string;
11
+ }>> & string;
9
12
  export declare const ChatWindow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
10
13
  $position: string;
11
14
  }>> & string;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatComponents.d.ts","sourceRoot":"","sources":["../../../src/components/styled/ChatComponents.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,6NAgBtB,CAAA;AAGD,eAAO,MAAM,WAAW;aAAyB,OAAO;YA8BvD,CAAA;AAGD,eAAO,MAAM,SAAS,6NAYrB,CAAA;AAGD,eAAO,MAAM,iBAAiB,+OA4C7B,CAAA;AAGD,eAAO,MAAM,UAAU,yOAgCtB,CAAA;AAGD,eAAO,MAAM,cAAc,yOAgC1B,CAAA;AAGD,eAAO,MAAM,UAAU;eAA2B,MAAM;YAiCvD,CAAA;AAGD,eAAO,MAAM,UAAU;mBAA+B,MAAM;YAqB3D,CAAA;AAGD,eAAO,MAAM,WAAW,yOAqBvB,CAAA;AAGD,eAAO,MAAM,YAAY,6NAuCxB,CAAA;AAGD,eAAO,MAAM,WAAW,6NA+BvB,CAAA;AAGD,eAAO,MAAM,SAAS;aAAyB,OAAO;YAQrD,CAAA;AAGD,eAAO,MAAM,YAAY,6NAUxB,CAAA;AAGD,eAAO,MAAM,YAAY;eAA2B,MAAM;YAwBzD,CAAA"}
1
+ {"version":3,"file":"ChatComponents.d.ts","sourceRoot":"","sources":["../../../src/components/styled/ChatComponents.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,6NAgBtB,CAAA;AAGD,eAAO,MAAM,WAAW;aAAyB,OAAO;YAyCvD,CAAA;AAGD,eAAO,MAAM,SAAS,6NAiBrB,CAAA;AAGD,eAAO,MAAM,iBAAiB,+OA2D7B,CAAA;AAGD,eAAO,MAAM,UAAU,yOAgCtB,CAAA;AAgBD,eAAO,MAAM,cAAc;gBAA+B,MAAM;oBAAkB,MAAM;YA2DvF,CAAA;AAGD,eAAO,MAAM,UAAU;eAA2B,MAAM;YAsCvD,CAAA;AAGD,eAAO,MAAM,UAAU;mBAA+B,MAAM;YAqB3D,CAAA;AAGD,eAAO,MAAM,WAAW,yOAqBvB,CAAA;AAGD,eAAO,MAAM,YAAY,6NAqDxB,CAAA;AAGD,eAAO,MAAM,WAAW,6NA+BvB,CAAA;AAGD,eAAO,MAAM,SAAS;aAAyB,OAAO;YAYrD,CAAA;AAGD,eAAO,MAAM,YAAY,6NAUxB,CAAA;AAGD,eAAO,MAAM,YAAY;eAA2B,MAAM;YAwBzD,CAAA"}
@@ -15,6 +15,7 @@ export declare function useOrdifyConfig(config: OrdifyConfig): {
15
15
  showHeader: boolean;
16
16
  buttonText: string | undefined;
17
17
  chatName: string | undefined;
18
+ primaryColor: string | undefined;
18
19
  onMessage: ((message: import('../types').Message) => void) | undefined;
19
20
  onError: ((error: Error) => void) | undefined;
20
21
  onClose: (() => void) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useOrdifyConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdifyConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;EAsCnD"}
1
+ {"version":3,"file":"useOrdifyConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdifyConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;EAuCnD"}