@astryxdesign/lab 0.7.5-canary.f2dafed → 0.7.5-canary.f48ad2a
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/blocks/CommentPinShowcase.doc.mjs +1 -1
- package/blocks/CommentPinShowcase.tsx +2 -3
- package/dist/Chart/Chart.d.ts +1 -1
- package/dist/Chart/ChartContext.d.ts +1 -1
- package/dist/Chart/index.d.ts +28 -28
- package/dist/Chart/useChartColors.d.ts +1 -1
- package/dist/Chart/useChartRange.d.ts +1 -1
- package/dist/Chart/utils.d.ts +1 -1
- package/dist/Chat/ChatReactionBar.d.ts +1 -1
- package/dist/Chat/ChatUnreadDivider.js +1 -1
- package/dist/Chat/index.d.ts +8 -8
- package/dist/CircularProgress/CircularProgress.js +3 -3
- package/dist/CircularProgress/index.d.ts +2 -2
- package/dist/CodeEditor/index.d.ts +2 -2
- package/dist/CommentPin/CommentPin.d.ts +22 -7
- package/dist/CommentPin/CommentPin.d.ts.map +1 -1
- package/dist/CommentPin/CommentPin.js +115 -38
- package/dist/CommentPin/index.d.ts +2 -2
- package/dist/Comments/CommentActions.d.ts +2 -2
- package/dist/Comments/CommentComposer.d.ts +1 -1
- package/dist/Comments/CommentMarkdown.d.ts +1 -1
- package/dist/Comments/CommentParts.d.ts +2 -2
- package/dist/Comments/CommentRow.d.ts +1 -1
- package/dist/Comments/CommentThread.d.ts +1 -1
- package/dist/Comments/Comments.d.ts +1 -1
- package/dist/Comments/CommentsContext.d.ts +2 -2
- package/dist/Comments/i18n.d.ts +1 -1
- package/dist/Comments/icons.d.ts.map +1 -1
- package/dist/Comments/icons.js +9 -2
- package/dist/Comments/index.d.ts +9 -9
- package/dist/Comments/useCommentThreadDismissal.d.ts +1 -1
- package/dist/Comments/utils.d.ts +1 -1
- package/dist/DiffViewer/DiffViewer.d.ts +16 -5
- package/dist/DiffViewer/DiffViewer.d.ts.map +1 -1
- package/dist/DiffViewer/DiffViewer.js +31 -6
- package/dist/DiffViewer/createDiffFile.d.ts +1 -1
- package/dist/DiffViewer/index.d.ts +6 -6
- package/dist/DiffViewer/parseUnifiedDiff.d.ts +1 -1
- package/dist/EmojiPicker/EmojiPicker.js +5 -8
- package/dist/EmojiPicker/index.d.ts +2 -2
- package/dist/InfoTip/index.d.ts +2 -2
- package/dist/ListInput/ListInput.d.ts.map +1 -1
- package/dist/ListInput/ListInput.js +19 -0
- package/dist/ListInput/index.d.ts +2 -2
- package/dist/LogStream/LogStream.d.ts.map +1 -1
- package/dist/LogStream/LogStream.js +2 -2
- package/dist/LogStream/index.d.ts +2 -2
- package/dist/MobilePowerSearch/MobilePowerSearch.d.ts +41 -13
- package/dist/MobilePowerSearch/MobilePowerSearch.d.ts.map +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearch.js +814 -426
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts +2 -3
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts.map +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.js +14 -33
- package/dist/MobilePowerSearch/index.d.ts +2 -2
- package/dist/MobilePowerSearch/mobilePowerSearchUtils.d.ts +23 -1
- package/dist/MobilePowerSearch/mobilePowerSearchUtils.d.ts.map +1 -1
- package/dist/MobilePowerSearch/mobilePowerSearchUtils.js +62 -2
- package/dist/MobileTokenizer/MobileTokenizer.d.ts +35 -10
- package/dist/MobileTokenizer/MobileTokenizer.d.ts.map +1 -1
- package/dist/MobileTokenizer/MobileTokenizer.js +688 -299
- package/dist/MobileTokenizer/index.d.ts +2 -2
- package/dist/Radial/RadialContext.d.ts +1 -1
- package/dist/Radial/index.d.ts +8 -8
- package/dist/SVGIcon/SVGIcon.js +3 -3
- package/dist/SVGIcon/icons.d.ts +1 -1
- package/dist/SVGIcon/index.d.ts +8 -8
- package/dist/SVGIcon/xif-examples.d.ts +1 -1
- package/dist/Sankey/SankeyChart.d.ts +1 -1
- package/dist/Sankey/SankeyContext.d.ts +1 -1
- package/dist/Sankey/index.d.ts +7 -7
- package/dist/Sankey/layout.d.ts +1 -1
- package/dist/Schedule/CalendarEvent.d.ts +1 -1
- package/dist/Schedule/DayView.d.ts +1 -1
- package/dist/Schedule/ListView.d.ts +1 -1
- package/dist/Schedule/MonthlyView.d.ts +1 -1
- package/dist/Schedule/Schedule.d.ts +1 -1
- package/dist/Schedule/TimeGridView.d.ts +1 -1
- package/dist/Schedule/WeeklyView.d.ts +1 -1
- package/dist/Schedule/context.d.ts +1 -1
- package/dist/Schedule/dateMath.d.ts +2 -2
- package/dist/Schedule/index.d.ts +12 -12
- package/dist/Schedule/monthLayout.d.ts +1 -1
- package/dist/Schedule/plugins/PaginationPlugin.d.ts +1 -1
- package/dist/Schedule/plugins/ViewSelectorPlugin.d.ts +1 -1
- package/dist/Schedule/plugins/index.d.ts +3 -3
- package/dist/Schedule/shared.d.ts +1 -1
- package/dist/Schedule/timeGridScrollMemory.d.ts +1 -1
- package/dist/Schedule/types.d.ts +4 -4
- package/dist/Schedule/useCurrentTime.d.ts +1 -1
- package/dist/Schedule/zonedDateTime.d.ts +1 -1
- package/dist/Stat/Stat.js +2 -2
- package/dist/Stat/index.d.ts +2 -2
- package/dist/ThreeD/ThreeDContext.d.ts +1 -1
- package/dist/ThreeD/index.d.ts +9 -9
- package/dist/Tour/Tour.d.ts +1 -1
- package/dist/Tour/index.d.ts +7 -7
- package/dist/Tour/useTour.d.ts +1 -1
- package/dist/TransferList/TransferList.d.ts.map +1 -1
- package/dist/TransferList/TransferList.js +20 -0
- package/dist/TransferList/TransferListSelector.d.ts +1 -1
- package/dist/TransferList/index.d.ts +3 -3
- package/dist/index.d.ts +23 -23
- package/dist/lab.css +30 -22
- package/dist/reorderStyles.d.ts +2 -2
- package/dist/reorderStyles.d.ts.map +1 -1
- package/dist/reorderStyles.js +2 -2
- package/package.json +8 -8
- package/src/Chat/ChatUnreadDivider.tsx +1 -1
- package/src/Chat/__tests__/ChatTypingIndicator.a11y.chromium.spec.ts +1 -0
- package/src/CircularProgress/CircularProgress.tsx +3 -3
- package/src/CircularProgress/__tests__/CircularProgress.a11y.chromium.spec.ts +1 -0
- package/src/CommentPin/CommentPin.doc.mjs +82 -34
- package/src/CommentPin/CommentPin.spec.md +92 -81
- package/src/CommentPin/CommentPin.test.tsx +98 -19
- package/src/CommentPin/CommentPin.tsx +146 -82
- package/src/Comments/Comments.test.tsx +10 -4
- package/src/Comments/icons.test.tsx +76 -0
- package/src/Comments/icons.tsx +9 -2
- package/src/DiffViewer/DiffViewer.doc.mjs +8 -2
- package/src/DiffViewer/DiffViewer.test.tsx +71 -0
- package/src/DiffViewer/DiffViewer.tsx +52 -9
- package/src/EmojiPicker/EmojiPicker.test.tsx +21 -0
- package/src/EmojiPicker/EmojiPicker.tsx +8 -8
- package/src/InfoTip/InfoTip.test.tsx +9 -4
- package/src/ListInput/ListInput.test.tsx +43 -3
- package/src/ListInput/ListInput.tsx +23 -0
- package/src/LogStream/LogStream.doc.mjs +1 -1
- package/src/LogStream/LogStream.tsx +3 -5
- package/src/MobilePowerSearch/MobilePowerSearch.doc.mjs +4 -4
- package/src/MobilePowerSearch/MobilePowerSearch.test.tsx +991 -46
- package/src/MobilePowerSearch/MobilePowerSearch.tsx +995 -496
- package/src/MobilePowerSearch/MobilePowerSearchValueEditor.tsx +13 -37
- package/src/MobilePowerSearch/mobilePowerSearchUtils.ts +68 -1
- package/src/MobileTokenizer/MobileTokenizer.doc.mjs +8 -4
- package/src/MobileTokenizer/MobileTokenizer.test.tsx +543 -3
- package/src/MobileTokenizer/MobileTokenizer.tsx +859 -339
- package/src/SVGIcon/SVGIcon.tsx +3 -3
- package/src/Stat/Stat.tsx +2 -2
- package/src/TransferList/TransferList.composition.test.tsx +4 -4
- package/src/TransferList/TransferList.test.tsx +36 -0
- package/src/TransferList/TransferList.tsx +24 -0
- package/src/TransferList/TransferListSelector.test.tsx +4 -4
- package/src/__tests__/ReorderGripPinchZoom.a11y.chromium.spec.ts +178 -0
- package/src/reorderStyles.ts +7 -2
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: 'Avatar-first annotations',
|
|
7
7
|
displayName: 'Avatar-first annotations',
|
|
8
8
|
description:
|
|
9
|
-
'Caller-positioned comment pins over media and in a content margin. Every coordinate maps to the pin’s logical bottom-start corner. The selected group caps its participants at three circles (two Avatars plus
|
|
9
|
+
'Caller-positioned comment pins over media and in a content margin. Every coordinate maps to the pin’s logical bottom-start corner. The selected group caps its participants at three circles (two Avatars plus an ellipsis) and ends with its total and an accent unread dot; the unread margin pin shows the dot too. Other pins dim without becoming disabled, activating the selected pin again clears the selection, and no pin dims while nothing is selected.',
|
|
10
10
|
exampleFor: 'CommentPin',
|
|
11
11
|
isReady: true,
|
|
12
12
|
isShowcase: true,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* participant/thread/unread counts, and controlled selected/dimmed state
|
|
8
8
|
* that may be empty
|
|
9
9
|
* @output A grouped pin with a three-circle participant cap and an unread
|
|
10
|
-
*
|
|
10
|
+
* dot, a single pin, and an unread margin pin; activating the selected
|
|
11
11
|
* pin clears the selection, and non-selected pins dim only while another pin
|
|
12
12
|
* is selected
|
|
13
13
|
* @position CommentPin docsite showcase and copyable Lab block
|
|
@@ -160,9 +160,8 @@ export default function CommentPinShowcase() {
|
|
|
160
160
|
xstyle={styles.groupedMarker}
|
|
161
161
|
/>
|
|
162
162
|
<CommentPin
|
|
163
|
-
label="Open
|
|
163
|
+
label="Open annotation from Mira"
|
|
164
164
|
participants={[PEOPLE.mira]}
|
|
165
|
-
isResolved
|
|
166
165
|
isSelected={selected === 'resolved'}
|
|
167
166
|
isDimmed={selected != null && selected !== 'resolved'}
|
|
168
167
|
onClick={() => toggle('resolved')}
|
package/dist/Chart/Chart.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* hidden data table so screen reader users can read the underlying values.
|
|
12
12
|
*/
|
|
13
13
|
import { type ReactNode } from 'react';
|
|
14
|
-
import type { ChartMargin } from './types';
|
|
14
|
+
import type { ChartMargin } from './types.js';
|
|
15
15
|
/**
|
|
16
16
|
* Controls how the y-axis domain is computed:
|
|
17
17
|
* - `'auto'` — includes 0 when all values are positive (default, bar-friendly)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartContext } from './types';
|
|
1
|
+
import type { ChartContext } from './types.js';
|
|
2
2
|
export declare const ChartProvider: import("react").Provider<ChartContext | null>;
|
|
3
3
|
/** Access the chart context. Throws if used outside <Chart>. */
|
|
4
4
|
export declare function useChart(): ChartContext;
|
package/dist/Chart/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export { Chart, type ChartProps, type YBaseline } from './Chart';
|
|
2
|
-
export { ChartAxis, type ChartAxisProps } from './ChartAxis';
|
|
3
|
-
export { compactNumber, currency, percent, shortDate, monthYear, } from './formatters';
|
|
4
|
-
export { ChartGrid, type ChartGridProps } from './ChartGrid';
|
|
5
|
-
export { ChartBar, type ChartBarProps } from './ChartBar';
|
|
6
|
-
export { ChartLine, type ChartLineProps } from './ChartLine';
|
|
7
|
-
export { ChartArea, type ChartAreaProps } from './ChartArea';
|
|
8
|
-
export { ChartErrorBar, type ChartErrorBarProps } from './ChartErrorBar';
|
|
9
|
-
export { ChartCandlestick, type ChartCandlestickProps, } from './ChartCandlestick';
|
|
10
|
-
export { ChartDot, type ChartDotProps } from './ChartDot';
|
|
11
|
-
export { ChartDotGL, type ChartDotGLProps } from './ChartDotGL';
|
|
12
|
-
export { ChartDotGLInteractive, type ChartDotGLInteractiveProps, } from './ChartDotGLInteractive';
|
|
13
|
-
export { ChartHeatmapGL, type ChartHeatmapGLProps, } from './ChartHeatmapGL';
|
|
14
|
-
export { ChartStreamGL, type ChartStreamGLProps, type ChartStreamGLHandle, } from './ChartStreamGL';
|
|
15
|
-
export { ChartTooltip, type ChartTooltipProps, type ChartCrosshairMode, } from './ChartTooltip';
|
|
16
|
-
export { ChartLegend, type ChartLegendProps, type ChartLegendItem, } from './ChartLegend';
|
|
17
|
-
export { useChart } from './ChartContext';
|
|
18
|
-
export type { ChartContext, ChartMargin, ChartScale, DataPoint } from './types';
|
|
19
|
-
export { m4Reduce, type M4Point } from './m4';
|
|
20
|
-
export { isBandScale, xPixel } from './utils';
|
|
21
|
-
export { useChartColors } from './useChartColors';
|
|
22
|
-
export { getChartColors, getChartColorsFromResolver, type ChartColorsAPI, type SequentialHue, type TokenResolver, } from './getChartColors';
|
|
23
|
-
export { useChartRange, type UseChartRangeOptions, type UseChartRangeReturn, } from './useChartRange';
|
|
24
|
-
export { hexToGL, getCanvasDPR, getWebGLContext, setupGLState, sizeCanvas, mountCanvasOverSVG, compileShader, CIRCLE_FRAG_BODY, POINT_SIZE_COMPENSATION, } from './webgl';
|
|
25
|
-
export { ChartBrush, type ChartBrushProps, type BrushMode, type BrushRange, } from './ChartBrush';
|
|
26
|
-
export { ChartZoom, type ChartZoomProps, type ZoomToolbarPosition, } from './ChartZoom';
|
|
27
|
-
export { ChartSelect, type ChartSelectProps } from './ChartSelect';
|
|
28
|
-
export { ChartReferenceLine, type ChartReferenceLineProps, } from './ChartReferenceLine';
|
|
1
|
+
export { Chart, type ChartProps, type YBaseline } from './Chart.js';
|
|
2
|
+
export { ChartAxis, type ChartAxisProps } from './ChartAxis.js';
|
|
3
|
+
export { compactNumber, currency, percent, shortDate, monthYear, } from './formatters.js';
|
|
4
|
+
export { ChartGrid, type ChartGridProps } from './ChartGrid.js';
|
|
5
|
+
export { ChartBar, type ChartBarProps } from './ChartBar.js';
|
|
6
|
+
export { ChartLine, type ChartLineProps } from './ChartLine.js';
|
|
7
|
+
export { ChartArea, type ChartAreaProps } from './ChartArea.js';
|
|
8
|
+
export { ChartErrorBar, type ChartErrorBarProps } from './ChartErrorBar.js';
|
|
9
|
+
export { ChartCandlestick, type ChartCandlestickProps, } from './ChartCandlestick.js';
|
|
10
|
+
export { ChartDot, type ChartDotProps } from './ChartDot.js';
|
|
11
|
+
export { ChartDotGL, type ChartDotGLProps } from './ChartDotGL.js';
|
|
12
|
+
export { ChartDotGLInteractive, type ChartDotGLInteractiveProps, } from './ChartDotGLInteractive.js';
|
|
13
|
+
export { ChartHeatmapGL, type ChartHeatmapGLProps, } from './ChartHeatmapGL.js';
|
|
14
|
+
export { ChartStreamGL, type ChartStreamGLProps, type ChartStreamGLHandle, } from './ChartStreamGL.js';
|
|
15
|
+
export { ChartTooltip, type ChartTooltipProps, type ChartCrosshairMode, } from './ChartTooltip.js';
|
|
16
|
+
export { ChartLegend, type ChartLegendProps, type ChartLegendItem, } from './ChartLegend.js';
|
|
17
|
+
export { useChart } from './ChartContext.js';
|
|
18
|
+
export type { ChartContext, ChartMargin, ChartScale, DataPoint } from './types.js';
|
|
19
|
+
export { m4Reduce, type M4Point } from './m4.js';
|
|
20
|
+
export { isBandScale, xPixel } from './utils.js';
|
|
21
|
+
export { useChartColors } from './useChartColors.js';
|
|
22
|
+
export { getChartColors, getChartColorsFromResolver, type ChartColorsAPI, type SequentialHue, type TokenResolver, } from './getChartColors.js';
|
|
23
|
+
export { useChartRange, type UseChartRangeOptions, type UseChartRangeReturn, } from './useChartRange.js';
|
|
24
|
+
export { hexToGL, getCanvasDPR, getWebGLContext, setupGLState, sizeCanvas, mountCanvasOverSVG, compileShader, CIRCLE_FRAG_BODY, POINT_SIZE_COMPENSATION, } from './webgl.js';
|
|
25
|
+
export { ChartBrush, type ChartBrushProps, type BrushMode, type BrushRange, } from './ChartBrush.js';
|
|
26
|
+
export { ChartZoom, type ChartZoomProps, type ZoomToolbarPosition, } from './ChartZoom.js';
|
|
27
|
+
export { ChartSelect, type ChartSelectProps } from './ChartSelect.js';
|
|
28
|
+
export { ChartReferenceLine, type ChartReferenceLineProps, } from './ChartReferenceLine.js';
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/Chart/utils.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @position Internal helpers; consumed by mark, axis, and interaction components
|
|
5
5
|
*/
|
|
6
6
|
import type { ScaleBand } from 'd3-scale';
|
|
7
|
-
import type { ChartScale } from './types';
|
|
7
|
+
import type { ChartScale } from './types.js';
|
|
8
8
|
/** Type guard for d3 band scales */
|
|
9
9
|
export declare function isBandScale(scale: ChartScale): scale is ScaleBand<string>;
|
|
10
10
|
/**
|
package/dist/Chat/index.d.ts
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* @output Exports lab chat components and related types
|
|
5
5
|
* @position Lab Chat entry point; re-exported by packages/lab/src/index.ts
|
|
6
6
|
*/
|
|
7
|
-
export { ChatReactionBar } from './ChatReactionBar';
|
|
8
|
-
export type { ChatReactionBarProps, ChatReaction } from './ChatReactionBar';
|
|
9
|
-
export { ChatEmojiPicker, DEFAULT_CHAT_EMOJIS } from './ChatEmojiPicker';
|
|
10
|
-
export type { ChatEmojiPickerProps, ChatEmojiOption } from './ChatEmojiPicker';
|
|
11
|
-
export { ChatUnreadDivider } from './ChatUnreadDivider';
|
|
12
|
-
export type { ChatUnreadDividerProps } from './ChatUnreadDivider';
|
|
13
|
-
export { ChatTypingIndicator } from './ChatTypingIndicator';
|
|
14
|
-
export type { ChatTypingIndicatorProps } from './ChatTypingIndicator';
|
|
7
|
+
export { ChatReactionBar } from './ChatReactionBar.js';
|
|
8
|
+
export type { ChatReactionBarProps, ChatReaction } from './ChatReactionBar.js';
|
|
9
|
+
export { ChatEmojiPicker, DEFAULT_CHAT_EMOJIS } from './ChatEmojiPicker.js';
|
|
10
|
+
export type { ChatEmojiPickerProps, ChatEmojiOption } from './ChatEmojiPicker.js';
|
|
11
|
+
export { ChatUnreadDivider } from './ChatUnreadDivider.js';
|
|
12
|
+
export type { ChatUnreadDividerProps } from './ChatUnreadDivider.js';
|
|
13
|
+
export { ChatTypingIndicator } from './ChatTypingIndicator.js';
|
|
14
|
+
export type { ChatTypingIndicatorProps } from './ChatTypingIndicator.js';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -106,15 +106,15 @@ const variantStyles = {
|
|
|
106
106
|
$$css: true
|
|
107
107
|
},
|
|
108
108
|
success: {
|
|
109
|
-
kjVXCG: "
|
|
109
|
+
kjVXCG: "x88o7k4",
|
|
110
110
|
$$css: true
|
|
111
111
|
},
|
|
112
112
|
warning: {
|
|
113
|
-
kjVXCG: "
|
|
113
|
+
kjVXCG: "x16d96h5",
|
|
114
114
|
$$css: true
|
|
115
115
|
},
|
|
116
116
|
error: {
|
|
117
|
-
kjVXCG: "
|
|
117
|
+
kjVXCG: "xqb94c9",
|
|
118
118
|
$$css: true
|
|
119
119
|
},
|
|
120
120
|
neutral: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file CircularProgress component barrel export
|
|
3
3
|
*/
|
|
4
|
-
export { CircularProgress } from './CircularProgress';
|
|
5
|
-
export type { CircularProgressProps, CircularProgressSize, CircularProgressVariant, CircularProgressVariantMap, } from './CircularProgress';
|
|
4
|
+
export { CircularProgress } from './CircularProgress.js';
|
|
5
|
+
export type { CircularProgressProps, CircularProgressSize, CircularProgressVariant, CircularProgressVariantMap, } from './CircularProgress.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file CodeEditor component barrel export
|
|
3
3
|
*/
|
|
4
|
-
export { CodeEditor } from './CodeEditor';
|
|
5
|
-
export type { CodeEditorProps } from './CodeEditor';
|
|
4
|
+
export { CodeEditor } from './CodeEditor.js';
|
|
5
|
+
export type { CodeEditorProps } from './CodeEditor.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { BaseProps } from '@astryxdesign/core';
|
|
2
|
+
/** Pin heights on the shared element-size scale: 28, 32, or 36px. */
|
|
3
|
+
export type CommentPinSize = 'sm' | 'md' | 'lg';
|
|
2
4
|
/** Identity data for one representative shown inside a CommentPin. */
|
|
3
5
|
export interface CommentPinParticipant {
|
|
4
6
|
/** Stable identity used to remove duplicate representatives. */
|
|
@@ -21,10 +23,17 @@ export interface CommentPinProps extends Omit<BaseProps<HTMLButtonElement>, 'chi
|
|
|
21
23
|
* Ordered participants, lead first. A single marker shows the first. A
|
|
22
24
|
* grouped marker shows distinct IDs as an AvatarGroup of at most three
|
|
23
25
|
* circles: every participant when three or fewer are distinct, otherwise the
|
|
24
|
-
* first two plus
|
|
25
|
-
* the overflow
|
|
26
|
+
* first two plus an ellipsis overflow circle. Pass every distinct
|
|
27
|
+
* participant so the overflow appears only when more than three people
|
|
28
|
+
* participate.
|
|
26
29
|
*/
|
|
27
30
|
participants: readonly [CommentPinParticipant, ...CommentPinParticipant[]];
|
|
31
|
+
/**
|
|
32
|
+
* Pin height on the element-size scale: `sm` 28px, `md` 32px, `lg` 36px,
|
|
33
|
+
* with 22px, 24px, and 28px participant circles.
|
|
34
|
+
* @default 'sm'
|
|
35
|
+
*/
|
|
36
|
+
size?: CommentPinSize;
|
|
28
37
|
/**
|
|
29
38
|
* Total number of threads represented by this marker. Values above one use
|
|
30
39
|
* the grouped presentation and show the exact total.
|
|
@@ -33,8 +42,9 @@ export interface CommentPinProps extends Omit<BaseProps<HTMLButtonElement>, 'chi
|
|
|
33
42
|
threadCount?: number;
|
|
34
43
|
/**
|
|
35
44
|
* Number of represented threads with unread activity. When above zero, an
|
|
36
|
-
* accent
|
|
37
|
-
*
|
|
45
|
+
* accent status dot appears at the end of the pin: after the thread total,
|
|
46
|
+
* or after the participant on a single pin. Values above `threadCount` are
|
|
47
|
+
* capped.
|
|
38
48
|
* @default 0
|
|
39
49
|
*/
|
|
40
50
|
unreadCount?: number;
|
|
@@ -45,7 +55,11 @@ export interface CommentPinProps extends Omit<BaseProps<HTMLButtonElement>, 'chi
|
|
|
45
55
|
* disabling it, so it remains available to switch selection.
|
|
46
56
|
*/
|
|
47
57
|
isDimmed?: boolean;
|
|
48
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Whether every thread represented by this pin is resolved. A resolved pin
|
|
60
|
+
* renders nothing unless it is selected, so resolved discussion leaves the
|
|
61
|
+
* content while a thread the reader opened keeps its anchor.
|
|
62
|
+
*/
|
|
49
63
|
isResolved?: boolean;
|
|
50
64
|
/** Whether activation is unavailable. */
|
|
51
65
|
isDisabled?: boolean;
|
|
@@ -56,7 +70,8 @@ export interface CommentPinProps extends Omit<BaseProps<HTMLButtonElement>, 'chi
|
|
|
56
70
|
* The caller owns grouping, representative selection, coordinates, collision
|
|
57
71
|
* handling, and the content opened by activation. Absolute placement maps the
|
|
58
72
|
* host anchor to the pin's logical bottom-start corner. The pin only owns its
|
|
59
|
-
* compact button surface and controlled visual states.
|
|
73
|
+
* compact button surface and controlled visual states. `size` sets its height
|
|
74
|
+
* on the element-size scale.
|
|
60
75
|
*
|
|
61
76
|
* @example
|
|
62
77
|
* ```
|
|
@@ -79,7 +94,7 @@ export interface CommentPinProps extends Omit<BaseProps<HTMLButtonElement>, 'chi
|
|
|
79
94
|
* />
|
|
80
95
|
* ```
|
|
81
96
|
*/
|
|
82
|
-
export declare function CommentPin({ label, participants, threadCount, unreadCount, isSelected, isDimmed, isResolved, isDisabled, ref, xstyle, className, style, ...rest }: CommentPinProps): React.ReactNode;
|
|
97
|
+
export declare function CommentPin({ label, participants, size, threadCount, unreadCount, isSelected, isDimmed, isResolved, isDisabled, ref, xstyle, className, style, ...rest }: CommentPinProps): React.ReactNode;
|
|
83
98
|
export declare namespace CommentPin {
|
|
84
99
|
var displayName: string;
|
|
85
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentPin.d.ts","sourceRoot":"","sources":["../../src/CommentPin/CommentPin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommentPin.d.ts","sourceRoot":"","sources":["../../src/CommentPin/CommentPin.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AA4BlD,qEAAqE;AACrE,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhD,sEAAsE;AACtE,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,SAAS,CAAC,iBAAiB,CAAC,EAC5B,UAAU,CACX;IACC,0CAA0C;IAC1C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,YAAY,EAAE,SAAS,CAAC,qBAAqB,EAAE,GAAG,qBAAqB,EAAE,CAAC,CAAC;IAC3E;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yCAAyC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA8ND;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,YAAY,EACZ,IAAW,EACX,WAAe,EACf,WAAe,EACf,UAAkB,EAClB,QAAgB,EAChB,UAAkB,EAClB,UAAkB,EAClB,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,eAAe,GAAG,KAAK,CAAC,SAAS,CA4JnC;yBA3Ke,UAAU"}
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CommentPin.tsx
|
|
7
7
|
* @input Ordered participants (grouped pins show at most three circles),
|
|
8
|
-
* total and unread represented thread counts,
|
|
9
|
-
*
|
|
8
|
+
* total and unread represented thread counts (unread shows as a dot), a
|
|
9
|
+
* size on the element-size
|
|
10
|
+
* scale, controlled selected/dimmed/resolved/disabled state, and button DOM
|
|
11
|
+
* props
|
|
10
12
|
* @output Exports the avatar-first CommentPin button and its public types
|
|
11
13
|
* @position Lab collaboration primitive for annotation anchors over content or
|
|
12
14
|
* in content margins; callers own grouping, coordinates, and opened content
|
|
@@ -23,11 +25,15 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
23
25
|
import { Avatar } from '@astryxdesign/core/Avatar';
|
|
24
26
|
import { AvatarGroup, AvatarGroupOverflow } from '@astryxdesign/core/AvatarGroup';
|
|
25
27
|
import { useDevWarning, useMergedRefs, usePressFeedback } from '@astryxdesign/core/hooks';
|
|
28
|
+
import { Icon } from '@astryxdesign/core/Icon';
|
|
29
|
+
import { StatusDot } from '@astryxdesign/core/StatusDot';
|
|
26
30
|
import '@astryxdesign/core/theme/tokens.stylex';
|
|
27
|
-
import { borderVars, colorVars, fontWeightVars,
|
|
31
|
+
import { borderVars, colorVars, fontWeightVars, shadowVars, sizeVars, spacingVars, typeScaleVars, typographyVars } from '@astryxdesign/core/theme/tokens.stylex';
|
|
28
32
|
import { useTooltip } from '@astryxdesign/core/Tooltip';
|
|
29
33
|
import { focusOutlineProps, interactionOverlayStyles, mergeProps, themeProps } from '@astryxdesign/core/utils';
|
|
30
34
|
|
|
35
|
+
/** Pin heights on the shared element-size scale: 28, 32, or 36px. */
|
|
36
|
+
|
|
31
37
|
/** Identity data for one representative shown inside a CommentPin. */
|
|
32
38
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
33
39
|
const styles = {
|
|
@@ -41,17 +47,11 @@ const styles = {
|
|
|
41
47
|
kmuXW: "x2lah0s",
|
|
42
48
|
kXLuUW: "xxymvpz",
|
|
43
49
|
k3nNDw: "x1bd091l x173emx3",
|
|
44
|
-
k7Eaqz: "x1nkkqge",
|
|
45
|
-
kZKoxP: "x6k0iem",
|
|
46
50
|
kogj98: "x1ghz6dp",
|
|
47
|
-
kmVPX3: "x12nba7r",
|
|
48
51
|
kMzoRj: "x1litavf",
|
|
49
52
|
ksu8eU: "x1y0btm7",
|
|
50
53
|
kVAM5u: "x9r1u3d",
|
|
51
|
-
|
|
52
|
-
kfmiAY: "x8agd5o",
|
|
53
|
-
kT0f0o: "x1dgc8on",
|
|
54
|
-
kVL7Gh: "x1pczhz8",
|
|
54
|
+
kVL7Gh: "x6en5u8",
|
|
55
55
|
kWkggS: "x1prclbq",
|
|
56
56
|
kKwaWg: "x18o3ruo",
|
|
57
57
|
kGVxlE: "x14hfi27",
|
|
@@ -68,8 +68,6 @@ const styles = {
|
|
|
68
68
|
withCount: {
|
|
69
69
|
kjj79g: "x1nhvcw1",
|
|
70
70
|
kOIVth: "xzye2dw",
|
|
71
|
-
kZCmMZ: "x138rykx",
|
|
72
|
-
kwRFfy: "x1djylfy",
|
|
73
71
|
$$css: true
|
|
74
72
|
},
|
|
75
73
|
selected: {
|
|
@@ -81,15 +79,6 @@ const styles = {
|
|
|
81
79
|
kMwMTN: "xv1l7n4 x1k5gbb1",
|
|
82
80
|
$$css: true
|
|
83
81
|
},
|
|
84
|
-
resolved: {
|
|
85
|
-
kAXs8y: "x1kzknox",
|
|
86
|
-
kVAM5u: "x9r1u3d x1w1tqly",
|
|
87
|
-
kWkggS: "xwmxj5m x9yvj25",
|
|
88
|
-
kGVxlE: "x1gnnqk1",
|
|
89
|
-
kMwMTN: "xv1l7n4 xs5hli",
|
|
90
|
-
kSiTet: "xf9vgkq x1tbh5bv",
|
|
91
|
-
$$css: true
|
|
92
|
-
},
|
|
93
82
|
dimmed: {
|
|
94
83
|
kSiTet: "xti2d7y x1tbh5bv",
|
|
95
84
|
$$css: true
|
|
@@ -102,8 +91,69 @@ const styles = {
|
|
|
102
91
|
overflowCircle: {
|
|
103
92
|
kg3NbH: "xnjsko4",
|
|
104
93
|
$$css: true
|
|
94
|
+
},
|
|
95
|
+
unreadDot: {
|
|
96
|
+
kAXs8y: "x1kzknox",
|
|
97
|
+
kMwMTN: "x17wrial x1q73b31",
|
|
98
|
+
kWkggS: "x1ewilqj x438xzl",
|
|
99
|
+
$$css: true
|
|
105
100
|
}
|
|
106
101
|
};
|
|
102
|
+
|
|
103
|
+
// Each size pairs an element-size height with a participant circle diameter
|
|
104
|
+
// (see AVATAR_SIZE). The padding is the inset that centers that circle in the
|
|
105
|
+
// height, applied on every side: the avatars and overflow sit the same
|
|
106
|
+
// distance from all four edges. The three round corners are half the height,
|
|
107
|
+
// which is fully round: the 9999px full-radius token would make the browser
|
|
108
|
+
// scale every corner down to fit the box (the CSS corner-overlap rule) and
|
|
109
|
+
// shrink the 2px anchor corner to nothing.
|
|
110
|
+
const sizeStyles = {
|
|
111
|
+
sm: {
|
|
112
|
+
k7Eaqz: "x1nkkqge",
|
|
113
|
+
kZKoxP: "x6k0iem",
|
|
114
|
+
kmVPX3: "x5pt662",
|
|
115
|
+
krdFHd: "x404ayl",
|
|
116
|
+
kfmiAY: "x1096wwc",
|
|
117
|
+
kT0f0o: "xjc3rfe",
|
|
118
|
+
$$css: true
|
|
119
|
+
},
|
|
120
|
+
md: {
|
|
121
|
+
k7Eaqz: "x17ydmr0",
|
|
122
|
+
kZKoxP: "x1ueg155",
|
|
123
|
+
kmVPX3: "xnvfkzk",
|
|
124
|
+
krdFHd: "x17mafka",
|
|
125
|
+
kfmiAY: "x1fefpn5",
|
|
126
|
+
kT0f0o: "x11o29ay",
|
|
127
|
+
$$css: true
|
|
128
|
+
},
|
|
129
|
+
lg: {
|
|
130
|
+
k7Eaqz: "x1je4dsv",
|
|
131
|
+
kZKoxP: "xssyfek",
|
|
132
|
+
kmVPX3: "x1fx55se",
|
|
133
|
+
krdFHd: "xgwm7ou",
|
|
134
|
+
kfmiAY: "x7b04l7",
|
|
135
|
+
kT0f0o: "x9hxrvx",
|
|
136
|
+
$$css: true
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Participant circle diameter per pin size, matching the literals in
|
|
142
|
+
* `sizeStyles`. Avatar renders any pixel size; its typed scale lists neither
|
|
143
|
+
* 22 nor 28, hence the cast.
|
|
144
|
+
*/
|
|
145
|
+
const AVATAR_SIZE = {
|
|
146
|
+
sm: 22,
|
|
147
|
+
md: 24,
|
|
148
|
+
lg: 28
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/** The overflow ellipsis per pin size. */
|
|
152
|
+
const OVERFLOW_ICON_SIZE = {
|
|
153
|
+
sm: 'xsm',
|
|
154
|
+
md: 'xsm',
|
|
155
|
+
lg: 'sm'
|
|
156
|
+
};
|
|
107
157
|
function takeDistinctParticipants(participants, limit) {
|
|
108
158
|
const result = [];
|
|
109
159
|
const seen = new Set();
|
|
@@ -135,7 +185,8 @@ const MAX_GROUP_CIRCLES = 3;
|
|
|
135
185
|
* The caller owns grouping, representative selection, coordinates, collision
|
|
136
186
|
* handling, and the content opened by activation. Absolute placement maps the
|
|
137
187
|
* host anchor to the pin's logical bottom-start corner. The pin only owns its
|
|
138
|
-
* compact button surface and controlled visual states.
|
|
188
|
+
* compact button surface and controlled visual states. `size` sets its height
|
|
189
|
+
* on the element-size scale.
|
|
139
190
|
*
|
|
140
191
|
* @example
|
|
141
192
|
* ```
|
|
@@ -161,6 +212,7 @@ const MAX_GROUP_CIRCLES = 3;
|
|
|
161
212
|
export function CommentPin({
|
|
162
213
|
label,
|
|
163
214
|
participants,
|
|
215
|
+
size = 'sm',
|
|
164
216
|
threadCount = 1,
|
|
165
217
|
unreadCount = 0,
|
|
166
218
|
isSelected = false,
|
|
@@ -173,6 +225,8 @@ export function CommentPin({
|
|
|
173
225
|
style,
|
|
174
226
|
...rest
|
|
175
227
|
}) {
|
|
228
|
+
const resolvedSize = size === 'md' || size === 'lg' ? size : 'sm';
|
|
229
|
+
const avatarSize = AVATAR_SIZE[resolvedSize];
|
|
176
230
|
const validThreadCount = isValidThreadCount(threadCount);
|
|
177
231
|
const resolvedThreadCount = validThreadCount ? threadCount : 1;
|
|
178
232
|
const isGrouped = resolvedThreadCount > 1;
|
|
@@ -181,7 +235,7 @@ export function CommentPin({
|
|
|
181
235
|
const hasUnread = resolvedUnreadCount > 0;
|
|
182
236
|
|
|
183
237
|
// Grouped pins cap at MAX_GROUP_CIRCLES circles: every distinct participant
|
|
184
|
-
// when they fit, otherwise one fewer Avatar plus
|
|
238
|
+
// when they fit, otherwise one fewer Avatar plus an ellipsis overflow circle.
|
|
185
239
|
const distinctParticipants = takeDistinctParticipants(participants, isGrouped ? Number.POSITIVE_INFINITY : 1);
|
|
186
240
|
const hasOverflow = isGrouped && distinctParticipants.length > MAX_GROUP_CIRCLES;
|
|
187
241
|
const visibleParticipants = hasOverflow ? distinctParticipants.slice(0, MAX_GROUP_CIRCLES - 1) : distinctParticipants;
|
|
@@ -197,6 +251,13 @@ export function CommentPin({
|
|
|
197
251
|
isEnabled: hasTooltip
|
|
198
252
|
});
|
|
199
253
|
const mergedRef = useMergedRefs(ref, hasTooltip ? tooltip.ref : undefined);
|
|
254
|
+
|
|
255
|
+
// Resolved discussion leaves the content. A selected pin stays, so a thread
|
|
256
|
+
// the reader opened (or resolved from its popover) keeps its anchor until
|
|
257
|
+
// the host clears the selection.
|
|
258
|
+
if (isResolved && !isSelected) {
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
200
261
|
const avatarParticipants = visibleParticipants.length > 0 ? visibleParticipants : [{
|
|
201
262
|
id: '__anonymous__',
|
|
202
263
|
name: '',
|
|
@@ -211,46 +272,62 @@ export function CommentPin({
|
|
|
211
272
|
"aria-pressed": isSelected,
|
|
212
273
|
disabled: isDisabled,
|
|
213
274
|
...mergeProps(themeProps('comment-pin', {
|
|
275
|
+
size: resolvedSize,
|
|
214
276
|
grouped: isGrouped ? 'grouped' : null,
|
|
215
277
|
unread: hasUnread ? 'unread' : null,
|
|
216
278
|
selected: isSelected ? 'selected' : null,
|
|
217
279
|
dimmed: isDimmed ? 'dimmed' : null,
|
|
218
280
|
resolved: isResolved ? 'resolved' : null,
|
|
219
281
|
disabled: isDisabled ? 'disabled' : null
|
|
220
|
-
}), focusOutlineProps.focusVisible(styles.root, interactionOverlayStyles.backgroundImage, (isGrouped || hasUnread) && styles.withCount,
|
|
282
|
+
}), focusOutlineProps.focusVisible(styles.root, sizeStyles[resolvedSize], interactionOverlayStyles.backgroundImage, (isGrouped || hasUnread) && styles.withCount, isDimmed && !isSelected && styles.dimmed, isSelected && styles.selected, isDisabled && styles.disabled, xstyle), className, style),
|
|
221
283
|
children: [/*#__PURE__*/_jsx("span", {
|
|
222
284
|
"aria-hidden": "true",
|
|
223
285
|
...{
|
|
224
|
-
|
|
225
|
-
|
|
286
|
+
0: {
|
|
287
|
+
className: "x3nfvp2 x6s0dn4 x2lah0s"
|
|
288
|
+
},
|
|
289
|
+
1: {
|
|
290
|
+
className: "x3nfvp2 x6s0dn4 x2lah0s xe9ewy2"
|
|
291
|
+
}
|
|
292
|
+
}[!!isGrouped << 0],
|
|
226
293
|
children: isGrouped ? /*#__PURE__*/_jsxs(AvatarGroup, {
|
|
227
|
-
size:
|
|
294
|
+
size: avatarSize,
|
|
228
295
|
children: [avatarParticipants.map(participant => /*#__PURE__*/_jsx(Avatar, {
|
|
229
296
|
name: participant.name,
|
|
230
297
|
src: participant.avatarSrc,
|
|
231
298
|
tooltip: false
|
|
232
299
|
}, participant.id)), overflowCount > 0 ? /*#__PURE__*/_jsx(AvatarGroupOverflow, {
|
|
233
300
|
count: overflowCount,
|
|
234
|
-
xstyle: styles.overflowCircle
|
|
301
|
+
xstyle: styles.overflowCircle,
|
|
302
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
303
|
+
icon: "moreHorizontal",
|
|
304
|
+
size: OVERFLOW_ICON_SIZE[resolvedSize]
|
|
305
|
+
})
|
|
235
306
|
}) : null]
|
|
236
307
|
}) : avatarParticipants.map(participant => /*#__PURE__*/_jsx(Avatar, {
|
|
237
308
|
name: participant.name,
|
|
238
309
|
src: participant.avatarSrc,
|
|
239
|
-
size:
|
|
310
|
+
size: avatarSize,
|
|
240
311
|
tooltip: false
|
|
241
312
|
}, participant.id))
|
|
242
|
-
}), hasUnread ? /*#__PURE__*/
|
|
243
|
-
"aria-hidden": "true",
|
|
244
|
-
...{
|
|
245
|
-
className: "x1kzknox x3nfvp2 x6s0dn4 xl56j7k x9f619 x16asifk x1grt7ep x7a5moj xjspbzw x1ewilqj x1jzqe4 x17wrial x1k5gbb1 xss6m8b xo5v014"
|
|
246
|
-
},
|
|
247
|
-
children: resolvedUnreadCount
|
|
248
|
-
}) : isGrouped ? /*#__PURE__*/_jsx("span", {
|
|
313
|
+
}), hasUnread || isGrouped ? /*#__PURE__*/_jsxs("span", {
|
|
249
314
|
"aria-hidden": "true",
|
|
250
315
|
...{
|
|
251
|
-
className: "
|
|
316
|
+
className: "x3nfvp2 x6s0dn4 xzye2dw x1nryj5t"
|
|
252
317
|
},
|
|
253
|
-
children:
|
|
318
|
+
children: [isGrouped ? /*#__PURE__*/_jsx("span", {
|
|
319
|
+
...{
|
|
320
|
+
className: "x1heor9g xss6m8b"
|
|
321
|
+
},
|
|
322
|
+
children: resolvedThreadCount
|
|
323
|
+
}) : null, hasUnread ?
|
|
324
|
+
/*#__PURE__*/
|
|
325
|
+
// Decorative: the button's label carries the unread context.
|
|
326
|
+
_jsx(StatusDot, {
|
|
327
|
+
variant: "accent",
|
|
328
|
+
label: "",
|
|
329
|
+
xstyle: styles.unreadDot
|
|
330
|
+
}) : null]
|
|
254
331
|
}) : null]
|
|
255
332
|
});
|
|
256
333
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* @output CommentPin module exports
|
|
5
5
|
* @position Public Lab subpath; re-exported by packages/lab/src/index.ts
|
|
6
6
|
*/
|
|
7
|
-
export { CommentPin } from './CommentPin';
|
|
8
|
-
export type { CommentPinParticipant, CommentPinProps } from './CommentPin';
|
|
7
|
+
export { CommentPin } from './CommentPin.js';
|
|
8
|
+
export type { CommentPinParticipant, CommentPinProps } from './CommentPin.js';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type ReactNode } from 'react';
|
|
11
11
|
import { type DropdownMenuOption } from '@astryxdesign/core/DropdownMenu';
|
|
12
|
-
import { type AnyComment } from './utils';
|
|
13
|
-
import type { CommentReactionOption } from './types';
|
|
12
|
+
import { type AnyComment } from './utils.js';
|
|
13
|
+
import type { CommentReactionOption } from './types.js';
|
|
14
14
|
export type CommentActionId = 'resolve' | 'reopen' | 'react' | 'reply' | 'link';
|
|
15
15
|
/** Mark as resolved on an open thread, Reopen on a resolved one. */
|
|
16
16
|
export type ResolveAction = {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { type ReactNode, type Ref } from 'react';
|
|
17
17
|
import type { BaseProps } from '@astryxdesign/core';
|
|
18
18
|
import { type ChatComposerTrigger } from '@astryxdesign/core/Chat';
|
|
19
|
-
import type { CommentAgentCommand, CommentAnchor, CommentComposerContext, CommentComposerRenderProps, CommentHighlightColor, CommentUploadedImage } from './types';
|
|
19
|
+
import type { CommentAgentCommand, CommentAnchor, CommentComposerContext, CommentComposerRenderProps, CommentHighlightColor, CommentUploadedImage } from './types.js';
|
|
20
20
|
/** Props the family's threads pass to their composers. */
|
|
21
21
|
export interface CommentComposerBaseProps {
|
|
22
22
|
value: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ChatComposerToken } from '@astryxdesign/core/Chat';
|
|
2
2
|
import { type MarkdownInlinePlugin } from '@astryxdesign/core/Markdown';
|
|
3
3
|
import type { MarkdownPluginEntry } from '@astryxdesign/core/Markdown/plugins';
|
|
4
|
-
import type { CommentAgentCommand } from './types';
|
|
4
|
+
import type { CommentAgentCommand } from './types.js';
|
|
5
5
|
/** An agent's chip: what the composer's `/` menu inserts, and what a posted
|
|
6
6
|
* comment shows in place of the command. */
|
|
7
7
|
export declare function agentToken(agent: CommentAgentCommand): ChatComposerToken;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { type CSSProperties, type ReactNode, type Ref } from 'react';
|
|
12
12
|
import * as stylex from '@stylexjs/stylex';
|
|
13
|
-
import { type AnyComment } from './utils';
|
|
14
|
-
import type { CommentAnchor, CommentHighlightColor, CommentProgress, CommentUser, CommentVersion, CommentActivityEvent } from './types';
|
|
13
|
+
import { type AnyComment } from './utils.js';
|
|
14
|
+
import type { CommentAnchor, CommentHighlightColor, CommentProgress, CommentUser, CommentVersion, CommentActivityEvent } from './types.js';
|
|
15
15
|
/** The 28px avatar column every comment row, reply, and event aligns to. */
|
|
16
16
|
export declare const AVATAR_SIZE: string;
|
|
17
17
|
/**
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { type Ref } from 'react';
|
|
19
19
|
import type { BaseProps } from '@astryxdesign/core';
|
|
20
|
-
import type { CommentThreadData, CommentThreadSharedProps } from './types';
|
|
20
|
+
import type { CommentThreadData, CommentThreadSharedProps } from './types.js';
|
|
21
21
|
export interface CommentThreadProps extends CommentThreadSharedProps, Omit<BaseProps<HTMLElement>, keyof CommentThreadSharedProps | 'onChange' | 'onSubmit'> {
|
|
22
22
|
/** Ref forwarded to the root element. */
|
|
23
23
|
ref?: Ref<HTMLElement>;
|