@boldare/askdare 0.5.0 → 0.5.1
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/CHANGELOG.md +8 -0
- package/dist/next.js +2 -2
- package/dist/react-marked.js +883 -810
- package/dist/root.js +2 -2
- package/dist/ui/askdare.css +1 -1
- package/dist/ui/avatar.tsx +1 -1
- package/dist/ui/chat.tsx +1 -1
- package/dist/ui/confirm.tsx +1 -1
- package/dist/ui/context.ts +1 -1
- package/dist/ui/feedback.tsx +1 -1
- package/dist/ui/footer.tsx +1 -1
- package/dist/ui/header.tsx +1 -1
- package/dist/ui/icons.tsx +1 -1
- package/dist/ui/index.ts +1 -1
- package/dist/ui/message.tsx +1 -1
- package/dist/ui/panel.tsx +1 -1
- package/dist/ui/welcome.tsx +1 -1
- package/docs/support.md +1 -1
- package/package.json +4 -4
package/dist/root.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as w } from "./react-marked.js";
|
|
3
3
|
import { Component, createContext, memo, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
// src/react/context.tsx
|
|
@@ -320,7 +320,7 @@ function block(token, key, depth) {
|
|
|
320
320
|
/** The text as paragraphs, when markdown can't be had. */
|
|
321
321
|
const plain = (text) => text.split(/\n{2,}/).map((paragraph, key) => /* @__PURE__ */ jsx("p", { children: paragraph }, key));
|
|
322
322
|
function lexAll(text) {
|
|
323
|
-
const tokens =
|
|
323
|
+
const tokens = w.lex(text, { gfm: true });
|
|
324
324
|
return {
|
|
325
325
|
text,
|
|
326
326
|
tokens,
|
package/dist/ui/askdare.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Ejected from @boldare/askdare@0.5.
|
|
1
|
+
/* Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change. */
|
|
2
2
|
/*
|
|
3
3
|
* Default skin of the chat (ADR-0008, ADR-0011), in the iframe and inside a page. Everything is
|
|
4
4
|
* built on the public styling API: the --ask-* tokens (set per bot by the theme stylesheet), the
|
package/dist/ui/avatar.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import { useSkin } from './context';
|
|
4
4
|
import { SparkIcon } from './icons';
|
package/dist/ui/chat.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
// The entry of an ejected copy (`npx @boldare/askdare add ui`): the same DefaultChat as in
|
package/dist/ui/confirm.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import { useChat } from '@boldare/askdare/react';
|
|
3
3
|
import { type KeyboardEvent, type ReactElement, useEffect, useId, useRef } from 'react';
|
|
4
4
|
import { RestartIcon } from './icons';
|
package/dist/ui/context.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import type { ChatBot, Translate } from '@boldare/askdare/react';
|
|
3
3
|
import { type Context, createContext, type RefObject, useContext } from 'react';
|
|
4
4
|
|
package/dist/ui/feedback.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import { FeedbackButton, useChat, useChatState, useMessage } from '@boldare/askdare/react';
|
|
3
3
|
import { type FormEvent, type ReactElement, useEffect, useId, useRef, useState } from 'react';
|
|
4
4
|
import { useSkin } from './context';
|
package/dist/ui/footer.tsx
CHANGED
package/dist/ui/header.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import { useChat } from '@boldare/askdare/react';
|
|
3
3
|
import type { ReactElement } from 'react';
|
|
4
4
|
import { Avatar } from './avatar';
|
package/dist/ui/icons.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
/** Line icons on a 24px grid, drawn with the current text color. */
|
package/dist/ui/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
// The default look of the chat (ADR-0011): what `npx @boldare/askdare add ui` copies into an app.
|
package/dist/ui/message.tsx
CHANGED
package/dist/ui/panel.tsx
CHANGED
package/dist/ui/welcome.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ejected from @boldare/askdare@0.5.
|
|
1
|
+
// Ejected from @boldare/askdare@0.5.1 with `npx @boldare/askdare add ui`. This copy is yours to change.
|
|
2
2
|
import { useChat } from '@boldare/askdare/react';
|
|
3
3
|
import type { ReactElement, ReactNode } from 'react';
|
|
4
4
|
import { Avatar } from './avatar';
|
package/docs/support.md
CHANGED
|
@@ -34,7 +34,7 @@ Every release is tested automatically in Chromium, Firefox and WebKit, and on tw
|
|
|
34
34
|
| --- | --- | --- |
|
|
35
35
|
| The loader (`widget.js`), on every page | about 3 KB | 5 KB |
|
|
36
36
|
| The chat itself, when the visitor opens it | about 38 KB, plus 6 KB of styles | 50 KB and 8 KB |
|
|
37
|
-
| `@boldare/askdare/react` in your app's bundle, without React itself | about 28 KB; about 8 KB with only `Root` and the hooks |
|
|
37
|
+
| `@boldare/askdare/react` in your app's bundle, without React itself | about 28 KB; about 8 KB with only `Root` and the hooks | 34 KB and 12 KB |
|
|
38
38
|
| One theme's fonts, from your app | up to 82 KB | 82 KB |
|
|
39
39
|
|
|
40
40
|
The build fails when one of these grows past its budget.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boldare/askdare",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Embeddable AI chatbot for Next.js, as a script-tag widget or React components, built on the official OpenAI SDK.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@types/react": "^19.3.0",
|
|
80
80
|
"@types/react-dom": "^19.3.0",
|
|
81
81
|
"happy-dom": "^21.0.4",
|
|
82
|
-
"marked": "18.2.
|
|
82
|
+
"marked": "18.2.1",
|
|
83
83
|
"next": "^16.4.6",
|
|
84
84
|
"preact": "11.2.0",
|
|
85
85
|
"publint": "^0.3.25",
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"jose": "^6.2.
|
|
107
|
-
"openai": "^7.
|
|
106
|
+
"jose": "^6.2.18",
|
|
107
|
+
"openai": "^7.62.0"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
110
|
"build:assets": "vite build -c vite.widget.config.ts && vite build -c vite.skin.config.ts && vite build -c vite.loader.config.ts && node scripts/inline-assets.mjs",
|