@tutti-os/ui-rich-text 0.0.105 → 0.0.107
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.
- package/README.md +23 -23
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -92,15 +92,15 @@ interface RichTextTriggerProvider<TItem = unknown> {
|
|
|
92
92
|
trigger: RichTextTrigger;
|
|
93
93
|
boundary?: RichTextTriggerBoundary;
|
|
94
94
|
query: (
|
|
95
|
-
input: RichTextTriggerQueryInput
|
|
95
|
+
input: RichTextTriggerQueryInput
|
|
96
96
|
) => Promise<readonly TItem[]> | readonly TItem[];
|
|
97
97
|
queryGroups?: (
|
|
98
|
-
input: RichTextTriggerQueryInput
|
|
98
|
+
input: RichTextTriggerQueryInput
|
|
99
99
|
) =>
|
|
100
100
|
| Promise<RichTextTriggerGroupedQueryResult<TItem>>
|
|
101
101
|
| RichTextTriggerGroupedQueryResult<TItem>;
|
|
102
102
|
queryGroupPage?: (
|
|
103
|
-
input: RichTextTriggerGroupPageQueryInput
|
|
103
|
+
input: RichTextTriggerGroupPageQueryInput
|
|
104
104
|
) =>
|
|
105
105
|
| Promise<RichTextTriggerQueryGroup<TItem>>
|
|
106
106
|
| RichTextTriggerQueryGroup<TItem>;
|
|
@@ -108,12 +108,12 @@ interface RichTextTriggerProvider<TItem = unknown> {
|
|
|
108
108
|
getItemLabel: (item: TItem) => string;
|
|
109
109
|
getItemSubtitle?: (item: TItem) => string | null | undefined;
|
|
110
110
|
getItemIconUrl?: (
|
|
111
|
-
item: TItem
|
|
111
|
+
item: TItem
|
|
112
112
|
) => string | null | undefined | Promise<string | null | undefined>;
|
|
113
113
|
getItemKeywords?: (item: TItem) => readonly string[] | undefined;
|
|
114
114
|
toInsertResult: (item: TItem) => RichTextTriggerInsertResult;
|
|
115
115
|
resolveMention?: (
|
|
116
|
-
identity: RichTextMentionIdentity
|
|
116
|
+
identity: RichTextMentionIdentity
|
|
117
117
|
) => Promise<RichTextMentionResolved | null> | RichTextMentionResolved | null;
|
|
118
118
|
}
|
|
119
119
|
```
|
|
@@ -199,7 +199,7 @@ import { createTuttiExternalAtRichTextTriggerProviders } from "@tutti-os/workspa
|
|
|
199
199
|
|
|
200
200
|
const providers = createTuttiExternalAtRichTextTriggerProviders({
|
|
201
201
|
bridge: window.tuttiExternal,
|
|
202
|
-
providerIds: ["workspace-app", "agent-session"]
|
|
202
|
+
providerIds: ["workspace-app", "agent-session"]
|
|
203
203
|
});
|
|
204
204
|
```
|
|
205
205
|
|
|
@@ -238,10 +238,10 @@ Minimum integration checklist:
|
|
|
238
238
|
mention: {
|
|
239
239
|
entityId: record.id,
|
|
240
240
|
label: record.title,
|
|
241
|
-
scope: { ownerId: record.ownerId }
|
|
242
|
-
}
|
|
243
|
-
})
|
|
244
|
-
}
|
|
241
|
+
scope: { ownerId: record.ownerId }
|
|
242
|
+
}
|
|
243
|
+
})
|
|
244
|
+
}
|
|
245
245
|
];
|
|
246
246
|
```
|
|
247
247
|
|
|
@@ -268,20 +268,20 @@ Minimum integration checklist:
|
|
|
268
268
|
{
|
|
269
269
|
id: "recent",
|
|
270
270
|
label: t("mentions.recent"),
|
|
271
|
-
matches: (match) => match.item.bucket === "recent"
|
|
271
|
+
matches: (match) => match.item.bucket === "recent"
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
id: "all",
|
|
275
275
|
label: t("mentions.all"),
|
|
276
|
-
matches: (match) => match.item.bucket !== "recent"
|
|
277
|
-
}
|
|
278
|
-
]
|
|
276
|
+
matches: (match) => match.item.bucket !== "recent"
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
id: "secondary",
|
|
282
282
|
label: t("mentions.secondary"),
|
|
283
|
-
providerIds: ["secondary-record"]
|
|
284
|
-
}
|
|
283
|
+
providerIds: ["secondary-record"]
|
|
284
|
+
}
|
|
285
285
|
];
|
|
286
286
|
```
|
|
287
287
|
|
|
@@ -292,7 +292,7 @@ Minimum integration checklist:
|
|
|
292
292
|
MentionPaletteFromState,
|
|
293
293
|
buildMentionPaletteModelFromTriggerMatches,
|
|
294
294
|
renderMentionRow,
|
|
295
|
-
richTextTriggerQueryMatchToMentionRowItem
|
|
295
|
+
richTextTriggerQueryMatchToMentionRowItem
|
|
296
296
|
} from "@tutti-os/ui-rich-text/at-panel";
|
|
297
297
|
|
|
298
298
|
const state = buildMentionPaletteModelFromTriggerMatches({
|
|
@@ -300,7 +300,7 @@ Minimum integration checklist:
|
|
|
300
300
|
categories,
|
|
301
301
|
matches,
|
|
302
302
|
loading,
|
|
303
|
-
query
|
|
303
|
+
query
|
|
304
304
|
});
|
|
305
305
|
|
|
306
306
|
<MentionPaletteFromState
|
|
@@ -310,23 +310,23 @@ Minimum integration checklist:
|
|
|
310
310
|
callbacks={{
|
|
311
311
|
onActiveCategoryIdChange: setActiveCategoryId,
|
|
312
312
|
onHighlightChange: setHighlightedKey,
|
|
313
|
-
onSelectItem: commitMatch
|
|
313
|
+
onSelectItem: commitMatch
|
|
314
314
|
}}
|
|
315
315
|
labels={{
|
|
316
316
|
empty: t("mentions.empty"),
|
|
317
|
-
loading: t("mentions.loading")
|
|
317
|
+
loading: t("mentions.loading")
|
|
318
318
|
}}
|
|
319
319
|
hintLabels={{
|
|
320
320
|
cycleFilter: t("mentions.switchCategory"),
|
|
321
|
-
moveSelection: t("mentions.switchSelection")
|
|
321
|
+
moveSelection: t("mentions.switchSelection")
|
|
322
322
|
}}
|
|
323
323
|
maxHeightPx={360}
|
|
324
324
|
renderItem={(match) =>
|
|
325
325
|
renderMentionRow(
|
|
326
326
|
richTextTriggerQueryMatchToMentionRowItem(match, {
|
|
327
327
|
getDescription: (candidate) => candidate.subtitle,
|
|
328
|
-
renderLeading: (ctx) => renderAppSpecificLeading(ctx)
|
|
329
|
-
})
|
|
328
|
+
renderLeading: (ctx) => renderAppSpecificLeading(ctx)
|
|
329
|
+
})
|
|
330
330
|
)
|
|
331
331
|
}
|
|
332
332
|
/>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tutti-os/ui-rich-text",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.107",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"directory": "packages/ui/rich-text"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@tutti-os/ui-i18n-runtime": "0.0.
|
|
56
|
-
"@tutti-os/ui-system": "0.0.
|
|
55
|
+
"@tutti-os/ui-i18n-runtime": "0.0.107",
|
|
56
|
+
"@tutti-os/ui-system": "0.0.107",
|
|
57
57
|
"@tiptap/core": "^3.23.6",
|
|
58
58
|
"@tiptap/extension-document": "^3.23.6",
|
|
59
59
|
"@tiptap/extension-hard-break": "^3.23.6",
|