@meistrari/chat-nuxt 1.2.2 → 1.2.3
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 +1 -10
- package/dist/module.json +1 -1
- package/dist/module.mjs +10 -1
- package/dist/runtime/plugins/markstream.d.ts +2 -0
- package/dist/runtime/plugins/markstream.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,22 +86,13 @@ Set `chatNuxt.validateConfig` to `'warn'` to report missing server config during
|
|
|
86
86
|
|
|
87
87
|
```vue
|
|
88
88
|
<!-- app.vue -->
|
|
89
|
-
<script setup lang="ts">
|
|
90
|
-
import { setDefaultMathOptions } from 'markstream-vue'
|
|
91
|
-
import 'markstream-vue/index.css'
|
|
92
|
-
import '@meistrari/chat-nuxt/assets/css/markstream.css'
|
|
93
|
-
import '@meistrari/chat-nuxt/assets/css/code-theme.css'
|
|
94
|
-
|
|
95
|
-
setDefaultMathOptions({ strictDelimiters: true })
|
|
96
|
-
</script>
|
|
97
|
-
|
|
98
89
|
<template>
|
|
99
90
|
<NuxtPage />
|
|
100
91
|
<AppStatusToast />
|
|
101
92
|
</template>
|
|
102
93
|
```
|
|
103
94
|
|
|
104
|
-
`AppStatusToast
|
|
95
|
+
`AppStatusToast`, Markstream styles, code block styles, and math delimiter defaults are auto-registered by the module.
|
|
105
96
|
|
|
106
97
|
### 4. Use it
|
|
107
98
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync, mkdirSync, symlinkSync } from 'node:fs';
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
|
-
import { defineNuxtModule, createResolver, addImportsDir, addComponent, addComponentsDir } from 'nuxt/kit';
|
|
4
|
+
import { defineNuxtModule, createResolver, addPlugin, addImportsDir, addComponent, addComponentsDir } from 'nuxt/kit';
|
|
5
5
|
|
|
6
6
|
const localRequire = createRequire(import.meta.url);
|
|
7
7
|
const runtimeAliasPackages = [
|
|
@@ -260,6 +260,15 @@ const module$1 = defineNuxtModule({
|
|
|
260
260
|
rc.public = rc.public || {};
|
|
261
261
|
rc.public.agentApiUrl = rc.public.agentApiUrl || process.env.AGENT_API_URL || "";
|
|
262
262
|
validateRuntimeConfig(rc, options.validateConfig ?? false);
|
|
263
|
+
nuxt.options.css = nuxt.options.css || [];
|
|
264
|
+
nuxt.options.css.push(
|
|
265
|
+
_chatNuxtRequire.resolve("markstream-vue/index.css"),
|
|
266
|
+
join(runtimeDir, "assets/css/markstream.css"),
|
|
267
|
+
join(runtimeDir, "assets/css/code-theme.css")
|
|
268
|
+
);
|
|
269
|
+
addPlugin({
|
|
270
|
+
src: join(runtimeDir, "plugins/markstream")
|
|
271
|
+
});
|
|
263
272
|
addImportsDir(join(runtimeDir, "composables"));
|
|
264
273
|
addImportsDir(join(runtimeDir, "utils"));
|
|
265
274
|
addComponent({
|