@blinq_ai/widget 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.
- package/README.md +59 -0
- package/dist/blinq-widget.iife.global.js +25048 -0
- package/dist/blinq-widget.iife.global.js.map +1 -0
- package/dist/browser.cjs +4390 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +20 -0
- package/dist/browser.d.ts +20 -0
- package/dist/browser.js +1198 -0
- package/dist/browser.js.map +1 -0
- package/dist/chunk-2BSH3PRA.js +3174 -0
- package/dist/chunk-2BSH3PRA.js.map +1 -0
- package/dist/cli.js +161 -0
- package/dist/index.cjs +3207 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +114 -0
- package/dist/index.d.ts +114 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @blinq_ai/widget
|
|
2
|
+
|
|
3
|
+
Browser widget, npm SDK, and CLI for Blinq AI.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @blinq_ai/widget
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`npm install` by itself is not enough. You still need to mount the widget once in your app.
|
|
12
|
+
|
|
13
|
+
## Custom element
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<blinq-widget
|
|
17
|
+
public-token="bq_pk_..."
|
|
18
|
+
api-base-url="https://api.blinq.kz"
|
|
19
|
+
mcp-endpoint="https://mcp.blinq.kz"
|
|
20
|
+
></blinq-widget>
|
|
21
|
+
<script type="module">
|
|
22
|
+
import "@blinq_ai/widget/browser"
|
|
23
|
+
</script>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## SDK
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { init } from "@blinq_ai/widget"
|
|
30
|
+
|
|
31
|
+
await init({
|
|
32
|
+
publicToken: "bq_pk_...",
|
|
33
|
+
apiBaseUrl: "https://api.blinq.kz",
|
|
34
|
+
mcpEndpoint: "https://mcp.blinq.kz",
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Config bootstrap
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import config from "./blinq-widget.config.json"
|
|
42
|
+
import { initFromConfig } from "@blinq_ai/widget"
|
|
43
|
+
|
|
44
|
+
await initFromConfig(config)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## CLI
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx @blinq_ai/widget login
|
|
51
|
+
npx @blinq_ai/widget init
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Updates
|
|
55
|
+
|
|
56
|
+
- Publish a new version to npm when the package changes.
|
|
57
|
+
- Clients that pin an exact version need to bump that version in their app.
|
|
58
|
+
- Clients using a semver range pick up updates on the next install/deploy.
|
|
59
|
+
- After the widget is mounted once, normal product copy, prompts, and dashboard config changes do not require code changes in the client app.
|