@caspeco/casper-ui-library 9.8.0 → 9.10.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 (113) 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/helper.d.ts +1 -0
  54. package/dist/components/table/helper.d.ts.map +1 -1
  55. package/dist/components/table/helper.js +8 -4
  56. package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
  57. package/dist/components/table/table-toolbar-settings.js +172 -56
  58. package/dist/components/table/translations.d.ts +14 -0
  59. package/dist/components/table/translations.d.ts.map +1 -1
  60. package/dist/components/table/translations.js +21 -9
  61. package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
  62. package/dist/components/toggle-button/toggle-button.js +11 -11
  63. package/dist/components/toggle-button/types.d.ts +2 -0
  64. package/dist/components/toggle-button/types.d.ts.map +1 -1
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +774 -763
  68. package/dist/node_modules/@dnd-kit/dom/index.js +13 -13
  69. package/dist/node_modules/@dnd-kit/dom/sortable.js +36 -32
  70. package/dist/node_modules/@dnd-kit/react/sortable.js +11 -10
  71. package/dist/node_modules/@dnd-kit/state/dist/index.js +1 -1
  72. package/dist/node_modules/@tiptap/core/dist/index.js +3792 -0
  73. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +17 -0
  74. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +62 -0
  75. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +85 -0
  76. package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
  77. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +217 -0
  78. package/dist/node_modules/@tiptap/extension-document/dist/index.js +12 -0
  79. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +59 -0
  80. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +63 -0
  81. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +56 -0
  82. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +83 -0
  83. package/dist/node_modules/@tiptap/extension-link/dist/index.js +313 -0
  84. package/dist/node_modules/@tiptap/extension-list/dist/index.js +785 -0
  85. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +49 -0
  86. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +66 -0
  87. package/dist/node_modules/@tiptap/extension-text/dist/index.js +13 -0
  88. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +65 -0
  89. package/dist/node_modules/@tiptap/extensions/dist/index.js +439 -0
  90. package/dist/node_modules/@tiptap/react/dist/index.js +501 -0
  91. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +28 -0
  92. package/dist/node_modules/fast-equals/dist/es/index.js +324 -0
  93. package/dist/node_modules/linkifyjs/dist/linkify.js +705 -0
  94. package/dist/node_modules/orderedmap/dist/index.js +103 -0
  95. package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
  96. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
  97. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
  98. package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
  99. package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
  100. package/dist/node_modules/prosemirror-model/dist/index.js +2736 -0
  101. package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
  102. package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
  103. package/dist/node_modules/prosemirror-transform/dist/index.js +1552 -0
  104. package/dist/node_modules/prosemirror-view/dist/index.js +3802 -0
  105. package/dist/node_modules/rope-sequence/dist/index.js +100 -0
  106. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +58 -0
  107. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +57 -0
  108. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +58 -0
  109. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +46 -0
  110. package/dist/node_modules/use-sync-external-store/shim/index.js +10 -0
  111. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -0
  112. package/dist/node_modules/w3c-keyname/index.js +93 -0
  113. package/package.json +9 -2
@@ -0,0 +1,5 @@
1
+ import { __require as r } from "../node_modules/use-sync-external-store/shim/index.js";
2
+ var i = r();
3
+ export {
4
+ i as s
5
+ };
@@ -0,0 +1,4 @@
1
+ var e = { exports: {} };
2
+ export {
3
+ e as __module
4
+ };
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1,5 @@
1
+ import { __require as r } from "../node_modules/use-sync-external-store/shim/with-selector.js";
2
+ var t = r();
3
+ export {
4
+ t as w
5
+ };
@@ -0,0 +1,4 @@
1
+ var o = {};
2
+ export {
3
+ o as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var e = { exports: {} };
2
+ export {
3
+ e as __module
4
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"button-recipe.d.ts","sourceRoot":"","sources":["../../../lib/components/button/button-recipe.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,gBAAgB,EAAwC,MAAM,kBAAkB,CAAC;AAkP/F,eAAO,MAAM,YAAY,EAAE,gBAmDzB,CAAC"}
1
+ {"version":3,"file":"button-recipe.d.ts","sourceRoot":"","sources":["../../../lib/components/button/button-recipe.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,gBAAgB,EAAwC,MAAM,kBAAkB,CAAC;AA6R/F,eAAO,MAAM,YAAY,EAAE,gBAoDzB,CAAC"}
@@ -1,9 +1,9 @@
1
- import { isTouchScreenDevice as n } from "../../theme/theme-helper.js";
2
- import { ThemeSpaceToken as o, ThemeFontSizeToken as r, ThemeColorToken as e, ThemeRadiusToken as i, ThemeFontToken as a, ThemeBorderToken as d } from "../../theme/theme-tokens.js";
1
+ import { isTouchScreenDevice as c } from "../../theme/theme-helper.js";
2
+ import { ThemeSpaceToken as r, ThemeFontSizeToken as t, ThemeColorToken as e, ThemeRadiusToken as a, ThemeFontToken as i, ThemeBorderToken as d } from "../../theme/theme-tokens.js";
3
3
  import { defineRecipe as l } from "@chakra-ui/react";
4
4
  const g = {
5
- fontFamily: a.SubHeader,
6
- borderRadius: i.XLarge,
5
+ fontFamily: i.SubHeader,
6
+ borderRadius: a.XLarge,
7
7
  border: d.XSmall + " transparent",
8
8
  fontWeight: "medium",
9
9
  cursor: "pointer",
@@ -22,7 +22,7 @@ const g = {
22
22
  color: e.OnAccent,
23
23
  _hover: {
24
24
  "&:not(:active, [data-state=open])": {
25
- background: n() ? e.Accent : e.AccentHover
25
+ background: c() ? e.Accent : e.AccentHover
26
26
  }
27
27
  },
28
28
  _active: {
@@ -38,8 +38,8 @@ const g = {
38
38
  color: e.OnAccentContainer,
39
39
  _hover: {
40
40
  "&:not(:active, [data-state=open])": {
41
- background: n() ? e.AccentContainer : e.AccentHover,
42
- color: n() ? e.OnAccentContainer : e.OnAccent
41
+ background: c() ? e.AccentContainer : e.AccentHover,
42
+ color: c() ? e.OnAccentContainer : e.OnAccent
43
43
  }
44
44
  },
45
45
  _active: {
@@ -50,13 +50,13 @@ const g = {
50
50
  background: e.AccentActive,
51
51
  color: e.OnAccent
52
52
  }
53
- }, p = {
53
+ }, b = {
54
54
  color: e.OnBackground,
55
55
  fontWeight: "medium",
56
56
  _hover: {
57
57
  "&:not(:active, [data-state=open])": {
58
58
  color: e.OnBackground,
59
- bg: n() ? "none" : e.AccentHoverAlpha,
59
+ bg: c() ? "none" : e.AccentHoverAlpha,
60
60
  textDecoration: "none"
61
61
  }
62
62
  },
@@ -68,12 +68,12 @@ const g = {
68
68
  bg: e.AccentActiveAlpha,
69
69
  color: e.OnBackground
70
70
  }
71
- }, b = {
71
+ }, p = {
72
72
  background: e.Error,
73
73
  color: e.OnAccent,
74
74
  _hover: {
75
75
  "&:not(:active, [data-state=open])": {
76
- background: n() ? e.Error : e.ErrorHover
76
+ background: c() ? e.Error : e.ErrorHover
77
77
  }
78
78
  },
79
79
  _active: {
@@ -86,7 +86,7 @@ const g = {
86
86
  }
87
87
  }, v = {
88
88
  color: e.OnBackground,
89
- fontFamily: a.Body,
89
+ fontFamily: i.Body,
90
90
  borderRadius: 0,
91
91
  fontWeight: "normal",
92
92
  background: "transparent",
@@ -99,7 +99,7 @@ const g = {
99
99
  border: 0,
100
100
  _hover: {
101
101
  "&:not(:active, [data-state=open])": {
102
- color: n() ? e.OnBackground : e.AccentHover
102
+ color: c() ? e.OnBackground : e.AccentHover
103
103
  }
104
104
  },
105
105
  _active: {
@@ -112,7 +112,7 @@ const g = {
112
112
  }, s = {
113
113
  flex: "1",
114
114
  fontWeight: "normal",
115
- font: a.Body,
115
+ font: i.Body,
116
116
  bg: e.AccentContainer,
117
117
  color: e.OnAccentContainer,
118
118
  borderRadius: "2px",
@@ -164,24 +164,24 @@ const g = {
164
164
  background: e.AccentActiveAlpha,
165
165
  color: e.OnBackground
166
166
  }
167
- }, c = '&[aria-pressed="true"]', t = '&[aria-pressed="false"]', k = {
167
+ }, o = '&[aria-pressed="true"]', n = '&[aria-pressed="false"]', k = {
168
168
  // Base style
169
- borderRadius: i.Small,
169
+ borderRadius: a.Small,
170
170
  borderColor: e.OnSurfaceBorder,
171
- paddingX: o.Small,
171
+ paddingX: r.Small,
172
172
  // Pressed state
173
- [`${c}`]: {
173
+ [`${o}`]: {
174
174
  background: e.Accent,
175
175
  color: e.OnAccent
176
176
  },
177
177
  // Not pressed state
178
- [`${t}`]: {
178
+ [`${n}`]: {
179
179
  background: e.Surface,
180
180
  color: e.OnSurface
181
181
  },
182
182
  // Hover styles
183
183
  "@media(hover: hover)": {
184
- [`${c}&:hover`]: {
184
+ [`${o}&:hover`]: {
185
185
  background: e.AccentHover,
186
186
  borderColor: e.AccentHover,
187
187
  _disabled: {
@@ -189,7 +189,7 @@ const g = {
189
189
  borderColor: e.Accent
190
190
  }
191
191
  },
192
- [`${t}&:hover`]: {
192
+ [`${n}&:hover`]: {
193
193
  background: e.AccentHoverAlpha,
194
194
  color: e.OnSurface,
195
195
  _disabled: {
@@ -199,76 +199,117 @@ const g = {
199
199
  }
200
200
  },
201
201
  // Active styles
202
- [`${c}:active`]: {
202
+ [`${o}:active`]: {
203
203
  color: e.OnAccent,
204
204
  background: e.AccentActive
205
205
  },
206
- [`${t}:active`]: {
206
+ [`${n}:active`]: {
207
207
  color: e.OnSurface,
208
208
  background: e.AccentActiveAlpha
209
209
  },
210
210
  // Define general disabled styles last to ensure they are not overridden
211
- [`${c}:disabled`]: {
211
+ [`${o}:disabled`]: {
212
212
  color: e.OnAccent,
213
213
  background: e.Accent,
214
214
  borderColor: e.Accent
215
215
  },
216
- [`${t}:disabled`]: {
216
+ [`${n}:disabled`]: {
217
217
  color: e.OnSurface,
218
218
  background: e.Surface
219
219
  }
220
- }, f = l({
220
+ }, m = {
221
+ borderRadius: a.Small,
222
+ border: "none",
223
+ paddingX: r.Small,
224
+ [`${n}`]: {
225
+ background: "transparent",
226
+ color: e.OnSurface
227
+ },
228
+ [`${o}`]: {
229
+ background: e.AccentContainer,
230
+ color: e.OnAccentContainer
231
+ },
232
+ "@media(hover: hover)": {
233
+ [`${n}&:hover`]: {
234
+ background: e.AccentHoverAlpha,
235
+ color: e.OnSurface,
236
+ _disabled: { background: "transparent" }
237
+ },
238
+ [`${o}&:hover`]: {
239
+ background: e.AccentHoverAlpha,
240
+ color: e.OnSurface,
241
+ _disabled: { background: e.AccentContainer }
242
+ }
243
+ },
244
+ [`${n}:active`]: {
245
+ background: e.AccentActiveAlpha,
246
+ color: e.OnSurface
247
+ },
248
+ [`${o}:active`]: {
249
+ background: e.AccentActiveAlpha,
250
+ color: e.OnSurface
251
+ },
252
+ [`${o}:disabled`]: {
253
+ background: e.AccentContainer,
254
+ color: e.OnAccentContainer
255
+ },
256
+ [`${n}:disabled`]: {
257
+ background: "transparent",
258
+ color: e.OnSurface
259
+ }
260
+ }, x = l({
221
261
  base: g,
222
262
  variants: {
223
263
  variant: {
224
264
  primary: u,
225
265
  secondary: A,
226
- ghost: p,
266
+ ghost: b,
227
267
  link: v,
228
268
  segmentedControl: s,
229
269
  tertiary: h,
230
270
  toggle: k,
231
- alert: b
271
+ toggleGhost: m,
272
+ alert: p
232
273
  },
233
274
  size: {
234
275
  xl: {
235
276
  paddingX: "24px",
236
277
  height: "56px",
237
278
  minWidth: "56px",
238
- fontSize: r.Large,
239
- gap: o.Small
279
+ fontSize: t.Large,
280
+ gap: r.Small
240
281
  },
241
282
  lg: {
242
283
  paddingX: "16px",
243
284
  height: "48px",
244
285
  minWidth: "48px",
245
- fontSize: r.Medium,
246
- gap: o.Small
286
+ fontSize: t.Medium,
287
+ gap: r.Small
247
288
  },
248
289
  md: {
249
290
  paddingX: "16px",
250
291
  height: "40px",
251
292
  minWidth: "40px",
252
- fontSize: r.Medium,
253
- gap: o.Small
293
+ fontSize: t.Medium,
294
+ gap: r.Small
254
295
  },
255
296
  sm: {
256
297
  paddingX: "8px",
257
298
  height: "32px",
258
299
  minWidth: "32px",
259
- fontSize: r.Small,
260
- gap: o.Small
300
+ fontSize: t.Small,
301
+ gap: r.Small
261
302
  },
262
303
  xs: {
263
304
  paddingX: "8px",
264
305
  height: "24px",
265
306
  minWidth: "24px",
266
- fontSize: r.Small,
267
- gap: o.Small
307
+ fontSize: t.Small,
308
+ gap: r.Small
268
309
  }
269
310
  }
270
311
  }
271
312
  });
272
313
  export {
273
- f as buttonRecipe
314
+ x as buttonRecipe
274
315
  };
@@ -12,6 +12,7 @@ export declare const Input: React.ForwardRefExoticComponent<import('./types.js')
12
12
  onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined;
13
13
  onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
14
14
  onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
15
+ onKeyDown?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
15
16
  defaultValue?: string | number | readonly string[] | undefined;
16
17
  autoFocus?: boolean | undefined | undefined;
17
18
  inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../lib/components/input/input.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;wNA2DhB,CAAC"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../lib/components/input/input.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;wNA2DhB,CAAC"}
@@ -21,7 +21,7 @@ export type CustomProperties = {
21
21
  isReadOnly?: boolean;
22
22
  isRequired?: boolean;
23
23
  };
24
- type ChakraInputProperties = Pick<ChakraInputProps, "id" | "type" | "value" | "placeholder" | "onChange" | "onBlur" | "onFocus" | "name" | "autoComplete" | "autoFocus" | "pattern" | "inputMode" | "defaultValue">;
24
+ type ChakraInputProperties = Pick<ChakraInputProps, "id" | "type" | "value" | "placeholder" | "onChange" | "onBlur" | "onFocus" | "onKeyDown" | "name" | "autoComplete" | "autoFocus" | "pattern" | "inputMode" | "defaultValue">;
25
25
  export type InputProps = CustomProperties & ChakraInputProperties & CustomChakraBoxProps & LayoutProps & MarginProps & PaddingProps & TypographyProps;
26
26
  export {};
27
27
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC7G,OAAO,KAAK,EAAE,UAAU,IAAI,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG;IAC9B,gDAAgD;IAChD,IAAI,CAAC,EAAE,gBAAgB,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IAC5C,8CAA8C;IAC9C,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,uEAAuE;IACvE,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAC3C,sEAAsE;IACtE,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C;mGAC+F;IAC/F,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,uEAAuE;IACvE,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAG9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,qBAAqB,GAAG,IAAI,CAChC,gBAAgB,EACd,IAAI,GACJ,MAAM,GACN,OAAO,GACP,aAAa,GACb,UAAU,GACV,QAAQ,GACR,SAAS,GACT,MAAM,GACN,cAAc,GACd,WAAW,GACX,SAAS,GACT,WAAW,GACX,cAAc,CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,gBAAgB,GACxC,qBAAqB,GACrB,oBAAoB,GACpB,WAAW,GACX,WAAW,GACX,YAAY,GACZ,eAAe,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC7G,OAAO,KAAK,EAAE,UAAU,IAAI,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG;IAC9B,gDAAgD;IAChD,IAAI,CAAC,EAAE,gBAAgB,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IAC5C,8CAA8C;IAC9C,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,uEAAuE;IACvE,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAC3C,sEAAsE;IACtE,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C;mGAC+F;IAC/F,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,uEAAuE;IACvE,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAG9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,qBAAqB,GAAG,IAAI,CAChC,gBAAgB,EACd,IAAI,GACJ,MAAM,GACN,OAAO,GACP,aAAa,GACb,UAAU,GACV,QAAQ,GACR,SAAS,GACT,WAAW,GACX,MAAM,GACN,cAAc,GACd,WAAW,GACX,SAAS,GACT,WAAW,GACX,cAAc,CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,gBAAgB,GACxC,qBAAqB,GACrB,oBAAoB,GACpB,WAAW,GACX,WAAW,GACX,YAAY,GACZ,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { BooleanControlConfig } from './types.js';
2
+ export declare function BooleanControl({ label, icon, command, isActive: isActiveFn, isDisabled: isDisabledFn, }: BooleanControlConfig): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=boolean-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boolean-control.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/boolean-control.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,wBAAgB,cAAc,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EAAE,UAAU,EACpB,UAAU,EAAE,YAAY,GACxB,EAAE,oBAAoB,kDA6BtB"}
@@ -0,0 +1,35 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useEditorState as s } from "../../node_modules/@tiptap/react/dist/index.js";
3
+ import { useRichTextEditorContext as d } from "./rich-text-editor-context.js";
4
+ import { Tooltip as f } from "../tooltip/tooltip.js";
5
+ import { ToggleButton as p } from "../toggle-button/toggle-button.js";
6
+ function v({
7
+ label: e,
8
+ icon: l,
9
+ command: n,
10
+ isActive: a,
11
+ isDisabled: i
12
+ }) {
13
+ const { editor: t } = d(), c = s({
14
+ editor: t,
15
+ selector: ({ editor: o }) => o ? a(o) : !1
16
+ }), m = s({
17
+ editor: t,
18
+ selector: ({ editor: o }) => o && i ? i(o) : !1
19
+ });
20
+ return t ? /* @__PURE__ */ r(f, { label: e, placement: "top", children: /* @__PURE__ */ r(
21
+ p,
22
+ {
23
+ size: "sm",
24
+ variant: "ghost",
25
+ "aria-label": e,
26
+ isPressed: !!c,
27
+ isDisabled: !!m,
28
+ onClick: () => n(t),
29
+ children: l
30
+ }
31
+ ) }) : null;
32
+ }
33
+ export {
34
+ v as BooleanControl
35
+ };
@@ -0,0 +1,4 @@
1
+ import { JSONContent } from '@tiptap/core';
2
+ export declare const richTextExtensions: (import('@tiptap/core').Mark<import('@tiptap/extension-link').LinkOptions, any> | import('@tiptap/core').Extension<import('@tiptap/starter-kit').StarterKitOptions, any> | import('@tiptap/core').Mark<import('@tiptap/extension-underline').UnderlineOptions, any>)[];
3
+ export declare function parseHtmlToContent(html: string): JSONContent;
4
+ //# sourceMappingURL=extensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAuBhD,eAAO,MAAM,kBAAkB,wQAgB9B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAE5D"}
@@ -0,0 +1,37 @@
1
+ import { generateJSON as r } from "../../node_modules/@tiptap/core/dist/index.js";
2
+ import { Link as t } from "../../node_modules/@tiptap/extension-link/dist/index.js";
3
+ import { Underline as n } from "../../node_modules/@tiptap/extension-underline/dist/index.js";
4
+ import { find as i, registerCustomProtocol as l } from "../../node_modules/linkifyjs/dist/linkify.js";
5
+ import { StarterKit as s } from "../../node_modules/@tiptap/starter-kit/dist/index.js";
6
+ l("tel");
7
+ const f = t.configure({
8
+ openOnClick: !1,
9
+ isAllowedUri: (e) => {
10
+ if (e.startsWith("tel:")) return !0;
11
+ const [o] = i(e);
12
+ return !!o?.isLink;
13
+ }
14
+ }), a = [
15
+ s.configure({
16
+ blockquote: !1,
17
+ code: !1,
18
+ codeBlock: !1,
19
+ dropcursor: !1,
20
+ gapcursor: !1,
21
+ heading: { levels: [1, 2, 3, 4] },
22
+ horizontalRule: !1,
23
+ // Disabled because we register custom-configured versions below
24
+ link: !1,
25
+ strike: !1,
26
+ underline: !1
27
+ }),
28
+ f,
29
+ n
30
+ ];
31
+ function k(e) {
32
+ return r(e, a);
33
+ }
34
+ export {
35
+ k as parseHtmlToContent,
36
+ a as richTextExtensions
37
+ };
@@ -0,0 +1,26 @@
1
+ import { RichTextEditorContent, RichTextEditorControlGroup, RichTextEditorRoot, RichTextEditorToolbar } from './rich-text-editor.js';
2
+ import { Bold, BulletList, Heading1, Heading2, Heading3, Heading4, Italic, LinkControl, OrderedList, Underline } from './rich-text-editor-control.js';
3
+ export declare const RichTextEditor: {
4
+ Root: typeof RichTextEditorRoot;
5
+ Toolbar: typeof RichTextEditorToolbar;
6
+ Content: typeof RichTextEditorContent;
7
+ ControlGroup: typeof RichTextEditorControlGroup;
8
+ Control: {
9
+ Bold: typeof Bold;
10
+ Italic: typeof Italic;
11
+ Underline: typeof Underline;
12
+ Heading1: typeof Heading1;
13
+ Heading2: typeof Heading2;
14
+ Heading3: typeof Heading3;
15
+ Heading4: typeof Heading4;
16
+ BulletList: typeof BulletList;
17
+ OrderedList: typeof OrderedList;
18
+ Link: typeof LinkControl;
19
+ };
20
+ };
21
+ export { parseHtmlToContent, richTextExtensions } from './extensions.js';
22
+ export { useRichTextEditorContext } from './rich-text-editor-context.js';
23
+ export { RichTextRenderer } from './rich-text-renderer.js';
24
+ export type { JSONContent, RichTextEditorLocale, RichTextEditorRootProps, RichTextEditorToolbarProps, RichTextRendererProps, UseRichTextEditorOptions, } from './types.js';
25
+ export { useRichTextEditor } from './use-rich-text-editor.js';
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,SAAS,EACT,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;CAiB1B,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACX,WAAW,EACX,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,wBAAwB,GACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { RichTextEditorControlGroup as o, RichTextEditorContent as t, RichTextEditorToolbar as i, RichTextEditorRoot as r } from "./rich-text-editor.js";
2
+ import { LinkControl as e, OrderedList as n, BulletList as d, Heading4 as l, Heading3 as a, Heading2 as c, Heading1 as R, Underline as T, Italic as x, Bold as C } from "./rich-text-editor-control.js";
3
+ const E = {
4
+ Root: r,
5
+ Toolbar: i,
6
+ Content: t,
7
+ ControlGroup: o,
8
+ Control: {
9
+ Bold: C,
10
+ Italic: x,
11
+ Underline: T,
12
+ Heading1: R,
13
+ Heading2: c,
14
+ Heading3: a,
15
+ Heading4: l,
16
+ BulletList: d,
17
+ OrderedList: n,
18
+ Link: e
19
+ }
20
+ };
21
+ export {
22
+ E as RichTextEditor
23
+ };
@@ -0,0 +1,10 @@
1
+ import { Editor } from '@tiptap/core';
2
+ import { RichTextEditorLocale } from './types.js';
3
+ interface RichTextEditorContextValue {
4
+ editor: Editor | null;
5
+ locale: RichTextEditorLocale;
6
+ }
7
+ export declare const RichTextEditorContext: import('react').Context<RichTextEditorContextValue | null>;
8
+ export declare function useRichTextEditorContext(): RichTextEditorContextValue;
9
+ export {};
10
+ //# sourceMappingURL=rich-text-editor-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-editor-context.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,UAAU,0BAA0B;IACnC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,oBAAoB,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,4DAAyD,CAAC;AAI5F,wBAAgB,wBAAwB,IAAI,0BAA0B,CAMrE"}
@@ -0,0 +1,13 @@
1
+ import { useContext as o, createContext as i } from "react";
2
+ const e = i(null);
3
+ e.displayName = "RichTextEditorContext";
4
+ function r() {
5
+ const t = o(e);
6
+ if (!t)
7
+ throw new Error("useRichTextEditorContext must be used within RichTextEditor.Root");
8
+ return t;
9
+ }
10
+ export {
11
+ e as RichTextEditorContext,
12
+ r as useRichTextEditorContext
13
+ };
@@ -0,0 +1,11 @@
1
+ export declare function Bold(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Italic(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function Underline(): import("react/jsx-runtime").JSX.Element;
4
+ export declare function BulletList(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function OrderedList(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function Heading1(): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Heading2(): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Heading3(): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Heading4(): import("react/jsx-runtime").JSX.Element;
10
+ export declare function LinkControl(): import("react/jsx-runtime").JSX.Element | null;
11
+ //# sourceMappingURL=rich-text-editor-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-editor-control.d.ts","sourceRoot":"","sources":["../../../lib/components/rich-text-editor/rich-text-editor-control.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,IAAI,4CAInB;AAQD,wBAAgB,MAAM,4CAIrB;AAQD,wBAAgB,SAAS,4CAIxB;AAQD,wBAAgB,UAAU,4CAIzB;AAQD,wBAAgB,WAAW,4CAI1B;AAUD,wBAAgB,QAAQ,4CAIvB;AAQD,wBAAgB,QAAQ,4CAIvB;AAQD,wBAAgB,QAAQ,4CAIvB;AAQD,wBAAgB,QAAQ,4CAIvB;AAwBD,wBAAgB,WAAW,mDA2G1B"}