@kopexa/extension-controlref 1.0.0 → 2.0.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 (126) hide show
  1. package/dist/chunk-4C72VBLP.mjs +52 -0
  2. package/dist/chunk-A7FWOQDN.mjs +210 -0
  3. package/dist/chunk-AQTNFDGA.mjs +57 -0
  4. package/dist/chunk-D53W4HWR.mjs +245 -0
  5. package/dist/chunk-FTEE5U3H.mjs +37 -0
  6. package/dist/chunk-GYDJVHHG.mjs +250 -0
  7. package/dist/chunk-IMHLTRZJ.mjs +29 -0
  8. package/dist/chunk-JM66CQVD.mjs +10 -0
  9. package/dist/chunk-LMKP3DDN.mjs +189 -0
  10. package/dist/chunk-RTBFRPB3.mjs +186 -0
  11. package/dist/chunk-TEDXYIGO.mjs +38 -0
  12. package/dist/chunk-WIS7ZNTO.mjs +4 -0
  13. package/dist/chunk-X46EFFCE.mjs +148 -0
  14. package/dist/chunk-XHD2KFKQ.mjs +16 -0
  15. package/dist/chunk-ZRKYAFRY.mjs +46 -0
  16. package/dist/chunk-ZUR6XKMG.mjs +21 -0
  17. package/dist/components/control-block-view.d.mts +6 -0
  18. package/dist/components/control-block-view.d.ts +6 -0
  19. package/dist/components/control-block-view.js +789 -0
  20. package/dist/components/control-block-view.mjs +11 -0
  21. package/dist/components/control-implementation-view.d.mts +6 -0
  22. package/dist/components/control-implementation-view.d.ts +6 -0
  23. package/dist/components/control-implementation-view.js +52 -0
  24. package/dist/components/control-implementation-view.mjs +7 -0
  25. package/dist/components/control-picker.d.mts +25 -0
  26. package/dist/components/control-picker.d.ts +25 -0
  27. package/dist/components/control-picker.js +522 -0
  28. package/dist/components/control-picker.mjs +10 -0
  29. package/dist/components/control-view.js +677 -122
  30. package/dist/components/control-view.mjs +5 -5
  31. package/dist/components/use-control.d.mts +20 -0
  32. package/dist/components/use-control.d.ts +20 -0
  33. package/dist/components/use-control.js +127 -0
  34. package/dist/components/use-control.mjs +9 -0
  35. package/dist/control-block.d.mts +35 -0
  36. package/dist/control-block.d.ts +35 -0
  37. package/dist/control-block.js +1012 -0
  38. package/dist/control-block.mjs +17 -0
  39. package/dist/control-implementation.d.mts +7 -0
  40. package/dist/control-implementation.d.ts +7 -0
  41. package/dist/control-implementation.js +92 -0
  42. package/dist/control-implementation.mjs +9 -0
  43. package/dist/control.d.mts +31 -1
  44. package/dist/control.d.ts +31 -1
  45. package/dist/control.js +819 -136
  46. package/dist/control.mjs +7 -6
  47. package/dist/defaults.d.mts +3 -9
  48. package/dist/defaults.d.ts +3 -9
  49. package/dist/defaults.js +3 -20
  50. package/dist/defaults.mjs +3 -6
  51. package/dist/index.d.mts +10 -10
  52. package/dist/index.d.ts +10 -10
  53. package/dist/index.js +1229 -569
  54. package/dist/index.mjs +58 -21
  55. package/dist/messages/index.d.mts +135 -0
  56. package/dist/messages/index.d.ts +135 -0
  57. package/dist/messages/index.js +137 -2
  58. package/dist/messages/index.mjs +1 -2
  59. package/dist/role.d.mts +17 -0
  60. package/dist/role.d.ts +17 -0
  61. package/dist/role.js +5 -0
  62. package/dist/role.mjs +2 -0
  63. package/dist/types.d.mts +23 -16
  64. package/dist/types.d.ts +23 -16
  65. package/dist/utils/create-control-block.d.mts +7 -0
  66. package/dist/utils/create-control-block.d.ts +7 -0
  67. package/dist/utils/create-control-block.js +85 -0
  68. package/dist/utils/create-control-block.mjs +10 -0
  69. package/dist/utils/create-control-implementation.d.mts +8 -0
  70. package/dist/utils/create-control-implementation.d.ts +8 -0
  71. package/dist/utils/create-control-implementation.js +39 -0
  72. package/dist/utils/create-control-implementation.mjs +7 -0
  73. package/dist/utils/getControlNodeTypes.d.mts +5 -0
  74. package/dist/utils/getControlNodeTypes.d.ts +5 -0
  75. package/dist/utils/getControlNodeTypes.js +44 -0
  76. package/dist/utils/getControlNodeTypes.mjs +7 -0
  77. package/dist/utils/index.d.mts +7 -2
  78. package/dist/utils/index.d.ts +7 -2
  79. package/dist/utils/index.js +35 -3
  80. package/dist/utils/index.mjs +7 -4
  81. package/dist/utils/status-indicator.d.mts +18 -0
  82. package/dist/utils/status-indicator.d.ts +18 -0
  83. package/dist/utils/status-indicator.js +80 -0
  84. package/dist/utils/status-indicator.mjs +7 -0
  85. package/package.json +9 -9
  86. package/dist/card-variant.d.mts +0 -12
  87. package/dist/card-variant.d.ts +0 -12
  88. package/dist/card-variant.js +0 -66
  89. package/dist/card-variant.mjs +0 -8
  90. package/dist/chunk-AC4KL3WX.mjs +0 -29
  91. package/dist/chunk-AZ5M5MVC.mjs +0 -36
  92. package/dist/chunk-DTFR234X.mjs +0 -244
  93. package/dist/chunk-EDD7DYLE.mjs +0 -29
  94. package/dist/chunk-GC5EBQ7G.mjs +0 -10
  95. package/dist/chunk-H2ECPGOG.mjs +0 -81
  96. package/dist/chunk-KLX7Q3HL.mjs +0 -109
  97. package/dist/chunk-LKRTUIEV.mjs +0 -46
  98. package/dist/chunk-NAJ6IC4Y.mjs +0 -43
  99. package/dist/chunk-QI3ZPZTR.mjs +0 -26
  100. package/dist/chunk-SNRVOTF5.mjs +0 -8
  101. package/dist/chunk-VP5POY44.mjs +0 -57
  102. package/dist/chunk-WIR5FCIC.mjs +0 -110
  103. package/dist/control-ref-view.d.mts +0 -6
  104. package/dist/control-ref-view.d.ts +0 -6
  105. package/dist/control-ref-view.js +0 -615
  106. package/dist/control-ref-view.mjs +0 -15
  107. package/dist/control-ref.d.mts +0 -28
  108. package/dist/control-ref.d.ts +0 -28
  109. package/dist/control-ref.js +0 -687
  110. package/dist/control-ref.mjs +0 -16
  111. package/dist/i18n.d.mts +0 -4
  112. package/dist/i18n.d.ts +0 -4
  113. package/dist/i18n.js +0 -128
  114. package/dist/i18n.mjs +0 -10
  115. package/dist/lang/de.d.mts +0 -24
  116. package/dist/lang/de.d.ts +0 -24
  117. package/dist/lang/de.js +0 -25
  118. package/dist/lang/de.mjs +0 -8
  119. package/dist/lang/en.d.mts +0 -24
  120. package/dist/lang/en.d.ts +0 -24
  121. package/dist/lang/en.js +0 -25
  122. package/dist/lang/en.mjs +0 -8
  123. package/dist/settings-dialog.d.mts +0 -19
  124. package/dist/settings-dialog.d.ts +0 -19
  125. package/dist/settings-dialog.js +0 -371
  126. package/dist/settings-dialog.mjs +0 -9
package/dist/index.mjs CHANGED
@@ -1,44 +1,81 @@
1
1
  "use client";
2
2
  import {
3
- DEFAULT_CONTROL_GQL_API
4
- } from "./chunk-SNRVOTF5.mjs";
3
+ ControlBlock
4
+ } from "./chunk-RTBFRPB3.mjs";
5
+ import "./chunk-FTEE5U3H.mjs";
6
+ import "./chunk-XHD2KFKQ.mjs";
7
+ import "./chunk-ZUR6XKMG.mjs";
5
8
  import {
6
- ControlRef
7
- } from "./chunk-H2ECPGOG.mjs";
8
- import "./chunk-KLX7Q3HL.mjs";
9
- import "./chunk-NAJ6IC4Y.mjs";
9
+ ControlImplementation
10
+ } from "./chunk-ZRKYAFRY.mjs";
11
+ import "./chunk-IMHLTRZJ.mjs";
10
12
  import {
11
13
  Control
12
- } from "./chunk-LKRTUIEV.mjs";
13
- import "./chunk-VP5POY44.mjs";
14
- import "./chunk-QI3ZPZTR.mjs";
15
- import "./chunk-AZ5M5MVC.mjs";
16
- import "./chunk-EDD7DYLE.mjs";
17
- import "./chunk-AC4KL3WX.mjs";
18
- import "./chunk-DTFR234X.mjs";
19
- import "./chunk-WIR5FCIC.mjs";
20
- import "./chunk-GC5EBQ7G.mjs";
14
+ } from "./chunk-X46EFFCE.mjs";
15
+ import "./chunk-TEDXYIGO.mjs";
16
+ import "./chunk-LMKP3DDN.mjs";
17
+ import "./chunk-JM66CQVD.mjs";
18
+ import "./chunk-WIS7ZNTO.mjs";
19
+ import "./chunk-GYDJVHHG.mjs";
20
+ import "./chunk-A7FWOQDN.mjs";
21
+ import "./chunk-4C72VBLP.mjs";
22
+ import "./chunk-AQTNFDGA.mjs";
23
+ import "./chunk-D53W4HWR.mjs";
21
24
 
22
25
  // src/index.ts
23
- import { Extension } from "@tiptap/core";
26
+ import {
27
+ callOrReturn,
28
+ Extension,
29
+ getExtensionField
30
+ } from "@tiptap/core";
24
31
  var ControlKit = Extension.create({
25
32
  name: "controlKit",
26
33
  addOptions() {
27
34
  return {
28
35
  control: {},
29
- url: DEFAULT_CONTROL_GQL_API
36
+ controlBlock: {},
37
+ controlImplementation: {}
30
38
  };
31
39
  },
32
40
  addExtensions() {
33
41
  const extensions = [];
34
42
  if (this.options.control !== false) {
35
- extensions.push(Control.configure(this.options.control));
43
+ extensions.push(
44
+ Control.configure({
45
+ ...this.options.control,
46
+ resolver: this.options.resolver
47
+ })
48
+ );
49
+ }
50
+ if (this.options.controlBlock !== false) {
51
+ extensions.push(
52
+ ControlBlock.configure({
53
+ ...this.options.controlBlock,
54
+ resolver: this.options.resolver
55
+ })
56
+ );
57
+ }
58
+ if (this.options.controlImplementation !== false) {
59
+ extensions.push(
60
+ ControlImplementation.configure(this.options.controlImplementation)
61
+ );
36
62
  }
37
- extensions.push(ControlRef);
38
63
  return extensions;
64
+ },
65
+ extendNodeSchema(extension) {
66
+ const context = {
67
+ name: extension.name,
68
+ options: extension.options,
69
+ storage: extension.storage
70
+ };
71
+ return {
72
+ controlRole: callOrReturn(
73
+ getExtensionField(extension, "controlRole", context)
74
+ )
75
+ };
39
76
  }
40
77
  });
41
78
  export {
42
- ControlKit,
43
- ControlRef
79
+ ControlBlock,
80
+ ControlKit
44
81
  };
@@ -44,6 +44,11 @@ declare const messages: {
44
44
  defaultMessage: string;
45
45
  description: string;
46
46
  };
47
+ variant_hint: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ description: string;
51
+ };
47
52
  variant_chip: {
48
53
  id: string;
49
54
  defaultMessage: string;
@@ -99,6 +104,136 @@ declare const messages: {
99
104
  defaultMessage: string;
100
105
  description: string;
101
106
  };
107
+ unmapped_control: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ description: string;
111
+ };
112
+ control_with_title: {
113
+ id: string;
114
+ defaultMessage: string;
115
+ description: string;
116
+ };
117
+ search_hint: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ description: string;
121
+ };
122
+ no_results: {
123
+ id: string;
124
+ defaultMessage: string;
125
+ description: string;
126
+ };
127
+ results_count: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ description: string;
131
+ };
132
+ updated_at: {
133
+ id: string;
134
+ defaultMessage: string;
135
+ description: string;
136
+ };
137
+ selected: {
138
+ id: string;
139
+ defaultMessage: string;
140
+ description: string;
141
+ };
142
+ no_control_selected: {
143
+ id: string;
144
+ defaultMessage: string;
145
+ description: string;
146
+ };
147
+ clear: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
152
+ unmap: {
153
+ id: string;
154
+ defaultMessage: string;
155
+ description: string;
156
+ };
157
+ live_preview: {
158
+ id: string;
159
+ defaultMessage: string;
160
+ description: string;
161
+ };
162
+ display_options: {
163
+ id: string;
164
+ defaultMessage: string;
165
+ description: string;
166
+ };
167
+ show_status_indicator: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
172
+ searching: {
173
+ id: string;
174
+ defaultMessage: string;
175
+ description: string;
176
+ };
177
+ map_control_aria: {
178
+ id: string;
179
+ defaultMessage: string;
180
+ description: string;
181
+ };
182
+ outdated_badge: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
187
+ missing_badge: {
188
+ id: string;
189
+ defaultMessage: string;
190
+ description: string;
191
+ };
192
+ error_loading: {
193
+ id: string;
194
+ defaultMessage: string;
195
+ description: string;
196
+ };
197
+ error_timeout: {
198
+ id: string;
199
+ defaultMessage: string;
200
+ description: string;
201
+ };
202
+ missing_callout: {
203
+ id: string;
204
+ defaultMessage: string;
205
+ description: string;
206
+ };
207
+ outdated_callout: {
208
+ id: string;
209
+ defaultMessage: string;
210
+ description: string;
211
+ };
212
+ search_placeholder: {
213
+ id: string;
214
+ defaultMessage: string;
215
+ description: string;
216
+ };
217
+ control_implementations: {
218
+ id: string;
219
+ defaultMessage: string;
220
+ description: string;
221
+ };
222
+ header_status: {
223
+ id: string;
224
+ defaultMessage: string;
225
+ description: string;
226
+ };
227
+ header_status_aria: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
232
+ header_status_avv_tip: {
233
+ id: string;
234
+ defaultMessage: string;
235
+ description: string;
236
+ };
102
237
  };
103
238
 
104
239
  export { messages };
@@ -44,6 +44,11 @@ declare const messages: {
44
44
  defaultMessage: string;
45
45
  description: string;
46
46
  };
47
+ variant_hint: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ description: string;
51
+ };
47
52
  variant_chip: {
48
53
  id: string;
49
54
  defaultMessage: string;
@@ -99,6 +104,136 @@ declare const messages: {
99
104
  defaultMessage: string;
100
105
  description: string;
101
106
  };
107
+ unmapped_control: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ description: string;
111
+ };
112
+ control_with_title: {
113
+ id: string;
114
+ defaultMessage: string;
115
+ description: string;
116
+ };
117
+ search_hint: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ description: string;
121
+ };
122
+ no_results: {
123
+ id: string;
124
+ defaultMessage: string;
125
+ description: string;
126
+ };
127
+ results_count: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ description: string;
131
+ };
132
+ updated_at: {
133
+ id: string;
134
+ defaultMessage: string;
135
+ description: string;
136
+ };
137
+ selected: {
138
+ id: string;
139
+ defaultMessage: string;
140
+ description: string;
141
+ };
142
+ no_control_selected: {
143
+ id: string;
144
+ defaultMessage: string;
145
+ description: string;
146
+ };
147
+ clear: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
152
+ unmap: {
153
+ id: string;
154
+ defaultMessage: string;
155
+ description: string;
156
+ };
157
+ live_preview: {
158
+ id: string;
159
+ defaultMessage: string;
160
+ description: string;
161
+ };
162
+ display_options: {
163
+ id: string;
164
+ defaultMessage: string;
165
+ description: string;
166
+ };
167
+ show_status_indicator: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
172
+ searching: {
173
+ id: string;
174
+ defaultMessage: string;
175
+ description: string;
176
+ };
177
+ map_control_aria: {
178
+ id: string;
179
+ defaultMessage: string;
180
+ description: string;
181
+ };
182
+ outdated_badge: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
187
+ missing_badge: {
188
+ id: string;
189
+ defaultMessage: string;
190
+ description: string;
191
+ };
192
+ error_loading: {
193
+ id: string;
194
+ defaultMessage: string;
195
+ description: string;
196
+ };
197
+ error_timeout: {
198
+ id: string;
199
+ defaultMessage: string;
200
+ description: string;
201
+ };
202
+ missing_callout: {
203
+ id: string;
204
+ defaultMessage: string;
205
+ description: string;
206
+ };
207
+ outdated_callout: {
208
+ id: string;
209
+ defaultMessage: string;
210
+ description: string;
211
+ };
212
+ search_placeholder: {
213
+ id: string;
214
+ defaultMessage: string;
215
+ description: string;
216
+ };
217
+ control_implementations: {
218
+ id: string;
219
+ defaultMessage: string;
220
+ description: string;
221
+ };
222
+ header_status: {
223
+ id: string;
224
+ defaultMessage: string;
225
+ description: string;
226
+ };
227
+ header_status_aria: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
232
+ header_status_avv_tip: {
233
+ id: string;
234
+ defaultMessage: string;
235
+ description: string;
236
+ };
102
237
  };
103
238
 
104
239
  export { messages };
@@ -63,14 +63,19 @@ var messages = (0, import_react_intl.defineMessages)({
63
63
  },
64
64
  search_controls: {
65
65
  id: "editor.controlref.search_controls",
66
- defaultMessage: "Search controls...",
66
+ defaultMessage: "Search controls\u2026",
67
67
  description: "Placeholder for search controls input"
68
68
  },
69
69
  variant: {
70
70
  id: "editor.controlref.variant",
71
- defaultMessage: "Variant",
71
+ defaultMessage: "Variante",
72
72
  description: "Label for variant section"
73
73
  },
74
+ variant_hint: {
75
+ id: "editor.controlref.variant_hint",
76
+ defaultMessage: "Choose a visual emphasis for this section.",
77
+ description: "Hint for variant section"
78
+ },
74
79
  variant_chip: {
75
80
  id: "editor.controlref.variant_chip",
76
81
  defaultMessage: "Chip",
@@ -125,6 +130,136 @@ var messages = (0, import_react_intl.defineMessages)({
125
130
  id: "editor.controlref.save_settings",
126
131
  defaultMessage: "Save Settings",
127
132
  description: "Label for save settings button"
133
+ },
134
+ unmapped_control: {
135
+ id: "editor.controlref.unmapped_control",
136
+ defaultMessage: "Unmapped Control",
137
+ description: "Fallback label when no control is selected"
138
+ },
139
+ control_with_title: {
140
+ id: "editor.controlref.control_with_title",
141
+ defaultMessage: "Control: {title}",
142
+ description: "Dialog title with selected control"
143
+ },
144
+ search_hint: {
145
+ id: "editor.controlref.search_hint",
146
+ defaultMessage: "Start typing to search by ID, title or status.",
147
+ description: "Empty search hint"
148
+ },
149
+ no_results: {
150
+ id: "editor.controlref.no_results",
151
+ defaultMessage: "No controls found for \u201C{query}\u201D. You can keep this chip unmapped.",
152
+ description: "Shown when no controls match search query"
153
+ },
154
+ results_count: {
155
+ id: "editor.controlref.results_count",
156
+ defaultMessage: "{count, plural, one {# result} other {# results}}",
157
+ description: "Number of search results"
158
+ },
159
+ updated_at: {
160
+ id: "editor.controlref.updated_at",
161
+ defaultMessage: "Updated {date}",
162
+ description: "Updated date label"
163
+ },
164
+ selected: {
165
+ id: "editor.controlref.selected",
166
+ defaultMessage: "Selected",
167
+ description: "Label for selected item area"
168
+ },
169
+ no_control_selected: {
170
+ id: "editor.controlref.no_control_selected",
171
+ defaultMessage: "No control selected",
172
+ description: "Empty state in selected area"
173
+ },
174
+ clear: {
175
+ id: "editor.controlref.clear",
176
+ defaultMessage: "Clear",
177
+ description: "Clear selection button"
178
+ },
179
+ unmap: {
180
+ id: "editor.controlref.unmap",
181
+ defaultMessage: "Unmap",
182
+ description: "Unmap selection button"
183
+ },
184
+ live_preview: {
185
+ id: "editor.controlref.live_preview",
186
+ defaultMessage: "Live preview",
187
+ description: "Live preview section title"
188
+ },
189
+ display_options: {
190
+ id: "editor.controlref.display_options",
191
+ defaultMessage: "Display options",
192
+ description: "Display options section title"
193
+ },
194
+ show_status_indicator: {
195
+ id: "editor.controlref.show_status_indicator",
196
+ defaultMessage: "Show status indicator",
197
+ description: "Toggle for showing indicator"
198
+ },
199
+ searching: {
200
+ id: "editor.controlref.searching",
201
+ defaultMessage: "Searching\u2026",
202
+ description: "Loading indicator text"
203
+ },
204
+ map_control_aria: {
205
+ id: "editor.controlref.map_control_aria",
206
+ defaultMessage: "Map control",
207
+ description: "ARIA label for mapping control"
208
+ },
209
+ outdated_badge: {
210
+ id: "editor.controlref.outdated_badge",
211
+ defaultMessage: "A newer revision exists",
212
+ description: "Badge for outdated controls"
213
+ },
214
+ missing_badge: {
215
+ id: "editor.controlref.missing_badge",
216
+ defaultMessage: "Control no longer exists",
217
+ description: "Badge for missing controls"
218
+ },
219
+ error_loading: {
220
+ id: "editor.controlref.error_loading",
221
+ defaultMessage: "Failed to load controls",
222
+ description: "Error message when failing to load controls"
223
+ },
224
+ error_timeout: {
225
+ id: "editor.controlref.error_timeout",
226
+ defaultMessage: "The request timed out. Please try again.",
227
+ description: "Error message when the request times out"
228
+ },
229
+ missing_callout: {
230
+ id: "editor.controlref.missing_callout",
231
+ defaultMessage: "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
232
+ description: "Callout message when the selected control is missing"
233
+ },
234
+ outdated_callout: {
235
+ id: "editor.controlref.outdated_callout",
236
+ defaultMessage: "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
237
+ description: "Callout message when the selected control is outdated"
238
+ },
239
+ search_placeholder: {
240
+ id: "editor.controlref.search_placeholder",
241
+ defaultMessage: "e.g. CTRL-001, Asset Inventory\u2026",
242
+ description: "Placeholder for search controls input"
243
+ },
244
+ control_implementations: {
245
+ id: "editor.controlref.control_implementations",
246
+ defaultMessage: "Implementations",
247
+ description: "Label for control implementations section"
248
+ },
249
+ header_status: {
250
+ id: "editor.controlblock.header_status",
251
+ defaultMessage: "Show status in header",
252
+ description: "Label for show status in header toggle"
253
+ },
254
+ header_status_aria: {
255
+ id: "editor.controlblock.header_status_aria",
256
+ defaultMessage: "Toggle status chip in card header",
257
+ description: "ARIA label for show status in header toggle"
258
+ },
259
+ header_status_avv_tip: {
260
+ id: "editor.controlblock.header_status_avv_tip",
261
+ defaultMessage: "If this document is intended for use or export as a data processing agreement (AVV), disable this option unless you explicitly want to publish the current control status.",
262
+ description: "Tooltip for show status in header toggle when used in AVV documents"
128
263
  }
129
264
  });
130
265
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,8 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  messages
4
- } from "../chunk-WIR5FCIC.mjs";
5
- import "../chunk-GC5EBQ7G.mjs";
4
+ } from "../chunk-D53W4HWR.mjs";
6
5
  export {
7
6
  messages
8
7
  };
@@ -0,0 +1,17 @@
1
+ import { ParentConfig } from '@tiptap/core';
2
+
3
+ declare module "@tiptap/core" {
4
+ interface NodeConfig<Options, Storage> {
5
+ /**
6
+ * A string or function to determine the role of the control field.
7
+ * @default 'control'
8
+ * @example () => 'control'
9
+ */
10
+ controlRole?: string | ((this: {
11
+ name: string;
12
+ options: Options;
13
+ storage: Storage;
14
+ parent: ParentConfig<NodeConfig<Options>>["controlRole"];
15
+ }) => string);
16
+ }
17
+ }
package/dist/role.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { ParentConfig } from '@tiptap/core';
2
+
3
+ declare module "@tiptap/core" {
4
+ interface NodeConfig<Options, Storage> {
5
+ /**
6
+ * A string or function to determine the role of the control field.
7
+ * @default 'control'
8
+ * @example () => 'control'
9
+ */
10
+ controlRole?: string | ((this: {
11
+ name: string;
12
+ options: Options;
13
+ storage: Storage;
14
+ parent: ParentConfig<NodeConfig<Options>>["controlRole"];
15
+ }) => string);
16
+ }
17
+ }
package/dist/role.js ADDED
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ // src/role.ts
5
+ var import_core = require("@tiptap/core");
package/dist/role.mjs ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import "./chunk-WIS7ZNTO.mjs";
package/dist/types.d.mts CHANGED
@@ -1,5 +1,27 @@
1
1
  import { CardVariantProps } from '@kopexa/theme';
2
2
 
3
+ type FallbackOptions = Record<string, unknown>;
4
+ type ControlNodeAttrs<T = FallbackOptions> = {
5
+ id: string | null;
6
+ title: string | null;
7
+ updatedAt: string | null;
8
+ status: string | null;
9
+ options: T | null;
10
+ };
11
+ type ControlBlockVariant = "default" | "muted" | "accent";
12
+ type ControlViewOptions = {
13
+ showStatus?: boolean | null;
14
+ variant?: ControlBlockVariant;
15
+ };
16
+ type ControlResolver = {
17
+ /**
18
+ * A method to retrieve a list of controls, potentially filtered by a search term.
19
+ * @param searchTerm - Optional term to filter controls.
20
+ * @returns A promise that resolves to an array of control objects.
21
+ */
22
+ getControls: (searchTerm?: string) => Promise<Array<ControlSummary>>;
23
+ getControl: (id: string) => Promise<ControlSummary | null>;
24
+ };
3
25
  type ControlSummary = {
4
26
  id: string | null;
5
27
  title: string | null;
@@ -14,24 +36,9 @@ type ControlImplementationRef = {
14
36
  updatedAt?: string | null;
15
37
  status?: string | null;
16
38
  };
17
- type Variant = "chip" | "card";
18
39
  type CardBorder = CardVariantProps["border"];
19
40
  type CardShadow = CardVariantProps["shadow"];
20
41
  type CardRadius = CardVariantProps["radius"];
21
42
  type CardSpacing = CardVariantProps["spacing"];
22
- type ControlRefOptions = {
23
- variant: Variant;
24
- inlineShowStatus: boolean;
25
- cardShowDescription: boolean;
26
- cardShowImplementations: boolean;
27
- cardBorder: CardBorder;
28
- cardShadow: CardShadow;
29
- cardRadius: CardRadius;
30
- cardSpacing: CardSpacing;
31
- };
32
- type Getters = {
33
- search: (q: string) => Promise<ControlSummary[]>;
34
- getById: (id: string) => Promise<ControlSummary | null>;
35
- };
36
43
 
37
- export type { CardBorder, CardRadius, CardShadow, CardSpacing, ControlImplementationRef, ControlRefOptions, ControlSummary, Getters, Variant };
44
+ export type { CardBorder, CardRadius, CardShadow, CardSpacing, ControlBlockVariant, ControlImplementationRef, ControlNodeAttrs, ControlResolver, ControlSummary, ControlViewOptions };