@wodecorp/openui-vue-browser-bundle 0.1.0 → 0.1.2
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 +40 -1
- package/dist/openui-vue-bundle.min.js +446 -123
- package/dist/styles.css +213 -47
- package/package.json +15 -9
package/README.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
1
|
# @wodecorp/openui-vue-browser-bundle
|
|
2
2
|
|
|
3
|
-
Standalone IIFE browser bundle (`dist/openui-vue-bundle.min.js`) and combined stylesheet (`dist/styles.css`) exposing `window.__OpenUI = { Vue, createApp, Renderer, openuiChatLibrary }` for iframe or script-tag embedding.
|
|
3
|
+
Standalone IIFE browser bundle (`dist/openui-vue-bundle.min.js`) and combined stylesheet (`dist/styles.css`) exposing `window.__OpenUI = { Vue, createApp, Renderer, ThemeProvider, openuiChatLibrary }` for iframe, micro-frontend, or script-tag embedding without a bundler.
|
|
4
|
+
|
|
5
|
+
## Install / CDN
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @wodecorp/openui-vue-browser-bundle
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or load via CDN (jsDelivr / unpkg):
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@wodecorp/openui-vue-browser-bundle/dist/styles.css" />
|
|
15
|
+
<script src="https://cdn.jsdelivr.net/npm/@wodecorp/openui-vue-browser-bundle/dist/openui-vue-bundle.min.js"></script>
|
|
16
|
+
<div id="app"></div>
|
|
17
|
+
<script>
|
|
18
|
+
const { Vue, createApp, Renderer, ThemeProvider, openuiChatLibrary } = window.__OpenUI;
|
|
19
|
+
const program = [
|
|
20
|
+
'header = CardHeader("Embedded OpenUI", "Zero-build browser bundle")',
|
|
21
|
+
'body = TextContent("Rendered via window.__OpenUI")',
|
|
22
|
+
"root = Card([header, body])",
|
|
23
|
+
].join("\n");
|
|
24
|
+
|
|
25
|
+
createApp({
|
|
26
|
+
render() {
|
|
27
|
+
return Vue.h(ThemeProvider, { mode: "light" }, () =>
|
|
28
|
+
Vue.h(Renderer, { response: program, library: openuiChatLibrary }),
|
|
29
|
+
);
|
|
30
|
+
},
|
|
31
|
+
}).mount("#app");
|
|
32
|
+
</script>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Exports
|
|
36
|
+
|
|
37
|
+
- `.` — `./dist/openui-vue-bundle.min.js`
|
|
38
|
+
- `./styles.css` — `./dist/styles.css`
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
MIT
|