@humandialog/forms.svelte 1.3.11 → 1.3.13

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 (139) hide show
  1. package/README.md +0 -0
  2. package/components/Fab.svelte +112 -34
  3. package/components/Fab.svelte.d.ts +17 -17
  4. package/components/Floating_container.svelte +86 -21
  5. package/components/Floating_container.svelte.d.ts +21 -21
  6. package/components/Grid.menu.svelte.d.ts +25 -25
  7. package/components/button.svelte.d.ts +26 -26
  8. package/components/checkbox.svelte.d.ts +26 -26
  9. package/components/combo/combo.d.ts +19 -19
  10. package/components/combo/combo.item.svelte.d.ts +20 -20
  11. package/components/combo/combo.js +19 -19
  12. package/components/combo/combo.source.svelte.d.ts +23 -23
  13. package/components/combo/combo.svelte +64 -30
  14. package/components/combo/combo.svelte.d.ts +44 -44
  15. package/components/contextmenu.svelte +97 -30
  16. package/components/contextmenu.svelte.d.ts +26 -26
  17. package/components/date.svelte +40 -30
  18. package/components/date.svelte.d.ts +33 -33
  19. package/components/delayed.spinner.svelte.d.ts +19 -19
  20. package/components/document/editor.svelte +33 -6
  21. package/components/document/editor.svelte.d.ts +35 -35
  22. package/components/document/internal/Document_command.d.ts +12 -11
  23. package/components/document/internal/Document_command.js +12 -11
  24. package/components/document/internal/Selection_helper.d.ts +7 -7
  25. package/components/document/internal/Selection_helper.js +133 -133
  26. package/components/document/internal/Selection_range.d.ts +26 -26
  27. package/components/document/internal/Selection_range.js +58 -58
  28. package/components/document/internal/findSuggestionMatch.d.ts +16 -16
  29. package/components/document/internal/findSuggestionMatch.js +51 -51
  30. package/components/document/internal/h1.icon.svelte.d.ts +23 -23
  31. package/components/document/internal/h2.icon.svelte.d.ts +23 -23
  32. package/components/document/internal/h3.icon.svelte.d.ts +23 -23
  33. package/components/document/internal/h4.icon.svelte.d.ts +23 -23
  34. package/components/document/internal/palette.row.big.svelte.d.ts +46 -46
  35. package/components/document/internal/palette.row.svelte +1 -1
  36. package/components/document/internal/palette.row.svelte.d.ts +46 -46
  37. package/components/document/internal/palette.svelte +23 -15
  38. package/components/document/internal/palette.svelte.d.ts +82 -82
  39. package/components/document/internal/suggestion.d.ts +158 -158
  40. package/components/document/internal/suggestion.js +194 -194
  41. package/components/document/rich.edit.svelte.d.ts +34 -34
  42. package/components/edit.field.svelte.d.ts +31 -31
  43. package/components/file.loader.svelte.d.ts +25 -25
  44. package/components/icon.ex.svelte.d.ts +62 -62
  45. package/components/icon.svelte.d.ts +62 -62
  46. package/components/input.text.svelte.d.ts +29 -29
  47. package/components/inputbox.ltop.svelte.d.ts +59 -59
  48. package/components/kanban/Kanban.d.ts +47 -47
  49. package/components/kanban/Kanban.js +105 -105
  50. package/components/kanban/internal/kanban.card.svelte +5 -3
  51. package/components/kanban/internal/kanban.card.svelte.d.ts +32 -32
  52. package/components/kanban/internal/kanban.column.svelte.d.ts +53 -53
  53. package/components/kanban/internal/kanban.inserter.svelte.d.ts +18 -18
  54. package/components/kanban/internal/kanban.move.menu.svelte +135 -135
  55. package/components/kanban/internal/kanban.move.menu.svelte.d.ts +22 -22
  56. package/components/kanban/internal/kanban.props.svelte.d.ts +19 -19
  57. package/components/kanban/kanban.callbacks.svelte +1 -1
  58. package/components/kanban/kanban.callbacks.svelte.d.ts +18 -18
  59. package/components/kanban/kanban.column.svelte.d.ts +21 -21
  60. package/components/kanban/kanban.combo.svelte.d.ts +25 -25
  61. package/components/kanban/kanban.date.svelte +1 -1
  62. package/components/kanban/kanban.date.svelte.d.ts +21 -21
  63. package/components/kanban/kanban.source.svelte.d.ts +23 -23
  64. package/components/kanban/kanban.static.svelte.d.ts +20 -20
  65. package/components/kanban/kanban.summary.svelte.d.ts +18 -18
  66. package/components/kanban/kanban.svelte.d.ts +65 -65
  67. package/components/kanban/kanban.tags.svelte.d.ts +24 -24
  68. package/components/kanban/kanban.title.svelte.d.ts +21 -21
  69. package/components/list/List.d.ts +46 -46
  70. package/components/list/List.js +54 -54
  71. package/components/list/internal/list.element.props.svelte +2 -2
  72. package/components/list/internal/list.element.props.svelte.d.ts +21 -21
  73. package/components/list/internal/list.element.summary.svelte +46 -46
  74. package/components/list/internal/list.element.summary.svelte.d.ts +24 -24
  75. package/components/list/internal/list.element.svelte +8 -6
  76. package/components/list/internal/list.element.svelte.d.ts +31 -31
  77. package/components/list/internal/list.inserter.svelte.d.ts +19 -19
  78. package/components/list/list.combo.svelte.d.ts +22 -22
  79. package/components/list/list.date.svelte.d.ts +18 -18
  80. package/components/list/list.inserter.svelte.d.ts +17 -17
  81. package/components/list/list.static.svelte.d.ts +17 -17
  82. package/components/list/list.summary.svelte.d.ts +19 -19
  83. package/components/list/list.svelte.d.ts +59 -59
  84. package/components/list/list.title.svelte.d.ts +22 -22
  85. package/components/menu.d.ts +5 -5
  86. package/components/menu.js +57 -57
  87. package/components/radio.svelte.d.ts +26 -26
  88. package/components/sidebar/sidebar.brand.svelte.d.ts +33 -33
  89. package/components/sidebar/sidebar.group.svelte +2 -2
  90. package/components/sidebar/sidebar.group.svelte.d.ts +33 -33
  91. package/components/sidebar/sidebar.item.svelte +52 -29
  92. package/components/sidebar/sidebar.item.svelte.d.ts +32 -32
  93. package/components/sidebar/sidebar.list.svelte +4 -2
  94. package/components/sidebar/sidebar.list.svelte.d.ts +38 -38
  95. package/components/sidebar/sidebar.svelte.d.ts +27 -27
  96. package/components/simple.table.svelte.d.ts +41 -41
  97. package/components/table/_template.table.svelte.d.ts +57 -57
  98. package/components/table/column.svelte.d.ts +19 -19
  99. package/components/table/item.svelte.d.ts +17 -17
  100. package/components/table/table.d.ts +11 -11
  101. package/components/table/table.js +11 -11
  102. package/components/table/table.svelte +6 -3
  103. package/components/table/table.svelte.d.ts +75 -75
  104. package/components/tag.colors.svelte.d.ts +17 -17
  105. package/components/tag.svelte +12 -9
  106. package/components/tag.svelte.d.ts +20 -20
  107. package/components/tags.svelte +13 -11
  108. package/components/tags.svelte.d.ts +32 -32
  109. package/components/textarea.ltop.svelte.d.ts +35 -35
  110. package/components/tile.title.svelte.d.ts +29 -29
  111. package/console.svelte.d.ts +23 -23
  112. package/desk.svelte +60 -27
  113. package/desk.svelte.d.ts +23 -23
  114. package/form.box.svelte.d.ts +35 -35
  115. package/horizontal.toolbar.svelte +3 -3
  116. package/horizontal.toolbar.svelte.d.ts +25 -25
  117. package/index.d.ts +63 -63
  118. package/index.js +69 -69
  119. package/internal/configurable.content.svelte.d.ts +29 -29
  120. package/internal/loading.svelte.d.ts +23 -23
  121. package/modal.svelte.d.ts +39 -39
  122. package/operations.svelte +37 -8
  123. package/operations.svelte.d.ts +16 -16
  124. package/package.json +9 -9
  125. package/page.row.svelte.d.ts +31 -31
  126. package/page.svelte +7 -2
  127. package/page.svelte.d.ts +47 -47
  128. package/stores.d.ts +45 -44
  129. package/stores.js +3 -2
  130. package/tenant.members.svelte +69 -39
  131. package/tenant.members.svelte.d.ts +33 -33
  132. package/tile.svelte.d.ts +33 -33
  133. package/tiles.row.svelte.d.ts +31 -31
  134. package/tiles.vertical.row.svelte.d.ts +29 -29
  135. package/updates.d.ts +4 -4
  136. package/utils.d.ts +50 -50
  137. package/utils.js +36 -7
  138. package/vertical.toolbar.svelte +1 -1
  139. package/vertical.toolbar.svelte.d.ts +27 -27
@@ -1,158 +1,158 @@
1
- import { Editor, type Range } from '@tiptap/core';
2
- import { EditorState, Plugin, PluginKey } from '@tiptap/pm/state';
3
- import { EditorView } from '@tiptap/pm/view';
4
- import { findSuggestionMatch as defaultFindSuggestionMatch } from './findSuggestionMatch';
5
- export interface SuggestionOptions<I = any, TSelected = any> {
6
- /**
7
- * The plugin key for the suggestion plugin.
8
- * @default 'suggestion'
9
- * @example 'mention'
10
- */
11
- pluginKey?: PluginKey;
12
- /**
13
- * The editor instance.
14
- * @default null
15
- */
16
- editor: Editor;
17
- /**
18
- * The character that triggers the suggestion.
19
- * @default '@'
20
- * @example '#'
21
- */
22
- char?: string;
23
- /**
24
- * Allow spaces in the suggestion query. Not compatible with `allowToIncludeChar`. Will be disabled if `allowToIncludeChar` is set to `true`.
25
- * @default false
26
- * @example true
27
- */
28
- allowSpaces?: boolean;
29
- /**
30
- * Allow the character to be included in the suggestion query. Not compatible with `allowSpaces`.
31
- * @default false
32
- */
33
- allowToIncludeChar?: boolean;
34
- /**
35
- * Allow prefixes in the suggestion query.
36
- * @default [' ']
37
- * @example [' ', '@']
38
- */
39
- allowedPrefixes?: string[] | null;
40
- /**
41
- * Only match suggestions at the start of the line.
42
- * @default false
43
- * @example true
44
- */
45
- startOfLine?: boolean;
46
- /**
47
- * The tag name of the decoration node.
48
- * @default 'span'
49
- * @example 'div'
50
- */
51
- decorationTag?: string;
52
- /**
53
- * The class name of the decoration node.
54
- * @default 'suggestion'
55
- * @example 'mention'
56
- */
57
- decorationClass?: string;
58
- /**
59
- * A function that is called when a suggestion is selected.
60
- * @param props The props object.
61
- * @param props.editor The editor instance.
62
- * @param props.range The range of the suggestion.
63
- * @param props.props The props of the selected suggestion.
64
- * @returns void
65
- * @example ({ editor, range, props }) => { props.command(props.props) }
66
- */
67
- command?: (props: {
68
- editor: Editor;
69
- range: Range;
70
- props: TSelected;
71
- }) => void;
72
- /**
73
- * A function that returns the suggestion items in form of an array.
74
- * @param props The props object.
75
- * @param props.editor The editor instance.
76
- * @param props.query The current suggestion query.
77
- * @returns An array of suggestion items.
78
- * @example ({ editor, query }) => [{ id: 1, label: 'John Doe' }]
79
- */
80
- items?: (props: {
81
- query: string;
82
- editor: Editor;
83
- }) => I[] | Promise<I[]>;
84
- /**
85
- * The render function for the suggestion.
86
- * @returns An object with render functions.
87
- */
88
- render?: () => {
89
- onBeforeStart?: (props: SuggestionProps<I, TSelected>) => void;
90
- onStart?: (props: SuggestionProps<I, TSelected>) => void;
91
- onBeforeUpdate?: (props: SuggestionProps<I, TSelected>) => void;
92
- onUpdate?: (props: SuggestionProps<I, TSelected>) => void;
93
- onExit?: (props: SuggestionProps<I, TSelected>) => void;
94
- onKeyDown?: (props: SuggestionKeyDownProps) => boolean;
95
- };
96
- /**
97
- * A function that returns a boolean to indicate if the suggestion should be active.
98
- * @param props The props object.
99
- * @returns {boolean}
100
- */
101
- allow?: (props: {
102
- editor: Editor;
103
- state: EditorState;
104
- range: Range;
105
- isActive?: boolean;
106
- }) => boolean;
107
- findSuggestionMatch?: typeof defaultFindSuggestionMatch;
108
- }
109
- export interface SuggestionProps<I = any, TSelected = any> {
110
- /**
111
- * The editor instance.
112
- */
113
- editor: Editor;
114
- /**
115
- * The range of the suggestion.
116
- */
117
- range: Range;
118
- /**
119
- * The current suggestion query.
120
- */
121
- query: string;
122
- /**
123
- * The current suggestion text.
124
- */
125
- text: string;
126
- /**
127
- * The suggestion items array.
128
- */
129
- items: I[];
130
- /**
131
- * A function that is called when a suggestion is selected.
132
- * @param props The props object.
133
- * @returns void
134
- */
135
- command: (props: TSelected) => void;
136
- /**
137
- * The decoration node HTML element
138
- * @default null
139
- */
140
- decorationNode: Element | null;
141
- /**
142
- * The function that returns the client rect
143
- * @default null
144
- * @example () => new DOMRect(0, 0, 0, 0)
145
- */
146
- clientRect?: (() => DOMRect | null) | null;
147
- }
148
- export interface SuggestionKeyDownProps {
149
- view: EditorView;
150
- event: KeyboardEvent;
151
- range: Range;
152
- }
153
- export declare const SuggestionPluginKey: PluginKey<any>;
154
- /**
155
- * This utility allows you to create suggestions.
156
- * @see https://tiptap.dev/api/utilities/suggestion
157
- */
158
- export declare function Suggestion<I = any, TSelected = any>({ pluginKey, editor, char, allowSpaces, allowToIncludeChar, allowedPrefixes, startOfLine, decorationTag, decorationClass, command, items, render, allow, findSuggestionMatch, }: SuggestionOptions<I, TSelected>): Plugin<any>;
1
+ import { Editor, type Range } from '@tiptap/core';
2
+ import { EditorState, Plugin, PluginKey } from '@tiptap/pm/state';
3
+ import { EditorView } from '@tiptap/pm/view';
4
+ import { findSuggestionMatch as defaultFindSuggestionMatch } from './findSuggestionMatch';
5
+ export interface SuggestionOptions<I = any, TSelected = any> {
6
+ /**
7
+ * The plugin key for the suggestion plugin.
8
+ * @default 'suggestion'
9
+ * @example 'mention'
10
+ */
11
+ pluginKey?: PluginKey;
12
+ /**
13
+ * The editor instance.
14
+ * @default null
15
+ */
16
+ editor: Editor;
17
+ /**
18
+ * The character that triggers the suggestion.
19
+ * @default '@'
20
+ * @example '#'
21
+ */
22
+ char?: string;
23
+ /**
24
+ * Allow spaces in the suggestion query. Not compatible with `allowToIncludeChar`. Will be disabled if `allowToIncludeChar` is set to `true`.
25
+ * @default false
26
+ * @example true
27
+ */
28
+ allowSpaces?: boolean;
29
+ /**
30
+ * Allow the character to be included in the suggestion query. Not compatible with `allowSpaces`.
31
+ * @default false
32
+ */
33
+ allowToIncludeChar?: boolean;
34
+ /**
35
+ * Allow prefixes in the suggestion query.
36
+ * @default [' ']
37
+ * @example [' ', '@']
38
+ */
39
+ allowedPrefixes?: string[] | null;
40
+ /**
41
+ * Only match suggestions at the start of the line.
42
+ * @default false
43
+ * @example true
44
+ */
45
+ startOfLine?: boolean;
46
+ /**
47
+ * The tag name of the decoration node.
48
+ * @default 'span'
49
+ * @example 'div'
50
+ */
51
+ decorationTag?: string;
52
+ /**
53
+ * The class name of the decoration node.
54
+ * @default 'suggestion'
55
+ * @example 'mention'
56
+ */
57
+ decorationClass?: string;
58
+ /**
59
+ * A function that is called when a suggestion is selected.
60
+ * @param props The props object.
61
+ * @param props.editor The editor instance.
62
+ * @param props.range The range of the suggestion.
63
+ * @param props.props The props of the selected suggestion.
64
+ * @returns void
65
+ * @example ({ editor, range, props }) => { props.command(props.props) }
66
+ */
67
+ command?: (props: {
68
+ editor: Editor;
69
+ range: Range;
70
+ props: TSelected;
71
+ }) => void;
72
+ /**
73
+ * A function that returns the suggestion items in form of an array.
74
+ * @param props The props object.
75
+ * @param props.editor The editor instance.
76
+ * @param props.query The current suggestion query.
77
+ * @returns An array of suggestion items.
78
+ * @example ({ editor, query }) => [{ id: 1, label: 'John Doe' }]
79
+ */
80
+ items?: (props: {
81
+ query: string;
82
+ editor: Editor;
83
+ }) => I[] | Promise<I[]>;
84
+ /**
85
+ * The render function for the suggestion.
86
+ * @returns An object with render functions.
87
+ */
88
+ render?: () => {
89
+ onBeforeStart?: (props: SuggestionProps<I, TSelected>) => void;
90
+ onStart?: (props: SuggestionProps<I, TSelected>) => void;
91
+ onBeforeUpdate?: (props: SuggestionProps<I, TSelected>) => void;
92
+ onUpdate?: (props: SuggestionProps<I, TSelected>) => void;
93
+ onExit?: (props: SuggestionProps<I, TSelected>) => void;
94
+ onKeyDown?: (props: SuggestionKeyDownProps) => boolean;
95
+ };
96
+ /**
97
+ * A function that returns a boolean to indicate if the suggestion should be active.
98
+ * @param props The props object.
99
+ * @returns {boolean}
100
+ */
101
+ allow?: (props: {
102
+ editor: Editor;
103
+ state: EditorState;
104
+ range: Range;
105
+ isActive?: boolean;
106
+ }) => boolean;
107
+ findSuggestionMatch?: typeof defaultFindSuggestionMatch;
108
+ }
109
+ export interface SuggestionProps<I = any, TSelected = any> {
110
+ /**
111
+ * The editor instance.
112
+ */
113
+ editor: Editor;
114
+ /**
115
+ * The range of the suggestion.
116
+ */
117
+ range: Range;
118
+ /**
119
+ * The current suggestion query.
120
+ */
121
+ query: string;
122
+ /**
123
+ * The current suggestion text.
124
+ */
125
+ text: string;
126
+ /**
127
+ * The suggestion items array.
128
+ */
129
+ items: I[];
130
+ /**
131
+ * A function that is called when a suggestion is selected.
132
+ * @param props The props object.
133
+ * @returns void
134
+ */
135
+ command: (props: TSelected) => void;
136
+ /**
137
+ * The decoration node HTML element
138
+ * @default null
139
+ */
140
+ decorationNode: Element | null;
141
+ /**
142
+ * The function that returns the client rect
143
+ * @default null
144
+ * @example () => new DOMRect(0, 0, 0, 0)
145
+ */
146
+ clientRect?: (() => DOMRect | null) | null;
147
+ }
148
+ export interface SuggestionKeyDownProps {
149
+ view: EditorView;
150
+ event: KeyboardEvent;
151
+ range: Range;
152
+ }
153
+ export declare const SuggestionPluginKey: PluginKey<any>;
154
+ /**
155
+ * This utility allows you to create suggestions.
156
+ * @see https://tiptap.dev/api/utilities/suggestion
157
+ */
158
+ export declare function Suggestion<I = any, TSelected = any>({ pluginKey, editor, char, allowSpaces, allowToIncludeChar, allowedPrefixes, startOfLine, decorationTag, decorationClass, command, items, render, allow, findSuggestionMatch, }: SuggestionOptions<I, TSelected>): Plugin<any>;