@caspeco/casper-ui-library 9.9.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/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +4 -0
- package/dist/_virtual/with-selector.development.js +4 -0
- package/dist/_virtual/with-selector.js +5 -0
- package/dist/_virtual/with-selector.production.js +4 -0
- package/dist/_virtual/with-selector2.js +4 -0
- package/dist/components/button/button-recipe.d.ts.map +1 -1
- package/dist/components/button/button-recipe.js +80 -39
- package/dist/components/input/input.d.ts +1 -0
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/types.d.ts +1 -1
- package/dist/components/input/types.d.ts.map +1 -1
- package/dist/components/rich-text-editor/boolean-control.d.ts +3 -0
- package/dist/components/rich-text-editor/boolean-control.d.ts.map +1 -0
- package/dist/components/rich-text-editor/boolean-control.js +35 -0
- package/dist/components/rich-text-editor/extensions.d.ts +4 -0
- package/dist/components/rich-text-editor/extensions.d.ts.map +1 -0
- package/dist/components/rich-text-editor/extensions.js +37 -0
- package/dist/components/rich-text-editor/index.d.ts +26 -0
- package/dist/components/rich-text-editor/index.d.ts.map +1 -0
- package/dist/components/rich-text-editor/index.js +23 -0
- package/dist/components/rich-text-editor/rich-text-editor-context.d.ts +10 -0
- package/dist/components/rich-text-editor/rich-text-editor-context.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor-context.js +13 -0
- package/dist/components/rich-text-editor/rich-text-editor-control.d.ts +11 -0
- package/dist/components/rich-text-editor/rich-text-editor-control.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor-control.js +202 -0
- package/dist/components/rich-text-editor/rich-text-editor-recipe.d.ts +4 -0
- package/dist/components/rich-text-editor/rich-text-editor-recipe.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor-recipe.js +58 -0
- package/dist/components/rich-text-editor/rich-text-editor.composition.d.ts +6 -0
- package/dist/components/rich-text-editor/rich-text-editor.composition.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +11 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.js +60 -0
- package/dist/components/rich-text-editor/rich-text-editor.test.d.ts +2 -0
- package/dist/components/rich-text-editor/rich-text-editor.test.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.visual.test.d.ts +2 -0
- package/dist/components/rich-text-editor/rich-text-editor.visual.test.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-renderer.d.ts +3 -0
- package/dist/components/rich-text-editor/rich-text-renderer.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-renderer.js +21 -0
- package/dist/components/rich-text-editor/translations.d.ts +23 -0
- package/dist/components/rich-text-editor/translations.d.ts.map +1 -0
- package/dist/components/rich-text-editor/translations.js +120 -0
- package/dist/components/rich-text-editor/types.d.ts +30 -0
- package/dist/components/rich-text-editor/types.d.ts.map +1 -0
- package/dist/components/rich-text-editor/use-rich-text-editor.d.ts +3 -0
- package/dist/components/rich-text-editor/use-rich-text-editor.d.ts.map +1 -0
- package/dist/components/rich-text-editor/use-rich-text-editor.js +17 -0
- package/dist/components/table/table-header-dropdown.d.ts.map +1 -1
- package/dist/components/table/table-header-dropdown.js +68 -66
- package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/toggle-button/toggle-button.js +11 -11
- package/dist/components/toggle-button/types.d.ts +2 -0
- package/dist/components/toggle-button/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +774 -763
- 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 +3953 -0
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +19 -0
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +62 -0
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +85 -0
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +219 -0
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +12 -0
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +61 -0
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +67 -0
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +56 -0
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +83 -0
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +341 -0
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +796 -0
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +49 -0
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +66 -0
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +13 -0
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +65 -0
- package/dist/node_modules/@tiptap/extensions/dist/index.js +446 -0
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +28 -0
- package/dist/node_modules/fast-equals/dist/es/index.js +324 -0
- package/dist/node_modules/linkifyjs/dist/linkify.js +705 -0
- package/dist/node_modules/orderedmap/dist/index.js +103 -0
- package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
- package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
- package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
- package/dist/node_modules/prosemirror-model/dist/index.js +2736 -0
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
- package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
- package/dist/node_modules/prosemirror-transform/dist/index.js +1552 -0
- package/dist/node_modules/prosemirror-view/dist/index.js +3802 -0
- package/dist/node_modules/rope-sequence/dist/index.js +100 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +58 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +57 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +58 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +46 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +10 -0
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -0
- package/dist/node_modules/w3c-keyname/index.js +93 -0
- package/dist/packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js +506 -0
- package/package.json +14 -8
|
@@ -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
|
};
|