@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.
Files changed (107) hide show
  1. package/dist/_virtual/index.js +5 -0
  2. package/dist/_virtual/index2.js +4 -0
  3. package/dist/_virtual/use-sync-external-store-shim.development.js +4 -0
  4. package/dist/_virtual/use-sync-external-store-shim.production.js +4 -0
  5. package/dist/_virtual/with-selector.development.js +4 -0
  6. package/dist/_virtual/with-selector.js +5 -0
  7. package/dist/_virtual/with-selector.production.js +4 -0
  8. package/dist/_virtual/with-selector2.js +4 -0
  9. package/dist/components/button/button-recipe.d.ts.map +1 -1
  10. package/dist/components/button/button-recipe.js +80 -39
  11. package/dist/components/input/input.d.ts +1 -0
  12. package/dist/components/input/input.d.ts.map +1 -1
  13. package/dist/components/input/types.d.ts +1 -1
  14. package/dist/components/input/types.d.ts.map +1 -1
  15. package/dist/components/rich-text-editor/boolean-control.d.ts +3 -0
  16. package/dist/components/rich-text-editor/boolean-control.d.ts.map +1 -0
  17. package/dist/components/rich-text-editor/boolean-control.js +35 -0
  18. package/dist/components/rich-text-editor/extensions.d.ts +4 -0
  19. package/dist/components/rich-text-editor/extensions.d.ts.map +1 -0
  20. package/dist/components/rich-text-editor/extensions.js +37 -0
  21. package/dist/components/rich-text-editor/index.d.ts +26 -0
  22. package/dist/components/rich-text-editor/index.d.ts.map +1 -0
  23. package/dist/components/rich-text-editor/index.js +23 -0
  24. package/dist/components/rich-text-editor/rich-text-editor-context.d.ts +10 -0
  25. package/dist/components/rich-text-editor/rich-text-editor-context.d.ts.map +1 -0
  26. package/dist/components/rich-text-editor/rich-text-editor-context.js +13 -0
  27. package/dist/components/rich-text-editor/rich-text-editor-control.d.ts +11 -0
  28. package/dist/components/rich-text-editor/rich-text-editor-control.d.ts.map +1 -0
  29. package/dist/components/rich-text-editor/rich-text-editor-control.js +202 -0
  30. package/dist/components/rich-text-editor/rich-text-editor-recipe.d.ts +4 -0
  31. package/dist/components/rich-text-editor/rich-text-editor-recipe.d.ts.map +1 -0
  32. package/dist/components/rich-text-editor/rich-text-editor-recipe.js +58 -0
  33. package/dist/components/rich-text-editor/rich-text-editor.composition.d.ts +6 -0
  34. package/dist/components/rich-text-editor/rich-text-editor.composition.d.ts.map +1 -0
  35. package/dist/components/rich-text-editor/rich-text-editor.d.ts +11 -0
  36. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -0
  37. package/dist/components/rich-text-editor/rich-text-editor.js +60 -0
  38. package/dist/components/rich-text-editor/rich-text-editor.test.d.ts +2 -0
  39. package/dist/components/rich-text-editor/rich-text-editor.test.d.ts.map +1 -0
  40. package/dist/components/rich-text-editor/rich-text-editor.visual.test.d.ts +2 -0
  41. package/dist/components/rich-text-editor/rich-text-editor.visual.test.d.ts.map +1 -0
  42. package/dist/components/rich-text-editor/rich-text-renderer.d.ts +3 -0
  43. package/dist/components/rich-text-editor/rich-text-renderer.d.ts.map +1 -0
  44. package/dist/components/rich-text-editor/rich-text-renderer.js +21 -0
  45. package/dist/components/rich-text-editor/translations.d.ts +23 -0
  46. package/dist/components/rich-text-editor/translations.d.ts.map +1 -0
  47. package/dist/components/rich-text-editor/translations.js +120 -0
  48. package/dist/components/rich-text-editor/types.d.ts +30 -0
  49. package/dist/components/rich-text-editor/types.d.ts.map +1 -0
  50. package/dist/components/rich-text-editor/use-rich-text-editor.d.ts +3 -0
  51. package/dist/components/rich-text-editor/use-rich-text-editor.d.ts.map +1 -0
  52. package/dist/components/rich-text-editor/use-rich-text-editor.js +17 -0
  53. package/dist/components/table/table-header-dropdown.d.ts.map +1 -1
  54. package/dist/components/table/table-header-dropdown.js +68 -66
  55. package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
  56. package/dist/components/toggle-button/toggle-button.js +11 -11
  57. package/dist/components/toggle-button/types.d.ts +2 -0
  58. package/dist/components/toggle-button/types.d.ts.map +1 -1
  59. package/dist/index.d.ts +1 -0
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +774 -763
  62. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +83 -31
  63. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +411 -226
  64. package/dist/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +33 -0
  65. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +29 -28
  66. package/dist/node_modules/@tiptap/core/dist/index.js +3953 -0
  67. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +19 -0
  68. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +62 -0
  69. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +85 -0
  70. package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
  71. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +219 -0
  72. package/dist/node_modules/@tiptap/extension-document/dist/index.js +12 -0
  73. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +61 -0
  74. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +67 -0
  75. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +56 -0
  76. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +83 -0
  77. package/dist/node_modules/@tiptap/extension-link/dist/index.js +341 -0
  78. package/dist/node_modules/@tiptap/extension-list/dist/index.js +796 -0
  79. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +49 -0
  80. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +66 -0
  81. package/dist/node_modules/@tiptap/extension-text/dist/index.js +13 -0
  82. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +65 -0
  83. package/dist/node_modules/@tiptap/extensions/dist/index.js +446 -0
  84. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +28 -0
  85. package/dist/node_modules/fast-equals/dist/es/index.js +324 -0
  86. package/dist/node_modules/linkifyjs/dist/linkify.js +705 -0
  87. package/dist/node_modules/orderedmap/dist/index.js +103 -0
  88. package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
  89. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
  90. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
  91. package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
  92. package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
  93. package/dist/node_modules/prosemirror-model/dist/index.js +2736 -0
  94. package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
  95. package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
  96. package/dist/node_modules/prosemirror-transform/dist/index.js +1552 -0
  97. package/dist/node_modules/prosemirror-view/dist/index.js +3802 -0
  98. package/dist/node_modules/rope-sequence/dist/index.js +100 -0
  99. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +58 -0
  100. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +57 -0
  101. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +58 -0
  102. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +46 -0
  103. package/dist/node_modules/use-sync-external-store/shim/index.js +10 -0
  104. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -0
  105. package/dist/node_modules/w3c-keyname/index.js +93 -0
  106. package/dist/packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js +506 -0
  107. package/package.json +14 -8
@@ -1,38 +1,90 @@
1
- import * as t from "react";
2
- import { flushSync as f } from "react-dom";
3
- import { Virtualizer as i, elementScroll as m, observeElementOffset as d, observeElementRect as p } from "../../../virtual-core/dist/esm/index.js";
4
- import { defaultKeyExtractor as g, defaultRangeExtractor as z, measureElement as O } from "../../../virtual-core/dist/esm/index.js";
5
- const l = typeof document < "u" ? t.useLayoutEffect : t.useEffect;
6
- function E({
7
- useFlushSync: r = !0,
8
- ...n
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 o = t.useReducer(() => ({}), {})[1], u = {
11
- ...n,
12
- onChange: (c, s) => {
13
- var a;
14
- r && s ? f(o) : o(), (a = n.onChange) == null || a.call(n, c, s);
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
- }, [e] = t.useState(
17
- () => new i(u)
18
- );
19
- return e.setOptions(u), l(() => e._didMount(), []), l(() => e._willUpdate()), e;
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 x(r) {
22
- return E({
23
- observeElementRect: p,
24
- observeElementOffset: d,
25
- scrollToFn: m,
26
- ...r
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
- i as Virtualizer,
31
- g as defaultKeyExtractor,
32
- z as defaultRangeExtractor,
33
- m as elementScroll,
34
- O as measureElement,
35
- d as observeElementOffset,
36
- p as observeElementRect,
37
- x as useVirtualizer
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
  };