@moontra/moonui-pro 2.20.1 → 2.20.3

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 (162) hide show
  1. package/dist/index.d.ts +691 -261
  2. package/dist/index.mjs +7418 -4934
  3. package/package.json +11 -5
  4. package/plugin/index.d.ts +86 -0
  5. package/plugin/index.js +308 -0
  6. package/scripts/postbuild.js +27 -0
  7. package/scripts/postinstall.js +176 -23
  8. package/src/__tests__/use-intersection-observer.test.tsx +0 -216
  9. package/src/__tests__/use-local-storage.test.tsx +0 -174
  10. package/src/__tests__/use-pro-access.test.tsx +0 -183
  11. package/src/components/advanced-chart/advanced-chart.test.tsx +0 -281
  12. package/src/components/advanced-chart/index.tsx +0 -1242
  13. package/src/components/advanced-forms/index.tsx +0 -426
  14. package/src/components/animated-button/index.tsx +0 -385
  15. package/src/components/calendar/event-dialog.tsx +0 -372
  16. package/src/components/calendar/index.tsx +0 -1073
  17. package/src/components/calendar-pro/index.tsx +0 -1697
  18. package/src/components/color-picker/index.tsx +0 -432
  19. package/src/components/credit-card-input/index.tsx +0 -406
  20. package/src/components/dashboard/dashboard-grid.tsx +0 -462
  21. package/src/components/dashboard/demo.tsx +0 -425
  22. package/src/components/dashboard/index.tsx +0 -1046
  23. package/src/components/dashboard/time-range-picker.tsx +0 -336
  24. package/src/components/dashboard/types.ts +0 -222
  25. package/src/components/dashboard/widgets/activity-feed.tsx +0 -344
  26. package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
  27. package/src/components/dashboard/widgets/metric-card.tsx +0 -343
  28. package/src/components/data-table/data-table-bulk-actions.tsx +0 -204
  29. package/src/components/data-table/data-table-column-toggle.tsx +0 -169
  30. package/src/components/data-table/data-table-export.ts +0 -156
  31. package/src/components/data-table/data-table-filter-drawer.tsx +0 -448
  32. package/src/components/data-table/data-table.test.tsx +0 -187
  33. package/src/components/data-table/index.tsx +0 -845
  34. package/src/components/draggable-list/index.tsx +0 -100
  35. package/src/components/enhanced/badge.tsx +0 -191
  36. package/src/components/enhanced/button.tsx +0 -362
  37. package/src/components/enhanced/card.tsx +0 -266
  38. package/src/components/enhanced/dialog.tsx +0 -246
  39. package/src/components/enhanced/index.ts +0 -4
  40. package/src/components/error-boundary/index.tsx +0 -109
  41. package/src/components/file-upload/file-upload.test.tsx +0 -243
  42. package/src/components/file-upload/index.tsx +0 -1660
  43. package/src/components/floating-action-button/index.tsx +0 -206
  44. package/src/components/form-wizard/form-wizard-context.tsx +0 -307
  45. package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
  46. package/src/components/form-wizard/form-wizard-progress.tsx +0 -298
  47. package/src/components/form-wizard/form-wizard-step.tsx +0 -111
  48. package/src/components/form-wizard/index.tsx +0 -102
  49. package/src/components/form-wizard/types.ts +0 -76
  50. package/src/components/gesture-drawer/index.tsx +0 -551
  51. package/src/components/github-stars/github-api.ts +0 -426
  52. package/src/components/github-stars/hooks.ts +0 -516
  53. package/src/components/github-stars/index.tsx +0 -375
  54. package/src/components/github-stars/types.ts +0 -148
  55. package/src/components/github-stars/variants.tsx +0 -513
  56. package/src/components/health-check/index.tsx +0 -439
  57. package/src/components/hover-card-3d/index.tsx +0 -530
  58. package/src/components/index.ts +0 -128
  59. package/src/components/internal/index.ts +0 -78
  60. package/src/components/kanban/add-card-modal.tsx +0 -502
  61. package/src/components/kanban/card-detail-modal.tsx +0 -761
  62. package/src/components/kanban/index.ts +0 -13
  63. package/src/components/kanban/kanban.tsx +0 -1684
  64. package/src/components/kanban/types.ts +0 -168
  65. package/src/components/lazy-component/index.tsx +0 -823
  66. package/src/components/license-error/index.tsx +0 -29
  67. package/src/components/magnetic-button/index.tsx +0 -167
  68. package/src/components/memory-efficient-data/index.tsx +0 -1016
  69. package/src/components/moonui-quiz-form/index.tsx +0 -817
  70. package/src/components/optimized-image/index.tsx +0 -425
  71. package/src/components/performance-debugger/index.tsx +0 -589
  72. package/src/components/performance-monitor/index.tsx +0 -794
  73. package/src/components/phone-number-input/index.tsx +0 -338
  74. package/src/components/pinch-zoom/index.tsx +0 -566
  75. package/src/components/quiz-form/index.tsx +0 -479
  76. package/src/components/rich-text-editor/index-old-backup.tsx +0 -437
  77. package/src/components/rich-text-editor/index.tsx +0 -2324
  78. package/src/components/rich-text-editor/slash-commands-extension.ts +0 -220
  79. package/src/components/rich-text-editor/slash-commands.css +0 -35
  80. package/src/components/rich-text-editor/table-styles.css +0 -65
  81. package/src/components/sidebar/index.tsx +0 -865
  82. package/src/components/spotlight-card/index.tsx +0 -191
  83. package/src/components/swipeable-card/index.tsx +0 -100
  84. package/src/components/timeline/index.tsx +0 -1148
  85. package/src/components/ui/accordion.tsx +0 -73
  86. package/src/components/ui/alert-dialog.tsx +0 -141
  87. package/src/components/ui/alert.tsx +0 -141
  88. package/src/components/ui/aspect-ratio.tsx +0 -245
  89. package/src/components/ui/avatar.tsx +0 -153
  90. package/src/components/ui/badge.tsx +0 -228
  91. package/src/components/ui/breadcrumb.tsx +0 -214
  92. package/src/components/ui/button.tsx +0 -222
  93. package/src/components/ui/calendar.tsx +0 -387
  94. package/src/components/ui/card.tsx +0 -214
  95. package/src/components/ui/checkbox.tsx +0 -259
  96. package/src/components/ui/collapsible.tsx +0 -135
  97. package/src/components/ui/color-picker.tsx +0 -97
  98. package/src/components/ui/command.tsx +0 -225
  99. package/src/components/ui/dialog.tsx +0 -334
  100. package/src/components/ui/dropdown-menu.tsx +0 -218
  101. package/src/components/ui/gesture-drawer.tsx +0 -11
  102. package/src/components/ui/hover-card.tsx +0 -29
  103. package/src/components/ui/index.ts +0 -190
  104. package/src/components/ui/input.tsx +0 -222
  105. package/src/components/ui/label.tsx +0 -29
  106. package/src/components/ui/lightbox.tsx +0 -606
  107. package/src/components/ui/magnetic-button.tsx +0 -129
  108. package/src/components/ui/media-gallery.tsx +0 -612
  109. package/src/components/ui/pagination.tsx +0 -123
  110. package/src/components/ui/popover.tsx +0 -185
  111. package/src/components/ui/progress.tsx +0 -30
  112. package/src/components/ui/radio-group.tsx +0 -257
  113. package/src/components/ui/scroll-area.tsx +0 -47
  114. package/src/components/ui/select.tsx +0 -374
  115. package/src/components/ui/separator.tsx +0 -145
  116. package/src/components/ui/sheet.tsx +0 -139
  117. package/src/components/ui/skeleton.tsx +0 -20
  118. package/src/components/ui/slider.tsx +0 -354
  119. package/src/components/ui/spotlight-card.tsx +0 -119
  120. package/src/components/ui/switch.tsx +0 -86
  121. package/src/components/ui/table.tsx +0 -329
  122. package/src/components/ui/tabs.tsx +0 -198
  123. package/src/components/ui/textarea.tsx +0 -28
  124. package/src/components/ui/toast.tsx +0 -317
  125. package/src/components/ui/toggle.tsx +0 -119
  126. package/src/components/ui/tooltip.tsx +0 -151
  127. package/src/components/virtual-list/index.tsx +0 -668
  128. package/src/hooks/use-chart.ts +0 -205
  129. package/src/hooks/use-data-table.ts +0 -182
  130. package/src/hooks/use-docs-pro-access.ts +0 -13
  131. package/src/hooks/use-license-check.ts +0 -65
  132. package/src/hooks/use-subscription.ts +0 -19
  133. package/src/hooks/use-toast.ts +0 -15
  134. package/src/index.ts +0 -14
  135. package/src/lib/ai-providers.ts +0 -377
  136. package/src/lib/component-metadata.ts +0 -18
  137. package/src/lib/micro-interactions.ts +0 -255
  138. package/src/lib/paddle.ts +0 -17
  139. package/src/lib/utils.ts +0 -6
  140. package/src/patterns/login-form/index.tsx +0 -276
  141. package/src/patterns/login-form/types.ts +0 -67
  142. package/src/setupTests.ts +0 -41
  143. package/src/styles/advanced-chart.css +0 -239
  144. package/src/styles/calendar.css +0 -35
  145. package/src/styles/design-system.css +0 -363
  146. package/src/styles/index.css +0 -85
  147. package/src/styles/tailwind.css +0 -7
  148. package/src/styles/tokens.css +0 -455
  149. package/src/types/moonui.d.ts +0 -22
  150. package/src/types/next-auth.d.ts +0 -21
  151. package/src/use-intersection-observer.tsx +0 -154
  152. package/src/use-local-storage.tsx +0 -71
  153. package/src/use-paddle.ts +0 -138
  154. package/src/use-performance-optimizer.ts +0 -389
  155. package/src/use-pro-access.ts +0 -141
  156. package/src/use-scroll-animation.ts +0 -219
  157. package/src/use-subscription.ts +0 -37
  158. package/src/use-toast.ts +0 -32
  159. package/src/utils/chart-helpers.ts +0 -357
  160. package/src/utils/cn.ts +0 -6
  161. package/src/utils/data-processing.ts +0 -151
  162. package/src/utils/license-validator.tsx +0 -183
@@ -1,220 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { Plugin, PluginKey } from '@tiptap/pm/state';
3
- import { Decoration, DecorationSet } from '@tiptap/pm/view';
4
- import type { SlashCommand } from '@/lib/ai-providers';
5
-
6
- declare module '@tiptap/core' {
7
- interface Commands<ReturnType> {
8
- slashCommands: {
9
- selectSlashCommand: (index: number) => ReturnType;
10
- };
11
- }
12
- }
13
-
14
- interface SlashCommandsOptions {
15
- commands: SlashCommand[];
16
- onSelectCommand: (command: SlashCommand) => void;
17
- }
18
-
19
- const slashCommandsPluginKey = new PluginKey('slashCommands');
20
-
21
- export const SlashCommandsExtension = Extension.create<SlashCommandsOptions>({
22
- name: 'slashCommands',
23
-
24
- addOptions() {
25
- return {
26
- commands: [],
27
- onSelectCommand: () => {},
28
- };
29
- },
30
-
31
- addCommands() {
32
- return {
33
- selectSlashCommand: (index: number) => ({ editor }) => {
34
- const state = slashCommandsPluginKey.getState(editor.state);
35
- if (state && state.active && state.filteredCommands[index]) {
36
- const command = state.filteredCommands[index];
37
-
38
- // Clear the slash command
39
- const { from, to } = state.range;
40
- editor.chain()
41
- .deleteRange({ from, to })
42
- .focus()
43
- .run();
44
-
45
- // Execute the command
46
- this.options.onSelectCommand(command);
47
-
48
- return true;
49
- }
50
- return false;
51
- },
52
- };
53
- },
54
-
55
- addKeyboardShortcuts() {
56
- return {
57
- ArrowUp: ({ editor }) => {
58
- const state = slashCommandsPluginKey.getState(editor.state);
59
- if (state && state.active) {
60
- const newIndex = state.selectedIndex > 0 ? state.selectedIndex - 1 : state.filteredCommands.length - 1;
61
- editor.view.dispatch(
62
- editor.state.tr.setMeta(slashCommandsPluginKey, { selectedIndex: newIndex })
63
- );
64
- return true;
65
- }
66
- return false;
67
- },
68
- ArrowDown: ({ editor }) => {
69
- const state = slashCommandsPluginKey.getState(editor.state);
70
- if (state && state.active) {
71
- const newIndex = state.selectedIndex < state.filteredCommands.length - 1 ? state.selectedIndex + 1 : 0;
72
- editor.view.dispatch(
73
- editor.state.tr.setMeta(slashCommandsPluginKey, { selectedIndex: newIndex })
74
- );
75
- return true;
76
- }
77
- return false;
78
- },
79
- Enter: ({ editor }) => {
80
- const state = slashCommandsPluginKey.getState(editor.state);
81
- if (state && state.active) {
82
- editor.commands.selectSlashCommand(state.selectedIndex);
83
- return true;
84
- }
85
- return false;
86
- },
87
- Escape: ({ editor }) => {
88
- const state = slashCommandsPluginKey.getState(editor.state);
89
- if (state && state.active) {
90
- editor.view.dispatch(
91
- editor.state.tr.setMeta(slashCommandsPluginKey, { active: false })
92
- );
93
- return true;
94
- }
95
- return false;
96
- },
97
- };
98
- },
99
-
100
- addProseMirrorPlugins() {
101
- return [
102
- new Plugin({
103
- key: slashCommandsPluginKey,
104
- state: {
105
- init() {
106
- return {
107
- active: false,
108
- range: { from: 0, to: 0 },
109
- query: '',
110
- filteredCommands: [],
111
- selectedIndex: 0,
112
- };
113
- },
114
- apply(transaction, value, oldState, newState) {
115
- const meta = transaction.getMeta(slashCommandsPluginKey);
116
- if (meta) {
117
- return { ...value, ...meta };
118
- }
119
-
120
- // Check for slash character
121
- const { selection } = newState;
122
- const { empty, $from } = selection;
123
-
124
- if (!empty) {
125
- return { ...value, active: false };
126
- }
127
-
128
- const textBefore = $from.parent.textBetween(
129
- Math.max(0, $from.parentOffset - 50),
130
- $from.parentOffset,
131
- null,
132
- '\ufffc'
133
- );
134
-
135
- const match = textBefore.match(/\/(\w*)$/);
136
-
137
- if (match) {
138
- const query = match[1].toLowerCase();
139
- const filteredCommands = this.options.commands.filter(cmd =>
140
- cmd.command.toLowerCase().includes(query) ||
141
- cmd.description.toLowerCase().includes(query)
142
- );
143
-
144
- return {
145
- active: true,
146
- range: {
147
- from: $from.pos - match[0].length,
148
- to: $from.pos,
149
- },
150
- query,
151
- filteredCommands,
152
- selectedIndex: 0,
153
- };
154
- }
155
-
156
- return { ...value, active: false };
157
- },
158
- },
159
- props: {
160
- decorations(state) {
161
- const pluginState = this.getState(state);
162
- if (!pluginState.active) {
163
- return DecorationSet.empty;
164
- }
165
-
166
- // Slash menu decoration
167
- const { from } = pluginState.range;
168
- const decoration = Decoration.widget(from, () => {
169
- const container = document.createElement('div');
170
- container.className = 'slash-commands-menu';
171
-
172
- pluginState.filteredCommands.forEach((cmd, index) => {
173
- const item = document.createElement('div');
174
- item.className = `slash-command-item ${index === pluginState.selectedIndex ? 'selected' : ''}`;
175
-
176
- if (cmd.icon) {
177
- const iconWrapper = document.createElement('div');
178
- iconWrapper.innerHTML = cmd.icon;
179
- item.appendChild(iconWrapper);
180
- }
181
-
182
- const textWrapper = document.createElement('div');
183
-
184
- const commandName = document.createElement('div');
185
- commandName.className = 'command-name';
186
- commandName.textContent = `/${cmd.command}`;
187
- textWrapper.appendChild(commandName);
188
-
189
- const commandDesc = document.createElement('div');
190
- commandDesc.className = 'command-description';
191
- commandDesc.textContent = cmd.description;
192
- textWrapper.appendChild(commandDesc);
193
-
194
- item.appendChild(textWrapper);
195
-
196
- item.addEventListener('click', () => {
197
- const editor = (state as any).editor;
198
- editor.commands.selectSlashCommand(index);
199
- });
200
-
201
- container.appendChild(item);
202
- });
203
-
204
- if (pluginState.filteredCommands.length === 0) {
205
- const empty = document.createElement('div');
206
- empty.className = 'text-gray-500 p-3 text-sm';
207
- empty.textContent = 'No commands found';
208
- container.appendChild(empty);
209
- }
210
-
211
- return container;
212
- });
213
-
214
- return DecorationSet.create(state.doc, [decoration]);
215
- },
216
- },
217
- }),
218
- ];
219
- },
220
- });
@@ -1,35 +0,0 @@
1
- /* Slash Commands Menu Styles */
2
- .slash-commands-menu {
3
- @apply bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg;
4
- @apply max-h-80 overflow-y-auto min-w-[280px] p-2;
5
- }
6
-
7
- .slash-command-item {
8
- @apply flex items-center gap-3 px-3 py-2 rounded-md cursor-pointer;
9
- @apply hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors;
10
- }
11
-
12
- .slash-command-item.selected {
13
- @apply bg-gray-100 dark:bg-gray-800;
14
- }
15
-
16
- .slash-command-item svg {
17
- @apply w-4 h-4 text-gray-500 dark:text-gray-400;
18
- }
19
-
20
- .slash-command-item > div {
21
- @apply flex-1;
22
- }
23
-
24
- .slash-command-item .command-name {
25
- @apply font-medium text-gray-900 dark:text-gray-100 text-sm;
26
- }
27
-
28
- .slash-command-item .command-description {
29
- @apply text-xs text-gray-500 dark:text-gray-400 mt-0.5;
30
- }
31
-
32
- /* Dark mode support */
33
- .dark .slash-commands-menu {
34
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
35
- }
@@ -1,65 +0,0 @@
1
- /* Table styles for RichTextEditor */
2
- .ProseMirror table {
3
- border-collapse: collapse;
4
- margin: 0;
5
- overflow: hidden;
6
- table-layout: fixed;
7
- width: 100%;
8
- border: 1px solid #d1d5db;
9
- }
10
-
11
- .ProseMirror table td,
12
- .ProseMirror table th {
13
- border: 1px solid #d1d5db;
14
- box-sizing: border-box;
15
- min-width: 1em;
16
- padding: 6px 8px;
17
- position: relative;
18
- vertical-align: top;
19
- }
20
-
21
- .ProseMirror table th {
22
- background-color: #f9fafb;
23
- font-weight: 600;
24
- text-align: left;
25
- }
26
-
27
- .ProseMirror table .selectedCell:after {
28
- background-color: rgba(59, 130, 246, 0.1);
29
- content: '';
30
- left: 0;
31
- right: 0;
32
- top: 0;
33
- bottom: 0;
34
- pointer-events: none;
35
- position: absolute;
36
- z-index: 2;
37
- }
38
-
39
- .ProseMirror table .column-resize-handle {
40
- background-color: #3b82f6;
41
- bottom: -2px;
42
- position: absolute;
43
- right: -2px;
44
- top: 0;
45
- width: 4px;
46
- pointer-events: none;
47
- }
48
-
49
- /* Dark mode styles */
50
- .dark .ProseMirror table {
51
- border: 1px solid #374151;
52
- }
53
-
54
- .dark .ProseMirror table td,
55
- .dark .ProseMirror table th {
56
- border: 1px solid #374151;
57
- }
58
-
59
- .dark .ProseMirror table th {
60
- background-color: #111827;
61
- }
62
-
63
- .dark .ProseMirror table .selectedCell:after {
64
- background-color: rgba(59, 130, 246, 0.2);
65
- }