@chat-lab/ui 0.1.0-beta.13 → 0.1.0-beta.15
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/dist/components/Chatkit/index.cjs.map +1 -1
- package/dist/components/Chatkit/index.d.ts +1 -0
- package/dist/components/Chatkit/index.d.ts.map +1 -1
- package/dist/components/Chatkit/index.js.map +1 -1
- package/dist/components/assistant-ui/markdown-text.cjs +47 -2
- package/dist/components/assistant-ui/markdown-text.cjs.map +1 -1
- package/dist/components/assistant-ui/markdown-text.d.ts.map +1 -1
- package/dist/components/assistant-ui/markdown-text.js +47 -2
- package/dist/components/assistant-ui/markdown-text.js.map +1 -1
- package/dist/components/assistant-ui/shiki-highlighter.cjs +1 -1
- package/dist/components/assistant-ui/shiki-highlighter.cjs.map +1 -1
- package/dist/components/assistant-ui/shiki-highlighter.js +1 -1
- package/dist/components/assistant-ui/shiki-highlighter.js.map +1 -1
- package/dist/components/assistant-ui/thread.cjs +4 -4
- package/dist/components/assistant-ui/thread.cjs.map +1 -1
- package/dist/components/assistant-ui/thread.d.ts.map +1 -1
- package/dist/components/assistant-ui/thread.js +4 -4
- package/dist/components/assistant-ui/thread.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.cjs +571 -0
- package/dist/node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.js +569 -0
- package/dist/node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.js.map +1 -0
- package/dist/node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.cjs +214 -0
- package/dist/node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.cjs.map +1 -0
- package/dist/node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.js +212 -0
- package/dist/node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.js.map +1 -0
- package/dist/node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.cjs +34 -0
- package/dist/node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.js +32 -0
- package/dist/node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.js.map +1 -0
- package/dist/packages/core/dist/index.cjs +2 -1
- package/dist/packages/core/dist/index.cjs.map +1 -1
- package/dist/packages/core/dist/index.js +2 -1
- package/dist/packages/core/dist/index.js.map +1 -1
- package/dist/utils/imageLoadingPlugin.cjs +73 -0
- package/dist/utils/imageLoadingPlugin.cjs.map +1 -0
- package/dist/utils/imageLoadingPlugin.d.ts +5 -0
- package/dist/utils/imageLoadingPlugin.d.ts.map +1 -0
- package/dist/utils/imageLoadingPlugin.js +71 -0
- package/dist/utils/imageLoadingPlugin.js.map +1 -0
- package/dist/utils/markdownCursorPlugin.cjs +65 -0
- package/dist/utils/markdownCursorPlugin.cjs.map +1 -0
- package/dist/utils/markdownCursorPlugin.d.ts +4 -0
- package/dist/utils/markdownCursorPlugin.d.ts.map +1 -0
- package/dist/utils/markdownCursorPlugin.js +63 -0
- package/dist/utils/markdownCursorPlugin.js.map +1 -0
- package/package.json +9 -1
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @import {Schema} from 'hast-util-sanitize'
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Couple of ARIA attributes allowed in several, but not all, places.
|
|
8
|
+
const aria = ['ariaDescribedBy', 'ariaLabel', 'ariaLabelledBy'];
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Default schema.
|
|
12
|
+
*
|
|
13
|
+
* Follows GitHub style sanitation.
|
|
14
|
+
*
|
|
15
|
+
* @type {Schema}
|
|
16
|
+
*/
|
|
17
|
+
const defaultSchema = {
|
|
18
|
+
ancestors: {
|
|
19
|
+
tbody: ['table'],
|
|
20
|
+
td: ['table'],
|
|
21
|
+
th: ['table'],
|
|
22
|
+
thead: ['table'],
|
|
23
|
+
tfoot: ['table'],
|
|
24
|
+
tr: ['table']
|
|
25
|
+
},
|
|
26
|
+
attributes: {
|
|
27
|
+
a: [
|
|
28
|
+
...aria,
|
|
29
|
+
// Note: these 3 are used by GFM footnotes, they do work on all links.
|
|
30
|
+
'dataFootnoteBackref',
|
|
31
|
+
'dataFootnoteRef',
|
|
32
|
+
['className', 'data-footnote-backref'],
|
|
33
|
+
'href'
|
|
34
|
+
],
|
|
35
|
+
blockquote: ['cite'],
|
|
36
|
+
// Note: this class is not normally allowed by GH, when manually writing
|
|
37
|
+
// `code` as HTML in markdown, they adds it some other way.
|
|
38
|
+
// We can’t do that, so we have to allow it.
|
|
39
|
+
code: [['className', /^language-./]],
|
|
40
|
+
del: ['cite'],
|
|
41
|
+
div: ['itemScope', 'itemType'],
|
|
42
|
+
dl: [...aria],
|
|
43
|
+
// Note: this is used by GFM footnotes.
|
|
44
|
+
h2: [['className', 'sr-only']],
|
|
45
|
+
img: [...aria, 'longDesc', 'src'],
|
|
46
|
+
// Note: `input` is not normally allowed by GH, when manually writing
|
|
47
|
+
// it in markdown, they add it from tasklists some other way.
|
|
48
|
+
// We can’t do that, so we have to allow it.
|
|
49
|
+
input: [
|
|
50
|
+
['disabled', true],
|
|
51
|
+
['type', 'checkbox']
|
|
52
|
+
],
|
|
53
|
+
ins: ['cite'],
|
|
54
|
+
// Note: this class is not normally allowed by GH, when manually writing
|
|
55
|
+
// `li` as HTML in markdown, they adds it some other way.
|
|
56
|
+
// We can’t do that, so we have to allow it.
|
|
57
|
+
li: [['className', 'task-list-item']],
|
|
58
|
+
// Note: this class is not normally allowed by GH, when manually writing
|
|
59
|
+
// `ol` as HTML in markdown, they adds it some other way.
|
|
60
|
+
// We can’t do that, so we have to allow it.
|
|
61
|
+
ol: [...aria, ['className', 'contains-task-list']],
|
|
62
|
+
q: ['cite'],
|
|
63
|
+
section: ['dataFootnotes', ['className', 'footnotes']],
|
|
64
|
+
source: ['srcSet'],
|
|
65
|
+
summary: [...aria],
|
|
66
|
+
table: [...aria],
|
|
67
|
+
// Note: this class is not normally allowed by GH, when manually writing
|
|
68
|
+
// `ol` as HTML in markdown, they adds it some other way.
|
|
69
|
+
// We can’t do that, so we have to allow it.
|
|
70
|
+
ul: [...aria, ['className', 'contains-task-list']],
|
|
71
|
+
'*': [
|
|
72
|
+
'abbr',
|
|
73
|
+
'accept',
|
|
74
|
+
'acceptCharset',
|
|
75
|
+
'accessKey',
|
|
76
|
+
'action',
|
|
77
|
+
'align',
|
|
78
|
+
'alt',
|
|
79
|
+
'axis',
|
|
80
|
+
'border',
|
|
81
|
+
'cellPadding',
|
|
82
|
+
'cellSpacing',
|
|
83
|
+
'char',
|
|
84
|
+
'charOff',
|
|
85
|
+
'charSet',
|
|
86
|
+
'checked',
|
|
87
|
+
'clear',
|
|
88
|
+
'colSpan',
|
|
89
|
+
'color',
|
|
90
|
+
'cols',
|
|
91
|
+
'compact',
|
|
92
|
+
'coords',
|
|
93
|
+
'dateTime',
|
|
94
|
+
'dir',
|
|
95
|
+
// Note: `disabled` is technically allowed on all elements by GH.
|
|
96
|
+
// But it is useless on everything except `input`.
|
|
97
|
+
// Because `input`s are normally not allowed, but we allow them for
|
|
98
|
+
// checkboxes due to tasklists, we allow `disabled` only there.
|
|
99
|
+
'encType',
|
|
100
|
+
'frame',
|
|
101
|
+
'hSpace',
|
|
102
|
+
'headers',
|
|
103
|
+
'height',
|
|
104
|
+
'hrefLang',
|
|
105
|
+
'htmlFor',
|
|
106
|
+
'id',
|
|
107
|
+
'isMap',
|
|
108
|
+
'itemProp',
|
|
109
|
+
'label',
|
|
110
|
+
'lang',
|
|
111
|
+
'maxLength',
|
|
112
|
+
'media',
|
|
113
|
+
'method',
|
|
114
|
+
'multiple',
|
|
115
|
+
'name',
|
|
116
|
+
'noHref',
|
|
117
|
+
'noShade',
|
|
118
|
+
'noWrap',
|
|
119
|
+
'open',
|
|
120
|
+
'prompt',
|
|
121
|
+
'readOnly',
|
|
122
|
+
'rev',
|
|
123
|
+
'rowSpan',
|
|
124
|
+
'rows',
|
|
125
|
+
'rules',
|
|
126
|
+
'scope',
|
|
127
|
+
'selected',
|
|
128
|
+
'shape',
|
|
129
|
+
'size',
|
|
130
|
+
'span',
|
|
131
|
+
'start',
|
|
132
|
+
'summary',
|
|
133
|
+
'tabIndex',
|
|
134
|
+
'title',
|
|
135
|
+
'useMap',
|
|
136
|
+
'vAlign',
|
|
137
|
+
'value',
|
|
138
|
+
'width'
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
clobber: ['ariaDescribedBy', 'ariaLabelledBy', 'id', 'name'],
|
|
142
|
+
clobberPrefix: 'user-content-',
|
|
143
|
+
protocols: {
|
|
144
|
+
cite: ['http', 'https'],
|
|
145
|
+
href: ['http', 'https', 'irc', 'ircs', 'mailto', 'xmpp'],
|
|
146
|
+
longDesc: ['http', 'https'],
|
|
147
|
+
src: ['http', 'https']
|
|
148
|
+
},
|
|
149
|
+
required: {
|
|
150
|
+
input: {disabled: true, type: 'checkbox'}
|
|
151
|
+
},
|
|
152
|
+
strip: ['script'],
|
|
153
|
+
tagNames: [
|
|
154
|
+
'a',
|
|
155
|
+
'b',
|
|
156
|
+
'blockquote',
|
|
157
|
+
'br',
|
|
158
|
+
'code',
|
|
159
|
+
'dd',
|
|
160
|
+
'del',
|
|
161
|
+
'details',
|
|
162
|
+
'div',
|
|
163
|
+
'dl',
|
|
164
|
+
'dt',
|
|
165
|
+
'em',
|
|
166
|
+
'h1',
|
|
167
|
+
'h2',
|
|
168
|
+
'h3',
|
|
169
|
+
'h4',
|
|
170
|
+
'h5',
|
|
171
|
+
'h6',
|
|
172
|
+
'hr',
|
|
173
|
+
'i',
|
|
174
|
+
'img',
|
|
175
|
+
// Note: `input` is not normally allowed by GH, when manually writing
|
|
176
|
+
// it in markdown, they add it from tasklists some other way.
|
|
177
|
+
// We can’t do that, so we have to allow it.
|
|
178
|
+
'input',
|
|
179
|
+
'ins',
|
|
180
|
+
'kbd',
|
|
181
|
+
'li',
|
|
182
|
+
'ol',
|
|
183
|
+
'p',
|
|
184
|
+
'picture',
|
|
185
|
+
'pre',
|
|
186
|
+
'q',
|
|
187
|
+
'rp',
|
|
188
|
+
'rt',
|
|
189
|
+
'ruby',
|
|
190
|
+
's',
|
|
191
|
+
'samp',
|
|
192
|
+
'section',
|
|
193
|
+
'source',
|
|
194
|
+
'span',
|
|
195
|
+
'strike',
|
|
196
|
+
'strong',
|
|
197
|
+
'sub',
|
|
198
|
+
'summary',
|
|
199
|
+
'sup',
|
|
200
|
+
'table',
|
|
201
|
+
'tbody',
|
|
202
|
+
'td',
|
|
203
|
+
'tfoot',
|
|
204
|
+
'th',
|
|
205
|
+
'thead',
|
|
206
|
+
'tr',
|
|
207
|
+
'tt',
|
|
208
|
+
'ul',
|
|
209
|
+
'var'
|
|
210
|
+
]
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
exports.defaultSchema = defaultSchema;
|
|
214
|
+
//# sourceMappingURL=schema.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.cjs","sources":["../../../../../../../../../node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.js"],"sourcesContent":["/**\n * @import {Schema} from 'hast-util-sanitize'\n */\n\n// Couple of ARIA attributes allowed in several, but not all, places.\nconst aria = ['ariaDescribedBy', 'ariaLabel', 'ariaLabelledBy']\n\n/**\n * Default schema.\n *\n * Follows GitHub style sanitation.\n *\n * @type {Schema}\n */\nexport const defaultSchema = {\n ancestors: {\n tbody: ['table'],\n td: ['table'],\n th: ['table'],\n thead: ['table'],\n tfoot: ['table'],\n tr: ['table']\n },\n attributes: {\n a: [\n ...aria,\n // Note: these 3 are used by GFM footnotes, they do work on all links.\n 'dataFootnoteBackref',\n 'dataFootnoteRef',\n ['className', 'data-footnote-backref'],\n 'href'\n ],\n blockquote: ['cite'],\n // Note: this class is not normally allowed by GH, when manually writing\n // `code` as HTML in markdown, they adds it some other way.\n // We can’t do that, so we have to allow it.\n code: [['className', /^language-./]],\n del: ['cite'],\n div: ['itemScope', 'itemType'],\n dl: [...aria],\n // Note: this is used by GFM footnotes.\n h2: [['className', 'sr-only']],\n img: [...aria, 'longDesc', 'src'],\n // Note: `input` is not normally allowed by GH, when manually writing\n // it in markdown, they add it from tasklists some other way.\n // We can’t do that, so we have to allow it.\n input: [\n ['disabled', true],\n ['type', 'checkbox']\n ],\n ins: ['cite'],\n // Note: this class is not normally allowed by GH, when manually writing\n // `li` as HTML in markdown, they adds it some other way.\n // We can’t do that, so we have to allow it.\n li: [['className', 'task-list-item']],\n // Note: this class is not normally allowed by GH, when manually writing\n // `ol` as HTML in markdown, they adds it some other way.\n // We can’t do that, so we have to allow it.\n ol: [...aria, ['className', 'contains-task-list']],\n q: ['cite'],\n section: ['dataFootnotes', ['className', 'footnotes']],\n source: ['srcSet'],\n summary: [...aria],\n table: [...aria],\n // Note: this class is not normally allowed by GH, when manually writing\n // `ol` as HTML in markdown, they adds it some other way.\n // We can’t do that, so we have to allow it.\n ul: [...aria, ['className', 'contains-task-list']],\n '*': [\n 'abbr',\n 'accept',\n 'acceptCharset',\n 'accessKey',\n 'action',\n 'align',\n 'alt',\n 'axis',\n 'border',\n 'cellPadding',\n 'cellSpacing',\n 'char',\n 'charOff',\n 'charSet',\n 'checked',\n 'clear',\n 'colSpan',\n 'color',\n 'cols',\n 'compact',\n 'coords',\n 'dateTime',\n 'dir',\n // Note: `disabled` is technically allowed on all elements by GH.\n // But it is useless on everything except `input`.\n // Because `input`s are normally not allowed, but we allow them for\n // checkboxes due to tasklists, we allow `disabled` only there.\n 'encType',\n 'frame',\n 'hSpace',\n 'headers',\n 'height',\n 'hrefLang',\n 'htmlFor',\n 'id',\n 'isMap',\n 'itemProp',\n 'label',\n 'lang',\n 'maxLength',\n 'media',\n 'method',\n 'multiple',\n 'name',\n 'noHref',\n 'noShade',\n 'noWrap',\n 'open',\n 'prompt',\n 'readOnly',\n 'rev',\n 'rowSpan',\n 'rows',\n 'rules',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'span',\n 'start',\n 'summary',\n 'tabIndex',\n 'title',\n 'useMap',\n 'vAlign',\n 'value',\n 'width'\n ]\n },\n clobber: ['ariaDescribedBy', 'ariaLabelledBy', 'id', 'name'],\n clobberPrefix: 'user-content-',\n protocols: {\n cite: ['http', 'https'],\n href: ['http', 'https', 'irc', 'ircs', 'mailto', 'xmpp'],\n longDesc: ['http', 'https'],\n src: ['http', 'https']\n },\n required: {\n input: {disabled: true, type: 'checkbox'}\n },\n strip: ['script'],\n tagNames: [\n 'a',\n 'b',\n 'blockquote',\n 'br',\n 'code',\n 'dd',\n 'del',\n 'details',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'i',\n 'img',\n // Note: `input` is not normally allowed by GH, when manually writing\n // it in markdown, they add it from tasklists some other way.\n // We can’t do that, so we have to allow it.\n 'input',\n 'ins',\n 'kbd',\n 'li',\n 'ol',\n 'p',\n 'picture',\n 'pre',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'section',\n 'source',\n 'span',\n 'strike',\n 'strong',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'tr',\n 'tt',\n 'ul',\n 'var'\n ]\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA,MAAM,IAA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,IAAI;AACR,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,GAAG;AACP,IAAI,KAAK;AACT;AACA;AACA;AACA,IAAI,OAAO;AACX,IAAI,KAAK;AACT,IAAI,KAAK;AACT,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,GAAG;AACP,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,GAAG;AACP,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,MAAM;AACV,IAAI,GAAG;AACP,IAAI,MAAM;AACV,IAAI,SAAS;AACb,IAAI,QAAQ;AACZ,IAAI,MAAM;AACV,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,IAAI;AACR,IAAI,OAAO;AACX,IAAI,IAAI;AACR,IAAI,OAAO;AACX,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,KAAK;AACT,GAAG;AACH;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {Schema} from 'hast-util-sanitize'
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Couple of ARIA attributes allowed in several, but not all, places.
|
|
6
|
+
const aria = ['ariaDescribedBy', 'ariaLabel', 'ariaLabelledBy'];
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Default schema.
|
|
10
|
+
*
|
|
11
|
+
* Follows GitHub style sanitation.
|
|
12
|
+
*
|
|
13
|
+
* @type {Schema}
|
|
14
|
+
*/
|
|
15
|
+
const defaultSchema = {
|
|
16
|
+
ancestors: {
|
|
17
|
+
tbody: ['table'],
|
|
18
|
+
td: ['table'],
|
|
19
|
+
th: ['table'],
|
|
20
|
+
thead: ['table'],
|
|
21
|
+
tfoot: ['table'],
|
|
22
|
+
tr: ['table']
|
|
23
|
+
},
|
|
24
|
+
attributes: {
|
|
25
|
+
a: [
|
|
26
|
+
...aria,
|
|
27
|
+
// Note: these 3 are used by GFM footnotes, they do work on all links.
|
|
28
|
+
'dataFootnoteBackref',
|
|
29
|
+
'dataFootnoteRef',
|
|
30
|
+
['className', 'data-footnote-backref'],
|
|
31
|
+
'href'
|
|
32
|
+
],
|
|
33
|
+
blockquote: ['cite'],
|
|
34
|
+
// Note: this class is not normally allowed by GH, when manually writing
|
|
35
|
+
// `code` as HTML in markdown, they adds it some other way.
|
|
36
|
+
// We can’t do that, so we have to allow it.
|
|
37
|
+
code: [['className', /^language-./]],
|
|
38
|
+
del: ['cite'],
|
|
39
|
+
div: ['itemScope', 'itemType'],
|
|
40
|
+
dl: [...aria],
|
|
41
|
+
// Note: this is used by GFM footnotes.
|
|
42
|
+
h2: [['className', 'sr-only']],
|
|
43
|
+
img: [...aria, 'longDesc', 'src'],
|
|
44
|
+
// Note: `input` is not normally allowed by GH, when manually writing
|
|
45
|
+
// it in markdown, they add it from tasklists some other way.
|
|
46
|
+
// We can’t do that, so we have to allow it.
|
|
47
|
+
input: [
|
|
48
|
+
['disabled', true],
|
|
49
|
+
['type', 'checkbox']
|
|
50
|
+
],
|
|
51
|
+
ins: ['cite'],
|
|
52
|
+
// Note: this class is not normally allowed by GH, when manually writing
|
|
53
|
+
// `li` as HTML in markdown, they adds it some other way.
|
|
54
|
+
// We can’t do that, so we have to allow it.
|
|
55
|
+
li: [['className', 'task-list-item']],
|
|
56
|
+
// Note: this class is not normally allowed by GH, when manually writing
|
|
57
|
+
// `ol` as HTML in markdown, they adds it some other way.
|
|
58
|
+
// We can’t do that, so we have to allow it.
|
|
59
|
+
ol: [...aria, ['className', 'contains-task-list']],
|
|
60
|
+
q: ['cite'],
|
|
61
|
+
section: ['dataFootnotes', ['className', 'footnotes']],
|
|
62
|
+
source: ['srcSet'],
|
|
63
|
+
summary: [...aria],
|
|
64
|
+
table: [...aria],
|
|
65
|
+
// Note: this class is not normally allowed by GH, when manually writing
|
|
66
|
+
// `ol` as HTML in markdown, they adds it some other way.
|
|
67
|
+
// We can’t do that, so we have to allow it.
|
|
68
|
+
ul: [...aria, ['className', 'contains-task-list']],
|
|
69
|
+
'*': [
|
|
70
|
+
'abbr',
|
|
71
|
+
'accept',
|
|
72
|
+
'acceptCharset',
|
|
73
|
+
'accessKey',
|
|
74
|
+
'action',
|
|
75
|
+
'align',
|
|
76
|
+
'alt',
|
|
77
|
+
'axis',
|
|
78
|
+
'border',
|
|
79
|
+
'cellPadding',
|
|
80
|
+
'cellSpacing',
|
|
81
|
+
'char',
|
|
82
|
+
'charOff',
|
|
83
|
+
'charSet',
|
|
84
|
+
'checked',
|
|
85
|
+
'clear',
|
|
86
|
+
'colSpan',
|
|
87
|
+
'color',
|
|
88
|
+
'cols',
|
|
89
|
+
'compact',
|
|
90
|
+
'coords',
|
|
91
|
+
'dateTime',
|
|
92
|
+
'dir',
|
|
93
|
+
// Note: `disabled` is technically allowed on all elements by GH.
|
|
94
|
+
// But it is useless on everything except `input`.
|
|
95
|
+
// Because `input`s are normally not allowed, but we allow them for
|
|
96
|
+
// checkboxes due to tasklists, we allow `disabled` only there.
|
|
97
|
+
'encType',
|
|
98
|
+
'frame',
|
|
99
|
+
'hSpace',
|
|
100
|
+
'headers',
|
|
101
|
+
'height',
|
|
102
|
+
'hrefLang',
|
|
103
|
+
'htmlFor',
|
|
104
|
+
'id',
|
|
105
|
+
'isMap',
|
|
106
|
+
'itemProp',
|
|
107
|
+
'label',
|
|
108
|
+
'lang',
|
|
109
|
+
'maxLength',
|
|
110
|
+
'media',
|
|
111
|
+
'method',
|
|
112
|
+
'multiple',
|
|
113
|
+
'name',
|
|
114
|
+
'noHref',
|
|
115
|
+
'noShade',
|
|
116
|
+
'noWrap',
|
|
117
|
+
'open',
|
|
118
|
+
'prompt',
|
|
119
|
+
'readOnly',
|
|
120
|
+
'rev',
|
|
121
|
+
'rowSpan',
|
|
122
|
+
'rows',
|
|
123
|
+
'rules',
|
|
124
|
+
'scope',
|
|
125
|
+
'selected',
|
|
126
|
+
'shape',
|
|
127
|
+
'size',
|
|
128
|
+
'span',
|
|
129
|
+
'start',
|
|
130
|
+
'summary',
|
|
131
|
+
'tabIndex',
|
|
132
|
+
'title',
|
|
133
|
+
'useMap',
|
|
134
|
+
'vAlign',
|
|
135
|
+
'value',
|
|
136
|
+
'width'
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
clobber: ['ariaDescribedBy', 'ariaLabelledBy', 'id', 'name'],
|
|
140
|
+
clobberPrefix: 'user-content-',
|
|
141
|
+
protocols: {
|
|
142
|
+
cite: ['http', 'https'],
|
|
143
|
+
href: ['http', 'https', 'irc', 'ircs', 'mailto', 'xmpp'],
|
|
144
|
+
longDesc: ['http', 'https'],
|
|
145
|
+
src: ['http', 'https']
|
|
146
|
+
},
|
|
147
|
+
required: {
|
|
148
|
+
input: {disabled: true, type: 'checkbox'}
|
|
149
|
+
},
|
|
150
|
+
strip: ['script'],
|
|
151
|
+
tagNames: [
|
|
152
|
+
'a',
|
|
153
|
+
'b',
|
|
154
|
+
'blockquote',
|
|
155
|
+
'br',
|
|
156
|
+
'code',
|
|
157
|
+
'dd',
|
|
158
|
+
'del',
|
|
159
|
+
'details',
|
|
160
|
+
'div',
|
|
161
|
+
'dl',
|
|
162
|
+
'dt',
|
|
163
|
+
'em',
|
|
164
|
+
'h1',
|
|
165
|
+
'h2',
|
|
166
|
+
'h3',
|
|
167
|
+
'h4',
|
|
168
|
+
'h5',
|
|
169
|
+
'h6',
|
|
170
|
+
'hr',
|
|
171
|
+
'i',
|
|
172
|
+
'img',
|
|
173
|
+
// Note: `input` is not normally allowed by GH, when manually writing
|
|
174
|
+
// it in markdown, they add it from tasklists some other way.
|
|
175
|
+
// We can’t do that, so we have to allow it.
|
|
176
|
+
'input',
|
|
177
|
+
'ins',
|
|
178
|
+
'kbd',
|
|
179
|
+
'li',
|
|
180
|
+
'ol',
|
|
181
|
+
'p',
|
|
182
|
+
'picture',
|
|
183
|
+
'pre',
|
|
184
|
+
'q',
|
|
185
|
+
'rp',
|
|
186
|
+
'rt',
|
|
187
|
+
'ruby',
|
|
188
|
+
's',
|
|
189
|
+
'samp',
|
|
190
|
+
'section',
|
|
191
|
+
'source',
|
|
192
|
+
'span',
|
|
193
|
+
'strike',
|
|
194
|
+
'strong',
|
|
195
|
+
'sub',
|
|
196
|
+
'summary',
|
|
197
|
+
'sup',
|
|
198
|
+
'table',
|
|
199
|
+
'tbody',
|
|
200
|
+
'td',
|
|
201
|
+
'tfoot',
|
|
202
|
+
'th',
|
|
203
|
+
'thead',
|
|
204
|
+
'tr',
|
|
205
|
+
'tt',
|
|
206
|
+
'ul',
|
|
207
|
+
'var'
|
|
208
|
+
]
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export { defaultSchema };
|
|
212
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sources":["../../../../../../../../../node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.js"],"sourcesContent":["/**\n * @import {Schema} from 'hast-util-sanitize'\n */\n\n// Couple of ARIA attributes allowed in several, but not all, places.\nconst aria = ['ariaDescribedBy', 'ariaLabel', 'ariaLabelledBy']\n\n/**\n * Default schema.\n *\n * Follows GitHub style sanitation.\n *\n * @type {Schema}\n */\nexport const defaultSchema = {\n ancestors: {\n tbody: ['table'],\n td: ['table'],\n th: ['table'],\n thead: ['table'],\n tfoot: ['table'],\n tr: ['table']\n },\n attributes: {\n a: [\n ...aria,\n // Note: these 3 are used by GFM footnotes, they do work on all links.\n 'dataFootnoteBackref',\n 'dataFootnoteRef',\n ['className', 'data-footnote-backref'],\n 'href'\n ],\n blockquote: ['cite'],\n // Note: this class is not normally allowed by GH, when manually writing\n // `code` as HTML in markdown, they adds it some other way.\n // We can’t do that, so we have to allow it.\n code: [['className', /^language-./]],\n del: ['cite'],\n div: ['itemScope', 'itemType'],\n dl: [...aria],\n // Note: this is used by GFM footnotes.\n h2: [['className', 'sr-only']],\n img: [...aria, 'longDesc', 'src'],\n // Note: `input` is not normally allowed by GH, when manually writing\n // it in markdown, they add it from tasklists some other way.\n // We can’t do that, so we have to allow it.\n input: [\n ['disabled', true],\n ['type', 'checkbox']\n ],\n ins: ['cite'],\n // Note: this class is not normally allowed by GH, when manually writing\n // `li` as HTML in markdown, they adds it some other way.\n // We can’t do that, so we have to allow it.\n li: [['className', 'task-list-item']],\n // Note: this class is not normally allowed by GH, when manually writing\n // `ol` as HTML in markdown, they adds it some other way.\n // We can’t do that, so we have to allow it.\n ol: [...aria, ['className', 'contains-task-list']],\n q: ['cite'],\n section: ['dataFootnotes', ['className', 'footnotes']],\n source: ['srcSet'],\n summary: [...aria],\n table: [...aria],\n // Note: this class is not normally allowed by GH, when manually writing\n // `ol` as HTML in markdown, they adds it some other way.\n // We can’t do that, so we have to allow it.\n ul: [...aria, ['className', 'contains-task-list']],\n '*': [\n 'abbr',\n 'accept',\n 'acceptCharset',\n 'accessKey',\n 'action',\n 'align',\n 'alt',\n 'axis',\n 'border',\n 'cellPadding',\n 'cellSpacing',\n 'char',\n 'charOff',\n 'charSet',\n 'checked',\n 'clear',\n 'colSpan',\n 'color',\n 'cols',\n 'compact',\n 'coords',\n 'dateTime',\n 'dir',\n // Note: `disabled` is technically allowed on all elements by GH.\n // But it is useless on everything except `input`.\n // Because `input`s are normally not allowed, but we allow them for\n // checkboxes due to tasklists, we allow `disabled` only there.\n 'encType',\n 'frame',\n 'hSpace',\n 'headers',\n 'height',\n 'hrefLang',\n 'htmlFor',\n 'id',\n 'isMap',\n 'itemProp',\n 'label',\n 'lang',\n 'maxLength',\n 'media',\n 'method',\n 'multiple',\n 'name',\n 'noHref',\n 'noShade',\n 'noWrap',\n 'open',\n 'prompt',\n 'readOnly',\n 'rev',\n 'rowSpan',\n 'rows',\n 'rules',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'span',\n 'start',\n 'summary',\n 'tabIndex',\n 'title',\n 'useMap',\n 'vAlign',\n 'value',\n 'width'\n ]\n },\n clobber: ['ariaDescribedBy', 'ariaLabelledBy', 'id', 'name'],\n clobberPrefix: 'user-content-',\n protocols: {\n cite: ['http', 'https'],\n href: ['http', 'https', 'irc', 'ircs', 'mailto', 'xmpp'],\n longDesc: ['http', 'https'],\n src: ['http', 'https']\n },\n required: {\n input: {disabled: true, type: 'checkbox'}\n },\n strip: ['script'],\n tagNames: [\n 'a',\n 'b',\n 'blockquote',\n 'br',\n 'code',\n 'dd',\n 'del',\n 'details',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'i',\n 'img',\n // Note: `input` is not normally allowed by GH, when manually writing\n // it in markdown, they add it from tasklists some other way.\n // We can’t do that, so we have to allow it.\n 'input',\n 'ins',\n 'kbd',\n 'li',\n 'ol',\n 'p',\n 'picture',\n 'pre',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'section',\n 'source',\n 'span',\n 'strike',\n 'strong',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'tr',\n 'tt',\n 'ul',\n 'var'\n ]\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG;AAC7B,EAAE,SAAS,EAAE;AACb,IAAI,KAAK,EAAE,CAAC,OAAO,CAAC;AACpB,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC;AACjB,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC;AACjB,IAAI,KAAK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AAS;AACb,IAAI,KAAK;AACT,IAAI,GAAG;AACP,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,MAAM;AACV,IAAI,GAAG;AACP,IAAI,MAAM;AACV,IAAI,SAAS;AACb,IAAI,QAAQ;AACZ,IAAI,MAAM;AACV,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,IAAI;AACR,IAAI,OAAO;AACX,IAAI,IAAI;AACR,IAAI,OAAO;AACX,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,KAAK;AACT,GAAG;AACH;;;;","x_google_ignoreList":[0]}
|
package/dist/node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.cjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('../../../../hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {import('hast').Root} Root
|
|
7
|
+
* @typedef {import('hast-util-sanitize').Schema} Schema
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Sanitize HTML.
|
|
13
|
+
*
|
|
14
|
+
* @param {Schema | null | undefined} [options]
|
|
15
|
+
* Configuration (optional).
|
|
16
|
+
* @returns
|
|
17
|
+
* Transform.
|
|
18
|
+
*/
|
|
19
|
+
function rehypeSanitize(options) {
|
|
20
|
+
/**
|
|
21
|
+
* @param {Root} tree
|
|
22
|
+
* Tree.
|
|
23
|
+
* @returns {Root}
|
|
24
|
+
* New tree.
|
|
25
|
+
*/
|
|
26
|
+
return function (tree) {
|
|
27
|
+
// Assume root in -> root out.
|
|
28
|
+
const result = /** @type {Root} */ (index.sanitize(tree, options));
|
|
29
|
+
return result
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
module.exports = rehypeSanitize;
|
|
34
|
+
//# sourceMappingURL=index.cjs.map
|
package/dist/node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../../../node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast-util-sanitize').Schema} Schema\n */\n\nimport {sanitize} from 'hast-util-sanitize'\n\n/**\n * Sanitize HTML.\n *\n * @param {Schema | null | undefined} [options]\n * Configuration (optional).\n * @returns\n * Transform.\n */\nexport default function rehypeSanitize(options) {\n /**\n * @param {Root} tree\n * Tree.\n * @returns {Root}\n * New tree.\n */\n return function (tree) {\n // Assume root in -> root out.\n const result = /** @type {Root} */ (sanitize(tree, options))\n return result\n }\n}\n"],"names":["sanitize"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS,cAAc,CAAC,OAAO,EAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,UAAU,IAAI,EAAE;AACzB;AACA,IAAI,MAAM,MAAM,wBAAwBA,cAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAC;AAChE,IAAI,OAAO,MAAM;AACjB,GAAG;AACH;;;;","x_google_ignoreList":[0]}
|
package/dist/node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { sanitize } from '../../../../hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {import('hast').Root} Root
|
|
5
|
+
* @typedef {import('hast-util-sanitize').Schema} Schema
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Sanitize HTML.
|
|
11
|
+
*
|
|
12
|
+
* @param {Schema | null | undefined} [options]
|
|
13
|
+
* Configuration (optional).
|
|
14
|
+
* @returns
|
|
15
|
+
* Transform.
|
|
16
|
+
*/
|
|
17
|
+
function rehypeSanitize(options) {
|
|
18
|
+
/**
|
|
19
|
+
* @param {Root} tree
|
|
20
|
+
* Tree.
|
|
21
|
+
* @returns {Root}
|
|
22
|
+
* New tree.
|
|
23
|
+
*/
|
|
24
|
+
return function (tree) {
|
|
25
|
+
// Assume root in -> root out.
|
|
26
|
+
const result = /** @type {Root} */ (sanitize(tree, options));
|
|
27
|
+
return result
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { rehypeSanitize as default };
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
package/dist/node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../../node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast-util-sanitize').Schema} Schema\n */\n\nimport {sanitize} from 'hast-util-sanitize'\n\n/**\n * Sanitize HTML.\n *\n * @param {Schema | null | undefined} [options]\n * Configuration (optional).\n * @returns\n * Transform.\n */\nexport default function rehypeSanitize(options) {\n /**\n * @param {Root} tree\n * Tree.\n * @returns {Root}\n * New tree.\n */\n return function (tree) {\n // Assume root in -> root out.\n const result = /** @type {Root} */ (sanitize(tree, options))\n return result\n }\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS,cAAc,CAAC,OAAO,EAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,UAAU,IAAI,EAAE;AACzB;AACA,IAAI,MAAM,MAAM,wBAAwB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAC;AAChE,IAAI,OAAO,MAAM;AACjB,GAAG;AACH;;;;","x_google_ignoreList":[0]}
|
|
@@ -843,10 +843,11 @@ var AdkProtocol = class extends BaseProtocols_default {
|
|
|
843
843
|
generateRequestBody(request) {
|
|
844
844
|
const { userMessage, defaultParams, dynamicParams } = request;
|
|
845
845
|
const attachParts = userMessage.attaches?.map((item) => {
|
|
846
|
+
const base64Data = item.url.startsWith("data:") ? item.url.split(",")[1] : item.url;
|
|
846
847
|
return {
|
|
847
848
|
inlineData: {
|
|
848
849
|
mimeType: item.mimeType,
|
|
849
|
-
data:
|
|
850
|
+
data: base64Data
|
|
850
851
|
}
|
|
851
852
|
};
|
|
852
853
|
}) || [];
|