@llumi/design-system 1.0.1 → 2.1.0
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/LICENSE +51 -0
- package/NOTICE +66 -0
- package/README.md +15 -205
- package/adopt-global-styles-D9108lqB.js +15 -0
- package/base.css +2 -0
- package/base.md +59 -0
- package/bpmn.md +113 -0
- package/bpmn.mjs +5076 -0
- package/copy-button.md +128 -0
- package/copy-button.mjs +161 -0
- package/custom-elements.json +1135 -18
- package/download-button.md +106 -0
- package/download-button.mjs +177 -0
- package/highlighter.md +45 -0
- package/highlighter.mjs +403 -0
- package/icon-button-BwB11RGC.js +5 -0
- package/icons-BaUbjt-v.js +42 -0
- package/index-BEhA78nX.js +7733 -0
- package/llumi-element-BWRwgzW5.js +22 -0
- package/mermaid.md +58 -0
- package/mermaid.mjs +254 -0
- package/package.json +16 -50
- package/review.md +141 -0
- package/review.mjs +2044 -0
- package/slot-text-mSWBdWBc.js +51 -0
- package/theme.css +2 -0
- package/dist/review.cjs +0 -172
- package/dist/review.css +0 -98
- package/dist/review.js +0 -172
- package/dist/review.mjs +0 -1710
- package/dist/types/components/review/comment-dialog.element.d.ts +0 -29
- package/dist/types/components/review/custom-target.utils.d.ts +0 -16
- package/dist/types/components/review/default-editor.element.d.ts +0 -19
- package/dist/types/components/review/highlight-manager.d.ts +0 -21
- package/dist/types/components/review/index.d.ts +0 -8
- package/dist/types/components/review/overall-comment-dialog.element.d.ts +0 -22
- package/dist/types/components/review/review-bar.element.d.ts +0 -26
- package/dist/types/components/review/review.element.d.ts +0 -60
- package/dist/types/components/review/review.machine.d.ts +0 -234
- package/dist/types/components/review/review.persistence.d.ts +0 -16
- package/dist/types/components/review/review.type.d.ts +0 -37
- package/dist/types/components/review/selection-comment-icons.element.d.ts +0 -17
- package/dist/types/components/review/selection-range.utils.d.ts +0 -6
- package/dist/types/components/review/sort-comments.utils.d.ts +0 -6
- package/dist/types/index.d.ts +0 -1
- package/dist/types/shared/cn.d.ts +0 -2
- package/dist/types/shared/icons.d.ts +0 -7
- package/dist/types/shared/tailwind-element.d.ts +0 -4
package/highlighter.mjs
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import { nothing as f, html as h, unsafeCSS as p } from "https://cdn.jsdelivr.net/npm/lit@3.3.3";
|
|
2
|
+
import { property as c, customElement as v } from "https://cdn.jsdelivr.net/npm/lit@3.3.3/decorators.js";
|
|
3
|
+
import { refractor as u } from "https://cdn.jsdelivr.net/npm/refractor@5.0.0/core";
|
|
4
|
+
import { i as w } from "./icon-button-BwB11RGC.js";
|
|
5
|
+
import { L as b } from "./llumi-element-BWRwgzW5.js";
|
|
6
|
+
/*! @llumi/design-system v2.1.0 | (c) 2026 pAIrprog SAS | license: https://cdn.jsdelivr.net/npm/@llumi/design-system@2.1.0/LICENSE | bundled third-party components under MIT, see NOTICE | @license */
|
|
7
|
+
const y = [
|
|
8
|
+
"ghcolors",
|
|
9
|
+
"oneLight",
|
|
10
|
+
"oneDark",
|
|
11
|
+
"dracula"
|
|
12
|
+
], x = /* @__PURE__ */ new Set(["oneDark", "dracula"]), d = {
|
|
13
|
+
ghcolors: {
|
|
14
|
+
bg: "#ffffff",
|
|
15
|
+
fg: "#393A34",
|
|
16
|
+
tokens: {
|
|
17
|
+
comment: "#999988",
|
|
18
|
+
prolog: "#999988",
|
|
19
|
+
doctype: "#999988",
|
|
20
|
+
cdata: "#999988",
|
|
21
|
+
punctuation: "#393A34",
|
|
22
|
+
property: "#36acaa",
|
|
23
|
+
tag: "#00009f",
|
|
24
|
+
boolean: "#36acaa",
|
|
25
|
+
number: "#36acaa",
|
|
26
|
+
constant: "#36acaa",
|
|
27
|
+
symbol: "#36acaa",
|
|
28
|
+
deleted: "#9a050f",
|
|
29
|
+
selector: "#00009f",
|
|
30
|
+
"attr-name": "#00a4db",
|
|
31
|
+
string: "#e3116c",
|
|
32
|
+
inserted: "#36acaa",
|
|
33
|
+
operator: "#393A34",
|
|
34
|
+
entity: "#36acaa",
|
|
35
|
+
url: "#36acaa",
|
|
36
|
+
atrule: "#00a4db",
|
|
37
|
+
"attr-value": "#e3116c",
|
|
38
|
+
keyword: "#00a4db",
|
|
39
|
+
function: "#9a050f",
|
|
40
|
+
regex: "#36acaa",
|
|
41
|
+
variable: "#36acaa"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
oneLight: {
|
|
45
|
+
bg: "hsl(230, 1%, 98%)",
|
|
46
|
+
fg: "hsl(230, 8%, 24%)",
|
|
47
|
+
tokens: {
|
|
48
|
+
comment: "hsl(230, 4%, 64%)",
|
|
49
|
+
prolog: "hsl(230, 4%, 64%)",
|
|
50
|
+
doctype: "hsl(230, 8%, 24%)",
|
|
51
|
+
cdata: "hsl(230, 4%, 64%)",
|
|
52
|
+
punctuation: "hsl(230, 8%, 24%)",
|
|
53
|
+
property: "hsl(5, 74%, 59%)",
|
|
54
|
+
tag: "hsl(5, 74%, 59%)",
|
|
55
|
+
boolean: "hsl(35, 99%, 36%)",
|
|
56
|
+
number: "hsl(35, 99%, 36%)",
|
|
57
|
+
constant: "hsl(35, 99%, 36%)",
|
|
58
|
+
symbol: "hsl(5, 74%, 59%)",
|
|
59
|
+
deleted: "hsl(5, 74%, 59%)",
|
|
60
|
+
selector: "hsl(119, 34%, 47%)",
|
|
61
|
+
"attr-name": "hsl(35, 99%, 36%)",
|
|
62
|
+
string: "hsl(119, 34%, 47%)",
|
|
63
|
+
char: "hsl(119, 34%, 47%)",
|
|
64
|
+
builtin: "hsl(119, 34%, 47%)",
|
|
65
|
+
inserted: "hsl(119, 34%, 47%)",
|
|
66
|
+
operator: "hsl(221, 87%, 60%)",
|
|
67
|
+
entity: "hsl(230, 8%, 24%)",
|
|
68
|
+
url: "hsl(198, 99%, 37%)",
|
|
69
|
+
atrule: "hsl(35, 99%, 36%)",
|
|
70
|
+
"attr-value": "hsl(119, 34%, 47%)",
|
|
71
|
+
keyword: "hsl(301, 63%, 40%)",
|
|
72
|
+
function: "hsl(221, 87%, 60%)",
|
|
73
|
+
"class-name": "hsl(35, 99%, 36%)",
|
|
74
|
+
regex: "hsl(119, 34%, 47%)",
|
|
75
|
+
important: "hsl(5, 74%, 59%)",
|
|
76
|
+
variable: "hsl(221, 87%, 60%)"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
oneDark: {
|
|
80
|
+
bg: "hsl(220, 13%, 18%)",
|
|
81
|
+
fg: "hsl(220, 14%, 71%)",
|
|
82
|
+
tokens: {
|
|
83
|
+
comment: "hsl(220, 10%, 40%)",
|
|
84
|
+
prolog: "hsl(220, 10%, 40%)",
|
|
85
|
+
doctype: "hsl(220, 14%, 71%)",
|
|
86
|
+
cdata: "hsl(220, 10%, 40%)",
|
|
87
|
+
punctuation: "hsl(220, 14%, 71%)",
|
|
88
|
+
property: "hsl(355, 65%, 65%)",
|
|
89
|
+
tag: "hsl(355, 65%, 65%)",
|
|
90
|
+
boolean: "hsl(29, 54%, 61%)",
|
|
91
|
+
number: "hsl(29, 54%, 61%)",
|
|
92
|
+
constant: "hsl(29, 54%, 61%)",
|
|
93
|
+
symbol: "hsl(355, 65%, 65%)",
|
|
94
|
+
deleted: "hsl(355, 65%, 65%)",
|
|
95
|
+
selector: "hsl(95, 38%, 62%)",
|
|
96
|
+
"attr-name": "hsl(29, 54%, 61%)",
|
|
97
|
+
string: "hsl(95, 38%, 62%)",
|
|
98
|
+
char: "hsl(95, 38%, 62%)",
|
|
99
|
+
builtin: "hsl(95, 38%, 62%)",
|
|
100
|
+
inserted: "hsl(95, 38%, 62%)",
|
|
101
|
+
operator: "hsl(207, 82%, 66%)",
|
|
102
|
+
entity: "hsl(220, 14%, 71%)",
|
|
103
|
+
url: "hsl(187, 47%, 55%)",
|
|
104
|
+
atrule: "hsl(29, 54%, 61%)",
|
|
105
|
+
"attr-value": "hsl(95, 38%, 62%)",
|
|
106
|
+
keyword: "hsl(286, 60%, 67%)",
|
|
107
|
+
function: "hsl(207, 82%, 66%)",
|
|
108
|
+
"class-name": "hsl(29, 54%, 61%)",
|
|
109
|
+
regex: "hsl(95, 38%, 62%)",
|
|
110
|
+
important: "hsl(355, 65%, 65%)",
|
|
111
|
+
variable: "hsl(207, 82%, 66%)"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
dracula: {
|
|
115
|
+
bg: "#282a36",
|
|
116
|
+
fg: "#f8f8f2",
|
|
117
|
+
tokens: {
|
|
118
|
+
comment: "#6272a4",
|
|
119
|
+
prolog: "#6272a4",
|
|
120
|
+
doctype: "#6272a4",
|
|
121
|
+
cdata: "#6272a4",
|
|
122
|
+
punctuation: "#f8f8f2",
|
|
123
|
+
property: "#ff79c6",
|
|
124
|
+
tag: "#ff79c6",
|
|
125
|
+
boolean: "#bd93f9",
|
|
126
|
+
number: "#bd93f9",
|
|
127
|
+
constant: "#ff79c6",
|
|
128
|
+
symbol: "#ff79c6",
|
|
129
|
+
deleted: "#ff79c6",
|
|
130
|
+
selector: "#50fa7b",
|
|
131
|
+
"attr-name": "#50fa7b",
|
|
132
|
+
string: "#50fa7b",
|
|
133
|
+
char: "#50fa7b",
|
|
134
|
+
builtin: "#50fa7b",
|
|
135
|
+
inserted: "#50fa7b",
|
|
136
|
+
operator: "#f8f8f2",
|
|
137
|
+
entity: "#f8f8f2",
|
|
138
|
+
url: "#f8f8f2",
|
|
139
|
+
atrule: "#f1fa8c",
|
|
140
|
+
"attr-value": "#f1fa8c",
|
|
141
|
+
keyword: "#8be9fd",
|
|
142
|
+
function: "#f1fa8c",
|
|
143
|
+
"class-name": "#f1fa8c",
|
|
144
|
+
regex: "#ffb86c",
|
|
145
|
+
important: "#ffb86c",
|
|
146
|
+
variable: "#f8f8f2"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
function L(t, e) {
|
|
151
|
+
return Object.entries(e).map(([r, o]) => `${t} .token.${r} { color: ${o}; }`).join(`
|
|
152
|
+
`);
|
|
153
|
+
}
|
|
154
|
+
function g(t, e) {
|
|
155
|
+
return `${t} { background: ${e.bg}; color: ${e.fg}; }
|
|
156
|
+
${L(t, e.tokens)}`;
|
|
157
|
+
}
|
|
158
|
+
function _() {
|
|
159
|
+
const t = y.map(
|
|
160
|
+
(e) => g(`:host([theme="${e}"])`, d[e])
|
|
161
|
+
);
|
|
162
|
+
return t.unshift(g(":host", d.ghcolors)), t.join(`
|
|
163
|
+
`);
|
|
164
|
+
}
|
|
165
|
+
function $(t, e) {
|
|
166
|
+
return e.some(
|
|
167
|
+
([r, o]) => t >= r && t <= o
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
function C(t) {
|
|
171
|
+
return y.includes(t ?? "") ? t : "ghcolors";
|
|
172
|
+
}
|
|
173
|
+
function A(t) {
|
|
174
|
+
return t.split(`
|
|
175
|
+
`).map((e) => e === "" ? [] : [{ classes: [], text: e }]);
|
|
176
|
+
}
|
|
177
|
+
function E(t) {
|
|
178
|
+
const e = [[]];
|
|
179
|
+
for (const r of t)
|
|
180
|
+
r.text.split(`
|
|
181
|
+
`).forEach((s, n) => {
|
|
182
|
+
var l;
|
|
183
|
+
n > 0 && e.push([]), s !== "" && ((l = e[e.length - 1]) == null || l.push({ classes: r.classes, text: s }));
|
|
184
|
+
});
|
|
185
|
+
return e;
|
|
186
|
+
}
|
|
187
|
+
function j(t) {
|
|
188
|
+
const e = [], r = (o, s) => {
|
|
189
|
+
var m;
|
|
190
|
+
if (o.type === "text") {
|
|
191
|
+
e.push({ classes: s, text: o.value ?? "" });
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const n = (m = o.properties) == null ? void 0 : m.className, l = o.type === "element" ? Array.isArray(n) ? n : n ? [n] : [] : s;
|
|
195
|
+
for (const k of o.children ?? []) r(k, l);
|
|
196
|
+
};
|
|
197
|
+
return r(t, []), E(e);
|
|
198
|
+
}
|
|
199
|
+
const T = {
|
|
200
|
+
html: "markup",
|
|
201
|
+
xml: "markup",
|
|
202
|
+
js: "javascript",
|
|
203
|
+
ts: "typescript",
|
|
204
|
+
py: "python",
|
|
205
|
+
rs: "rust",
|
|
206
|
+
sh: "bash",
|
|
207
|
+
shell: "bash",
|
|
208
|
+
md: "markdown"
|
|
209
|
+
}, S = {
|
|
210
|
+
markup: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/markup"),
|
|
211
|
+
css: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/css"),
|
|
212
|
+
javascript: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/javascript"),
|
|
213
|
+
jsx: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/jsx"),
|
|
214
|
+
typescript: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/typescript"),
|
|
215
|
+
tsx: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/tsx"),
|
|
216
|
+
json: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/json"),
|
|
217
|
+
bash: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/bash"),
|
|
218
|
+
python: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/python"),
|
|
219
|
+
rust: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/rust"),
|
|
220
|
+
go: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/go"),
|
|
221
|
+
java: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/java"),
|
|
222
|
+
yaml: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/yaml"),
|
|
223
|
+
markdown: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/markdown"),
|
|
224
|
+
sql: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/sql"),
|
|
225
|
+
diff: () => import("https://cdn.jsdelivr.net/npm/refractor@5.0.0/diff")
|
|
226
|
+
};
|
|
227
|
+
function D(t) {
|
|
228
|
+
const e = T[t] ?? t;
|
|
229
|
+
return { canonical: e, loader: S[e] };
|
|
230
|
+
}
|
|
231
|
+
var q = Object.defineProperty, H = Object.getOwnPropertyDescriptor, i = (t, e, r, o) => {
|
|
232
|
+
for (var s = o > 1 ? void 0 : o ? H(e, r) : e, n = t.length - 1, l; n >= 0; n--)
|
|
233
|
+
(l = t[n]) && (s = (o ? l(e, r, s) : l(s)) || s);
|
|
234
|
+
return o && s && q(e, r, s), s;
|
|
235
|
+
};
|
|
236
|
+
const O = {
|
|
237
|
+
fromAttribute: (t) => t === null ? !0 : !(t === "false" || t === "0"),
|
|
238
|
+
toAttribute: (t) => t ? null : "false"
|
|
239
|
+
};
|
|
240
|
+
let a = class extends b {
|
|
241
|
+
constructor() {
|
|
242
|
+
super(...arguments), this.language = "", this.theme = "ghcolors", this.code = "", this.copyButton = !0, this._tokenLines = [], this._seq = 0, this._highlightTask = Promise.resolve(), this._warnedLang = "";
|
|
243
|
+
}
|
|
244
|
+
/** Code source: `code` property, else light-DOM text content. */
|
|
245
|
+
get resolvedCode() {
|
|
246
|
+
var t;
|
|
247
|
+
return this.code || ((t = this.textContent) == null ? void 0 : t.trim()) || "";
|
|
248
|
+
}
|
|
249
|
+
/** Test hook: resolves when the in-flight highlight pass has finished. */
|
|
250
|
+
get whenHighlighted() {
|
|
251
|
+
return this._highlightTask;
|
|
252
|
+
}
|
|
253
|
+
willUpdate(t) {
|
|
254
|
+
(t.has("language") || t.has("code")) && (this._highlightTask = this.runHighlight()), t.has("theme") && this.classList.toggle(
|
|
255
|
+
"is-dark",
|
|
256
|
+
x.has(C(this.theme))
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
async runHighlight() {
|
|
260
|
+
const t = this.resolvedCode, e = this.language, r = ++this._seq;
|
|
261
|
+
this._tokenLines = A(t), this.requestUpdate();
|
|
262
|
+
const { canonical: o, loader: s } = D(e);
|
|
263
|
+
if (!s) {
|
|
264
|
+
e && e !== this._warnedLang && (this._warnedLang = e, console.warn(
|
|
265
|
+
`<llumi-highlighter>: language "${e}" is not supported; rendering plain text`
|
|
266
|
+
));
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
try {
|
|
270
|
+
const n = await s();
|
|
271
|
+
if (r !== this._seq) return;
|
|
272
|
+
u.registered(o) || u.register(n.default);
|
|
273
|
+
const l = u.highlight(t, o);
|
|
274
|
+
this._tokenLines = j(l), this.requestUpdate();
|
|
275
|
+
} catch (n) {
|
|
276
|
+
console.warn(
|
|
277
|
+
`<llumi-highlighter>: failed to highlight "${e}"`,
|
|
278
|
+
n
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
renderLines() {
|
|
283
|
+
const t = !!this.highlight;
|
|
284
|
+
return this._tokenLines.map((e, r) => {
|
|
285
|
+
const o = r + 1, s = this.highlight && !$(o, this.highlight);
|
|
286
|
+
return h`<span
|
|
287
|
+
class="line"
|
|
288
|
+
style=${s ? "opacity:0.3;transition:opacity 0.2s ease" : ""}
|
|
289
|
+
>
|
|
290
|
+
${t ? h`<span class="ln">${o}</span>` : f}
|
|
291
|
+
<span class="line-content"
|
|
292
|
+
>${e.map(
|
|
293
|
+
(n) => h`<span class=${n.classes.join(" ")}>${n.text}</span>`
|
|
294
|
+
)}</span
|
|
295
|
+
>
|
|
296
|
+
</span>`;
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
render() {
|
|
300
|
+
return h`<div class="wrap">
|
|
301
|
+
<div class="overlay">
|
|
302
|
+
<span class="lang">${this.language}</span>
|
|
303
|
+
${this.copyButton ? h`<llumi-copy-button
|
|
304
|
+
.getValue=${() => this.resolvedCode}
|
|
305
|
+
title="Copy code"
|
|
306
|
+
></llumi-copy-button>` : f}
|
|
307
|
+
</div>
|
|
308
|
+
<pre><code>${this.renderLines()}</code></pre>
|
|
309
|
+
</div>`;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
a.styles = [
|
|
313
|
+
b.styles,
|
|
314
|
+
p(w),
|
|
315
|
+
p(_()),
|
|
316
|
+
p(`
|
|
317
|
+
:host { display: block; }
|
|
318
|
+
.wrap { position: relative; }
|
|
319
|
+
.overlay {
|
|
320
|
+
position: absolute;
|
|
321
|
+
top: 0.5rem;
|
|
322
|
+
right: 0.5rem;
|
|
323
|
+
z-index: 1;
|
|
324
|
+
display: flex;
|
|
325
|
+
align-items: center;
|
|
326
|
+
gap: 0.5rem;
|
|
327
|
+
}
|
|
328
|
+
.lang {
|
|
329
|
+
user-select: none;
|
|
330
|
+
font-size: 0.75rem;
|
|
331
|
+
opacity: 0.6;
|
|
332
|
+
}
|
|
333
|
+
:host(.is-dark) .lang { color: #c9ccd3; opacity: 0.8; }
|
|
334
|
+
pre {
|
|
335
|
+
margin: 0;
|
|
336
|
+
border-radius: 0.5rem;
|
|
337
|
+
padding: 1rem;
|
|
338
|
+
overflow: auto;
|
|
339
|
+
font-size: 0.8125rem;
|
|
340
|
+
background: inherit;
|
|
341
|
+
color: inherit;
|
|
342
|
+
}
|
|
343
|
+
code {
|
|
344
|
+
font-family: var(--llumi-font-mono, ui-monospace, monospace);
|
|
345
|
+
display: block;
|
|
346
|
+
}
|
|
347
|
+
.line { display: flex; min-height: 1lh; }
|
|
348
|
+
.ln {
|
|
349
|
+
user-select: none;
|
|
350
|
+
width: 2.5em;
|
|
351
|
+
flex: none;
|
|
352
|
+
text-align: right;
|
|
353
|
+
padding-right: 1em;
|
|
354
|
+
opacity: 0.4;
|
|
355
|
+
}
|
|
356
|
+
.line-content { white-space: pre; }
|
|
357
|
+
/* Embedded copy-button: smaller than the standalone 36px. Its idle
|
|
358
|
+
(and working) colors follow the CODE theme — currentColor here
|
|
359
|
+
resolves to the host's theme text color — instead of the document's
|
|
360
|
+
--llumi-* tokens, so the icon stays legible on every theme no matter
|
|
361
|
+
the page's light/dark mode. The done/error feedback colors are left
|
|
362
|
+
to the shared icon-button rule. */
|
|
363
|
+
llumi-copy-button button:has(> i:only-child) {
|
|
364
|
+
width: 1.75rem;
|
|
365
|
+
height: 1.75rem;
|
|
366
|
+
background: transparent;
|
|
367
|
+
}
|
|
368
|
+
llumi-copy-button button:has(> i:only-child) > i {
|
|
369
|
+
width: 0.875rem;
|
|
370
|
+
height: 0.875rem;
|
|
371
|
+
}
|
|
372
|
+
llumi-copy-button button:has(> i:only-child):not(.is-done):not(.is-error) {
|
|
373
|
+
color: color-mix(in oklab, currentColor 60%, transparent);
|
|
374
|
+
border-color: color-mix(in oklab, currentColor 22%, transparent);
|
|
375
|
+
}
|
|
376
|
+
llumi-copy-button
|
|
377
|
+
button:has(> i:only-child):hover:not(:disabled):not(.is-done):not(.is-error) {
|
|
378
|
+
background: color-mix(in oklab, currentColor 12%, transparent);
|
|
379
|
+
color: color-mix(in oklab, currentColor 85%, transparent);
|
|
380
|
+
}
|
|
381
|
+
`)
|
|
382
|
+
];
|
|
383
|
+
i([
|
|
384
|
+
c()
|
|
385
|
+
], a.prototype, "language", 2);
|
|
386
|
+
i([
|
|
387
|
+
c({ reflect: !0 })
|
|
388
|
+
], a.prototype, "theme", 2);
|
|
389
|
+
i([
|
|
390
|
+
c()
|
|
391
|
+
], a.prototype, "code", 2);
|
|
392
|
+
i([
|
|
393
|
+
c({ attribute: !1 })
|
|
394
|
+
], a.prototype, "highlight", 2);
|
|
395
|
+
i([
|
|
396
|
+
c({ attribute: "copy-button", converter: O })
|
|
397
|
+
], a.prototype, "copyButton", 2);
|
|
398
|
+
a = i([
|
|
399
|
+
v("llumi-highlighter")
|
|
400
|
+
], a);
|
|
401
|
+
export {
|
|
402
|
+
a as LlumiHighlighter
|
|
403
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*! @llumi/design-system v2.1.0 | (c) 2026 pAIrprog SAS | license: https://cdn.jsdelivr.net/npm/@llumi/design-system@2.1.0/LICENSE | bundled third-party components under MIT, see NOTICE | @license */
|
|
2
|
+
const o = ":where(button:has(>i:only-child)){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:1px solid var(--llumi-color-border, oklch(92% .004 286.32));border-radius:var(--llumi-radius, .5rem);background:var(--llumi-color-surface, oklch(100% 0 0));color:var(--llumi-color-fg, oklch(21% .006 285.885));cursor:pointer;transition:background-color .15s ease,color .15s ease,border-color .15s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none}:where(button:has(>i:only-child):hover:not(:disabled)){background:color-mix(in oklab,var(--llumi-color-fg, oklch(21% .006 285.885)) 6%,transparent)}:where(button:has(>i:only-child):focus-visible){outline:2px solid var(--llumi-color-ring, oklch(55.8% .288 302.321));outline-offset:2px}:where(button:has(>i:only-child):disabled){opacity:.6;cursor:default}:where(button:has(>i:only-child)>i){display:inline-flex;width:1rem;height:1rem}:where(button:has(>i:only-child)>i>svg){width:100%;height:100%}:where(button.is-done:has(>i:only-child)){border-color:var(--llumi-color-success, oklch(62.7% .194 149.214));color:var(--llumi-color-success, oklch(62.7% .194 149.214))}:where(button.is-error:has(>i:only-child)){border-color:var(--llumi-color-danger, oklch(57.7% .245 27.325));color:var(--llumi-color-danger, oklch(57.7% .245 27.325))}:where(button.is-working:has(>i:only-child)>i>svg){animation:llumi-spin 1s linear infinite}@keyframes llumi-spin{to{transform:rotate(360deg)}}";
|
|
3
|
+
export {
|
|
4
|
+
o as i
|
|
5
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { svg as c, html as e } from "https://cdn.jsdelivr.net/npm/lit@3.3.3";
|
|
2
|
+
/*! @llumi/design-system v2.1.0 | (c) 2026 pAIrprog SAS | license: https://cdn.jsdelivr.net/npm/@llumi/design-system@2.1.0/LICENSE | bundled third-party components under MIT, see NOTICE | @license */
|
|
3
|
+
function r(t) {
|
|
4
|
+
return e`<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="none"
|
|
8
|
+
stroke="currentColor"
|
|
9
|
+
stroke-width="2"
|
|
10
|
+
stroke-linecap="round"
|
|
11
|
+
stroke-linejoin="round"
|
|
12
|
+
aria-hidden="true"
|
|
13
|
+
>
|
|
14
|
+
${t}
|
|
15
|
+
</svg>`;
|
|
16
|
+
}
|
|
17
|
+
const a = {
|
|
18
|
+
check: r(c`<path d="M20 6 9 17l-5-5" />`),
|
|
19
|
+
copy: r(
|
|
20
|
+
c`<rect width="14" height="14" x="8" y="8" rx="2" ry="2" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />`
|
|
21
|
+
),
|
|
22
|
+
download: r(
|
|
23
|
+
c`<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><path d="M12 3v12" /><path d="m7 10 5 5 5-5" />`
|
|
24
|
+
),
|
|
25
|
+
gripVertical: r(
|
|
26
|
+
c`<circle cx="9" cy="12" r="1" /><circle cx="9" cy="5" r="1" /><circle cx="9" cy="19" r="1" /><circle cx="15" cy="12" r="1" /><circle cx="15" cy="5" r="1" /><circle cx="15" cy="19" r="1" />`
|
|
27
|
+
),
|
|
28
|
+
maximize: r(
|
|
29
|
+
c`<polyline points="15 3 21 3 21 9" /><polyline points="9 21 3 21 3 15" /><line x1="21" x2="14" y1="3" y2="10" /><line x1="3" x2="10" y1="21" y2="14" />`
|
|
30
|
+
),
|
|
31
|
+
messageSquare: r(
|
|
32
|
+
c`<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />`
|
|
33
|
+
),
|
|
34
|
+
spinner: r(c`<path d="M21 12a9 9 0 1 1-6.219-8.56" />`),
|
|
35
|
+
trash: r(
|
|
36
|
+
c`<path d="M3 6h18" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />`
|
|
37
|
+
),
|
|
38
|
+
x: r(c`<path d="M18 6 6 18" /><path d="m6 6 12 12" />`)
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
a as i
|
|
42
|
+
};
|