@koide-labs/ui 0.0.7 → 0.0.9
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.
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
2
|
+
import { jsxs as re, jsx as P } from "react/jsx-runtime";
|
|
3
|
+
import { c as J } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { useMemo as ie } from "react";
|
|
5
|
-
import { Surface as
|
|
5
|
+
import { Surface as V } from "../surface/index.js";
|
|
6
6
|
import { Text as se } from "../text/index.js";
|
|
7
7
|
import { View as ue } from "../view/index.js";
|
|
8
|
-
import '../../index22.css';var
|
|
8
|
+
import '../../index22.css';var K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
9
9
|
function le(b) {
|
|
10
10
|
return b && b.__esModule && Object.prototype.hasOwnProperty.call(b, "default") ? b.default : b;
|
|
11
11
|
}
|
|
12
|
-
var Z = { exports: {} },
|
|
12
|
+
var Z = { exports: {} }, Q;
|
|
13
13
|
function oe() {
|
|
14
|
-
return
|
|
15
|
-
var
|
|
14
|
+
return Q || (Q = 1, (function(b) {
|
|
15
|
+
var j = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
|
16
16
|
var i = (function(g) {
|
|
17
17
|
var f = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, F = 0, A = {}, s = {
|
|
18
18
|
/**
|
|
@@ -358,8 +358,8 @@ function oe() {
|
|
|
358
358
|
a.hasOwnProperty(o) || (l[o] = r[o]);
|
|
359
359
|
}
|
|
360
360
|
var d = n[t];
|
|
361
|
-
return n[t] = l, s.languages.DFS(s.languages, function(v,
|
|
362
|
-
|
|
361
|
+
return n[t] = l, s.languages.DFS(s.languages, function(v, _) {
|
|
362
|
+
_ === d && v != t && (this[v] = l);
|
|
363
363
|
}), l;
|
|
364
364
|
},
|
|
365
365
|
// Traverse a language definition with Depth First Search
|
|
@@ -454,8 +454,8 @@ function oe() {
|
|
|
454
454
|
grammar: r,
|
|
455
455
|
code: o
|
|
456
456
|
};
|
|
457
|
-
function d(
|
|
458
|
-
u.highlightedCode =
|
|
457
|
+
function d(_) {
|
|
458
|
+
u.highlightedCode = _, s.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, s.hooks.run("after-highlight", u), s.hooks.run("complete", u), a && a.call(u.element);
|
|
459
459
|
}
|
|
460
460
|
if (s.hooks.run("before-sanity-check", u), l = u.element.parentElement, l && l.nodeName.toLowerCase() === "pre" && !l.hasAttribute("tabindex") && l.setAttribute("tabindex", "0"), !u.code) {
|
|
461
461
|
s.hooks.run("complete", u), a && a.call(u.element);
|
|
@@ -467,8 +467,8 @@ function oe() {
|
|
|
467
467
|
}
|
|
468
468
|
if (e && g.Worker) {
|
|
469
469
|
var v = new Worker(s.filename);
|
|
470
|
-
v.onmessage = function(
|
|
471
|
-
d(
|
|
470
|
+
v.onmessage = function(_) {
|
|
471
|
+
d(_.data);
|
|
472
472
|
}, v.postMessage(JSON.stringify({
|
|
473
473
|
language: u.language,
|
|
474
474
|
code: u.code,
|
|
@@ -539,7 +539,7 @@ function oe() {
|
|
|
539
539
|
delete e.rest;
|
|
540
540
|
}
|
|
541
541
|
var r = new T();
|
|
542
|
-
return S(r, r.head, t),
|
|
542
|
+
return S(r, r.head, t), I(t, r, e, r.head, 0), M(r);
|
|
543
543
|
},
|
|
544
544
|
/**
|
|
545
545
|
* @namespace
|
|
@@ -618,7 +618,7 @@ function oe() {
|
|
|
618
618
|
}
|
|
619
619
|
return r;
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function I(t, e, a, n, r, l) {
|
|
622
622
|
for (var o in a)
|
|
623
623
|
if (!(!a.hasOwnProperty(o) || !a[o])) {
|
|
624
624
|
var u = a[o];
|
|
@@ -626,41 +626,41 @@ function oe() {
|
|
|
626
626
|
for (var d = 0; d < u.length; ++d) {
|
|
627
627
|
if (l && l.cause == o + "," + d)
|
|
628
628
|
return;
|
|
629
|
-
var v = u[d],
|
|
629
|
+
var v = u[d], _ = v.inside, W = !!v.lookbehind, N = !!v.greedy, ee = v.alias;
|
|
630
630
|
if (N && !v.pattern.global) {
|
|
631
|
-
var
|
|
632
|
-
v.pattern = RegExp(v.pattern.source,
|
|
631
|
+
var te = v.pattern.toString().match(/[imsuy]*$/)[0];
|
|
632
|
+
v.pattern = RegExp(v.pattern.source, te + "g");
|
|
633
633
|
}
|
|
634
634
|
for (var X = v.pattern || v, m = n.next, w = r; m !== e.tail && !(l && w >= l.reach); w += m.value.length, m = m.next) {
|
|
635
635
|
var E = m.value;
|
|
636
636
|
if (e.length > t.length)
|
|
637
637
|
return;
|
|
638
638
|
if (!(E instanceof y)) {
|
|
639
|
-
var
|
|
639
|
+
var z = 1, x;
|
|
640
640
|
if (N) {
|
|
641
641
|
if (x = $(X, w, t, W), !x || x.index >= t.length)
|
|
642
642
|
break;
|
|
643
|
-
var
|
|
644
|
-
for (
|
|
645
|
-
m = m.next,
|
|
646
|
-
if (
|
|
643
|
+
var D = x.index, ae = x.index + x[0].length, k = w;
|
|
644
|
+
for (k += m.value.length; D >= k; )
|
|
645
|
+
m = m.next, k += m.value.length;
|
|
646
|
+
if (k -= m.value.length, w = k, m.value instanceof y)
|
|
647
647
|
continue;
|
|
648
|
-
for (var C = m; C !== e.tail && (
|
|
649
|
-
|
|
650
|
-
|
|
648
|
+
for (var C = m; C !== e.tail && (k < ae || typeof C.value == "string"); C = C.next)
|
|
649
|
+
z++, k += C.value.length;
|
|
650
|
+
z--, E = t.slice(w, k), x.index -= w;
|
|
651
651
|
} else if (x = $(X, 0, E, W), !x)
|
|
652
652
|
continue;
|
|
653
|
-
var
|
|
653
|
+
var D = x.index, O = x[0], q = E.slice(0, D), Y = E.slice(D + O.length), G = w + E.length;
|
|
654
654
|
l && G > l.reach && (l.reach = G);
|
|
655
|
-
var
|
|
656
|
-
q && (
|
|
657
|
-
var
|
|
658
|
-
if (m = S(e,
|
|
655
|
+
var R = m.prev;
|
|
656
|
+
q && (R = S(e, R, q), w += q.length), H(e, R, z);
|
|
657
|
+
var ne = new y(o, _ ? s.tokenize(O, _) : O, ee, O);
|
|
658
|
+
if (m = S(e, R, ne), Y && S(e, m, Y), z > 1) {
|
|
659
659
|
var U = {
|
|
660
660
|
cause: o + "," + d,
|
|
661
661
|
reach: G
|
|
662
662
|
};
|
|
663
|
-
|
|
663
|
+
I(t, e, a, m.prev, w, U), l && U.reach > l.reach && (l.reach = U.reach);
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
}
|
|
@@ -680,7 +680,7 @@ function oe() {
|
|
|
680
680
|
n = n.next;
|
|
681
681
|
e.next = n, n.prev = e, t.length -= r;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function M(t) {
|
|
684
684
|
for (var e = [], a = t.head.next; a !== t.tail; )
|
|
685
685
|
e.push(a.value), a = a.next;
|
|
686
686
|
return e;
|
|
@@ -700,8 +700,8 @@ function oe() {
|
|
|
700
700
|
h === "loading" || h === "interactive" && p && p.defer ? document.addEventListener("DOMContentLoaded", c) : window.requestAnimationFrame ? window.requestAnimationFrame(c) : window.setTimeout(c, 16);
|
|
701
701
|
}
|
|
702
702
|
return s;
|
|
703
|
-
})(
|
|
704
|
-
b.exports && (b.exports = i), typeof
|
|
703
|
+
})(j);
|
|
704
|
+
b.exports && (b.exports = i), typeof K < "u" && (K.Prism = i), i.languages.markup = {
|
|
705
705
|
comment: {
|
|
706
706
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
707
707
|
greedy: !0
|
|
@@ -1091,7 +1091,7 @@ function oe() {
|
|
|
1091
1091
|
bat: "batch",
|
|
1092
1092
|
h: "c",
|
|
1093
1093
|
tex: "latex"
|
|
1094
|
-
}, s = "data-src-status", y = "loading", $ = "loaded",
|
|
1094
|
+
}, s = "data-src-status", y = "loading", $ = "loaded", I = "failed", T = "pre[data-src]:not([" + s + '="' + $ + '"]):not([' + s + '="' + y + '"])';
|
|
1095
1095
|
function S(p, c, h) {
|
|
1096
1096
|
var t = new XMLHttpRequest();
|
|
1097
1097
|
t.open("GET", p, !0), t.onreadystatechange = function() {
|
|
@@ -1136,7 +1136,7 @@ function oe() {
|
|
|
1136
1136
|
h.textContent = r, i.highlightElement(h);
|
|
1137
1137
|
},
|
|
1138
1138
|
function(r) {
|
|
1139
|
-
c.setAttribute(s,
|
|
1139
|
+
c.setAttribute(s, I), h.textContent = r;
|
|
1140
1140
|
}
|
|
1141
1141
|
);
|
|
1142
1142
|
}
|
|
@@ -1153,45 +1153,46 @@ function oe() {
|
|
|
1153
1153
|
i.highlightElement(e);
|
|
1154
1154
|
}
|
|
1155
1155
|
};
|
|
1156
|
-
var
|
|
1156
|
+
var M = !1;
|
|
1157
1157
|
i.fileHighlight = function() {
|
|
1158
|
-
|
|
1158
|
+
M || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), M = !0), i.plugins.fileHighlight.highlight.apply(this, arguments);
|
|
1159
1159
|
};
|
|
1160
1160
|
})();
|
|
1161
1161
|
})(Z)), Z.exports;
|
|
1162
1162
|
}
|
|
1163
1163
|
var ge = oe();
|
|
1164
|
-
const B = /* @__PURE__ */ le(ge), ce = "
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1164
|
+
const B = /* @__PURE__ */ le(ge), ce = "_code__root_1cnms_1", de = "_code_1cnms_1", fe = "_code_title_1cnms_12", pe = "_code__value_1cnms_16", he = "_code__title_1cnms_21", L = {
|
|
1165
|
+
code__root: ce,
|
|
1166
|
+
code: de,
|
|
1167
|
+
code_title: fe,
|
|
1168
|
+
code__value: pe,
|
|
1169
|
+
code__title: he
|
|
1169
1170
|
};
|
|
1170
|
-
function
|
|
1171
|
+
function Ae({
|
|
1171
1172
|
language: b = "javascript",
|
|
1172
|
-
children:
|
|
1173
|
+
children: j = "",
|
|
1173
1174
|
title: i,
|
|
1174
1175
|
className: g
|
|
1175
1176
|
}) {
|
|
1176
1177
|
const f = ie(
|
|
1177
1178
|
() => B.highlight(
|
|
1178
|
-
|
|
1179
|
+
j,
|
|
1179
1180
|
B.languages[b] ?? B.languages.javascript,
|
|
1180
1181
|
b
|
|
1181
1182
|
),
|
|
1182
|
-
[
|
|
1183
|
+
[j, b]
|
|
1183
1184
|
);
|
|
1184
|
-
return /* @__PURE__ */
|
|
1185
|
-
i ? /* @__PURE__ */
|
|
1186
|
-
/* @__PURE__ */
|
|
1187
|
-
|
|
1185
|
+
return /* @__PURE__ */ re(ue, { className: J(L.code__root, g), children: [
|
|
1186
|
+
i ? /* @__PURE__ */ P(V, { elevated: !0, className: L.code__title, children: /* @__PURE__ */ P(se, { size: "sm", color: "dimmer", children: i }) }) : null,
|
|
1187
|
+
/* @__PURE__ */ P(
|
|
1188
|
+
V,
|
|
1188
1189
|
{
|
|
1189
1190
|
elevated: !0,
|
|
1190
|
-
className:
|
|
1191
|
-
children: /* @__PURE__ */
|
|
1191
|
+
className: J(L.code, i && L.code_title),
|
|
1192
|
+
children: /* @__PURE__ */ P("pre", { children: /* @__PURE__ */ P(
|
|
1192
1193
|
"code",
|
|
1193
1194
|
{
|
|
1194
|
-
className:
|
|
1195
|
+
className: L.code__value,
|
|
1195
1196
|
dangerouslySetInnerHTML: {
|
|
1196
1197
|
__html: f
|
|
1197
1198
|
}
|
|
@@ -1202,5 +1203,5 @@ function xe({
|
|
|
1202
1203
|
] });
|
|
1203
1204
|
}
|
|
1204
1205
|
export {
|
|
1205
|
-
|
|
1206
|
+
Ae as Code
|
|
1206
1207
|
};
|
package/dist/index22.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._code__root_1cnms_1{border-radius:var(--border-radius-default);overflow:hidden}._code_1cnms_1{border-radius:var(--border-radius-default);padding:var(--space-8);overflow-x:auto}._code_title_1cnms_12{border-top-left-radius:0}._code__value_1cnms_16{font-size:var(--font-size-default);font-family:var(--font-family-code)}._code__title_1cnms_21{border-top-right-radius:var(--border-radius-default);border-top-left-radius:var(--border-radius-default);padding:var(--space-4) var(--space-8);width:-moz-fit-content;width:fit-content}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import s from "react-markdown";
|
|
3
|
-
import { omit as
|
|
3
|
+
import { omit as a } from "../../-utils.js";
|
|
4
4
|
import { Anchor as i } from "../../components/anchor/index.js";
|
|
5
5
|
import { Code as w } from "../../components/code/index.js";
|
|
6
|
-
import { Heading as
|
|
7
|
-
import {
|
|
6
|
+
import { Heading as m } from "../../components/heading/index.js";
|
|
7
|
+
import { InlineCode as k } from "../../components/inline-code/index.js";
|
|
8
|
+
import { S as h } from "../../index-DVjyPAD4.js";
|
|
8
9
|
import { Text as l } from "../../components/text/index.js";
|
|
9
|
-
import { View as
|
|
10
|
+
import { View as u } from "../../components/view/index.js";
|
|
10
11
|
import '../../index2.css';const _ = {
|
|
11
12
|
"react-markdown__h1": "_react-markdown__h1_slb08_6",
|
|
12
13
|
"react-markdown__h2": "_react-markdown__h2_slb08_7",
|
|
@@ -21,129 +22,130 @@ import '../../index2.css';const _ = {
|
|
|
21
22
|
"react-markdown__img-root": "_react-markdown__img-root_slb08_45",
|
|
22
23
|
"react-markdown__img": "_react-markdown__img_slb08_45"
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
-
components:
|
|
25
|
+
function z({
|
|
26
|
+
components: n,
|
|
26
27
|
children: t,
|
|
27
28
|
...c
|
|
28
29
|
}) {
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ e(
|
|
30
31
|
s,
|
|
31
32
|
{
|
|
32
33
|
...c,
|
|
33
34
|
components: {
|
|
34
|
-
h1: (r) => /* @__PURE__ */
|
|
35
|
-
|
|
35
|
+
h1: (r) => /* @__PURE__ */ e(
|
|
36
|
+
m,
|
|
36
37
|
{
|
|
37
|
-
...
|
|
38
|
+
...a(r, ["node"]),
|
|
38
39
|
level: 1,
|
|
39
40
|
className: _["react-markdown__h1"]
|
|
40
41
|
}
|
|
41
42
|
),
|
|
42
|
-
h2: (r) => /* @__PURE__ */
|
|
43
|
-
|
|
43
|
+
h2: (r) => /* @__PURE__ */ e(
|
|
44
|
+
m,
|
|
44
45
|
{
|
|
45
|
-
...
|
|
46
|
+
...a(r, ["node"]),
|
|
46
47
|
level: 2,
|
|
47
48
|
className: _["react-markdown__h2"]
|
|
48
49
|
}
|
|
49
50
|
),
|
|
50
|
-
h3: (r) => /* @__PURE__ */
|
|
51
|
-
|
|
51
|
+
h3: (r) => /* @__PURE__ */ e(
|
|
52
|
+
m,
|
|
52
53
|
{
|
|
53
|
-
...
|
|
54
|
+
...a(r, ["node"]),
|
|
54
55
|
level: 3,
|
|
55
56
|
className: _["react-markdown__h3"]
|
|
56
57
|
}
|
|
57
58
|
),
|
|
58
|
-
h4: (r) => /* @__PURE__ */
|
|
59
|
-
|
|
59
|
+
h4: (r) => /* @__PURE__ */ e(
|
|
60
|
+
m,
|
|
60
61
|
{
|
|
61
|
-
...
|
|
62
|
+
...a(r, ["node"]),
|
|
62
63
|
level: 4,
|
|
63
64
|
className: _["react-markdown__h4"]
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
|
-
h5: (r) => /* @__PURE__ */
|
|
67
|
-
|
|
67
|
+
h5: (r) => /* @__PURE__ */ e(
|
|
68
|
+
m,
|
|
68
69
|
{
|
|
69
|
-
...
|
|
70
|
+
...a(r, ["node"]),
|
|
70
71
|
level: 5,
|
|
71
72
|
className: _["react-markdown__h5"]
|
|
72
73
|
}
|
|
73
74
|
),
|
|
74
|
-
p: (r) => /* @__PURE__ */
|
|
75
|
+
p: (r) => /* @__PURE__ */ e(
|
|
75
76
|
l,
|
|
76
77
|
{
|
|
77
|
-
...
|
|
78
|
+
...a(r, ["node"]),
|
|
78
79
|
multiline: !0,
|
|
79
80
|
className: _["react-markdown__p"]
|
|
80
81
|
}
|
|
81
82
|
),
|
|
82
|
-
hr: () => /* @__PURE__ */
|
|
83
|
-
ul: (r) => /* @__PURE__ */
|
|
83
|
+
hr: () => /* @__PURE__ */ e(h, {}),
|
|
84
|
+
ul: (r) => /* @__PURE__ */ e(
|
|
84
85
|
"ul",
|
|
85
86
|
{
|
|
86
|
-
...
|
|
87
|
+
...a(r, ["node"]),
|
|
87
88
|
className: _["react-markdown__ul"]
|
|
88
89
|
}
|
|
89
90
|
),
|
|
90
|
-
ol: (r) => /* @__PURE__ */
|
|
91
|
+
ol: (r) => /* @__PURE__ */ e(
|
|
91
92
|
"ul",
|
|
92
93
|
{
|
|
93
|
-
...
|
|
94
|
+
...a(r, ["node"]),
|
|
94
95
|
className: _["react-markdown__ol"]
|
|
95
96
|
}
|
|
96
97
|
),
|
|
97
|
-
li: (r) => /* @__PURE__ */
|
|
98
|
+
li: (r) => /* @__PURE__ */ e(
|
|
98
99
|
"li",
|
|
99
100
|
{
|
|
100
|
-
...
|
|
101
|
+
...a(r, ["node"]),
|
|
101
102
|
className: _["react-markdown__li"]
|
|
102
103
|
}
|
|
103
104
|
),
|
|
104
|
-
a: ({ href: r, ...
|
|
105
|
+
a: ({ href: r, ...o }) => /* @__PURE__ */ e(
|
|
105
106
|
i,
|
|
106
107
|
{
|
|
107
|
-
...
|
|
108
|
+
...a(o, ["node"]),
|
|
108
109
|
href: r,
|
|
109
|
-
...
|
|
110
|
+
...f(r) ? {
|
|
110
111
|
target: "_blank",
|
|
111
112
|
rel: "noreferrer"
|
|
112
113
|
} : {}
|
|
113
114
|
}
|
|
114
115
|
),
|
|
115
|
-
code: ({ className: r, ...
|
|
116
|
+
code: ({ className: r, ...o }) => typeof o.children == "string" && !o.children.includes(`
|
|
117
|
+
`) ? /* @__PURE__ */ e(k, { ...a(o, ["node"]) }) : /* @__PURE__ */ e(
|
|
116
118
|
w,
|
|
117
119
|
{
|
|
118
120
|
className: _["react-markdown__code"],
|
|
119
|
-
...
|
|
120
|
-
language:
|
|
121
|
+
...a(o, ["node"]),
|
|
122
|
+
language: g(r)
|
|
121
123
|
}
|
|
122
124
|
),
|
|
123
|
-
img: ({ alt: r, ...
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
img: ({ alt: r, ...o }) => /* @__PURE__ */ d(u, { className: _["react-markdown__img-root"], children: [
|
|
126
|
+
/* @__PURE__ */ e(
|
|
125
127
|
"img",
|
|
126
128
|
{
|
|
127
|
-
...
|
|
129
|
+
...a(o, ["node"]),
|
|
128
130
|
alt: r,
|
|
129
131
|
className: _["react-markdown__img"]
|
|
130
132
|
}
|
|
131
133
|
),
|
|
132
|
-
r ? /* @__PURE__ */
|
|
134
|
+
r ? /* @__PURE__ */ e(l, { size: "sm", color: "dimmer", multiline: !0, children: r }) : null
|
|
133
135
|
] }),
|
|
134
|
-
...
|
|
136
|
+
...n
|
|
135
137
|
},
|
|
136
138
|
children: t
|
|
137
139
|
}
|
|
138
140
|
);
|
|
139
141
|
}
|
|
140
|
-
function
|
|
141
|
-
const t = (/language-(\w+)/.exec(
|
|
142
|
+
function g(n = "") {
|
|
143
|
+
const t = (/language-(\w+)/.exec(n) || [])[0];
|
|
142
144
|
return t ? t.substring(9) : "text";
|
|
143
145
|
}
|
|
144
|
-
function
|
|
145
|
-
return
|
|
146
|
+
function f(n) {
|
|
147
|
+
return n?.startsWith("https://");
|
|
146
148
|
}
|
|
147
149
|
export {
|
|
148
|
-
|
|
150
|
+
z as Markdown
|
|
149
151
|
};
|