@chatwillow/widget 0.0.5 → 0.0.6

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 CHANGED
@@ -87,34 +87,20 @@ For usage in static HTML files or legacy applications. Even though it uses React
87
87
  <html lang="en">
88
88
  <head>
89
89
  <meta charset="UTF-8" />
90
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
91
90
  <title>ChatWillow Widget</title>
92
91
 
93
92
  <link
94
93
  rel="stylesheet"
95
- href="[https://unpkg.com/@chatwillow/widget@latest/dist/style.css](https://unpkg.com/@chatwillow/widget@latest/dist/style.css)"
94
+ href="https://unpkg.com/@chatwillow/widget@latest/dist/style.css"
96
95
  />
97
96
  </head>
98
97
  <body>
99
- <div id="chatwillow-root"></div>
100
-
101
- <script
102
- crossorigin
103
- src="[https://unpkg.com/react@18/umd/react.production.min.js](https://unpkg.com/react@18/umd/react.production.min.js)"
104
- ></script>
105
- <script
106
- crossorigin
107
- src="[https://unpkg.com/react-dom@18/umd/react-dom.production.min.js](https://unpkg.com/react-dom@18/umd/react-dom.production.min.js)"
108
- ></script>
109
-
110
- <script src="[https://unpkg.com/@chatwillow/widget@latest/dist/chatwillow-widget.umd.js](https://unpkg.com/@chatwillow/widget@latest/dist/chatwillow-widget.umd.js)"></script>
98
+ <script src="https://unpkg.com/@chatwillow/widget@latest/dist/chatwillow-widget.umd.js"></script>
111
99
 
112
100
  <script>
113
- // Simple initialization
114
101
  ChatWillow.init({
115
- apiKey: "YOUR_API_KEY_HERE",
102
+ apiKey: "YOUR_API_KEY",
116
103
  theme: "dark",
117
- title: "Customer Support",
118
104
  });
119
105
  </script>
120
106
  </body>
@@ -132,17 +118,12 @@ Integration with PHP (Laravel, CodeIgniter, or Native PHP) is identical to the C
132
118
  **PHP**
133
119
 
134
120
  ```php
135
- <link rel="stylesheet" href="[https://unpkg.com/@chatwillow/widget@latest/dist/style.css](https://unpkg.com/@chatwillow/widget@latest/dist/style.css)">
136
-
137
- <script crossorigin src="[https://unpkg.com/react@18/umd/react.production.min.js](https://unpkg.com/react@18/umd/react.production.min.js)"></script>
138
- <script crossorigin src="[https://unpkg.com/react-dom@18/umd/react-dom.production.min.js](https://unpkg.com/react-dom@18/umd/react-dom.production.min.js)"></script>
139
- <script src="[https://unpkg.com/@chatwillow/widget@latest/dist/chatwillow-widget.umd.js](https://unpkg.com/@chatwillow/widget@latest/dist/chatwillow-widget.umd.js)"></script>
121
+ <link rel="stylesheet" href="https://unpkg.com/@chatwillow/widget@latest/dist/style.css">
140
122
 
123
+ <script src="https://unpkg.com/@chatwillow/widget@latest/dist/chatwillow-widget.umd.js"></script>
141
124
  <script>
142
- // Initialize with PHP variables
143
125
  ChatWillow.init({
144
- apiKey: "<?php echo getenv('CHATWILLOW_API_KEY'); ?>",
145
- userEmail: "<?php echo $user->email ?? ''; ?>",
126
+ apiKey: "<?php echo $api_key; ?>",
146
127
  theme: "light"
147
128
  });
148
129
  </script>