@box/threaded-annotations 1.95.2 → 1.96.1

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 (68) hide show
  1. package/dist/chunks/annotation-badge.js +15 -14
  2. package/dist/chunks/message-editor2.module.js +26 -24
  3. package/dist/chunks/timestamp-toggle.js +36 -0
  4. package/dist/esm/lib/components/v2/message-editor/message-editor.js +77 -69
  5. package/dist/esm/lib/components/v2/message-editor/messages.js +4 -0
  6. package/dist/esm/lib/components/v2/message-editor/subcomponents/timestamp-toggle.js +2 -0
  7. package/dist/i18n/bn-IN.js +1 -0
  8. package/dist/i18n/bn-IN.properties +4 -0
  9. package/dist/i18n/da-DK.js +1 -0
  10. package/dist/i18n/da-DK.properties +4 -0
  11. package/dist/i18n/de-DE.js +1 -0
  12. package/dist/i18n/de-DE.properties +4 -0
  13. package/dist/i18n/en-AU.js +1 -0
  14. package/dist/i18n/en-AU.properties +4 -0
  15. package/dist/i18n/en-CA.js +1 -0
  16. package/dist/i18n/en-CA.properties +4 -0
  17. package/dist/i18n/en-GB.js +1 -0
  18. package/dist/i18n/en-GB.properties +4 -0
  19. package/dist/i18n/en-US.js +1 -0
  20. package/dist/i18n/en-US.properties +2 -0
  21. package/dist/i18n/en-x-pseudo.js +2 -1
  22. package/dist/i18n/en-x-pseudo.properties +4 -0
  23. package/dist/i18n/es-419.js +1 -0
  24. package/dist/i18n/es-419.properties +4 -0
  25. package/dist/i18n/es-ES.js +1 -0
  26. package/dist/i18n/es-ES.properties +4 -0
  27. package/dist/i18n/fi-FI.js +1 -0
  28. package/dist/i18n/fi-FI.properties +4 -0
  29. package/dist/i18n/fr-CA.js +1 -0
  30. package/dist/i18n/fr-CA.properties +4 -0
  31. package/dist/i18n/fr-FR.js +1 -0
  32. package/dist/i18n/fr-FR.properties +4 -0
  33. package/dist/i18n/hi-IN.js +1 -0
  34. package/dist/i18n/hi-IN.properties +4 -0
  35. package/dist/i18n/it-IT.js +1 -0
  36. package/dist/i18n/it-IT.properties +4 -0
  37. package/dist/i18n/ja-JP.js +1 -0
  38. package/dist/i18n/ja-JP.properties +4 -0
  39. package/dist/i18n/json/src/lib/components/v2/message-editor/messages.json +1 -1
  40. package/dist/i18n/ko-KR.js +1 -0
  41. package/dist/i18n/ko-KR.properties +4 -0
  42. package/dist/i18n/nb-NO.js +1 -0
  43. package/dist/i18n/nb-NO.properties +4 -0
  44. package/dist/i18n/nl-NL.js +1 -0
  45. package/dist/i18n/nl-NL.properties +4 -0
  46. package/dist/i18n/pl-PL.js +1 -0
  47. package/dist/i18n/pl-PL.properties +4 -0
  48. package/dist/i18n/pt-BR.js +1 -0
  49. package/dist/i18n/pt-BR.properties +4 -0
  50. package/dist/i18n/ru-RU.js +1 -0
  51. package/dist/i18n/ru-RU.properties +4 -0
  52. package/dist/i18n/sv-SE.js +1 -0
  53. package/dist/i18n/sv-SE.properties +4 -0
  54. package/dist/i18n/tr-TR.js +1 -0
  55. package/dist/i18n/tr-TR.properties +4 -0
  56. package/dist/i18n/zh-CN.js +1 -0
  57. package/dist/i18n/zh-CN.properties +4 -0
  58. package/dist/i18n/zh-TW.js +1 -0
  59. package/dist/i18n/zh-TW.properties +4 -0
  60. package/dist/styles/message-editor2.css +1 -1
  61. package/dist/styles/timestamp-toggle.css +1 -0
  62. package/dist/types/index.d.ts +1 -0
  63. package/dist/types/lib/components/v2/message-editor/message-editor.types.d.ts +15 -0
  64. package/dist/types/lib/components/v2/message-editor/messages.d.ts +5 -0
  65. package/dist/types/lib/components/v2/message-editor/stories/shared.d.ts +1 -1
  66. package/dist/types/lib/components/v2/message-editor/subcomponents/timestamp-toggle.d.ts +9 -0
  67. package/dist/types/lib/v2/test-utils/test-selectors.d.ts +1 -0
  68. package/package.json +11 -11
@@ -6,6 +6,19 @@ export declare enum MessageEditorVariant {
6
6
  EDIT_MESSAGE = "EDIT_MESSAGE"
7
7
  }
8
8
  type MessageActionCallback = (content: JSONContent | null) => Promise<TextMessageType | void> | TextMessageType | void;
9
+ /**
10
+ * Opt-in config for the editor-footer timestamp toggle. Pressed state is
11
+ * controlled by the host; this component does not modify the editor document
12
+ * to record the toggle.
13
+ */
14
+ export interface VideoTimestampOptions {
15
+ /** Display-formatted timestamp (e.g. "00:43") shown in the toggle. May change as playback progresses. */
16
+ formattedTimestamp: string;
17
+ /** Pressed state of the timestamp toggle. */
18
+ isPressed: boolean;
19
+ /** Called when the user toggles the timestamp pill. */
20
+ onPressedChange: (pressed: boolean) => void;
21
+ }
9
22
  interface BaseMessageEditorProps {
10
23
  disableComponent?: boolean;
11
24
  /** When true (create mode only), editor does not expand to full width. Defaults to false. */
@@ -21,6 +34,8 @@ interface BaseMessageEditorProps {
21
34
  maxCharacterCount?: number;
22
35
  /** Properties for the user selector component from blueprint-web. */
23
36
  userSelectorProps: Omit<HeadlessUserSelectorProps, 'inputElementRef' | 'onSelectedUserChange' | 'open' | 'rootElement' | 'value'>;
37
+ /** When provided, renders the timestamp toggle in the editor footer. */
38
+ videoTimestamp?: VideoTimestampOptions;
24
39
  }
25
40
  export interface CreateMessageEditorProps extends BaseMessageEditorProps {
26
41
  /**
@@ -54,5 +54,10 @@ declare const messages: {
54
54
  description: string;
55
55
  id: string;
56
56
  };
57
+ timestampToggleLabel: {
58
+ defaultMessage: string;
59
+ description: string;
60
+ id: string;
61
+ };
57
62
  };
58
63
  export default messages;
@@ -4,5 +4,5 @@ export declare const defaultUserSelectorProps: Omit<import('@box/user-selector')
4
4
  type DefaultMessageEditorProps = MessageEditorProps & {
5
5
  fetchCollaboratorState?: (user: UserContactType) => Promise<boolean>;
6
6
  };
7
- export declare const DefaultMessageEditor: ({ fetchCollaboratorState, ...props }: DefaultMessageEditorProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const DefaultMessageEditor: ({ fetchCollaboratorState, videoTimestamp, ...props }: DefaultMessageEditorProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -0,0 +1,9 @@
1
+ export interface TimestampToggleProps {
2
+ className?: string;
3
+ disabled?: boolean;
4
+ formattedTimestamp: string;
5
+ isPressed: boolean;
6
+ /** Synchronous; throws propagate to the React error boundary. */
7
+ onChange: (isPressed: boolean) => void;
8
+ }
9
+ export declare const TimestampToggle: ({ className, disabled, formattedTimestamp, isPressed, onChange, }: TimestampToggleProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,4 +10,5 @@ export declare const TEST_SELECTORS: {
10
10
  EDIT_MENU_ITEM: string;
11
11
  RESOLVE_MENU_ITEM: string;
12
12
  UNRESOLVE_MENU_ITEM: string;
13
+ TIMESTAMP_TOGGLE: string;
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/threaded-annotations",
3
- "version": "1.95.2",
3
+ "version": "1.96.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "dependencies": {
6
6
  "@tanstack/react-virtual": "^3.10.8",
@@ -16,23 +16,23 @@
16
16
  "uuid": "^9.0.1"
17
17
  },
18
18
  "peerDependencies": {
19
- "@box/blueprint-web": "^15.5.3",
20
- "@box/blueprint-web-assets": "^4.123.1",
21
- "@box/collaboration-popover": "^1.63.12",
22
- "@box/readable-time": "^1.42.12",
23
- "@box/user-selector": "^1.77.12",
19
+ "@box/blueprint-web": "^15.6.0",
20
+ "@box/blueprint-web-assets": "^4.123.2",
21
+ "@box/collaboration-popover": "^1.63.13",
22
+ "@box/readable-time": "^1.42.13",
23
+ "@box/user-selector": "^1.77.13",
24
24
  "clsx": "^1.2.1",
25
25
  "react": "^18.0.0",
26
26
  "react-dom": "^18.0.0",
27
27
  "react-intl": "^6.4.2"
28
28
  },
29
29
  "devDependencies": {
30
- "@box/blueprint-web": "^15.5.3",
31
- "@box/blueprint-web-assets": "^4.123.1",
30
+ "@box/blueprint-web": "^15.6.0",
31
+ "@box/blueprint-web-assets": "^4.123.2",
32
32
  "@box/eslint-plugin-blueprint": "1.2.5",
33
- "@box/readable-time": "^1.42.12",
34
- "@box/storybook-utils": "^0.20.11",
35
- "@box/user-selector": "^1.77.12",
33
+ "@box/readable-time": "^1.42.13",
34
+ "@box/storybook-utils": "^0.20.12",
35
+ "@box/user-selector": "^1.77.13",
36
36
  "react": "^18.0.0",
37
37
  "react-dom": "^18.0.0"
38
38
  },