@koide-labs/ui 0.0.7 → 0.0.8

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,12 +1,13 @@
1
- import { jsx as a, jsxs as d } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
2
  import s from "react-markdown";
3
- import { omit as e } from "../../-utils.js";
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 n } from "../../components/heading/index.js";
7
- import { S as k } from "../../index-DVjyPAD4.js";
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 h } from "../../components/view/index.js";
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 y({
25
- components: o,
25
+ function z({
26
+ components: n,
26
27
  children: t,
27
28
  ...c
28
29
  }) {
29
- return /* @__PURE__ */ a(
30
+ return /* @__PURE__ */ e(
30
31
  s,
31
32
  {
32
33
  ...c,
33
34
  components: {
34
- h1: (r) => /* @__PURE__ */ a(
35
- n,
35
+ h1: (r) => /* @__PURE__ */ e(
36
+ m,
36
37
  {
37
- ...e(r, ["node"]),
38
+ ...a(r, ["node"]),
38
39
  level: 1,
39
40
  className: _["react-markdown__h1"]
40
41
  }
41
42
  ),
42
- h2: (r) => /* @__PURE__ */ a(
43
- n,
43
+ h2: (r) => /* @__PURE__ */ e(
44
+ m,
44
45
  {
45
- ...e(r, ["node"]),
46
+ ...a(r, ["node"]),
46
47
  level: 2,
47
48
  className: _["react-markdown__h2"]
48
49
  }
49
50
  ),
50
- h3: (r) => /* @__PURE__ */ a(
51
- n,
51
+ h3: (r) => /* @__PURE__ */ e(
52
+ m,
52
53
  {
53
- ...e(r, ["node"]),
54
+ ...a(r, ["node"]),
54
55
  level: 3,
55
56
  className: _["react-markdown__h3"]
56
57
  }
57
58
  ),
58
- h4: (r) => /* @__PURE__ */ a(
59
- n,
59
+ h4: (r) => /* @__PURE__ */ e(
60
+ m,
60
61
  {
61
- ...e(r, ["node"]),
62
+ ...a(r, ["node"]),
62
63
  level: 4,
63
64
  className: _["react-markdown__h4"]
64
65
  }
65
66
  ),
66
- h5: (r) => /* @__PURE__ */ a(
67
- n,
67
+ h5: (r) => /* @__PURE__ */ e(
68
+ m,
68
69
  {
69
- ...e(r, ["node"]),
70
+ ...a(r, ["node"]),
70
71
  level: 5,
71
72
  className: _["react-markdown__h5"]
72
73
  }
73
74
  ),
74
- p: (r) => /* @__PURE__ */ a(
75
+ p: (r) => /* @__PURE__ */ e(
75
76
  l,
76
77
  {
77
- ...e(r, ["node"]),
78
+ ...a(r, ["node"]),
78
79
  multiline: !0,
79
80
  className: _["react-markdown__p"]
80
81
  }
81
82
  ),
82
- hr: () => /* @__PURE__ */ a(k, {}),
83
- ul: (r) => /* @__PURE__ */ a(
83
+ hr: () => /* @__PURE__ */ e(h, {}),
84
+ ul: (r) => /* @__PURE__ */ e(
84
85
  "ul",
85
86
  {
86
- ...e(r, ["node"]),
87
+ ...a(r, ["node"]),
87
88
  className: _["react-markdown__ul"]
88
89
  }
89
90
  ),
90
- ol: (r) => /* @__PURE__ */ a(
91
+ ol: (r) => /* @__PURE__ */ e(
91
92
  "ul",
92
93
  {
93
- ...e(r, ["node"]),
94
+ ...a(r, ["node"]),
94
95
  className: _["react-markdown__ol"]
95
96
  }
96
97
  ),
97
- li: (r) => /* @__PURE__ */ a(
98
+ li: (r) => /* @__PURE__ */ e(
98
99
  "li",
99
100
  {
100
- ...e(r, ["node"]),
101
+ ...a(r, ["node"]),
101
102
  className: _["react-markdown__li"]
102
103
  }
103
104
  ),
104
- a: ({ href: r, ...m }) => /* @__PURE__ */ a(
105
+ a: ({ href: r, ...o }) => /* @__PURE__ */ e(
105
106
  i,
106
107
  {
107
- ...e(m, ["node"]),
108
+ ...a(o, ["node"]),
108
109
  href: r,
109
- ...g(r) ? {
110
+ ...f(r) ? {
110
111
  target: "_blank",
111
112
  rel: "noreferrer"
112
113
  } : {}
113
114
  }
114
115
  ),
115
- code: ({ className: r, ...m }) => /* @__PURE__ */ a(
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
- ...e(m, ["node"]),
120
- language: u(r)
121
+ ...a(o, ["node"]),
122
+ language: g(r)
121
123
  }
122
124
  ),
123
- img: ({ alt: r, ...m }) => /* @__PURE__ */ d(h, { className: _["react-markdown__img-root"], children: [
124
- /* @__PURE__ */ a(
125
+ img: ({ alt: r, ...o }) => /* @__PURE__ */ d(u, { className: _["react-markdown__img-root"], children: [
126
+ /* @__PURE__ */ e(
125
127
  "img",
126
128
  {
127
- ...e(m, ["node"]),
129
+ ...a(o, ["node"]),
128
130
  alt: r,
129
131
  className: _["react-markdown__img"]
130
132
  }
131
133
  ),
132
- r ? /* @__PURE__ */ a(l, { size: "sm", color: "dimmer", multiline: !0, children: r }) : null
134
+ r ? /* @__PURE__ */ e(l, { size: "sm", color: "dimmer", multiline: !0, children: r }) : null
133
135
  ] }),
134
- ...o
136
+ ...n
135
137
  },
136
138
  children: t
137
139
  }
138
140
  );
139
141
  }
140
- function u(o = "") {
141
- const t = (/language-(\w+)/.exec(o) || [])[0];
142
+ function g(n = "") {
143
+ const t = (/language-(\w+)/.exec(n) || [])[0];
142
144
  return t ? t.substring(9) : "text";
143
145
  }
144
- function g(o) {
145
- return o?.startsWith("https://");
146
+ function f(n) {
147
+ return n?.startsWith("https://");
146
148
  }
147
149
  export {
148
- y as Markdown
150
+ z as Markdown
149
151
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koide-labs/ui",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {