@caspeco/casper-ui-library 10.0.2 → 10.0.3
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/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +33 -31
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +2 -2
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +16 -16
- package/dist/node_modules/@tiptap/core/dist/index.js +1062 -1056
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +23 -24
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +607 -336
- package/dist/node_modules/@tiptap/extensions/dist/index.js +243 -232
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../lib/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,IAAI,YAAY,EAItB,MAAM,kBAAkB,CAAC;AAI1B,KAAK,qBAAqB,GAAG;IAC5B;2EACuE;IACvE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAG1C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,KAAK,sBAAsB,GAAG,IAAI,CACjC,YAAY,CAAC,SAAS,EACtB,UAAU,GAAG,IAAI,GAAG,gBAAgB,GAAG,WAAW,CAClD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AAExE,wBAAgB,KAAK,CAAC,EACrB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,kBAAyB,EACzB,IAAW,EACX,cAAyB,EACzB,UAAiB,EACjB,GAAG,KAAK,EACR,EAAE,UAAU,+
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../lib/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,IAAI,YAAY,EAItB,MAAM,kBAAkB,CAAC;AAI1B,KAAK,qBAAqB,GAAG;IAC5B;2EACuE;IACvE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAG1C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,KAAK,sBAAsB,GAAG,IAAI,CACjC,YAAY,CAAC,SAAS,EACtB,UAAU,GAAG,IAAI,GAAG,gBAAgB,GAAG,WAAW,CAClD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AAExE,wBAAgB,KAAK,CAAC,EACrB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,kBAAyB,EACzB,IAAW,EACX,cAAyB,EACzB,UAAiB,EACjB,GAAG,KAAK,EACR,EAAE,UAAU,+BAuCZ"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as O, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useBreakpointValue as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { ModalBodyContext as
|
|
6
|
-
function
|
|
7
|
-
const e =
|
|
1
|
+
import { jsx as O, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { c as I } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { useBreakpointValue as V, Dialog as y, Portal as $ } from "@chakra-ui/react";
|
|
4
|
+
import { useState as q } from "react";
|
|
5
|
+
import { ModalBodyContext as w } from "./modal-body-context.js";
|
|
6
|
+
function N(g) {
|
|
7
|
+
const e = I.c(41);
|
|
8
8
|
let t, o, l, n, s, i, r, u, h, C, v;
|
|
9
|
-
e[0] !==
|
|
9
|
+
e[0] !== g ? ({
|
|
10
10
|
children: t,
|
|
11
11
|
isOpen: n,
|
|
12
12
|
onClose: s,
|
|
@@ -18,39 +18,41 @@ function L(y) {
|
|
|
18
18
|
scrollBehavior: C,
|
|
19
19
|
isCentered: v,
|
|
20
20
|
...r
|
|
21
|
-
} =
|
|
22
|
-
const
|
|
23
|
-
let x;
|
|
21
|
+
} = g, e[0] = g, e[1] = t, e[2] = o, e[3] = l, e[4] = n, e[5] = s, e[6] = i, e[7] = r, e[8] = u, e[9] = h, e[10] = C, e[11] = v) : (t = e[1], o = e[2], l = e[3], n = e[4], s = e[5], i = e[6], r = e[7], u = e[8], h = e[9], C = e[10], v = e[11]);
|
|
22
|
+
const P = u === void 0 ? !0 : u, k = h === void 0 ? "sm" : h, F = C === void 0 ? "inside" : C, M = v === void 0 ? !0 : v, [S, R] = q(null);
|
|
23
|
+
let x, B;
|
|
24
24
|
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = {
|
|
25
25
|
base: "bottomSheet",
|
|
26
26
|
md: void 0
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
}, B = {
|
|
28
|
+
ssr: !1
|
|
29
|
+
}, e[12] = x, e[13] = B) : (x = e[12], B = e[13]);
|
|
30
|
+
const c = V(x, B);
|
|
31
|
+
let E;
|
|
32
|
+
e[14] !== s ? (E = function(_) {
|
|
33
|
+
_.open || s?.();
|
|
34
|
+
}, e[14] = s, e[15] = E) : E = e[15];
|
|
35
|
+
const j = E;
|
|
34
36
|
let a;
|
|
35
|
-
e[
|
|
36
|
-
bodyElement:
|
|
37
|
-
setBodyElement:
|
|
38
|
-
}, e[
|
|
39
|
-
const
|
|
37
|
+
e[16] !== S ? (a = {
|
|
38
|
+
bodyElement: S,
|
|
39
|
+
setBodyElement: R
|
|
40
|
+
}, e[16] = S, e[17] = a) : a = e[17];
|
|
41
|
+
const z = M ? "center" : void 0;
|
|
40
42
|
let d;
|
|
41
|
-
e[
|
|
43
|
+
e[18] !== c ? (d = /* @__PURE__ */ O(y.Backdrop, { "data-variant": c }), e[18] = c, e[19] = d) : d = e[19];
|
|
42
44
|
let m;
|
|
43
|
-
e[
|
|
45
|
+
e[20] !== t ? (m = /* @__PURE__ */ O(y.Positioner, { children: /* @__PURE__ */ O(y.Content, { children: t }) }), e[20] = t, e[21] = m) : m = e[21];
|
|
44
46
|
let p;
|
|
45
|
-
e[
|
|
47
|
+
e[22] !== d || e[23] !== m ? (p = /* @__PURE__ */ D($, { children: [
|
|
46
48
|
d,
|
|
47
49
|
m
|
|
48
|
-
] }), e[
|
|
50
|
+
] }), e[22] = d, e[23] = m, e[24] = p) : p = e[24];
|
|
49
51
|
let f;
|
|
50
|
-
e[
|
|
51
|
-
let
|
|
52
|
-
return e[
|
|
52
|
+
e[25] !== o || e[26] !== l || e[27] !== j || e[28] !== n || e[29] !== i || e[30] !== r || e[31] !== P || e[32] !== F || e[33] !== k || e[34] !== p || e[35] !== z || e[36] !== c ? (f = /* @__PURE__ */ O(y.Root, { variant: c, scrollBehavior: F, motionPreset: "slide-in-bottom", size: k, placement: z, closeOnInteractOutside: l, closeOnEscape: o, open: n, onOpenChange: j, restoreFocus: P, onExitComplete: i, ...r, children: p }), e[25] = o, e[26] = l, e[27] = j, e[28] = n, e[29] = i, e[30] = r, e[31] = P, e[32] = F, e[33] = k, e[34] = p, e[35] = z, e[36] = c, e[37] = f) : f = e[37];
|
|
53
|
+
let b;
|
|
54
|
+
return e[38] !== f || e[39] !== a ? (b = /* @__PURE__ */ O(w.Provider, { value: a, children: f }), e[38] = f, e[39] = a, e[40] = b) : b = e[40], b;
|
|
53
55
|
}
|
|
54
56
|
export {
|
|
55
|
-
|
|
57
|
+
N as Modal
|
|
56
58
|
};
|
|
@@ -23,9 +23,9 @@ function $({
|
|
|
23
23
|
i.current.enabled = x, i.current.mode = h;
|
|
24
24
|
const S = (e) => {
|
|
25
25
|
const t = i.current;
|
|
26
|
-
if (!t.enabled) return;
|
|
26
|
+
if (!t.enabled || !t.container) return;
|
|
27
27
|
const n = e.getTotalSize();
|
|
28
|
-
if (
|
|
28
|
+
if (n !== t.lastSize) {
|
|
29
29
|
t.lastSize = n;
|
|
30
30
|
const d = e.options.horizontal ? "width" : "height";
|
|
31
31
|
t.container.style[d] = `${n}px`;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createLazyMeasurementsView as F } from "./lazy-measurements.js";
|
|
2
2
|
import { memo as M, notUndefined as w, approxEqual as R, debounce as D } from "./utils.js";
|
|
3
|
-
let
|
|
3
|
+
let z;
|
|
4
4
|
const y = () => {
|
|
5
|
-
if (
|
|
6
|
-
if (typeof navigator > "u") return
|
|
7
|
-
if (/iP(hone|od|ad)/.test(navigator.userAgent)) return
|
|
5
|
+
if (z !== void 0) return z;
|
|
6
|
+
if (typeof navigator > "u") return z = !1;
|
|
7
|
+
if (/iP(hone|od|ad)/.test(navigator.userAgent)) return z = !0;
|
|
8
8
|
const r = navigator.maxTouchPoints;
|
|
9
|
-
return
|
|
9
|
+
return z = navigator.platform === "MacIntel" && r !== void 0 && r > 0;
|
|
10
10
|
}, C = (r) => {
|
|
11
11
|
const { offsetWidth: a, offsetHeight: t } = r;
|
|
12
12
|
return { width: a, height: t };
|
|
@@ -366,8 +366,8 @@ class U {
|
|
|
366
366
|
p = g[f * 2] + g[f * 2 + 1] + c;
|
|
367
367
|
}
|
|
368
368
|
for (let f = m; f < t; f++) {
|
|
369
|
-
const b = i(f), _ = d.get(b),
|
|
370
|
-
g[f * 2] = p, g[f * 2 + 1] =
|
|
369
|
+
const b = i(f), _ = d.get(b), I = typeof _ == "number" ? _ : this.options.estimateSize(f);
|
|
370
|
+
g[f * 2] = p, g[f * 2 + 1] = I, p += I + c;
|
|
371
371
|
}
|
|
372
372
|
const E = F(t, g, i);
|
|
373
373
|
return this.measurementsCache = E, E;
|
|
@@ -391,12 +391,12 @@ class U {
|
|
|
391
391
|
const O = this.options.lanes === 1 ? h[c - 1] : this.getFurthestMeasurement(h, c);
|
|
392
392
|
E = O ? O.end + this.options.gap : e + s, p = O ? O.lane : c % this.options.lanes, this.options.lanes > 1 && f && this.laneAssignments.set(c, p);
|
|
393
393
|
}
|
|
394
|
-
const b = d.get(v), _ = typeof b == "number" ? b : this.options.estimateSize(c),
|
|
394
|
+
const b = d.get(v), _ = typeof b == "number" ? b : this.options.estimateSize(c), I = E + _;
|
|
395
395
|
h[c] = {
|
|
396
396
|
index: c,
|
|
397
397
|
start: E,
|
|
398
398
|
size: _,
|
|
399
|
-
end:
|
|
399
|
+
end: I,
|
|
400
400
|
key: v,
|
|
401
401
|
lane: p
|
|
402
402
|
}, S[p] = c;
|
|
@@ -508,13 +508,13 @@ class U {
|
|
|
508
508
|
m,
|
|
509
509
|
this
|
|
510
510
|
) : (
|
|
511
|
-
// Default: adjust
|
|
512
|
-
//
|
|
513
|
-
//
|
|
514
|
-
//
|
|
515
|
-
//
|
|
516
|
-
//
|
|
517
|
-
o < this.getScrollOffset() + this.scrollAdjustments && this.scrollDirection !== "backward"
|
|
511
|
+
// Default: adjust when the resize is an above-viewport item.
|
|
512
|
+
// First measurement (!has(key)): always adjust — the item
|
|
513
|
+
// has never been sized, so the estimate→actual delta must
|
|
514
|
+
// be compensated regardless of scroll direction.
|
|
515
|
+
// Re-measurement (has(key)): skip during backward scroll
|
|
516
|
+
// to avoid the "items jump while scrolling up" cascade.
|
|
517
|
+
o < this.getScrollOffset() + this.scrollAdjustments && (!this.itemSizeCache.has(l) || this.scrollDirection !== "backward")
|
|
518
518
|
));
|
|
519
519
|
(this.pendingMin === null || t < this.pendingMin) && (this.pendingMin = t), this.itemSizeCache.set(l, e), this.itemSizeCacheVersion++, h ? this.applyScrollAdjustment(this.getTotalSize() - S) : c && this.applyScrollAdjustment(m), this.notify(!1);
|
|
520
520
|
}
|