@caspeco/casper-ui-library 9.10.0 → 9.11.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/components/rich-text-editor/boolean-control.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-control.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/components/rich-text-editor/use-rich-text-editor.js +1 -1
- package/dist/components/table/table-header-dropdown.d.ts.map +1 -1
- package/dist/components/table/table-header-dropdown.js +68 -66
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +83 -31
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +411 -226
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +33 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +29 -28
- package/dist/node_modules/@tiptap/core/dist/index.js +251 -90
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +3 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +3 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +3 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +5 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +36 -8
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +13 -2
- package/dist/node_modules/@tiptap/extensions/dist/index.js +236 -229
- package/dist/{node_modules → packages/casper-ui-library/node_modules}/@tiptap/react/dist/index.js +12 -7
- package/package.json +13 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useEditorState as s } from "../../node_modules/@tiptap/react/dist/index.js";
|
|
2
|
+
import { useEditorState as s } from "../../packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js";
|
|
3
3
|
import { useRichTextEditorContext as d } from "./rich-text-editor-context.js";
|
|
4
4
|
import { Tooltip as f } from "../tooltip/tooltip.js";
|
|
5
5
|
import { ToggleButton as p } from "../toggle-button/toggle-button.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { Box as D } from "@chakra-ui/react";
|
|
3
|
-
import { useEditorState as x } from "../../node_modules/@tiptap/react/dist/index.js";
|
|
3
|
+
import { useEditorState as x } from "../../packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js";
|
|
4
4
|
import { find as T } from "../../node_modules/linkifyjs/dist/linkify.js";
|
|
5
5
|
import { useState as C, useEffect as A, useCallback as z } from "react";
|
|
6
6
|
import { BooleanControl as c } from "./boolean-control.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { HStack as i, Box as n } from "@chakra-ui/react";
|
|
3
|
-
import { EditorContent as s } from "../../node_modules/@tiptap/react/dist/index.js";
|
|
3
|
+
import { EditorContent as s } from "../../packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js";
|
|
4
4
|
import { useMemo as m } from "react";
|
|
5
5
|
import { useRichTextEditorContext as p, RichTextEditorContext as u } from "./rich-text-editor-context.js";
|
|
6
6
|
import { toolbarCss as f, proseMirrorContainerCss as d, proseMirrorContentCss as x } from "./rich-text-editor-recipe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEditor as r } from "../../node_modules/@tiptap/react/dist/index.js";
|
|
1
|
+
import { useEditor as r } from "../../packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js";
|
|
2
2
|
import { richTextExtensions as n } from "./extensions.js";
|
|
3
3
|
function f({
|
|
4
4
|
initialContent: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-header-dropdown.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-header-dropdown.tsx"],"names":[],"mappings":"AAWA,OAAO,EAGN,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,M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AAC"}
|
|
@@ -1,133 +1,135 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, Fragment as u, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Portal as j } from "@chakra-ui/react";
|
|
3
3
|
import { flexRender as A } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
4
|
-
import { memo as L, useCallback as M, useMemo as
|
|
4
|
+
import { memo as L, useCallback as M, useMemo as p } from "react";
|
|
5
5
|
import { useTableContext as U } from "./table-context.js";
|
|
6
6
|
import { translations as X } from "./translations.js";
|
|
7
7
|
import { SortDescIcon as k } from "../icon/icons/sort-desc-icon.js";
|
|
8
|
-
import { SortAscIcon as
|
|
8
|
+
import { SortAscIcon as S } from "../icon/icons/sort-asc-icon.js";
|
|
9
9
|
import { MenuItem as l } from "../menu/menu-item.js";
|
|
10
|
-
import { Text as
|
|
10
|
+
import { Text as c } from "../text/text.js";
|
|
11
11
|
import { FilterIcon as R } from "../icon/icons/filter-icon.js";
|
|
12
|
-
import { MenuDivider as
|
|
12
|
+
import { MenuDivider as w } from "../menu/menu-divider.js";
|
|
13
13
|
import { HideIcon as W } from "../icon/icons/hide-icon.js";
|
|
14
14
|
import { ThumbtackIcon as $ } from "../icon/icons/thumbtack-icon.js";
|
|
15
15
|
import { Switch as q } from "../switch/switch.js";
|
|
16
16
|
import { Menu as J } from "../menu/menu.js";
|
|
17
17
|
import { MenuBoxButton as K } from "../menu/menu-box-button.js";
|
|
18
18
|
import { MenuList as N } from "../menu/menu-list.js";
|
|
19
|
-
import { ThemeIconSizeVariable as
|
|
19
|
+
import { ThemeIconSizeVariable as D, ThemeColorVariable as v, ThemeSpaceVariable as Q, ThemeFontSizeVariable as F } from "../../theme/theme-types.js";
|
|
20
20
|
const Y = ({
|
|
21
|
-
header:
|
|
22
|
-
breakingContentState:
|
|
23
|
-
onBreakingContentChange:
|
|
24
|
-
setBreakingContentState:
|
|
25
|
-
headerGroup:
|
|
21
|
+
header: n,
|
|
22
|
+
breakingContentState: m,
|
|
23
|
+
onBreakingContentChange: h,
|
|
24
|
+
setBreakingContentState: g,
|
|
25
|
+
headerGroup: C,
|
|
26
26
|
sorting: d,
|
|
27
|
-
setSorting:
|
|
27
|
+
setSorting: f,
|
|
28
28
|
localeString: y,
|
|
29
29
|
portalContainerRef: z,
|
|
30
30
|
dragRef: V
|
|
31
31
|
}) => {
|
|
32
|
-
const i = X[y], H = U(), { getTableFilterMethods:
|
|
32
|
+
const i = X[y], H = U(), { getTableFilterMethods: s } = H, b = M(
|
|
33
33
|
({ checked: e }) => {
|
|
34
34
|
const t = {
|
|
35
|
-
...
|
|
36
|
-
[
|
|
35
|
+
...m,
|
|
36
|
+
[n.column.id]: e
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
g(t), h?.(t);
|
|
39
39
|
},
|
|
40
|
-
[
|
|
41
|
-
),
|
|
40
|
+
[m, n.column.id, h, g]
|
|
41
|
+
), x = M(
|
|
42
42
|
(e) => {
|
|
43
43
|
const t = e.getIndex();
|
|
44
|
-
|
|
44
|
+
C.forEach((E) => {
|
|
45
45
|
E.headers.forEach((O, T) => {
|
|
46
46
|
const { column: I } = O;
|
|
47
47
|
e.getIsPinned() ? T >= t && I.pin(!1) : T <= t && I.pin("left");
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
},
|
|
51
|
-
[
|
|
52
|
-
), P =
|
|
53
|
-
d.find((e) => e.id ===
|
|
54
|
-
|
|
55
|
-
] }), [
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
51
|
+
[C]
|
|
52
|
+
), P = p(() => /* @__PURE__ */ r(u, { children: [
|
|
53
|
+
d.find((e) => e.id === n.column.id) && (d.find((e) => e.desc) ? /* @__PURE__ */ o(k, { size: D.XSmall }) : /* @__PURE__ */ o(S, { size: D.XSmall })),
|
|
54
|
+
n.column.columnDef.header
|
|
55
|
+
] }), [n.column.columnDef.header, n.column.id, d]), a = p(() => s()?.canFilterOnColumn(n.column.id) ?? !1, [n.column.id, s]), B = p(() => /* @__PURE__ */ r(u, { children: [
|
|
56
|
+
n.column.getCanSort() && /* @__PURE__ */ r(u, { children: [
|
|
57
|
+
/* @__PURE__ */ o(
|
|
58
|
+
l,
|
|
59
|
+
{
|
|
60
|
+
onClick: () => f([{ desc: !1, id: n.column.id }]),
|
|
61
|
+
leftIcon: S,
|
|
62
|
+
value: "sort-asc",
|
|
63
|
+
children: /* @__PURE__ */ o(c, { children: i.sortUp })
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ o(
|
|
67
|
+
l,
|
|
68
|
+
{
|
|
69
|
+
onClick: () => f([{ desc: !0, id: n.column.id }]),
|
|
70
|
+
leftIcon: k,
|
|
71
|
+
value: "sort-desc",
|
|
72
|
+
children: /* @__PURE__ */ o(c, { children: i.sortDown })
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }),
|
|
76
|
+
a && /* @__PURE__ */ o(
|
|
75
77
|
l,
|
|
76
78
|
{
|
|
77
79
|
onClick: () => {
|
|
78
|
-
const e =
|
|
79
|
-
e?.onToggleFilterVisibility && e.onToggleFilterVisibility(
|
|
80
|
+
const e = s();
|
|
81
|
+
e?.onToggleFilterVisibility && e.onToggleFilterVisibility(n.column.id);
|
|
80
82
|
},
|
|
81
83
|
leftIcon: R,
|
|
82
84
|
value: "filter",
|
|
83
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ o(c, { children: i.filter })
|
|
84
86
|
}
|
|
85
87
|
),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
88
|
+
(n.column.getCanSort() || a) && /* @__PURE__ */ o(w, {}),
|
|
89
|
+
n.column.getCanHide() && /* @__PURE__ */ o(l, { onClick: n.column.getToggleVisibilityHandler(), leftIcon: W, value: "hide", children: /* @__PURE__ */ o(c, { children: i.hideColumn }) }),
|
|
90
|
+
/* @__PURE__ */ o(l, { onClick: () => x(n.column), leftIcon: $, value: "pin", children: /* @__PURE__ */ o(c, { children: n.column.getIsPinned() ? i.stopPinningColumn : i.pinUpToColumn }) }),
|
|
91
|
+
/* @__PURE__ */ o(w, {}),
|
|
92
|
+
/* @__PURE__ */ r(l, { itemType: "switch", value: "breaking-content", children: [
|
|
91
93
|
i.breakingContent,
|
|
92
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ o(
|
|
93
95
|
q,
|
|
94
96
|
{
|
|
95
|
-
onCheckedChange:
|
|
96
|
-
isChecked:
|
|
97
|
+
onCheckedChange: b,
|
|
98
|
+
isChecked: m[n.column.id]
|
|
97
99
|
}
|
|
98
100
|
)
|
|
99
101
|
] })
|
|
100
102
|
] }), [
|
|
101
|
-
c,
|
|
102
|
-
x,
|
|
103
103
|
m,
|
|
104
|
+
a,
|
|
105
|
+
s,
|
|
106
|
+
x,
|
|
107
|
+
n.column,
|
|
104
108
|
b,
|
|
105
|
-
|
|
106
|
-
C,
|
|
107
|
-
u,
|
|
109
|
+
f,
|
|
108
110
|
i
|
|
109
111
|
]);
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
+
return /* @__PURE__ */ o(J, { isLazy: !0, children: ({ isOpen: e }) => /* @__PURE__ */ r(u, { children: [
|
|
113
|
+
/* @__PURE__ */ o(
|
|
112
114
|
K,
|
|
113
115
|
{
|
|
114
116
|
ref: V,
|
|
115
|
-
color:
|
|
117
|
+
color: v.OnBackgroundSubdued,
|
|
116
118
|
textTransform: "none",
|
|
117
|
-
fontSize:
|
|
119
|
+
fontSize: F.Small,
|
|
118
120
|
h: "40px",
|
|
119
121
|
display: "flex",
|
|
120
122
|
textAlign: "inherit",
|
|
121
123
|
alignItems: "center",
|
|
122
124
|
lineHeight: "1.2",
|
|
123
125
|
padding: `0px 0px 0px ${Q.Small}`,
|
|
124
|
-
backgroundColor: e ?
|
|
126
|
+
backgroundColor: e ? v.BackgroundDisabled : "unset",
|
|
125
127
|
w: "100%",
|
|
126
128
|
overflowWrap: "anywhere",
|
|
127
|
-
children: A(P,
|
|
129
|
+
children: A(P, n.getContext())
|
|
128
130
|
}
|
|
129
131
|
),
|
|
130
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ o(j, { container: z, children: /* @__PURE__ */ o(N, { fontSize: F.Medium, children: B }) })
|
|
131
133
|
] }) });
|
|
132
134
|
}, bn = L(Y);
|
|
133
135
|
export {
|
|
@@ -1,38 +1,90 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { flushSync as
|
|
3
|
-
import { Virtualizer as
|
|
4
|
-
import { defaultKeyExtractor as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
useFlushSync:
|
|
8
|
-
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import { flushSync as R } from "react-dom";
|
|
3
|
+
import { Virtualizer as I, elementScroll as b, observeElementOffset as E, observeElementRect as w } from "../../../virtual-core/dist/esm/index.js";
|
|
4
|
+
import { defaultKeyExtractor as P, defaultRangeExtractor as _, measureElement as k } from "../../../virtual-core/dist/esm/index.js";
|
|
5
|
+
const g = typeof document < "u" ? f.useLayoutEffect : f.useEffect;
|
|
6
|
+
function $({
|
|
7
|
+
useFlushSync: p = !0,
|
|
8
|
+
directDomUpdates: x = !1,
|
|
9
|
+
directDomUpdatesMode: h = "transform",
|
|
10
|
+
...m
|
|
9
11
|
}) {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const z = f.useReducer((e) => e + 1, 0)[1], i = f.useRef({
|
|
13
|
+
enabled: x,
|
|
14
|
+
mode: h,
|
|
15
|
+
container: null,
|
|
16
|
+
lastSize: null,
|
|
17
|
+
// Keyed by the element itself so a remounted node (same key, new DOM
|
|
18
|
+
// node — e.g. when `enabled` is toggled off then on) is treated as fresh
|
|
19
|
+
// and gets its style written.
|
|
20
|
+
lastPositions: /* @__PURE__ */ new WeakMap(),
|
|
21
|
+
prevRange: null
|
|
22
|
+
});
|
|
23
|
+
i.current.enabled = x, i.current.mode = h;
|
|
24
|
+
const S = (e) => {
|
|
25
|
+
const t = i.current;
|
|
26
|
+
if (!t.enabled) return;
|
|
27
|
+
const n = e.getTotalSize();
|
|
28
|
+
if (t.container && n !== t.lastSize) {
|
|
29
|
+
t.lastSize = n;
|
|
30
|
+
const d = e.options.horizontal ? "width" : "height";
|
|
31
|
+
t.container.style[d] = `${n}px`;
|
|
32
|
+
}
|
|
33
|
+
const o = !!e.options.horizontal, s = t.mode === "transform", r = o ? "left" : "top", l = e.options.scrollMargin, y = e.getVirtualItems();
|
|
34
|
+
for (const d of y) {
|
|
35
|
+
const c = d.start - l, u = e.elementsCache.get(d.key);
|
|
36
|
+
u && t.lastPositions.get(u) !== c && (t.lastPositions.set(u, c), s ? u.style.transform = o ? `translate3d(${c}px, 0, 0)` : `translate3d(0, ${c}px, 0)` : u.style[r] = `${c}px`);
|
|
15
37
|
}
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
38
|
+
}, v = {
|
|
39
|
+
...m,
|
|
40
|
+
onChange: (e, t) => {
|
|
41
|
+
var n;
|
|
42
|
+
const o = i.current;
|
|
43
|
+
let s = !0;
|
|
44
|
+
if (o.enabled) {
|
|
45
|
+
S(e);
|
|
46
|
+
const r = e.range, l = o.prevRange;
|
|
47
|
+
s = !l || l.isScrolling !== e.isScrolling || l.startIndex !== r?.startIndex || l.endIndex !== r?.endIndex, s && (o.prevRange = r ? {
|
|
48
|
+
startIndex: r.startIndex,
|
|
49
|
+
endIndex: r.endIndex,
|
|
50
|
+
isScrolling: e.isScrolling
|
|
51
|
+
} : null);
|
|
52
|
+
}
|
|
53
|
+
s && (p && t ? R(z) : z()), (n = m.onChange) == null || n.call(m, e, t);
|
|
54
|
+
}
|
|
55
|
+
}, [a] = f.useState(() => {
|
|
56
|
+
const e = new I(v);
|
|
57
|
+
return Object.assign(e, {
|
|
58
|
+
containerRef: (t) => {
|
|
59
|
+
const n = i.current;
|
|
60
|
+
if (n.container = t, n.lastSize = null, t && n.enabled) {
|
|
61
|
+
const o = e.getTotalSize();
|
|
62
|
+
n.lastSize = o;
|
|
63
|
+
const s = e.options.horizontal ? "width" : "height";
|
|
64
|
+
t.style[s] = `${o}px`;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
return a.setOptions(v), g(() => a._didMount(), []), g(() => a._willUpdate()), g(() => {
|
|
70
|
+
S(a);
|
|
71
|
+
}), a;
|
|
20
72
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
23
|
-
observeElementRect:
|
|
24
|
-
observeElementOffset:
|
|
25
|
-
scrollToFn:
|
|
26
|
-
...
|
|
73
|
+
function V(p) {
|
|
74
|
+
return $({
|
|
75
|
+
observeElementRect: w,
|
|
76
|
+
observeElementOffset: E,
|
|
77
|
+
scrollToFn: b,
|
|
78
|
+
...p
|
|
27
79
|
});
|
|
28
80
|
}
|
|
29
81
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
82
|
+
I as Virtualizer,
|
|
83
|
+
P as defaultKeyExtractor,
|
|
84
|
+
_ as defaultRangeExtractor,
|
|
85
|
+
b as elementScroll,
|
|
86
|
+
k as measureElement,
|
|
87
|
+
E as observeElementOffset,
|
|
88
|
+
w as observeElementRect,
|
|
89
|
+
V as useVirtualizer
|
|
38
90
|
};
|