neatkit 0.8.0 → 0.9.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/dist/Boundary.cjs +1 -1
- package/dist/Boundary.js +29 -29
- package/dist/Button-BV5OUXpc.js +101 -0
- package/dist/Button-DU4j_IED.cjs +1 -0
- package/dist/Button.cjs +1 -1
- package/dist/Button.js +1 -1
- package/dist/Checkbox.cjs +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Code-JDb4VFl7.cjs → Code-B7s_rN0G.cjs} +1 -1
- package/dist/{Code-ClkozPlv.js → Code-Bp2X1k-g.js} +1 -4
- package/dist/Code.cjs +1 -1
- package/dist/Code.js +1 -1
- package/dist/Divider-C7XGlr26.cjs +1 -0
- package/dist/{Divider-BE15WVDI.js → Divider-DZgpYpr-.js} +1 -1
- package/dist/Divider.cjs +1 -1
- package/dist/Divider.js +1 -1
- package/dist/Icon-BIBzgznI.cjs +1 -0
- package/dist/{Icon-BoEUoOk7.js → Icon-CxK1wlGk.js} +98 -52
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.cjs +1 -1
- package/dist/Input.js +1 -1
- package/dist/Markdown.cjs +1 -1
- package/dist/Markdown.js +108 -104
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +1 -1
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.js +147 -141
- package/dist/Select.cjs +1 -1
- package/dist/Select.js +2 -2
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +310 -295
- package/dist/Table-CADupJEU.js +423 -0
- package/dist/Table-qetwZpTC.cjs +1 -0
- package/dist/Table.cjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Tooltip-B4bajPtk.cjs → Tooltip-B2d5ss7S.cjs} +1 -1
- package/dist/{Tooltip-BVqdnKK_.js → Tooltip-BK64rkxV.js} +1 -1
- package/dist/Tooltip.cjs +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/albert-sans-cb3e34c4.woff2 +0 -0
- package/dist/components/Icon/icons/GearIcon.d.ts +11 -0
- package/dist/components/Icon/icons/ImageIcon.d.ts +11 -0
- package/dist/components/Icon/utils/registry.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.d.ts +6 -1
- package/dist/components/Sidebar/components/SidebarFooter.d.ts +5 -0
- package/dist/components/Sidebar/components/SidebarGroup.d.ts +5 -16
- package/dist/components/Sidebar/components/SidebarHeader.d.ts +29 -0
- package/dist/components/Sidebar/components/SidebarItem.d.ts +3 -0
- package/dist/components/Sidebar/components/SidebarPanel.d.ts +2 -2
- package/dist/components/Sidebar/hooks/usePresentation.d.ts +2 -2
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Sidebar/utils/presentation.d.ts +12 -0
- package/dist/components/Sidebar/utils/state.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +21 -209
- package/dist/components/Table/components/TableAction.d.ts +18 -0
- package/dist/components/Table/components/TableActionCell.d.ts +15 -0
- package/dist/components/Table/components/TableActionHeaderCell.d.ts +13 -0
- package/dist/components/Table/components/TableBody.d.ts +27 -0
- package/dist/components/Table/components/TableCell.d.ts +42 -0
- package/dist/components/Table/components/TableFoot.d.ts +19 -0
- package/dist/components/Table/components/TableHead.d.ts +19 -0
- package/dist/components/Table/components/TableHeaderCell.d.ts +23 -0
- package/dist/components/Table/components/TableRow.d.ts +67 -0
- package/dist/components/Table/hooks/useHorizontalOverflow.d.ts +25 -0
- package/dist/components/Table/utils/cell.d.ts +25 -0
- package/dist/components/Table/utils/children.d.ts +18 -0
- package/dist/components/Table/utils/trigger.d.ts +54 -0
- package/dist/floating-position-DIjh2wnP.cjs +1 -0
- package/dist/floating-position-DvR6e334.js +50 -0
- package/dist/style.css +1 -1
- package/dist/{useFloatingPosition-CMirP2-2.js → useFloatingPosition-B3ZC-v3v.js} +1 -1
- package/dist/{useFloatingPosition-BBEUHPqy.cjs → useFloatingPosition-GzkP9dCc.cjs} +1 -1
- package/package.json +2 -1
- package/dist/Button-Chv4O66e.js +0 -99
- package/dist/Button-DCKtFvSo.cjs +0 -1
- package/dist/Divider-CJYbFcSX.cjs +0 -1
- package/dist/Icon-DJ4BigRz.cjs +0 -1
- package/dist/Table-B30TBckZ.js +0 -402
- package/dist/Table-DceR12X9.cjs +0 -1
- package/dist/floating-position-5wJ5G5IT.js +0 -48
- package/dist/floating-position-Cy9xxdH4.cjs +0 -1
package/dist/Markdown.js
CHANGED
|
@@ -7,9 +7,9 @@ import Q, { defaultSchema as P } from "rehype-sanitize";
|
|
|
7
7
|
import Z from "rehype-slug";
|
|
8
8
|
import ee from "remark-gfm";
|
|
9
9
|
import { A as ne } from "./Alert-DQ5CCE0N.js";
|
|
10
|
-
import { C as re } from "./Code-
|
|
11
|
-
import { D as te } from "./Divider-
|
|
12
|
-
import { T as _ } from "./Table-
|
|
10
|
+
import { C as re } from "./Code-Bp2X1k-g.js";
|
|
11
|
+
import { D as te } from "./Divider-DZgpYpr-.js";
|
|
12
|
+
import { T as _ } from "./Table-CADupJEU.js";
|
|
13
13
|
import { T as k } from "./Text-rN6iDo0V.js";
|
|
14
14
|
const oe = {
|
|
15
15
|
bash: "Shell",
|
|
@@ -44,7 +44,7 @@ const oe = {
|
|
|
44
44
|
};
|
|
45
45
|
function ie(e) {
|
|
46
46
|
var a;
|
|
47
|
-
const o = (a = e == null ? void 0 : e.split(/\s+/).find((
|
|
47
|
+
const o = (a = e == null ? void 0 : e.split(/\s+/).find((f) => f.startsWith("language-"))) == null ? void 0 : a.slice(9).toLowerCase();
|
|
48
48
|
return o ? oe[o] : void 0;
|
|
49
49
|
}
|
|
50
50
|
const B = "md-", R = [
|
|
@@ -140,34 +140,35 @@ function le(e) {
|
|
|
140
140
|
}
|
|
141
141
|
function E(e, o, a) {
|
|
142
142
|
if (e.includes("\\") || /[\u0000-\u0020\u007f]/.test(e) || o === void 0) return;
|
|
143
|
-
const
|
|
143
|
+
const f = /^[a-z][a-z\d+.-]*:/i.test(e), m = e.startsWith("//");
|
|
144
144
|
if (o === "*")
|
|
145
|
-
return !
|
|
145
|
+
return !f && !m || /^https?:/i.test(e) || m ? e : void 0;
|
|
146
146
|
const i = Array.isArray(o) ? o : [o], t = le(a);
|
|
147
147
|
try {
|
|
148
|
-
|
|
149
|
-
if (!n || n.protocol !== "http:" && n.protocol !== "https:" || n.username || n.password)
|
|
148
|
+
let n = null;
|
|
149
|
+
if (f ? n = new URL(e) : t && (n = new URL(e, t)), !n || n.protocol !== "http:" && n.protocol !== "https:" || n.username || n.password)
|
|
150
150
|
return;
|
|
151
151
|
const r = n.href;
|
|
152
|
-
return i.some((
|
|
152
|
+
return i.some((l) => ae(r, l)) ? r : void 0;
|
|
153
153
|
} catch {
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
function C(e, o, a) {
|
|
158
158
|
if (!e) return;
|
|
159
|
-
const
|
|
159
|
+
const m = e.split(",").map((i) => {
|
|
160
160
|
const t = i.trim().split(/\s+/), [n, r] = t, d = r === void 0 || /^(?:\d+w|(?:\d+(?:\.\d+)?|\.\d+)x)$/.test(r);
|
|
161
161
|
if (t.length > 2 || !d || n === void 0 || n.length === 0)
|
|
162
162
|
return null;
|
|
163
|
-
const
|
|
163
|
+
const l = E(
|
|
164
164
|
n,
|
|
165
165
|
o,
|
|
166
166
|
a
|
|
167
167
|
);
|
|
168
|
-
return
|
|
168
|
+
return l ? `${l}${r ? ` ${r}` : ""}` : null;
|
|
169
169
|
});
|
|
170
|
-
|
|
170
|
+
if (!m.some((i) => i === null))
|
|
171
|
+
return m.join(", ");
|
|
171
172
|
}
|
|
172
173
|
function ce() {
|
|
173
174
|
function e(o) {
|
|
@@ -182,9 +183,9 @@ function S(e, o) {
|
|
|
182
183
|
}
|
|
183
184
|
function de(e) {
|
|
184
185
|
const { clobberPrefix: o, prefix: a } = e;
|
|
185
|
-
function m
|
|
186
|
-
if (
|
|
187
|
-
const { properties: i } =
|
|
186
|
+
function f(m) {
|
|
187
|
+
if (m.type === "element") {
|
|
188
|
+
const { properties: i } = m;
|
|
188
189
|
i.id = S(i.id, a), i.name = S(i.name, a), i.ariaDescribedBy = S(
|
|
189
190
|
i.ariaDescribedBy,
|
|
190
191
|
a
|
|
@@ -193,9 +194,9 @@ function de(e) {
|
|
|
193
194
|
a
|
|
194
195
|
), typeof i.href == "string" && i.href.startsWith("#") && (i.href = `#${o}${a}${i.href.slice(1)}`);
|
|
195
196
|
}
|
|
196
|
-
"children" in
|
|
197
|
+
"children" in m && m.children.forEach(f);
|
|
197
198
|
}
|
|
198
|
-
return (
|
|
199
|
+
return (m) => f(m);
|
|
199
200
|
}
|
|
200
201
|
function A(e) {
|
|
201
202
|
return e === "center" || e === "left" || e === "right" ? e : void 0;
|
|
@@ -210,23 +211,26 @@ function ue(e) {
|
|
|
210
211
|
if (!e) return null;
|
|
211
212
|
const o = e.children.find((n) => n.type === "element" && n.tagName === "code");
|
|
212
213
|
if (!o || e.children.some((n) => n !== o && (n.type !== "text" || n.value.trim().length > 0))) return null;
|
|
213
|
-
const
|
|
214
|
+
const f = o.properties.className;
|
|
215
|
+
let m;
|
|
216
|
+
Array.isArray(f) ? m = f.join(" ") : typeof f == "string" && (m = f);
|
|
217
|
+
const i = o.children.map(j).join("").replace(/\n$/, "");
|
|
214
218
|
return { codeProps: {
|
|
215
|
-
className:
|
|
219
|
+
className: m,
|
|
216
220
|
dir: H(o.properties.dir),
|
|
217
221
|
id: H(o.properties.id),
|
|
218
222
|
lang: H(o.properties.lang),
|
|
219
223
|
title: H(o.properties.title)
|
|
220
224
|
}, content: i };
|
|
221
225
|
}
|
|
222
|
-
function me(e, o, a,
|
|
226
|
+
function me(e, o, a, f, m) {
|
|
223
227
|
return {
|
|
224
228
|
a: function(t) {
|
|
225
229
|
const {
|
|
226
230
|
children: n,
|
|
227
231
|
className: r,
|
|
228
232
|
dangerouslySetInnerHTML: d,
|
|
229
|
-
node:
|
|
233
|
+
node: l,
|
|
230
234
|
...s
|
|
231
235
|
} = t;
|
|
232
236
|
return /* @__PURE__ */ u(
|
|
@@ -234,7 +238,7 @@ function me(e, o, a, m, f) {
|
|
|
234
238
|
{
|
|
235
239
|
...s,
|
|
236
240
|
className: ["nk-markdown__link", r].filter(Boolean).join(" "),
|
|
237
|
-
onClick:
|
|
241
|
+
onClick: m,
|
|
238
242
|
children: n
|
|
239
243
|
}
|
|
240
244
|
);
|
|
@@ -244,16 +248,16 @@ function me(e, o, a, m, f) {
|
|
|
244
248
|
children: n,
|
|
245
249
|
dangerouslySetInnerHTML: r,
|
|
246
250
|
node: d,
|
|
247
|
-
...
|
|
251
|
+
...l
|
|
248
252
|
} = t;
|
|
249
|
-
return /* @__PURE__ */ u("blockquote", { ...
|
|
253
|
+
return /* @__PURE__ */ u("blockquote", { ...l, className: "nk-markdown__blockquote", children: n });
|
|
250
254
|
},
|
|
251
255
|
code: function(t) {
|
|
252
256
|
const {
|
|
253
257
|
children: n,
|
|
254
258
|
className: r,
|
|
255
259
|
dangerouslySetInnerHTML: d,
|
|
256
|
-
node:
|
|
260
|
+
node: l,
|
|
257
261
|
...s
|
|
258
262
|
} = t;
|
|
259
263
|
return /* @__PURE__ */ u(
|
|
@@ -270,14 +274,14 @@ function me(e, o, a, m, f) {
|
|
|
270
274
|
children: n,
|
|
271
275
|
className: r,
|
|
272
276
|
dangerouslySetInnerHTML: d,
|
|
273
|
-
node:
|
|
277
|
+
node: l,
|
|
274
278
|
ref: s,
|
|
275
|
-
...
|
|
279
|
+
...c
|
|
276
280
|
} = t;
|
|
277
281
|
return /* @__PURE__ */ u(
|
|
278
282
|
k,
|
|
279
283
|
{
|
|
280
|
-
...
|
|
284
|
+
...c,
|
|
281
285
|
as: "h1",
|
|
282
286
|
className: ["nk-markdown__heading", r].filter(Boolean).join(" "),
|
|
283
287
|
size: "heading",
|
|
@@ -291,14 +295,14 @@ function me(e, o, a, m, f) {
|
|
|
291
295
|
children: n,
|
|
292
296
|
className: r,
|
|
293
297
|
dangerouslySetInnerHTML: d,
|
|
294
|
-
node:
|
|
298
|
+
node: l,
|
|
295
299
|
ref: s,
|
|
296
|
-
...
|
|
300
|
+
...c
|
|
297
301
|
} = t;
|
|
298
302
|
return /* @__PURE__ */ u(
|
|
299
303
|
k,
|
|
300
304
|
{
|
|
301
|
-
...
|
|
305
|
+
...c,
|
|
302
306
|
as: "h2",
|
|
303
307
|
className: [
|
|
304
308
|
"nk-markdown__heading",
|
|
@@ -315,14 +319,14 @@ function me(e, o, a, m, f) {
|
|
|
315
319
|
children: n,
|
|
316
320
|
className: r,
|
|
317
321
|
dangerouslySetInnerHTML: d,
|
|
318
|
-
node:
|
|
322
|
+
node: l,
|
|
319
323
|
ref: s,
|
|
320
|
-
...
|
|
324
|
+
...c
|
|
321
325
|
} = t;
|
|
322
326
|
return /* @__PURE__ */ u(
|
|
323
327
|
k,
|
|
324
328
|
{
|
|
325
|
-
...
|
|
329
|
+
...c,
|
|
326
330
|
as: "h3",
|
|
327
331
|
className: ["nk-markdown__heading", r].filter(Boolean).join(" "),
|
|
328
332
|
size: "subtitle",
|
|
@@ -336,14 +340,14 @@ function me(e, o, a, m, f) {
|
|
|
336
340
|
children: n,
|
|
337
341
|
className: r,
|
|
338
342
|
dangerouslySetInnerHTML: d,
|
|
339
|
-
node:
|
|
343
|
+
node: l,
|
|
340
344
|
ref: s,
|
|
341
|
-
...
|
|
345
|
+
...c
|
|
342
346
|
} = t;
|
|
343
347
|
return /* @__PURE__ */ u(
|
|
344
348
|
k,
|
|
345
349
|
{
|
|
346
|
-
...
|
|
350
|
+
...c,
|
|
347
351
|
as: "h4",
|
|
348
352
|
className: ["nk-markdown__heading", r].filter(Boolean).join(" "),
|
|
349
353
|
weight: "semibold",
|
|
@@ -356,14 +360,14 @@ function me(e, o, a, m, f) {
|
|
|
356
360
|
children: n,
|
|
357
361
|
className: r,
|
|
358
362
|
dangerouslySetInnerHTML: d,
|
|
359
|
-
node:
|
|
363
|
+
node: l,
|
|
360
364
|
ref: s,
|
|
361
|
-
...
|
|
365
|
+
...c
|
|
362
366
|
} = t;
|
|
363
367
|
return /* @__PURE__ */ u(
|
|
364
368
|
k,
|
|
365
369
|
{
|
|
366
|
-
...
|
|
370
|
+
...c,
|
|
367
371
|
as: "h5",
|
|
368
372
|
className: ["nk-markdown__heading", r].filter(Boolean).join(" "),
|
|
369
373
|
weight: "semibold",
|
|
@@ -376,14 +380,14 @@ function me(e, o, a, m, f) {
|
|
|
376
380
|
children: n,
|
|
377
381
|
className: r,
|
|
378
382
|
dangerouslySetInnerHTML: d,
|
|
379
|
-
node:
|
|
383
|
+
node: l,
|
|
380
384
|
ref: s,
|
|
381
|
-
...
|
|
385
|
+
...c
|
|
382
386
|
} = t;
|
|
383
387
|
return /* @__PURE__ */ u(
|
|
384
388
|
k,
|
|
385
389
|
{
|
|
386
|
-
...
|
|
390
|
+
...c,
|
|
387
391
|
as: "h6",
|
|
388
392
|
className: ["nk-markdown__heading", r].filter(Boolean).join(" "),
|
|
389
393
|
weight: "medium",
|
|
@@ -404,16 +408,16 @@ function me(e, o, a, m, f) {
|
|
|
404
408
|
alt: n,
|
|
405
409
|
className: r,
|
|
406
410
|
dangerouslySetInnerHTML: d,
|
|
407
|
-
node:
|
|
411
|
+
node: l,
|
|
408
412
|
src: s,
|
|
409
|
-
srcSet:
|
|
413
|
+
srcSet: c,
|
|
410
414
|
...M
|
|
411
415
|
} = t, b = E(
|
|
412
416
|
typeof s == "string" ? s : "",
|
|
413
417
|
e,
|
|
414
418
|
o
|
|
415
419
|
), L = C(
|
|
416
|
-
|
|
420
|
+
c,
|
|
417
421
|
e,
|
|
418
422
|
o
|
|
419
423
|
);
|
|
@@ -435,7 +439,7 @@ function me(e, o, a, m, f) {
|
|
|
435
439
|
checked: n,
|
|
436
440
|
className: r,
|
|
437
441
|
dangerouslySetInnerHTML: d,
|
|
438
|
-
node:
|
|
442
|
+
node: l,
|
|
439
443
|
...s
|
|
440
444
|
} = t;
|
|
441
445
|
return /* @__PURE__ */ W(q, { children: [
|
|
@@ -463,16 +467,16 @@ function me(e, o, a, m, f) {
|
|
|
463
467
|
children: n,
|
|
464
468
|
className: r,
|
|
465
469
|
dangerouslySetInnerHTML: d,
|
|
466
|
-
node:
|
|
470
|
+
node: l,
|
|
467
471
|
...s
|
|
468
|
-
} = t,
|
|
472
|
+
} = t, c = (r == null ? void 0 : r.split(/\s+/).includes("task-list-item")) ?? !1;
|
|
469
473
|
return /* @__PURE__ */ u(
|
|
470
474
|
"li",
|
|
471
475
|
{
|
|
472
476
|
...s,
|
|
473
477
|
className: [
|
|
474
478
|
"nk-markdown__list-item",
|
|
475
|
-
|
|
479
|
+
c ? "nk-markdown__list-item--task" : void 0
|
|
476
480
|
].filter(Boolean).join(" "),
|
|
477
481
|
children: n
|
|
478
482
|
}
|
|
@@ -483,9 +487,9 @@ function me(e, o, a, m, f) {
|
|
|
483
487
|
children: n,
|
|
484
488
|
className: r,
|
|
485
489
|
dangerouslySetInnerHTML: d,
|
|
486
|
-
node:
|
|
490
|
+
node: l,
|
|
487
491
|
...s
|
|
488
|
-
} = t,
|
|
492
|
+
} = t, c = (r == null ? void 0 : r.split(/\s+/).includes("contains-task-list")) ?? !1;
|
|
489
493
|
return /* @__PURE__ */ u(
|
|
490
494
|
"ol",
|
|
491
495
|
{
|
|
@@ -493,7 +497,7 @@ function me(e, o, a, m, f) {
|
|
|
493
497
|
className: [
|
|
494
498
|
"nk-markdown__list",
|
|
495
499
|
"nk-markdown__list--ordered",
|
|
496
|
-
|
|
500
|
+
c ? "nk-markdown__list--tasks" : void 0
|
|
497
501
|
].filter(Boolean).join(" "),
|
|
498
502
|
children: n
|
|
499
503
|
}
|
|
@@ -504,14 +508,14 @@ function me(e, o, a, m, f) {
|
|
|
504
508
|
children: n,
|
|
505
509
|
className: r,
|
|
506
510
|
dangerouslySetInnerHTML: d,
|
|
507
|
-
node:
|
|
511
|
+
node: l,
|
|
508
512
|
ref: s,
|
|
509
|
-
...
|
|
513
|
+
...c
|
|
510
514
|
} = t;
|
|
511
515
|
return /* @__PURE__ */ u(
|
|
512
516
|
k,
|
|
513
517
|
{
|
|
514
|
-
...
|
|
518
|
+
...c,
|
|
515
519
|
className: ["nk-markdown__paragraph", r].filter(Boolean).join(" "),
|
|
516
520
|
children: n
|
|
517
521
|
}
|
|
@@ -522,7 +526,7 @@ function me(e, o, a, m, f) {
|
|
|
522
526
|
children: n,
|
|
523
527
|
className: r,
|
|
524
528
|
dangerouslySetInnerHTML: d,
|
|
525
|
-
node:
|
|
529
|
+
node: l,
|
|
526
530
|
...s
|
|
527
531
|
} = t;
|
|
528
532
|
return /* @__PURE__ */ u(
|
|
@@ -539,17 +543,17 @@ function me(e, o, a, m, f) {
|
|
|
539
543
|
children: n,
|
|
540
544
|
dangerouslySetInnerHTML: r,
|
|
541
545
|
node: d,
|
|
542
|
-
ref:
|
|
546
|
+
ref: l,
|
|
543
547
|
...s
|
|
544
|
-
} = t,
|
|
545
|
-
return
|
|
548
|
+
} = t, c = ue(d);
|
|
549
|
+
return c ? /* @__PURE__ */ u(
|
|
546
550
|
re,
|
|
547
551
|
{
|
|
548
|
-
code:
|
|
549
|
-
codeProps:
|
|
550
|
-
language: ie(
|
|
552
|
+
code: c.content,
|
|
553
|
+
codeProps: c.codeProps,
|
|
554
|
+
language: ie(c.codeProps.className),
|
|
551
555
|
maxHighlightLength: a,
|
|
552
|
-
maxLineCount:
|
|
556
|
+
maxLineCount: f,
|
|
553
557
|
preProps: s
|
|
554
558
|
}
|
|
555
559
|
) : /* @__PURE__ */ u("pre", { ...s, children: n });
|
|
@@ -559,18 +563,18 @@ function me(e, o, a, m, f) {
|
|
|
559
563
|
children: n,
|
|
560
564
|
dangerouslySetInnerHTML: r,
|
|
561
565
|
node: d,
|
|
562
|
-
srcSet:
|
|
566
|
+
srcSet: l,
|
|
563
567
|
...s
|
|
564
|
-
} = t,
|
|
565
|
-
|
|
568
|
+
} = t, c = C(
|
|
569
|
+
l,
|
|
566
570
|
e,
|
|
567
571
|
o
|
|
568
572
|
);
|
|
569
|
-
return
|
|
573
|
+
return c ? /* @__PURE__ */ u(
|
|
570
574
|
"source",
|
|
571
575
|
{
|
|
572
576
|
...s,
|
|
573
|
-
srcSet:
|
|
577
|
+
srcSet: c
|
|
574
578
|
}
|
|
575
579
|
) : null;
|
|
576
580
|
},
|
|
@@ -579,32 +583,32 @@ function me(e, o, a, m, f) {
|
|
|
579
583
|
children: n,
|
|
580
584
|
dangerouslySetInnerHTML: r,
|
|
581
585
|
node: d,
|
|
582
|
-
...
|
|
586
|
+
...l
|
|
583
587
|
} = t;
|
|
584
|
-
return /* @__PURE__ */ u(_, { ...
|
|
588
|
+
return /* @__PURE__ */ u(_, { ...l, children: n });
|
|
585
589
|
},
|
|
586
590
|
tbody: function(t) {
|
|
587
591
|
const {
|
|
588
592
|
children: n,
|
|
589
593
|
dangerouslySetInnerHTML: r,
|
|
590
594
|
node: d,
|
|
591
|
-
...
|
|
595
|
+
...l
|
|
592
596
|
} = t;
|
|
593
|
-
return /* @__PURE__ */ u(_.Body, { ...
|
|
597
|
+
return /* @__PURE__ */ u(_.Body, { ...l, children: n });
|
|
594
598
|
},
|
|
595
599
|
td: function(t) {
|
|
596
600
|
const {
|
|
597
601
|
align: n,
|
|
598
602
|
children: r,
|
|
599
603
|
dangerouslySetInnerHTML: d,
|
|
600
|
-
node:
|
|
604
|
+
node: l,
|
|
601
605
|
style: s,
|
|
602
|
-
...
|
|
606
|
+
...c
|
|
603
607
|
} = t;
|
|
604
608
|
return /* @__PURE__ */ u(
|
|
605
609
|
_.Cell,
|
|
606
610
|
{
|
|
607
|
-
...
|
|
611
|
+
...c,
|
|
608
612
|
align: A((s == null ? void 0 : s.textAlign) ?? n),
|
|
609
613
|
children: r
|
|
610
614
|
}
|
|
@@ -615,14 +619,14 @@ function me(e, o, a, m, f) {
|
|
|
615
619
|
align: n,
|
|
616
620
|
children: r,
|
|
617
621
|
dangerouslySetInnerHTML: d,
|
|
618
|
-
node:
|
|
622
|
+
node: l,
|
|
619
623
|
style: s,
|
|
620
|
-
...
|
|
624
|
+
...c
|
|
621
625
|
} = t;
|
|
622
626
|
return /* @__PURE__ */ u(
|
|
623
627
|
_.HeaderCell,
|
|
624
628
|
{
|
|
625
|
-
...
|
|
629
|
+
...c,
|
|
626
630
|
align: A((s == null ? void 0 : s.textAlign) ?? n),
|
|
627
631
|
children: r
|
|
628
632
|
}
|
|
@@ -633,16 +637,16 @@ function me(e, o, a, m, f) {
|
|
|
633
637
|
children: n,
|
|
634
638
|
dangerouslySetInnerHTML: r,
|
|
635
639
|
node: d,
|
|
636
|
-
...
|
|
640
|
+
...l
|
|
637
641
|
} = t;
|
|
638
|
-
return /* @__PURE__ */ u(_.Head, { ...
|
|
642
|
+
return /* @__PURE__ */ u(_.Head, { ...l, children: n });
|
|
639
643
|
},
|
|
640
644
|
tr: function(t) {
|
|
641
645
|
const {
|
|
642
646
|
children: n,
|
|
643
647
|
dangerouslySetInnerHTML: r,
|
|
644
648
|
node: d,
|
|
645
|
-
onClick:
|
|
649
|
+
onClick: l,
|
|
646
650
|
...s
|
|
647
651
|
} = t;
|
|
648
652
|
return /* @__PURE__ */ u(_.Row, { ...s, children: n });
|
|
@@ -652,9 +656,9 @@ function me(e, o, a, m, f) {
|
|
|
652
656
|
children: n,
|
|
653
657
|
className: r,
|
|
654
658
|
dangerouslySetInnerHTML: d,
|
|
655
|
-
node:
|
|
659
|
+
node: l,
|
|
656
660
|
...s
|
|
657
|
-
} = t,
|
|
661
|
+
} = t, c = (r == null ? void 0 : r.split(/\s+/).includes("contains-task-list")) ?? !1;
|
|
658
662
|
return /* @__PURE__ */ u(
|
|
659
663
|
"ul",
|
|
660
664
|
{
|
|
@@ -662,7 +666,7 @@ function me(e, o, a, m, f) {
|
|
|
662
666
|
className: [
|
|
663
667
|
"nk-markdown__list",
|
|
664
668
|
"nk-markdown__list--unordered",
|
|
665
|
-
|
|
669
|
+
c ? "nk-markdown__list--tasks" : void 0
|
|
666
670
|
].filter(Boolean).join(" "),
|
|
667
671
|
children: n
|
|
668
672
|
}
|
|
@@ -696,27 +700,27 @@ function ge(e) {
|
|
|
696
700
|
}
|
|
697
701
|
}
|
|
698
702
|
function _e(e, o) {
|
|
699
|
-
const a = e,
|
|
703
|
+
const a = e, f = new a.HashChangeEvent("hashchange", {
|
|
700
704
|
newURL: e.location.href,
|
|
701
705
|
oldURL: o
|
|
702
706
|
});
|
|
703
|
-
e.dispatchEvent(
|
|
707
|
+
e.dispatchEvent(f);
|
|
704
708
|
}
|
|
705
709
|
function ye(e) {
|
|
706
710
|
return e === null ? null : Number.isFinite(e) ? Math.max(0, Math.floor(e)) : 0;
|
|
707
711
|
}
|
|
708
712
|
const Ce = V(function(o, a) {
|
|
709
713
|
const {
|
|
710
|
-
allowedImageSources:
|
|
711
|
-
anchorPrefix:
|
|
714
|
+
allowedImageSources: f,
|
|
715
|
+
anchorPrefix: m = "",
|
|
712
716
|
className: i,
|
|
713
717
|
content: t,
|
|
714
718
|
dangerouslySetInnerHTML: n,
|
|
715
719
|
imageBaseUrl: r,
|
|
716
720
|
maxCodeHighlightLength: d,
|
|
717
|
-
maxCodeLineCount:
|
|
721
|
+
maxCodeLineCount: l,
|
|
718
722
|
maxContentLength: s = he,
|
|
719
|
-
rehypePlugins:
|
|
723
|
+
rehypePlugins: c,
|
|
720
724
|
remarkPlugins: M,
|
|
721
725
|
scrollOffset: g = 128,
|
|
722
726
|
style: b,
|
|
@@ -725,7 +729,7 @@ const Ce = V(function(o, a) {
|
|
|
725
729
|
s
|
|
726
730
|
), D = I !== null && t.length > I, N = J(
|
|
727
731
|
(h) => {
|
|
728
|
-
var
|
|
732
|
+
var v;
|
|
729
733
|
if (h.defaultPrevented || h.button !== 0 || h.metaKey || h.ctrlKey || h.shiftKey || h.altKey)
|
|
730
734
|
return;
|
|
731
735
|
const y = h.currentTarget.getAttribute("href");
|
|
@@ -738,7 +742,7 @@ const Ce = V(function(o, a) {
|
|
|
738
742
|
const p = w.ownerDocument.defaultView;
|
|
739
743
|
if (!p) return;
|
|
740
744
|
h.preventDefault();
|
|
741
|
-
const F = ((
|
|
745
|
+
const F = ((v = p.matchMedia) == null ? void 0 : v.call(
|
|
742
746
|
p,
|
|
743
747
|
"(prefers-reduced-motion: reduce)"
|
|
744
748
|
).matches) ?? !1, U = g === null || F ? "auto" : "smooth", K = p.location.href, G = p.location.hash !== y;
|
|
@@ -750,18 +754,18 @@ const Ce = V(function(o, a) {
|
|
|
750
754
|
[g]
|
|
751
755
|
), O = T(
|
|
752
756
|
() => me(
|
|
753
|
-
|
|
757
|
+
f,
|
|
754
758
|
r,
|
|
755
759
|
d,
|
|
756
|
-
|
|
760
|
+
l,
|
|
757
761
|
N
|
|
758
762
|
),
|
|
759
763
|
[
|
|
760
|
-
|
|
764
|
+
f,
|
|
761
765
|
N,
|
|
762
766
|
r,
|
|
763
767
|
d,
|
|
764
|
-
|
|
768
|
+
l
|
|
765
769
|
]
|
|
766
770
|
), $ = T(
|
|
767
771
|
() => [ee, ...M ?? []],
|
|
@@ -769,20 +773,20 @@ const Ce = V(function(o, a) {
|
|
|
769
773
|
), z = T(
|
|
770
774
|
() => [
|
|
771
775
|
X,
|
|
772
|
-
...
|
|
776
|
+
...c ?? [],
|
|
773
777
|
ce,
|
|
774
778
|
Z,
|
|
775
779
|
[de, {
|
|
776
780
|
clobberPrefix: B,
|
|
777
|
-
prefix:
|
|
781
|
+
prefix: m
|
|
778
782
|
}],
|
|
779
783
|
[Q, se]
|
|
780
784
|
],
|
|
781
|
-
[
|
|
782
|
-
),
|
|
785
|
+
[m, c]
|
|
786
|
+
), x = { ...b };
|
|
783
787
|
if (g !== null) {
|
|
784
788
|
const h = Number.isFinite(g) ? Math.max(0, g) : 0;
|
|
785
|
-
|
|
789
|
+
x["--nk-markdown-scroll-offset"] = `${h}px`;
|
|
786
790
|
}
|
|
787
791
|
return /* @__PURE__ */ u(
|
|
788
792
|
"div",
|
|
@@ -790,7 +794,7 @@ const Ce = V(function(o, a) {
|
|
|
790
794
|
...L,
|
|
791
795
|
ref: a,
|
|
792
796
|
className: ["nk-markdown", i].filter(Boolean).join(" "),
|
|
793
|
-
style:
|
|
797
|
+
style: x,
|
|
794
798
|
children: D ? /* @__PURE__ */ u(ne, { role: "alert", tone: "warning", children: pe }) : /* @__PURE__ */ u(
|
|
795
799
|
Y,
|
|
796
800
|
{
|
package/dist/Modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),s=require("react"),A=require("./effects-D85L_7zM.cjs"),$=require("./Button-
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),s=require("react"),A=require("./effects-D85L_7zM.cjs"),$=require("./Button-DU4j_IED.cjs"),r=require("./usePresence-B5RYv4e1.cjs"),G=require("./useFocusTrap-BrFZdMqQ.cjs"),H=require("./useScrollLock-Dy8MZaSn.cjs"),J=require("./Surface-BttJYSDt.cjs"),K=require("./Text-DWYlIcPj.cjs");function Q(c,t,a){t.current=c,typeof a=="function"?a(c):a&&(a.current=c)}function U(c){const{"aria-label":t,"aria-labelledby":a,children:l,className:v,closeButtonLabel:m="Close modal",exitable:i=!0,forwardedReference:u,initialFocusReference:d,lockScroll:f=!0,onClose:e,open:o,ownerDocument:g,presenceState:k,restoreFocus:R=!0,role:F="dialog",style:I,title:b,trapFocus:S=!0,...P}=c,j=s.useRef(null),_=s.useRef(null),q=s.useContext(r.FocusScopeContext),B=`${s.useId()}-title`,[y,M]=s.useState(null),p=r.useBoundary("Modal").boundaryElement,x=r.useOverlayLayer(!0,p),E=s.useMemo(()=>[j],[]),h=!!(b!=null&&b.trim()),N=d??(h?_:void 0),O=a??(t===void 0&&h?B:void 0),T=s.useCallback(L=>{Q(L,j,u),M(L)},[u]);A.useIsomorphicLayoutEffect(()=>{y&&(y.inert=!o)},[y,o]);const w=s.useCallback(()=>{e==null||e("escape")},[e]),C=s.useCallback(()=>{e==null||e("outside")},[e]);r.useDismissableLayer({boundary:p,active:o,boundaries:E,dismissOnEscape:i,dismissOnPointerDownOutside:i,layerId:x.id,onEscapeDismiss:w,onPointerDownOutsideDismiss:C,ownerDocument:g});const z=G.useFocusTrap({boundary:p,active:o&&S,container:y,initialFocusReference:N,layerId:x.id,restoreFocus:R});H.useScrollLock(f,g,p);const D=i?n.jsx($.Button,{"aria-label":m,className:"nk-modal__close",icon:"cross",onClick:()=>e==null?void 0:e("close-button"),shape:"rectangle",type:"button",variant:"ghost"}):null;return n.jsx(r.FocusScopeContext.Provider,{value:o&&S?z:q,children:n.jsx("div",{className:"nk-modal__overlay","data-state":k,role:"presentation",style:{zIndex:x.zIndex},children:n.jsx("div",{className:"nk-modal__viewport",children:n.jsxs(J.Surface,{...P,ref:T,"aria-hidden":o?void 0:!0,"aria-label":o?t:void 0,"aria-labelledby":o?O:void 0,"aria-modal":o?"true":void 0,className:["nk-modal",v].filter(Boolean).join(" "),"data-state":k,role:o?F:void 0,style:I,tabIndex:-1,children:[h?n.jsxs("div",{className:"nk-modal__header",children:[n.jsx(K.Text,{as:"h2",className:"nk-modal__title",id:B,ref:_,size:"subtitle",tabIndex:-1,weight:"semibold",children:b}),D]}):D,l]})})})})}const V=s.forwardRef(function(t,a){const{open:l}=t,v=r.useBoundary("Modal"),m=s.useRef(t);l&&(m.current=t);const i=l?t:m.current,u=r.usePresence(l),d=v.boundaryElement,f=(d==null?void 0:d.ownerDocument)??(typeof document>"u"?null:document);return!u.present||!f?null:n.jsx(r.Portal,{children:n.jsx(U,{...i,forwardedReference:a,open:l,ownerDocument:f,presenceState:u.state==="closing"?"closing":"open"})})});exports.default=V;
|
package/dist/Modal.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as t, jsxs as F } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as H, useRef as g, useContext as J, useId as K, useState as Q, useMemo as U, useCallback as h } from "react";
|
|
4
4
|
import { u as V } from "./effects-D5CWf-Pl.js";
|
|
5
|
-
import { B as W } from "./Button-
|
|
5
|
+
import { B as W } from "./Button-BV5OUXpc.js";
|
|
6
6
|
import { b as E, c as X, P as Y, F as P, d as Z, e as ee } from "./usePresence-CqegYqy4.js";
|
|
7
7
|
import { u as oe } from "./useFocusTrap-DhVnlboe.js";
|
|
8
8
|
import { u as ae } from "./useScrollLock-Drd7OZRC.js";
|
package/dist/Popover.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),t=require("react"),Oe=require("./aria-Bntn6ad_.cjs"),qe=require("./effects-D85L_7zM.cjs"),M=require("./reference-C2guRuR0.cjs"),b=require("./usePresence-B5RYv4e1.cjs"),we=require("./useFloatingPosition-GzkP9dCc.cjs"),De=require("./useFocusTrap-BrFZdMqQ.cjs"),Fe=require("./Surface-BttJYSDt.cjs");function je(o){const{inert:i,panelElement:c}=o;return qe.useIsomorphicLayoutEffect(()=>{c&&(c.inert=i)},[i,c]),null}function Le(o,i,c){i.current=o,M.assignElementReference(c,o)}function Ne(o,i,c){i.current=o,M.assignElementReference(c,o)}function _e(o){const i=o.tagName.toLowerCase();return o.getAttribute("role")==="button"&&i!=="button"?!1:["button","input","select","summary","textarea"].includes(i)?!0:i==="a"&&o.hasAttribute("href")}function Be(o){return o==="grid"||o==="listbox"||o==="menu"||o==="tree"?o:"dialog"}const Me=t.forwardRef(function(i,c){const{"aria-label":K,"aria-labelledby":re,autoFocus:D=!0,children:ne,className:se,closeOnEscape:oe=!0,closeOnOutsideInteraction:ae=!0,defaultOpen:ie=!1,disabled:x=!1,initialFocusReference:E,onEscapeKeyDown:ce,onOpenChange:k,onPointerDownOutside:I,open:z,placement:A="bottom",restoreFocus:F=!0,role:H="dialog",style:V,tabIndex:ue,trapFocus:v=!1,trigger:d,...le}=i;if(d.type===t.Fragment)throw new Error("Popover requires a single non-Fragment trigger");const $=t.useId(),de=t.useContext(b.FocusScopeContext),U=`${$}-popover`,s=d.props,G=M.getElementReference(d),J=s.id??`${$}-trigger`,P=x||s.disabled===!0||s["aria-disabled"]===!0||s["aria-disabled"]==="true",R=z!==void 0,[fe,pe]=t.useState(ie),r=R?z:fe,C=b.usePresence(r),Q=t.useRef(null),W=t.useRef(null),j=t.useRef("programmatic"),L=t.useRef(null),X=t.useRef(r),T=t.useRef(null),[ge,me]=t.useReducer(e=>e+1,0),[u,be]=t.useState(null),[f,ve]=t.useState(null),a=(u==null?void 0:u.ownerDocument)??(typeof document>"u"?null:document),S=b.useBoundary("Popover").boundaryElement,O=b.useOverlayLayer(C.present,S),ye=t.useMemo(()=>[Q,W],[]),p=we.useFloatingPosition(C.present,A,u,f,S),he=t.useCallback(e=>{Ne(e,Q,G),be(e)},[G]),Ee=t.useCallback(e=>{Le(e,W,c),ve(e)},[c]),g=t.useCallback((e,n)=>{r!==e&&(R?(L.current={open:e,reason:n},me()):(j.current=n,pe(e)),k==null||k(e,n))},[R,k,r]),Pe=t.useCallback(()=>{g(!1,"escape")},[g]),Re=t.useCallback(()=>{g(!1,"outside")},[g]),Te=t.useCallback(e=>{var m;if(I==null||I(e),e.defaultPrevented)return;const n=(m=a==null?void 0:a.defaultView)==null?void 0:m.HTMLElement;n?T.current=e.composedPath().find(h=>h instanceof n&&h.tabIndex>=0)??e.target:T.current=e.target},[I,a]);b.useDismissableLayer({boundary:S,active:r,boundaries:ye,dismissOnEscape:oe,dismissOnPointerDownOutside:ae,layerId:O.id,onEscapeDismiss:Pe,onEscapeKeyDown:ce,onPointerDownOutside:Te,onPointerDownOutsideDismiss:Re,ownerDocument:a});const xe=De.useFocusTrap({boundary:S,active:r&&v,autoFocus:D,container:f,initialFocusReference:E,layerId:O.id,restoreFocus:F});t.useEffect(()=>{if(!r||v||!D||!f)return;let e=!0;return Promise.resolve().then(()=>{if(!e)return;const n=E==null?void 0:E.current;(n&&f.contains(n)?n:f).focus({preventScroll:!0})}),()=>{e=!1}},[D,E,r,f,v]),t.useEffect(()=>{var te;const e=X.current;X.current=r;const n=L.current;let m=j.current;if(R&&(m="programmatic",e!==r&&(n==null?void 0:n.open)===r&&(m=n.reason)),L.current=null,r){j.current="programmatic",T.current=null;return}const h=a==null?void 0:a.activeElement,_=T.current,B=(te=a==null?void 0:a.defaultView)==null?void 0:te.HTMLElement,Se=m==="outside"&&B&&_ instanceof B&&h instanceof B&&(_===h||_.contains(h));e&&!v&&F&&!Se&&(u==null||u.focus({preventScroll:!0})),T.current=null},[ge,R,r,a,F,v,u]),t.useEffect(()=>{x&&r&&g(!1,"programmatic")},[x,r,g]);function ke(e){var n;if(P){e.preventDefault(),e.stopPropagation();return}(n=s.onClick)==null||n.call(s,e),!e.defaultPrevented&&g(!r,"trigger")}function Ie(e){var n;(n=s.onKeyDown)==null||n.call(s,e),!(e.defaultPrevented||P||_e(e.currentTarget)||e.key!=="Enter"&&e.key!==" ")&&(e.preventDefault(),e.currentTarget.click())}if(x)return d;const N=typeof d.type=="string",y=N?d.type:null,Y=y==="a"&&typeof s.href=="string",Z=N&&!(y==="button"||y==="input"||y==="select"||y==="summary"||y==="textarea"||Y),ee=Y&&P;let q=s.role;q===void 0&&(ee?q="link":Z&&(q="button"));let w=s.tabIndex;w===void 0&&Z&&(w=0),P&&(w=-1);const Ce=t.cloneElement(d,{"aria-controls":r?Oe.mergeIdentifiers(s["aria-controls"],U):s["aria-controls"],"aria-expanded":r,"aria-haspopup":s["aria-haspopup"]??Be(H),"aria-disabled":P?!0:s["aria-disabled"],className:[s.className,"nk-popover__trigger"].filter(Boolean).join(" "),href:ee?void 0:s.href,id:J,onClick:ke,onKeyDown:N?Ie:s.onKeyDown,ref:he,role:q,tabIndex:w});return l.jsxs(l.Fragment,{children:[Ce,l.jsx(b.FocusScopeContext.Provider,{value:r&&v?xe:de,children:C.present&&a?l.jsx(b.Portal,{children:l.jsxs(Fe.Surface,{...le,ref:Ee,"aria-hidden":r?void 0:!0,"aria-label":r?K:void 0,"aria-labelledby":r?re??(K===void 0?J:void 0):void 0,className:["nk-popover",se].filter(Boolean).join(" "),"data-placement":(p==null?void 0:p.placement)??A,"data-state":C.state==="closing"?"closing":"open",id:U,role:r?H:void 0,style:p?{...V,"--nk-popover-arrow-offset":`${p.arrowOffset}px`,left:p.left,top:p.top,zIndex:O.zIndex}:{...V,visibility:"hidden",zIndex:O.zIndex},tabIndex:ue??-1,children:[l.jsx(je,{inert:!r,panelElement:f}),l.jsx("span",{"aria-hidden":"true",className:"nk-popover__arrow"}),l.jsx("div",{className:"nk-popover__content",children:ne})]})}):null})]})});exports.default=Me;
|