@veevarts/design-system 0.1.17 → 0.1.18

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 (47) hide show
  1. package/dist/index.cjs +106 -1
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.js +17207 -108
  4. package/dist/patterns/RichText/RichText.d.ts +33 -0
  5. package/dist/patterns/RichText/RichText.test.d.ts +1 -0
  6. package/dist/patterns/RichText/TipTapArea/TipTapArea.d.ts +60 -0
  7. package/dist/patterns/RichText/commands/index.d.ts +5 -0
  8. package/dist/patterns/RichText/commands/registry.d.ts +14 -0
  9. package/dist/patterns/RichText/config/colors.d.ts +39 -0
  10. package/dist/patterns/RichText/config/defaults.d.ts +34 -0
  11. package/dist/patterns/RichText/config/icons.d.ts +26 -0
  12. package/dist/patterns/RichText/config/index.d.ts +7 -0
  13. package/dist/patterns/RichText/core/TipTapEditor.d.ts +7 -0
  14. package/dist/patterns/RichText/core/TipTapEditor.test.d.ts +1 -0
  15. package/dist/patterns/RichText/examples/ControlledExample.d.ts +1 -0
  16. package/dist/patterns/RichText/examples/FormWithValidationExample.d.ts +1 -0
  17. package/dist/patterns/RichText/extensions/index.d.ts +22 -0
  18. package/dist/patterns/RichText/extensions/registry.d.ts +19 -0
  19. package/dist/patterns/RichText/index.d.ts +11 -0
  20. package/dist/patterns/RichText/presets.d.ts +36 -0
  21. package/dist/patterns/RichText/toolbar/Toolbar.d.ts +34 -0
  22. package/dist/patterns/RichText/toolbar/ToolbarDivider.d.ts +15 -0
  23. package/dist/patterns/RichText/toolbar/ToolbarSection.d.ts +29 -0
  24. package/dist/patterns/RichText/toolbar/components/ColorPalette.d.ts +28 -0
  25. package/dist/patterns/RichText/toolbar/components/ColorPicker.d.ts +29 -0
  26. package/dist/patterns/RichText/toolbar/components/CustomColorInput.d.ts +28 -0
  27. package/dist/patterns/RichText/toolbar/components/HeadingDropdown.d.ts +21 -0
  28. package/dist/patterns/RichText/toolbar/components/ListDropdown.d.ts +20 -0
  29. package/dist/patterns/RichText/toolbar/components/ToolbarButton.d.ts +40 -0
  30. package/dist/patterns/RichText/toolbar/components/ZoomControls.d.ts +35 -0
  31. package/dist/patterns/RichText/toolbar/components/index.d.ts +17 -0
  32. package/dist/patterns/RichText/toolbar/hooks/index.d.ts +6 -0
  33. package/dist/patterns/RichText/toolbar/hooks/useToolbarCommands.d.ts +14 -0
  34. package/dist/patterns/RichText/toolbar/hooks/useToolbarState.d.ts +14 -0
  35. package/dist/patterns/RichText/toolbar/hooks/useZoomState.d.ts +21 -0
  36. package/dist/patterns/RichText/toolbar/index.d.ts +12 -0
  37. package/dist/patterns/RichText/toolbar/sections/TextFormattingSection.d.ts +7 -0
  38. package/dist/patterns/RichText/types/commands.d.ts +68 -0
  39. package/dist/patterns/RichText/types/extensions.d.ts +71 -0
  40. package/dist/patterns/RichText/types/index.d.ts +14 -0
  41. package/dist/patterns/RichText/types/marks.d.ts +86 -0
  42. package/dist/patterns/RichText/types/modifiers.d.ts +125 -0
  43. package/dist/patterns/RichText/types/nodes.d.ts +80 -0
  44. package/dist/patterns/RichText/types/props.d.ts +157 -0
  45. package/dist/patterns/RichText/types/toolbar.d.ts +88 -0
  46. package/dist/patterns/index.d.ts +2 -0
  47. package/package.json +13 -1
@@ -0,0 +1,88 @@
1
+ import { ModifierIdentifier, ModifierType } from './modifiers';
2
+ /**
3
+ * Toolbar section configuration
4
+ * Groups related modifiers together in the toolbar
5
+ */
6
+ export interface ToolbarSectionConfig {
7
+ /**
8
+ * Unique section identifier
9
+ */
10
+ id: string;
11
+ /**
12
+ * Modifiers to display in this section
13
+ */
14
+ modifiers: ModifierIdentifier[];
15
+ /**
16
+ * Whether to show a divider after this section
17
+ * @default true
18
+ */
19
+ showDivider?: boolean;
20
+ /**
21
+ * Optional section label (for accessibility)
22
+ */
23
+ label?: string;
24
+ }
25
+ /**
26
+ * Complete toolbar configuration
27
+ */
28
+ export interface ToolbarConfig {
29
+ /**
30
+ * Toolbar sections in order
31
+ */
32
+ sections: ToolbarSectionConfig[];
33
+ /**
34
+ * Whether to show zoom controls
35
+ * @default false
36
+ */
37
+ showZoom?: boolean;
38
+ /**
39
+ * Whether toolbar should stick to top on scroll
40
+ * @default true
41
+ */
42
+ stickyPosition?: boolean;
43
+ /**
44
+ * Custom toolbar class names
45
+ */
46
+ className?: string;
47
+ }
48
+ /**
49
+ * Individual toolbar button state
50
+ */
51
+ export interface ToolbarButtonState {
52
+ /**
53
+ * Whether the button represents an active state
54
+ * (e.g., bold is active when cursor is in bold text)
55
+ */
56
+ isActive: boolean;
57
+ /**
58
+ * Whether the button is disabled
59
+ */
60
+ isDisabled: boolean;
61
+ /**
62
+ * Whether the command can be executed
63
+ */
64
+ canExecute: boolean;
65
+ }
66
+ /**
67
+ * Complete toolbar state for all modifiers
68
+ */
69
+ export type ToolbarState = Record<ModifierType, ToolbarButtonState>;
70
+ /**
71
+ * Toolbar layout preset names
72
+ */
73
+ export type ToolbarPreset = 'simple' | 'blog' | 'documentation' | 'comment' | 'full';
74
+ /**
75
+ * Default toolbar section IDs
76
+ */
77
+ export declare const TOOLBAR_SECTION_IDS: {
78
+ readonly TEXT_FORMATTING: "text-formatting";
79
+ readonly COLOR: "color";
80
+ readonly BLOCK_TYPE: "block-type";
81
+ readonly HEADING: "heading";
82
+ readonly ALIGNMENT: "alignment";
83
+ readonly LIST: "list";
84
+ readonly INSERT: "insert";
85
+ readonly HISTORY: "history";
86
+ readonly VIEW: "view";
87
+ };
88
+ export type ToolbarSectionId = (typeof TOOLBAR_SECTION_IDS)[keyof typeof TOOLBAR_SECTION_IDS];
@@ -1,6 +1,8 @@
1
1
  export { Navbar } from './Navbar';
2
2
  export { Stepper } from './Stepper';
3
3
  export { Footer } from './Footer';
4
+ export { RichTextArea, RICH_TEXT_PRESETS } from './RichText';
4
5
  export type { NavbarProps, NavbarLink, NavbarLanguage } from './Navbar';
5
6
  export type { StepperProps } from './Stepper';
6
7
  export type { FooterProps, FooterSection, FooterLink, SocialLink } from './Footer';
8
+ export type { RichTextAreaProps } from './RichText';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "0.1.17",
4
+ "version": "0.1.18",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -31,6 +31,18 @@
31
31
  "react-dom": "^18.0.0 || ^19.0.0"
32
32
  },
33
33
  "dependencies": {
34
+ "@tiptap/extension-color": "^2.12.0",
35
+ "@tiptap/extension-highlight": "^2.27.2",
36
+ "@tiptap/extension-link": "^2.27.2",
37
+ "@tiptap/extension-placeholder": "^2.27.2",
38
+ "@tiptap/extension-task-item": "^2.27.2",
39
+ "@tiptap/extension-task-list": "^2.27.2",
40
+ "@tiptap/extension-text-align": "^2.27.2",
41
+ "@tiptap/extension-underline": "^2.27.2",
42
+ "@tiptap/pm": "^2.12.0",
43
+ "@tiptap/react": "^2.12.0",
44
+ "@tiptap/starter-kit": "^2.12.0",
45
+ "lucide-react": "^0.562.0",
34
46
  "vite-plugin-css-injected-by-js": "latest",
35
47
  "vite-plugin-dts": "latest"
36
48
  },