@nevescloud/pip 2.11.1 → 3.0.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
CHANGED
|
@@ -20,6 +20,25 @@ const pip = createPip({
|
|
|
20
20
|
|
|
21
21
|
Or via npm: `npm install @nevescloud/pip`.
|
|
22
22
|
|
|
23
|
+
### Quickstart: bundle entries
|
|
24
|
+
|
|
25
|
+
Provider-named bundles re-export the three primitives most hosts compose, from a single import. Pick the brain you're wiring to:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
// Anthropic — Claude on /v1/messages
|
|
29
|
+
import { createPip, createRuntime, anthropic } from 'https://cdn.jsdelivr.net/npm/@nevescloud/pip@latest/bundle/anthropic';
|
|
30
|
+
|
|
31
|
+
const rt = createRuntime({ provider: anthropic({ model: 'claude-opus-4-7', apiKey: '…' }) });
|
|
32
|
+
const pip = createPip({ onSubmit: rt.onSubmit, onSlash: rt.onSlash, slashSource: rt.slashSource });
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
// OpenAI-compatible — OpenAI, GitHub Models, Together, Groq, OpenRouter, LM Studio, llama.cpp
|
|
37
|
+
import { createPip, createRuntime, openai } from 'https://cdn.jsdelivr.net/npm/@nevescloud/pip@latest/bundle/openai';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`pip/bundle` (no provider segment) is an alias for `pip/bundle/anthropic` — the default when you haven't picked a brain. Bundles are sugar over the layered files; hosts with a different brain shape (UI only, custom provider, in-browser model) import the granular files directly. See [CONSUMERS.md](../../CONSUMERS.md) for the full entry-point list.
|
|
41
|
+
|
|
23
42
|
## Options
|
|
24
43
|
|
|
25
44
|
| Key | Default | Notes |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Quickstart entry — pip wired to Anthropic in one import.
|
|
2
|
+
// Re-exports the three primitives most Anthropic hosts wire together.
|
|
3
|
+
// Layered files stay public; hosts that need a different brain shape
|
|
4
|
+
// import from pip-core / runtime / providers directly.
|
|
5
|
+
|
|
6
|
+
export { createPip } from '../pip-core.esm.js';
|
|
7
|
+
export { createRuntime } from '../runtime.esm.js';
|
|
8
|
+
export { anthropic } from '../providers/anthropic.esm.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Quickstart entry — pip wired to any OpenAI-compatible host in one import.
|
|
2
|
+
// Re-exports the three primitives. Works with OpenAI direct, GitHub Models,
|
|
3
|
+
// Together, Groq, OpenRouter, LM Studio, llama.cpp — anything speaking
|
|
4
|
+
// /chat/completions. Pass baseUrl to switch hosts.
|
|
5
|
+
|
|
6
|
+
export { createPip } from '../pip-core.esm.js';
|
|
7
|
+
export { createRuntime } from '../runtime.esm.js';
|
|
8
|
+
export { openai } from '../providers/openai.esm.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nevescloud/pip",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Floating assistant bubble + panel + chat runtime. ESM, no build.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "pip-core.esm.js",
|
|
@@ -8,13 +8,19 @@
|
|
|
8
8
|
".": "./pip-core.esm.js",
|
|
9
9
|
"./pip-core.esm.js": "./pip-core.esm.js",
|
|
10
10
|
"./runtime.esm.js": "./runtime.esm.js",
|
|
11
|
+
"./bundle": "./bundle/anthropic.esm.js",
|
|
12
|
+
"./bundle/anthropic": "./bundle/anthropic.esm.js",
|
|
13
|
+
"./bundle/anthropic.esm.js": "./bundle/anthropic.esm.js",
|
|
14
|
+
"./bundle/openai": "./bundle/openai.esm.js",
|
|
15
|
+
"./bundle/openai.esm.js": "./bundle/openai.esm.js",
|
|
11
16
|
"./providers/anthropic.esm.js": "./providers/anthropic.esm.js",
|
|
12
17
|
"./providers/openai.esm.js": "./providers/openai.esm.js",
|
|
13
|
-
"./providers/
|
|
18
|
+
"./providers/local.esm.js": "./providers/local.esm.js"
|
|
14
19
|
},
|
|
15
20
|
"files": [
|
|
16
21
|
"pip-core.esm.js",
|
|
17
22
|
"runtime.esm.js",
|
|
23
|
+
"bundle/",
|
|
18
24
|
"providers/",
|
|
19
25
|
"README.md",
|
|
20
26
|
"LICENSE"
|
package/pip-core.esm.js
CHANGED
|
@@ -154,12 +154,14 @@ const CSS = `
|
|
|
154
154
|
overflow: visible;
|
|
155
155
|
margin: 0;
|
|
156
156
|
padding: 14px;
|
|
157
|
-
/*
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
/* Force light as the default scheme for pip's chrome. The fallbacks
|
|
158
|
+
below use light-dark(); without an explicit value here CSS treats
|
|
159
|
+
the element as "normal", which lets the browser pick the dark
|
|
160
|
+
branch based on the visitor's OS preference — painting pip dark
|
|
161
|
+
even when the host page is rendering light. Hosts that want dark
|
|
162
|
+
pip set --pip-* variables explicitly or override color-scheme to
|
|
163
|
+
dark on this rule. */
|
|
164
|
+
color-scheme: light;
|
|
163
165
|
border: 1px solid var(--pip-border, light-dark(rgba(0,0,0,0.10), rgba(255,255,255,0.12)));
|
|
164
166
|
border-radius: 14px;
|
|
165
167
|
background: var(--pip-surface, light-dark(#fff, #212529));
|