@assistant-ui/react-markdown 0.7.21 → 0.8.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/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -6
- package/dist/index.mjs.map +1 -1
- package/dist/memoization.d.ts.map +1 -1
- package/dist/overrides/withDefaults.d.ts.map +1 -1
- package/dist/primitives/MarkdownText.d.ts +1 -0
- package/dist/primitives/MarkdownText.d.ts.map +1 -1
- package/dist/primitives/MarkdownText.js +1 -1
- package/dist/primitives/MarkdownText.js.map +1 -1
- package/dist/primitives/MarkdownText.mjs +1 -1
- package/dist/primitives/MarkdownText.mjs.map +1 -1
- package/package.json +9 -24
- package/src/index.ts +0 -12
- package/src/primitives/MarkdownText.tsx +2 -1
- package/dist/styles/markdown.css +0 -274
- package/dist/styles/markdown.css.map +0 -1
- package/dist/styles/tailwindcss/markdown.css +0 -106
- package/dist/styles/tailwindcss/markdown.css.json +0 -68
- package/dist/tailwindcss/index.d.ts +0 -9
- package/dist/tailwindcss/index.d.ts.map +0 -1
- package/dist/tailwindcss/index.js +0 -113
- package/dist/tailwindcss/index.js.map +0 -1
- package/dist/tailwindcss/index.mjs +0 -105
- package/dist/tailwindcss/index.mjs.map +0 -1
- package/dist/ui/code-header.d.ts +0 -4
- package/dist/ui/code-header.d.ts.map +0 -1
- package/dist/ui/code-header.js +0 -54
- package/dist/ui/code-header.js.map +0 -1
- package/dist/ui/code-header.mjs +0 -29
- package/dist/ui/code-header.mjs.map +0 -1
- package/dist/ui/markdown-text.d.ts +0 -4
- package/dist/ui/markdown-text.d.ts.map +0 -1
- package/dist/ui/markdown-text.js +0 -114
- package/dist/ui/markdown-text.js.map +0 -1
- package/dist/ui/markdown-text.mjs +0 -81
- package/dist/ui/markdown-text.mjs.map +0 -1
- package/dist/ui/useCopyToClipboard.d.ts +0 -11
- package/dist/ui/useCopyToClipboard.d.ts.map +0 -1
- package/dist/ui/useCopyToClipboard.js +0 -45
- package/dist/ui/useCopyToClipboard.js.map +0 -1
- package/dist/ui/useCopyToClipboard.mjs +0 -21
- package/dist/ui/useCopyToClipboard.mjs.map +0 -1
- package/src/styles/tailwindcss/markdown.css +0 -106
- package/src/tailwindcss/index.ts +0 -8
- package/src/ui/code-header.tsx +0 -32
- package/src/ui/markdown-text.tsx +0 -114
- package/src/ui/useCopyToClipboard.tsx +0 -26
- package/tailwindcss/README.md +0 -1
- package/tailwindcss/package-lock.json +0 -6
- package/tailwindcss/package.json +0 -5
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/* running indicator */
|
|
2
|
-
:where(.aui-md-running):empty::after,
|
|
3
|
-
:where(.aui-md-running) > :where(:not(ol):not(ul):not(pre)):last-child::after,
|
|
4
|
-
:where(.aui-md-running) > pre:last-child code::after,
|
|
5
|
-
:where(.aui-md-running)
|
|
6
|
-
> :where(:is(ol, ul):last-child)
|
|
7
|
-
> :where(li:last-child:not(:has(* > li)))::after,
|
|
8
|
-
:where(.aui-md-running)
|
|
9
|
-
> :where(:is(ol, ul):last-child)
|
|
10
|
-
> :where(li:last-child)
|
|
11
|
-
> :where(:is(ol, ul):last-child)
|
|
12
|
-
> :where(li:last-child:not(:has(* > li)))::after,
|
|
13
|
-
:where(.aui-md-running)
|
|
14
|
-
> :where(:is(ol, ul):last-child)
|
|
15
|
-
> :where(li:last-child)
|
|
16
|
-
> :where(:is(ol, ul):last-child)
|
|
17
|
-
> :where(li:last-child)
|
|
18
|
-
> :where(:is(ol, ul):last-child)
|
|
19
|
-
> :where(li:last-child)::after {
|
|
20
|
-
@apply animate-pulse font-sans content-['\25CF'] ltr:ml-1 rtl:mr-1;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* typography */
|
|
24
|
-
.aui-md-h1 {
|
|
25
|
-
@apply mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.aui-md-h2 {
|
|
29
|
-
@apply mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.aui-md-h3 {
|
|
33
|
-
@apply mb-4 mt-6 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.aui-md-h4 {
|
|
37
|
-
@apply mb-4 mt-6 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.aui-md-h5 {
|
|
41
|
-
@apply my-4 text-lg font-semibold first:mt-0 last:mb-0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.aui-md-h6 {
|
|
45
|
-
@apply my-4 font-semibold first:mt-0 last:mb-0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.aui-md-p {
|
|
49
|
-
@apply mb-5 mt-5 leading-7 first:mt-0 last:mb-0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.aui-md-a {
|
|
53
|
-
@apply text-aui-primary font-medium underline underline-offset-4;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.aui-md-blockquote {
|
|
57
|
-
@apply border-l-2 pl-6 italic;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.aui-md-ul {
|
|
61
|
-
@apply my-5 ml-6 list-disc [&>li]:mt-2;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.aui-md-ol {
|
|
65
|
-
@apply my-5 ml-6 list-decimal [&>li]:mt-2;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.aui-md-hr {
|
|
69
|
-
@apply my-5 border-b;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.aui-md-table {
|
|
73
|
-
@apply my-5 w-full border-separate border-spacing-0 overflow-y-auto;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.aui-md-th {
|
|
77
|
-
@apply bg-aui-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.aui-md-td {
|
|
81
|
-
@apply border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.aui-md-tr {
|
|
85
|
-
@apply m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.aui-md-sup {
|
|
89
|
-
@apply [&>a]:text-xs [&>a]:no-underline;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.aui-md-pre {
|
|
93
|
-
@apply overflow-x-auto rounded-b-lg bg-black p-4 text-white;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.aui-md-inline-code {
|
|
97
|
-
@apply bg-aui-muted rounded border font-semibold;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.aui-code-header-root {
|
|
101
|
-
@apply flex items-center justify-between gap-4 rounded-t-lg bg-zinc-900 px-4 py-2 text-sm font-semibold text-white;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.aui-code-header-language {
|
|
105
|
-
@apply lowercase [&>span]:text-xs;
|
|
106
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
":where(.aui-md-running):empty::after,\n:where(.aui-md-running) > :where(:not(ol):not(ul):not(pre)):last-child::after,\n:where(.aui-md-running) > pre:last-child code::after,\n:where(.aui-md-running)\n > :where(:is(ol, ul):last-child)\n > :where(li:last-child:not(:has(* > li)))::after,\n:where(.aui-md-running)\n > :where(:is(ol, ul):last-child)\n > :where(li:last-child)\n > :where(:is(ol, ul):last-child)\n > :where(li:last-child:not(:has(* > li)))::after,\n:where(.aui-md-running)\n > :where(:is(ol, ul):last-child)\n > :where(li:last-child)\n > :where(:is(ol, ul):last-child)\n > :where(li:last-child)\n > :where(:is(ol, ul):last-child)\n > :where(li:last-child)::after": {
|
|
3
|
-
"@apply animate-pulse font-sans content-['\\25CF'] ltr:ml-1 rtl:mr-1": {}
|
|
4
|
-
},
|
|
5
|
-
".aui-md-h1": {
|
|
6
|
-
"@apply mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0": {}
|
|
7
|
-
},
|
|
8
|
-
".aui-md-h2": {
|
|
9
|
-
"@apply mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0": {}
|
|
10
|
-
},
|
|
11
|
-
".aui-md-h3": {
|
|
12
|
-
"@apply mb-4 mt-6 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0": {}
|
|
13
|
-
},
|
|
14
|
-
".aui-md-h4": {
|
|
15
|
-
"@apply mb-4 mt-6 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0": {}
|
|
16
|
-
},
|
|
17
|
-
".aui-md-h5": {
|
|
18
|
-
"@apply my-4 text-lg font-semibold first:mt-0 last:mb-0": {}
|
|
19
|
-
},
|
|
20
|
-
".aui-md-h6": {
|
|
21
|
-
"@apply my-4 font-semibold first:mt-0 last:mb-0": {}
|
|
22
|
-
},
|
|
23
|
-
".aui-md-p": {
|
|
24
|
-
"@apply mb-5 mt-5 leading-7 first:mt-0 last:mb-0": {}
|
|
25
|
-
},
|
|
26
|
-
".aui-md-a": {
|
|
27
|
-
"@apply text-aui-primary font-medium underline underline-offset-4": {}
|
|
28
|
-
},
|
|
29
|
-
".aui-md-blockquote": {
|
|
30
|
-
"@apply border-l-2 pl-6 italic": {}
|
|
31
|
-
},
|
|
32
|
-
".aui-md-ul": {
|
|
33
|
-
"@apply my-5 ml-6 list-disc [&>li]:mt-2": {}
|
|
34
|
-
},
|
|
35
|
-
".aui-md-ol": {
|
|
36
|
-
"@apply my-5 ml-6 list-decimal [&>li]:mt-2": {}
|
|
37
|
-
},
|
|
38
|
-
".aui-md-hr": {
|
|
39
|
-
"@apply my-5 border-b": {}
|
|
40
|
-
},
|
|
41
|
-
".aui-md-table": {
|
|
42
|
-
"@apply my-5 w-full border-separate border-spacing-0 overflow-y-auto": {}
|
|
43
|
-
},
|
|
44
|
-
".aui-md-th": {
|
|
45
|
-
"@apply bg-aui-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right": {}
|
|
46
|
-
},
|
|
47
|
-
".aui-md-td": {
|
|
48
|
-
"@apply border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right": {}
|
|
49
|
-
},
|
|
50
|
-
".aui-md-tr": {
|
|
51
|
-
"@apply m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg": {}
|
|
52
|
-
},
|
|
53
|
-
".aui-md-sup": {
|
|
54
|
-
"@apply [&>a]:text-xs [&>a]:no-underline": {}
|
|
55
|
-
},
|
|
56
|
-
".aui-md-pre": {
|
|
57
|
-
"@apply overflow-x-auto rounded-b-lg bg-black p-4 text-white": {}
|
|
58
|
-
},
|
|
59
|
-
".aui-md-inline-code": {
|
|
60
|
-
"@apply bg-aui-muted rounded border font-semibold": {}
|
|
61
|
-
},
|
|
62
|
-
".aui-code-header-root": {
|
|
63
|
-
"@apply flex items-center justify-between gap-4 rounded-t-lg bg-zinc-900 px-4 py-2 text-sm font-semibold text-white": {}
|
|
64
|
-
},
|
|
65
|
-
".aui-code-header-language": {
|
|
66
|
-
"@apply lowercase [&>span]:text-xs": {}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const auiPlugin: {
|
|
2
|
-
(options: {}): {
|
|
3
|
-
handler: import("tailwindcss/types/config").PluginCreator;
|
|
4
|
-
config?: Partial<import("tailwindcss/types/config").Config>;
|
|
5
|
-
};
|
|
6
|
-
__isOptionsFunction: true;
|
|
7
|
-
};
|
|
8
|
-
export default auiPlugin;
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tailwindcss/index.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS;;;cAIP,CAAC;;;CAFP,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
|
-
var __export = (target, all) => {
|
|
12
|
-
for (var name in all)
|
|
13
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
-
};
|
|
15
|
-
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
-
for (let key of __getOwnPropNames(from))
|
|
18
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
-
mod
|
|
30
|
-
));
|
|
31
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
-
|
|
33
|
-
// ../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/util/createPlugin.js
|
|
34
|
-
var require_createPlugin = __commonJS({
|
|
35
|
-
"../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/util/createPlugin.js"(exports2) {
|
|
36
|
-
"use strict";
|
|
37
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
38
|
-
value: true
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(exports2, "default", {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
get: function() {
|
|
43
|
-
return _default;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
function createPlugin(plugin2, config) {
|
|
47
|
-
return {
|
|
48
|
-
handler: plugin2,
|
|
49
|
-
config
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
createPlugin.withOptions = function(pluginFunction, configFunction = () => ({})) {
|
|
53
|
-
const optionsFunction = function(options) {
|
|
54
|
-
return {
|
|
55
|
-
__options: options,
|
|
56
|
-
handler: pluginFunction(options),
|
|
57
|
-
config: configFunction(options)
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
optionsFunction.__isOptionsFunction = true;
|
|
61
|
-
optionsFunction.__pluginFunction = pluginFunction;
|
|
62
|
-
optionsFunction.__configFunction = configFunction;
|
|
63
|
-
return optionsFunction;
|
|
64
|
-
};
|
|
65
|
-
var _default = createPlugin;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// ../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/public/create-plugin.js
|
|
70
|
-
var require_create_plugin = __commonJS({
|
|
71
|
-
"../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/public/create-plugin.js"(exports2) {
|
|
72
|
-
"use strict";
|
|
73
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
74
|
-
value: true
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(exports2, "default", {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function() {
|
|
79
|
-
return _default;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
var _createPlugin = /* @__PURE__ */ _interop_require_default(require_createPlugin());
|
|
83
|
-
function _interop_require_default(obj) {
|
|
84
|
-
return obj && obj.__esModule ? obj : {
|
|
85
|
-
default: obj
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
var _default = _createPlugin.default;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
// ../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/plugin.js
|
|
93
|
-
var require_plugin = __commonJS({
|
|
94
|
-
"../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/plugin.js"(exports2, module2) {
|
|
95
|
-
"use strict";
|
|
96
|
-
var createPlugin = require_create_plugin();
|
|
97
|
-
module2.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// src/tailwindcss/index.ts
|
|
102
|
-
var tailwindcss_exports = {};
|
|
103
|
-
__export(tailwindcss_exports, {
|
|
104
|
-
default: () => tailwindcss_default
|
|
105
|
-
});
|
|
106
|
-
module.exports = __toCommonJS(tailwindcss_exports);
|
|
107
|
-
var import_plugin = __toESM(require_plugin());
|
|
108
|
-
var import_markdown_css = __toESM(require("../../dist/styles/tailwindcss/markdown.css.json"));
|
|
109
|
-
var auiPlugin = import_plugin.default.withOptions(() => ({ addComponents }) => {
|
|
110
|
-
addComponents(import_markdown_css.default);
|
|
111
|
-
});
|
|
112
|
-
var tailwindcss_default = auiPlugin;
|
|
113
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/util/createPlugin.js","../../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/public/create-plugin.js","../../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/plugin.js","../../src/tailwindcss/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","import plugin from \"tailwindcss/plugin.js\";\nimport markdownCSS from \"../../dist/styles/tailwindcss/markdown.css.json\";\n\nconst auiPlugin = plugin.withOptions<{}>(() => ({ addComponents }) => {\n addComponents(markdownCSS);\n});\n\nexport default auiPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,kGAAAA,UAAA;AAAA;AACA,WAAO,eAAeA,UAAS,cAAc;AAAA,MACzC,OAAO;AAAA,IACX,CAAC;AACD,WAAO,eAAeA,UAAS,WAAW;AAAA,MACtC,YAAY;AAAA,MACZ,KAAK,WAAW;AACZ,eAAO;AAAA,MACX;AAAA,IACJ,CAAC;AACD,aAAS,aAAaC,SAAQ,QAAQ;AAClC,aAAO;AAAA,QACH,SAASA;AAAA,QACT;AAAA,MACJ;AAAA,IACJ;AACA,iBAAa,cAAc,SAAS,gBAAgB,iBAAiB,OAAK,CAAC,IAAI;AAC3E,YAAM,kBAAkB,SAAS,SAAS;AACtC,eAAO;AAAA,UACH,WAAW;AAAA,UACX,SAAS,eAAe,OAAO;AAAA,UAC/B,QAAQ,eAAe,OAAO;AAAA,QAClC;AAAA,MACJ;AACA,sBAAgB,sBAAsB;AAGtC,sBAAgB,mBAAmB;AACnC,sBAAgB,mBAAmB;AACnC,aAAO;AAAA,IACX;AACA,QAAM,WAAW;AAAA;AAAA;;;AC/BjB;AAAA,qGAAAC,UAAA;AAAA;AACA,WAAO,eAAeA,UAAS,cAAc;AAAA,MACzC,OAAO;AAAA,IACX,CAAC;AACD,WAAO,eAAeA,UAAS,WAAW;AAAA,MACtC,YAAY;AAAA,MACZ,KAAK,WAAW;AACZ,eAAO;AAAA,MACX;AAAA,IACJ,CAAC;AACD,QAAM,gBAA8B,yCAAyB,sBAA+B;AAC5F,aAAS,yBAAyB,KAAK;AACnC,aAAO,OAAO,IAAI,aAAa,MAAM;AAAA,QACjC,SAAS;AAAA,MACb;AAAA,IACJ;AACA,QAAM,WAAW,cAAc;AAAA;AAAA;;;AChB/B;AAAA,mFAAAC,UAAAC,SAAA;AAAA;AAAA,QAAI,eAAe;AACnB,IAAAA,QAAO,WAAW,aAAa,aAAa,eAAe,EAAE,SAAS,aAAa,GAAG;AAAA;AAAA;;;ACDtF;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmB;AACnB,0BAAwB;AAExB,IAAM,YAAY,cAAAC,QAAO,YAAgB,MAAM,CAAC,EAAE,cAAc,MAAM;AACpE,gBAAc,oBAAAC,OAAW;AAC3B,CAAC;AAED,IAAO,sBAAQ;","names":["exports","plugin","exports","exports","module","plugin","markdownCSS"]}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
-
mod
|
|
25
|
-
));
|
|
26
|
-
|
|
27
|
-
// ../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/util/createPlugin.js
|
|
28
|
-
var require_createPlugin = __commonJS({
|
|
29
|
-
"../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/util/createPlugin.js"(exports) {
|
|
30
|
-
"use strict";
|
|
31
|
-
Object.defineProperty(exports, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
});
|
|
34
|
-
Object.defineProperty(exports, "default", {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function() {
|
|
37
|
-
return _default;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
function createPlugin(plugin2, config) {
|
|
41
|
-
return {
|
|
42
|
-
handler: plugin2,
|
|
43
|
-
config
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
createPlugin.withOptions = function(pluginFunction, configFunction = () => ({})) {
|
|
47
|
-
const optionsFunction = function(options) {
|
|
48
|
-
return {
|
|
49
|
-
__options: options,
|
|
50
|
-
handler: pluginFunction(options),
|
|
51
|
-
config: configFunction(options)
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
optionsFunction.__isOptionsFunction = true;
|
|
55
|
-
optionsFunction.__pluginFunction = pluginFunction;
|
|
56
|
-
optionsFunction.__configFunction = configFunction;
|
|
57
|
-
return optionsFunction;
|
|
58
|
-
};
|
|
59
|
-
var _default = createPlugin;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// ../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/public/create-plugin.js
|
|
64
|
-
var require_create_plugin = __commonJS({
|
|
65
|
-
"../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/public/create-plugin.js"(exports) {
|
|
66
|
-
"use strict";
|
|
67
|
-
Object.defineProperty(exports, "__esModule", {
|
|
68
|
-
value: true
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(exports, "default", {
|
|
71
|
-
enumerable: true,
|
|
72
|
-
get: function() {
|
|
73
|
-
return _default;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
var _createPlugin = /* @__PURE__ */ _interop_require_default(require_createPlugin());
|
|
77
|
-
function _interop_require_default(obj) {
|
|
78
|
-
return obj && obj.__esModule ? obj : {
|
|
79
|
-
default: obj
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
var _default = _createPlugin.default;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
// ../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/plugin.js
|
|
87
|
-
var require_plugin = __commonJS({
|
|
88
|
-
"../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/plugin.js"(exports, module) {
|
|
89
|
-
"use strict";
|
|
90
|
-
var createPlugin = require_create_plugin();
|
|
91
|
-
module.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// src/tailwindcss/index.ts
|
|
96
|
-
var import_plugin = __toESM(require_plugin());
|
|
97
|
-
import markdownCSS from "../../dist/styles/tailwindcss/markdown.css.json";
|
|
98
|
-
var auiPlugin = import_plugin.default.withOptions(() => ({ addComponents }) => {
|
|
99
|
-
addComponents(markdownCSS);
|
|
100
|
-
});
|
|
101
|
-
var tailwindcss_default = auiPlugin;
|
|
102
|
-
export {
|
|
103
|
-
tailwindcss_default as default
|
|
104
|
-
};
|
|
105
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/util/createPlugin.js","../../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/public/create-plugin.js","../../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/plugin.js","../../src/tailwindcss/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","import plugin from \"tailwindcss/plugin.js\";\nimport markdownCSS from \"../../dist/styles/tailwindcss/markdown.css.json\";\n\nconst auiPlugin = plugin.withOptions<{}>(() => ({ addComponents }) => {\n addComponents(markdownCSS);\n});\n\nexport default auiPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AACA,WAAO,eAAe,SAAS,cAAc;AAAA,MACzC,OAAO;AAAA,IACX,CAAC;AACD,WAAO,eAAe,SAAS,WAAW;AAAA,MACtC,YAAY;AAAA,MACZ,KAAK,WAAW;AACZ,eAAO;AAAA,MACX;AAAA,IACJ,CAAC;AACD,aAAS,aAAaA,SAAQ,QAAQ;AAClC,aAAO;AAAA,QACH,SAASA;AAAA,QACT;AAAA,MACJ;AAAA,IACJ;AACA,iBAAa,cAAc,SAAS,gBAAgB,iBAAiB,OAAK,CAAC,IAAI;AAC3E,YAAM,kBAAkB,SAAS,SAAS;AACtC,eAAO;AAAA,UACH,WAAW;AAAA,UACX,SAAS,eAAe,OAAO;AAAA,UAC/B,QAAQ,eAAe,OAAO;AAAA,QAClC;AAAA,MACJ;AACA,sBAAgB,sBAAsB;AAGtC,sBAAgB,mBAAmB;AACnC,sBAAgB,mBAAmB;AACnC,aAAO;AAAA,IACX;AACA,QAAM,WAAW;AAAA;AAAA;;;AC/BjB;AAAA;AAAA;AACA,WAAO,eAAe,SAAS,cAAc;AAAA,MACzC,OAAO;AAAA,IACX,CAAC;AACD,WAAO,eAAe,SAAS,WAAW;AAAA,MACtC,YAAY;AAAA,MACZ,KAAK,WAAW;AACZ,eAAO;AAAA,MACX;AAAA,IACJ,CAAC;AACD,QAAM,gBAA8B,yCAAyB,sBAA+B;AAC5F,aAAS,yBAAyB,KAAK;AACnC,aAAO,OAAO,IAAI,aAAa,MAAM;AAAA,QACjC,SAAS;AAAA,MACb;AAAA,IACJ;AACA,QAAM,WAAW,cAAc;AAAA;AAAA;;;AChB/B;AAAA;AAAA;AAAA,QAAI,eAAe;AACnB,WAAO,WAAW,aAAa,aAAa,eAAe,EAAE,SAAS,aAAa,GAAG;AAAA;AAAA;;;ACDtF,oBAAmB;AACnB,OAAO,iBAAiB;AAExB,IAAM,YAAY,cAAAC,QAAO,YAAgB,MAAM,CAAC,EAAE,cAAc,MAAM;AACpE,gBAAc,WAAW;AAC3B,CAAC;AAED,IAAO,sBAAQ;","names":["plugin","plugin"]}
|
package/dist/ui/code-header.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-header.d.ts","sourceRoot":"","sources":["../../src/ui/code-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsB1C,CAAC"}
|
package/dist/ui/code-header.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/ui/code-header.tsx
|
|
21
|
-
var code_header_exports = {};
|
|
22
|
-
__export(code_header_exports, {
|
|
23
|
-
CodeHeader: () => CodeHeader
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(code_header_exports);
|
|
26
|
-
var import_lucide_react = require("lucide-react");
|
|
27
|
-
var import_react = require("@assistant-ui/react");
|
|
28
|
-
var import_useCopyToClipboard = require("./useCopyToClipboard.js");
|
|
29
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
-
var { TooltipIconButton } = import_react.INTERNAL;
|
|
31
|
-
var CodeHeader = ({ language, code }) => {
|
|
32
|
-
const {
|
|
33
|
-
strings: {
|
|
34
|
-
code: { header: { copy: { tooltip = "Copy" } = {} } = {} } = {}
|
|
35
|
-
} = {}
|
|
36
|
-
} = (0, import_react.useThreadConfig)();
|
|
37
|
-
const { isCopied, copyToClipboard } = (0, import_useCopyToClipboard.useCopyToClipboard)();
|
|
38
|
-
const onCopy = () => {
|
|
39
|
-
if (!code || isCopied) return;
|
|
40
|
-
copyToClipboard(code);
|
|
41
|
-
};
|
|
42
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "aui-code-header-root", children: [
|
|
43
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "aui-code-header-language", children: language }),
|
|
44
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipIconButton, { tooltip, onClick: onCopy, children: [
|
|
45
|
-
!isCopied && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CopyIcon, {}),
|
|
46
|
-
isCopied && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckIcon, {})
|
|
47
|
-
] })
|
|
48
|
-
] });
|
|
49
|
-
};
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
CodeHeader
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=code-header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/code-header.tsx"],"sourcesContent":["import { FC } from \"react\";\nimport { CheckIcon, CopyIcon } from \"lucide-react\";\nimport { INTERNAL, useThreadConfig } from \"@assistant-ui/react\";\n\nimport { CodeHeaderProps } from \"../overrides/types\";\nimport { useCopyToClipboard } from \"./useCopyToClipboard\";\n\nconst { TooltipIconButton } = INTERNAL;\n\nexport const CodeHeader: FC<CodeHeaderProps> = ({ language, code }) => {\n const {\n strings: {\n code: { header: { copy: { tooltip = \"Copy\" } = {} } = {} } = {},\n } = {},\n } = useThreadConfig();\n\n const { isCopied, copyToClipboard } = useCopyToClipboard();\n const onCopy = () => {\n if (!code || isCopied) return;\n copyToClipboard(code);\n };\n\n return (\n <div className=\"aui-code-header-root\">\n <span className=\"aui-code-header-language\">{language}</span>\n <TooltipIconButton tooltip={tooltip} onClick={onCopy}>\n {!isCopied && <CopyIcon />}\n {isCopied && <CheckIcon />}\n </TooltipIconButton>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAoC;AACpC,mBAA0C;AAG1C,gCAAmC;AAmB7B;AAjBN,IAAM,EAAE,kBAAkB,IAAI;AAEvB,IAAM,aAAkC,CAAC,EAAE,UAAU,KAAK,MAAM;AACrE,QAAM;AAAA,IACJ,SAAS;AAAA,MACP,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,OAAO,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;AAAA,IAChE,IAAI,CAAC;AAAA,EACP,QAAI,8BAAgB;AAEpB,QAAM,EAAE,UAAU,gBAAgB,QAAI,8CAAmB;AACzD,QAAM,SAAS,MAAM;AACnB,QAAI,CAAC,QAAQ,SAAU;AACvB,oBAAgB,IAAI;AAAA,EACtB;AAEA,SACE,6CAAC,SAAI,WAAU,wBACb;AAAA,gDAAC,UAAK,WAAU,4BAA4B,oBAAS;AAAA,IACrD,6CAAC,qBAAkB,SAAkB,SAAS,QAC3C;AAAA,OAAC,YAAY,4CAAC,gCAAS;AAAA,MACvB,YAAY,4CAAC,iCAAU;AAAA,OAC1B;AAAA,KACF;AAEJ;","names":[]}
|
package/dist/ui/code-header.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// src/ui/code-header.tsx
|
|
2
|
-
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
3
|
-
import { INTERNAL, useThreadConfig } from "@assistant-ui/react";
|
|
4
|
-
import { useCopyToClipboard } from "./useCopyToClipboard.mjs";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
var { TooltipIconButton } = INTERNAL;
|
|
7
|
-
var CodeHeader = ({ language, code }) => {
|
|
8
|
-
const {
|
|
9
|
-
strings: {
|
|
10
|
-
code: { header: { copy: { tooltip = "Copy" } = {} } = {} } = {}
|
|
11
|
-
} = {}
|
|
12
|
-
} = useThreadConfig();
|
|
13
|
-
const { isCopied, copyToClipboard } = useCopyToClipboard();
|
|
14
|
-
const onCopy = () => {
|
|
15
|
-
if (!code || isCopied) return;
|
|
16
|
-
copyToClipboard(code);
|
|
17
|
-
};
|
|
18
|
-
return /* @__PURE__ */ jsxs("div", { className: "aui-code-header-root", children: [
|
|
19
|
-
/* @__PURE__ */ jsx("span", { className: "aui-code-header-language", children: language }),
|
|
20
|
-
/* @__PURE__ */ jsxs(TooltipIconButton, { tooltip, onClick: onCopy, children: [
|
|
21
|
-
!isCopied && /* @__PURE__ */ jsx(CopyIcon, {}),
|
|
22
|
-
isCopied && /* @__PURE__ */ jsx(CheckIcon, {})
|
|
23
|
-
] })
|
|
24
|
-
] });
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
CodeHeader
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=code-header.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/code-header.tsx"],"sourcesContent":["import { FC } from \"react\";\nimport { CheckIcon, CopyIcon } from \"lucide-react\";\nimport { INTERNAL, useThreadConfig } from \"@assistant-ui/react\";\n\nimport { CodeHeaderProps } from \"../overrides/types\";\nimport { useCopyToClipboard } from \"./useCopyToClipboard\";\n\nconst { TooltipIconButton } = INTERNAL;\n\nexport const CodeHeader: FC<CodeHeaderProps> = ({ language, code }) => {\n const {\n strings: {\n code: { header: { copy: { tooltip = \"Copy\" } = {} } = {} } = {},\n } = {},\n } = useThreadConfig();\n\n const { isCopied, copyToClipboard } = useCopyToClipboard();\n const onCopy = () => {\n if (!code || isCopied) return;\n copyToClipboard(code);\n };\n\n return (\n <div className=\"aui-code-header-root\">\n <span className=\"aui-code-header-language\">{language}</span>\n <TooltipIconButton tooltip={tooltip} onClick={onCopy}>\n {!isCopied && <CopyIcon />}\n {isCopied && <CheckIcon />}\n </TooltipIconButton>\n </div>\n );\n};\n"],"mappings":";AACA,SAAS,WAAW,gBAAgB;AACpC,SAAS,UAAU,uBAAuB;AAG1C,SAAS,0BAA0B;AAmB7B,cACA,YADA;AAjBN,IAAM,EAAE,kBAAkB,IAAI;AAEvB,IAAM,aAAkC,CAAC,EAAE,UAAU,KAAK,MAAM;AACrE,QAAM;AAAA,IACJ,SAAS;AAAA,MACP,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,OAAO,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;AAAA,IAChE,IAAI,CAAC;AAAA,EACP,IAAI,gBAAgB;AAEpB,QAAM,EAAE,UAAU,gBAAgB,IAAI,mBAAmB;AACzD,QAAM,SAAS,MAAM;AACnB,QAAI,CAAC,QAAQ,SAAU;AACvB,oBAAgB,IAAI;AAAA,EACtB;AAEA,SACE,qBAAC,SAAI,WAAU,wBACb;AAAA,wBAAC,UAAK,WAAU,4BAA4B,oBAAS;AAAA,IACrD,qBAAC,qBAAkB,SAAkB,SAAS,QAC3C;AAAA,OAAC,YAAY,oBAAC,YAAS;AAAA,MACvB,YAAY,oBAAC,aAAU;AAAA,OAC1B;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { MarkdownTextPrimitiveProps } from "../primitives/MarkdownText";
|
|
2
|
-
export type MakeMarkdownTextProps = MarkdownTextPrimitiveProps;
|
|
3
|
-
export declare const makeMarkdownText: ({ className, components: userComponents, ...rest }?: MakeMarkdownTextProps) => import("react").NamedExoticComponent<{}>;
|
|
4
|
-
//# sourceMappingURL=markdown-text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-text.d.ts","sourceRoot":"","sources":["../../src/ui/markdown-text.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AAMpC,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAwE/D,eAAO,MAAM,gBAAgB,wDAI1B,qBAAqB,6CAyBvB,CAAC"}
|
package/dist/ui/markdown-text.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/ui/markdown-text.tsx
|
|
31
|
-
var markdown_text_exports = {};
|
|
32
|
-
__export(markdown_text_exports, {
|
|
33
|
-
makeMarkdownText: () => makeMarkdownText
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(markdown_text_exports);
|
|
36
|
-
var import_react = require("react");
|
|
37
|
-
var import_code_header = require("./code-header.js");
|
|
38
|
-
var import_classnames = __toESM(require("classnames"));
|
|
39
|
-
var import_MarkdownText = require("../primitives/MarkdownText.js");
|
|
40
|
-
var import_react2 = require("@assistant-ui/react");
|
|
41
|
-
var import_PreOverride = require("../overrides/PreOverride.js");
|
|
42
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
-
var { withSmoothContextProvider, useSmoothStatus } = import_react2.INTERNAL;
|
|
44
|
-
var defaultComponents = {
|
|
45
|
-
h1: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: (0, import_classnames.default)("aui-md-h1", className), ...props }),
|
|
46
|
-
h2: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: (0, import_classnames.default)("aui-md-h2", className), ...props }),
|
|
47
|
-
h3: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: (0, import_classnames.default)("aui-md-h3", className), ...props }),
|
|
48
|
-
h4: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: (0, import_classnames.default)("aui-md-h4", className), ...props }),
|
|
49
|
-
h5: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h5", { className: (0, import_classnames.default)("aui-md-h5", className), ...props }),
|
|
50
|
-
h6: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h6", { className: (0, import_classnames.default)("aui-md-h6", className), ...props }),
|
|
51
|
-
p: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: (0, import_classnames.default)("aui-md-p", className), ...props }),
|
|
52
|
-
a: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { className: (0, import_classnames.default)("aui-md-a", className), ...props }),
|
|
53
|
-
blockquote: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
-
"blockquote",
|
|
55
|
-
{
|
|
56
|
-
className: (0, import_classnames.default)("aui-md-blockquote", className),
|
|
57
|
-
...props
|
|
58
|
-
}
|
|
59
|
-
),
|
|
60
|
-
ul: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: (0, import_classnames.default)("aui-md-ul", className), ...props }),
|
|
61
|
-
ol: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: (0, import_classnames.default)("aui-md-ol", className), ...props }),
|
|
62
|
-
hr: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", { className: (0, import_classnames.default)("aui-md-hr", className), ...props }),
|
|
63
|
-
table: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", { className: (0, import_classnames.default)("aui-md-table", className), ...props }),
|
|
64
|
-
th: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: (0, import_classnames.default)("aui-md-th", className), ...props }),
|
|
65
|
-
td: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: (0, import_classnames.default)("aui-md-td", className), ...props }),
|
|
66
|
-
tr: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { className: (0, import_classnames.default)("aui-md-tr", className), ...props }),
|
|
67
|
-
sup: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("sup", { className: (0, import_classnames.default)("aui-md-sup", className), ...props }),
|
|
68
|
-
pre: ({ node, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { className: (0, import_classnames.default)("aui-md-pre", className), ...props }),
|
|
69
|
-
code: ({ node, className, ...props }) => {
|
|
70
|
-
const isCodeBlock = (0, import_PreOverride.useIsMarkdownCodeBlock)();
|
|
71
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
-
"code",
|
|
73
|
-
{
|
|
74
|
-
className: (0, import_classnames.default)(!isCodeBlock && "aui-md-inline-code", className),
|
|
75
|
-
...props
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
},
|
|
79
|
-
CodeHeader: import_code_header.CodeHeader
|
|
80
|
-
};
|
|
81
|
-
var makeMarkdownText = ({
|
|
82
|
-
className,
|
|
83
|
-
components: userComponents,
|
|
84
|
-
...rest
|
|
85
|
-
} = {}) => {
|
|
86
|
-
const components = {
|
|
87
|
-
...defaultComponents,
|
|
88
|
-
...Object.fromEntries(
|
|
89
|
-
// ignore undefined values, so undefined values do not override default components
|
|
90
|
-
Object.entries(userComponents ?? {}).filter(([_, v]) => v !== void 0)
|
|
91
|
-
)
|
|
92
|
-
};
|
|
93
|
-
const MarkdownTextImpl = () => {
|
|
94
|
-
const status = useSmoothStatus();
|
|
95
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
-
import_MarkdownText.MarkdownTextPrimitive,
|
|
97
|
-
{
|
|
98
|
-
components,
|
|
99
|
-
...rest,
|
|
100
|
-
className: (0, import_classnames.default)(
|
|
101
|
-
status.type === "running" && "aui-md-running",
|
|
102
|
-
className
|
|
103
|
-
)
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
MarkdownTextImpl.displayName = "MarkdownText";
|
|
108
|
-
return (0, import_react.memo)(withSmoothContextProvider(MarkdownTextImpl), () => true);
|
|
109
|
-
};
|
|
110
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
111
|
-
0 && (module.exports = {
|
|
112
|
-
makeMarkdownText
|
|
113
|
-
});
|
|
114
|
-
//# sourceMappingURL=markdown-text.js.map
|