@bitforgehq/ui 0.4.0 → 0.5.0-next.4

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 (87) hide show
  1. package/CHANGELOG.md +350 -0
  2. package/README.md +12 -12
  3. package/ai/MANIFEST.index.json +74 -2
  4. package/ai/MANIFEST.json +3507 -1763
  5. package/ai/REFERENCE.index.json +189 -0
  6. package/ai/REFERENCE.json +1617 -139
  7. package/ai/UI_GUIDE.md +70 -20
  8. package/ai/components/app-frame.md +1 -1
  9. package/ai/components/badge.md +41 -1
  10. package/ai/components/chat-composer.md +357 -0
  11. package/ai/components/chat-message.md +251 -0
  12. package/ai/components/chat-thread.md +521 -0
  13. package/ai/components/checkbox.md +7 -0
  14. package/ai/components/combobox.md +12 -0
  15. package/ai/components/date-input.md +9 -0
  16. package/ai/components/datetime-input.md +2 -0
  17. package/ai/components/field.md +10 -0
  18. package/ai/components/file-input.md +498 -0
  19. package/ai/components/header.md +1 -1
  20. package/ai/components/image-input.md +368 -0
  21. package/ai/components/image-tile.md +452 -0
  22. package/ai/components/image-viewer.md +309 -0
  23. package/ai/components/media-card.md +478 -0
  24. package/ai/components/menu-button.md +67 -9
  25. package/ai/components/menu.md +10 -0
  26. package/ai/components/multi-combobox.md +7 -0
  27. package/ai/components/nav-group.md +10 -3
  28. package/ai/components/nav-item.md +11 -2
  29. package/ai/components/number-input.md +2 -7
  30. package/ai/components/pagination.md +59 -11
  31. package/ai/components/popover.md +13 -0
  32. package/ai/components/radio-group.md +6 -0
  33. package/ai/components/segmented.md +14 -2
  34. package/ai/components/select.md +100 -42
  35. package/ai/components/sidebar-toggle.md +16 -9
  36. package/ai/components/sidebar.md +41 -13
  37. package/ai/components/tab-group.md +18 -2
  38. package/ai/components/table.md +17 -2
  39. package/ai/components/theme-menu-button.md +1 -0
  40. package/ai/components/time-input.md +2 -0
  41. package/ai/components/toolbar.md +7 -18
  42. package/ai/reference/bf-chat-composer-harness.md +64 -0
  43. package/ai/reference/bf-chat-message-role.md +27 -0
  44. package/ai/reference/bf-chat-message-status.md +28 -0
  45. package/ai/reference/bf-fade-in-directive.md +18 -0
  46. package/ai/reference/bf-file-input-harness.md +67 -0
  47. package/ai/reference/bf-file-input-variant.md +27 -0
  48. package/ai/reference/bf-image-input-harness.md +67 -0
  49. package/ai/reference/bf-image-input-shape.md +27 -0
  50. package/ai/reference/bf-image-tile-aspect.md +28 -0
  51. package/ai/reference/bf-image-tile-caption-placement.md +27 -0
  52. package/ai/reference/bf-image-tile-harness.md +70 -0
  53. package/ai/reference/bf-image-viewer-actions-context.md +29 -0
  54. package/ai/reference/bf-image-viewer-harness.md +87 -0
  55. package/ai/reference/bf-image-viewer-image.md +25 -0
  56. package/ai/reference/bf-image-viewer-options.md +33 -0
  57. package/ai/reference/bf-image-viewer-origin.md +23 -0
  58. package/ai/reference/bf-image-viewer-ref.md +55 -0
  59. package/ai/reference/bf-image-viewer-service.md +32 -0
  60. package/ai/reference/bf-labels.md +107 -75
  61. package/ai/reference/bf-media-card-aspect.md +28 -0
  62. package/ai/reference/bf-media-card-harness.md +66 -0
  63. package/ai/reference/bf-motion-list-directive.md +22 -0
  64. package/ai/reference/bf-pagination-position-label.md +22 -0
  65. package/ai/reference/bf-prose-directive.md +16 -0
  66. package/ai/reference/bf-rejected-file-reason.md +28 -0
  67. package/ai/reference/bf-rejected-file.md +28 -0
  68. package/ai/reference/bf-select-harness.md +14 -5
  69. package/ai/reference/bf-select-option.md +2 -0
  70. package/ai/reference/bf-size.md +3 -0
  71. package/ai/reference/bf_table_sort_select.md +23 -0
  72. package/ai/reference/provide-bf-labels.md +11 -3
  73. package/ai/reference/provide-bf-select.md +20 -0
  74. package/bin/bf-ui.js +1 -0
  75. package/fesm2022/bitforgehq-ui-overlay.mjs +2660 -594
  76. package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -1
  77. package/fesm2022/bitforgehq-ui-testing.mjs +414 -10
  78. package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
  79. package/fesm2022/bitforgehq-ui.mjs +8056 -3993
  80. package/fesm2022/bitforgehq-ui.mjs.map +1 -1
  81. package/llms-full.txt +4923 -132
  82. package/llms.txt +36 -1
  83. package/package.json +1 -1
  84. package/theme.css +60 -0
  85. package/types/bitforgehq-ui-overlay.d.ts +695 -7
  86. package/types/bitforgehq-ui-testing.d.ts +517 -6
  87. package/types/bitforgehq-ui.d.ts +1699 -181
package/ai/REFERENCE.json CHANGED
@@ -145,6 +145,22 @@
145
145
  "since": "0.3.0",
146
146
  "signature": "const BF_TAB_LINKS: InjectionToken<BfTabLinks>"
147
147
  },
148
+ {
149
+ "name": "BF_TABLE_SORT_SELECT",
150
+ "slug": "bf_table_sort_select",
151
+ "kind": "token",
152
+ "entryPoint": "@bitforgehq/ui",
153
+ "file": "src/components/table/table-sort-select.token.ts",
154
+ "summary": "The component a stacked table renders as its Sort by select",
155
+ "description": "The component a stacked `bf-table` renders as its Sort by select; `null` (the default) keeps the\nbuilt-in native `<select>`. `provideBfSelect()` from `@bitforgehq/ui/overlay` sets it to the\nstyled `bf-select`, so the core entry never imports the overlay entry. A component given here\nmust take the inputs `label` (string), `options` (`BfSelectOption<string>[]`) and `value`\n(string) and emit the picked value from the output `changed`. The table adds its layout classes\nto the component's host with `classList`, so the component must not overwrite its host\n`className` or `class` attribute directly.",
156
+ "members": [],
157
+ "methods": [],
158
+ "slots": [],
159
+ "references": [],
160
+ "usedBy": [],
161
+ "since": "0.5.0",
162
+ "signature": "const BF_TABLE_SORT_SELECT: InjectionToken<Type<unknown> | null>"
163
+ },
148
164
  {
149
165
  "name": "BfActionDirective",
150
166
  "slug": "bf-action-directive",
@@ -454,6 +470,40 @@
454
470
  "signature": "type BfCardVariant = 'raised' | 'tint' | 'ink' | 'flat'",
455
471
  "values": ["raised", "tint", "ink", "flat"]
456
472
  },
473
+ {
474
+ "name": "BfChatMessageRole",
475
+ "slug": "bf-chat-message-role",
476
+ "kind": "type",
477
+ "entryPoint": "@bitforgehq/ui",
478
+ "file": "src/components/chat-thread/chat-message.component.ts",
479
+ "summary": "Who wrote a chat message, the user or the assistant",
480
+ "description": "Who wrote a `bf-chat-message`: `user` (a tinted bubble at the inline end) or `assistant` (full\nwidth, no bubble).",
481
+ "members": [],
482
+ "methods": [],
483
+ "slots": [],
484
+ "references": [],
485
+ "usedBy": ["bf-chat-message-component"],
486
+ "since": "0.5.0",
487
+ "signature": "type BfChatMessageRole = 'user' | 'assistant'",
488
+ "values": ["user", "assistant"]
489
+ },
490
+ {
491
+ "name": "BfChatMessageStatus",
492
+ "slug": "bf-chat-message-status",
493
+ "kind": "type",
494
+ "entryPoint": "@bitforgehq/ui",
495
+ "file": "src/components/chat-thread/chat-message.component.ts",
496
+ "summary": "How a chat message ended: done, stopped by the user, or failed",
497
+ "description": "How a `bf-chat-message` ended: `done` (the default, no status line), `stopped` (the user\nstopped the reply) or `failed` (it did not arrive or was not sent).",
498
+ "members": [],
499
+ "methods": [],
500
+ "slots": [],
501
+ "references": [],
502
+ "usedBy": ["bf-chat-message-component"],
503
+ "since": "0.5.0",
504
+ "signature": "type BfChatMessageStatus = 'done' | 'stopped' | 'failed'",
505
+ "values": ["done", "stopped", "failed"]
506
+ },
457
507
  {
458
508
  "name": "BfChipGroupMode",
459
509
  "slug": "bf-chip-group-mode",
@@ -704,6 +754,22 @@
704
754
  "signature": "type BfEnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'",
705
755
  "values": ["enter", "done", "go", "next", "previous", "search", "send"]
706
756
  },
757
+ {
758
+ "name": "BfFadeInDirective",
759
+ "slug": "bf-fade-in-directive",
760
+ "kind": "directive",
761
+ "entryPoint": "@bitforgehq/ui",
762
+ "file": "src/components/fade-in/fade-in.directive.ts",
763
+ "summary": "Fades an image in once it has loaded instead of popping in",
764
+ "description": "Fades an image in when it has loaded instead of letting it pop in line by line: put\n`bfFadeIn` on the `<img>`. The image stays transparent until its `load` (or `error`) event,\nthen fades in over 260 ms (`duration-slow`), at once under `prefers-reduced-motion: reduce`. An\nimage that is already loaded when it renders (from the cache) shows straight away. Reserve its\nspace (`width`/`height` attributes or an aspect ratio) so the layout does not move when it\narrives; for a placeholder while it loads, put a `bf-skeleton` behind it.",
765
+ "members": [],
766
+ "methods": [],
767
+ "slots": [],
768
+ "references": [],
769
+ "usedBy": [],
770
+ "since": "0.5.0",
771
+ "selector": "img[bfFadeIn]"
772
+ },
707
773
  {
708
774
  "name": "bfFieldControlClass",
709
775
  "slug": "bf-field-control-class",
@@ -798,6 +864,23 @@
798
864
  "signature": "type BfFieldSize = BfSize",
799
865
  "values": ["sm", "md", "lg"]
800
866
  },
867
+ {
868
+ "name": "BfFileInputVariant",
869
+ "slug": "bf-file-input-variant",
870
+ "kind": "type",
871
+ "entryPoint": "@bitforgehq/ui",
872
+ "file": "src/components/file-input/file-input.component.ts",
873
+ "summary": "The two looks of a file picker, a compact field or a drop zone",
874
+ "description": "The look of a `bf-file-input`: a compact field with a pick button (`field`), or a drop zone\n(`dropzone`). Both have the same API and behaviour.",
875
+ "members": [],
876
+ "methods": [],
877
+ "slots": [],
878
+ "references": [],
879
+ "usedBy": ["bf-file-input-component"],
880
+ "since": "0.5.0",
881
+ "signature": "type BfFileInputVariant = 'field' | 'dropzone'",
882
+ "values": ["field", "dropzone"]
883
+ },
801
884
  {
802
885
  "name": "BfIconButtonVariant",
803
886
  "slug": "bf-icon-button-variant",
@@ -815,6 +898,57 @@
815
898
  "signature": "type BfIconButtonVariant = 'tonal' | 'primary' | 'outline' | 'text'",
816
899
  "values": ["tonal", "primary", "outline", "text"]
817
900
  },
901
+ {
902
+ "name": "BfImageInputShape",
903
+ "slug": "bf-image-input-shape",
904
+ "kind": "type",
905
+ "entryPoint": "@bitforgehq/ui",
906
+ "file": "src/components/image-input/image-input.component.ts",
907
+ "summary": "The two tile shapes of an image picker, a circle or a rounded square",
908
+ "description": "The shape of a `bf-image-input` tile: a circle (`round`, for avatars) or a rounded square\n(`square`, for logos and covers).",
909
+ "members": [],
910
+ "methods": [],
911
+ "slots": [],
912
+ "references": [],
913
+ "usedBy": ["bf-image-input-component"],
914
+ "since": "0.5.0",
915
+ "signature": "type BfImageInputShape = 'round' | 'square'",
916
+ "values": ["round", "square"]
917
+ },
918
+ {
919
+ "name": "BfImageTileAspect",
920
+ "slug": "bf-image-tile-aspect",
921
+ "kind": "type",
922
+ "entryPoint": "@bitforgehq/ui",
923
+ "file": "src/components/image-tile/image-tile.component.ts",
924
+ "summary": "The four aspect ratios of an image tile's picture, square by default",
925
+ "description": "The aspect ratio of a `bf-image-tile`'s picture: square (default), 4:3, 16:9 or 3:4.",
926
+ "members": [],
927
+ "methods": [],
928
+ "slots": [],
929
+ "references": [],
930
+ "usedBy": ["bf-image-tile-component"],
931
+ "since": "0.5.0",
932
+ "signature": "type BfImageTileAspect = '1/1' | '4/3' | '16/9' | '3/4'",
933
+ "values": ["1/1", "4/3", "16/9", "3/4"]
934
+ },
935
+ {
936
+ "name": "BfImageTileCaptionPlacement",
937
+ "slug": "bf-image-tile-caption-placement",
938
+ "kind": "type",
939
+ "entryPoint": "@bitforgehq/ui",
940
+ "file": "src/components/image-tile/image-tile.component.ts",
941
+ "summary": "Where an image tile's caption sits, below the picture or over it",
942
+ "description": "Where a `bf-image-tile`'s title and meta line sit: `below` the picture (default), or `overlay`,\non a soft gradient over the bottom of the picture.",
943
+ "members": [],
944
+ "methods": [],
945
+ "slots": [],
946
+ "references": [],
947
+ "usedBy": ["bf-image-tile-component"],
948
+ "since": "0.5.0",
949
+ "signature": "type BfImageTileCaptionPlacement = 'below' | 'overlay'",
950
+ "values": ["below", "overlay"]
951
+ },
818
952
  {
819
953
  "name": "BfInputAutocapitalize",
820
954
  "slug": "bf-input-autocapitalize",
@@ -1569,6 +1703,294 @@
1569
1703
  "readonly": true,
1570
1704
  "default": "'Unread'"
1571
1705
  },
1706
+ {
1707
+ "name": "fileInputChoose",
1708
+ "kind": "property",
1709
+ "type": "(multiple: boolean) => string",
1710
+ "required": true,
1711
+ "doc": "bf-file-input's button text.",
1712
+ "readonly": true,
1713
+ "default": "(multiple) => (multiple ? 'Choose files' : 'Choose file')"
1714
+ },
1715
+ {
1716
+ "name": "fileInputDropHint",
1717
+ "kind": "property",
1718
+ "type": "(multiple: boolean) => string",
1719
+ "required": true,
1720
+ "doc": "bf-file-input's hint beside the button.",
1721
+ "readonly": true,
1722
+ "default": "(multiple) => (multiple ? 'or drop them here' : 'or drop it here')"
1723
+ },
1724
+ {
1725
+ "name": "fileInputDropzone",
1726
+ "kind": "property",
1727
+ "type": "(multiple: boolean) => string",
1728
+ "required": true,
1729
+ "doc": "bf-file-input's drop zone text.",
1730
+ "readonly": true,
1731
+ "default": "(multiple) => (multiple ? 'Drag files here or browse' : 'Drag a file here or browse')"
1732
+ },
1733
+ {
1734
+ "name": "fileInputTapToChoose",
1735
+ "kind": "property",
1736
+ "type": "(multiple: boolean) => string",
1737
+ "required": true,
1738
+ "doc": "bf-file-input's text under touch input.",
1739
+ "readonly": true,
1740
+ "default": "(multiple) => (multiple ? 'Tap to choose files' : 'Tap to choose a file')"
1741
+ },
1742
+ {
1743
+ "name": "fileInputRemove",
1744
+ "kind": "property",
1745
+ "type": "(name: string) => string",
1746
+ "required": true,
1747
+ "doc": "The accessible name of bf-file-input's remove button for a file.",
1748
+ "readonly": true,
1749
+ "default": "(name) => `Remove ${name}`"
1750
+ },
1751
+ {
1752
+ "name": "fileInputDismiss",
1753
+ "kind": "property",
1754
+ "type": "(name: string) => string",
1755
+ "required": true,
1756
+ "doc": "The accessible name of bf-file-input's button that dismisses a rejected file.",
1757
+ "readonly": true,
1758
+ "default": "(name) => `Dismiss ${name}`"
1759
+ },
1760
+ {
1761
+ "name": "fileInputAdded",
1762
+ "kind": "property",
1763
+ "type": "(count: number) => string",
1764
+ "required": true,
1765
+ "doc": "bf-file-input's live announcement after files are added.",
1766
+ "readonly": true,
1767
+ "default": "(count) => (count === 1 ? '1 file added' : `${count} files added`)"
1768
+ },
1769
+ {
1770
+ "name": "fileInputNotAdded",
1771
+ "kind": "property",
1772
+ "type": "(name: string, reason: string) => string",
1773
+ "required": true,
1774
+ "doc": "bf-file-input's live announcement for a rejected file.",
1775
+ "readonly": true,
1776
+ "default": "(name, reason) => `${name} was not added: ${reason}`"
1777
+ },
1778
+ {
1779
+ "name": "fileInputRemoved",
1780
+ "kind": "property",
1781
+ "type": "(name: string) => string",
1782
+ "required": true,
1783
+ "doc": "bf-file-input's live announcement after a file is removed.",
1784
+ "readonly": true,
1785
+ "default": "(name) => `${name} removed`"
1786
+ },
1787
+ {
1788
+ "name": "fileInputCount",
1789
+ "kind": "property",
1790
+ "type": "(count: number) => string",
1791
+ "required": true,
1792
+ "doc": "bf-file-input's read-only box text for the number of chosen files.",
1793
+ "readonly": true,
1794
+ "default": "(count) => (count === 1 ? '1 file' : `${count} files`)"
1795
+ },
1796
+ {
1797
+ "name": "fileRejectedType",
1798
+ "kind": "property",
1799
+ "type": "string",
1800
+ "required": true,
1801
+ "doc": "The message of a file rejected for its type.",
1802
+ "readonly": true,
1803
+ "default": "'Not an accepted type'"
1804
+ },
1805
+ {
1806
+ "name": "fileRejectedSize",
1807
+ "kind": "property",
1808
+ "type": "(max: string) => string",
1809
+ "required": true,
1810
+ "doc": "The message of a file rejected for its size; `max` is the formatted limit.",
1811
+ "readonly": true,
1812
+ "default": "(max) => `Too large, max ${max}`"
1813
+ },
1814
+ {
1815
+ "name": "fileRejectedCount",
1816
+ "kind": "property",
1817
+ "type": "(max: number) => string",
1818
+ "required": true,
1819
+ "doc": "The message of a file rejected because the file limit is reached.",
1820
+ "readonly": true,
1821
+ "default": "(max) => `Too many files, max ${max}`"
1822
+ },
1823
+ {
1824
+ "name": "imageInputChoose",
1825
+ "kind": "property",
1826
+ "type": "string",
1827
+ "required": true,
1828
+ "doc": "bf-image-input's accessible name for the empty drop target.",
1829
+ "readonly": true,
1830
+ "default": "'Choose image'"
1831
+ },
1832
+ {
1833
+ "name": "imageInputUpload",
1834
+ "kind": "property",
1835
+ "type": "string",
1836
+ "required": true,
1837
+ "doc": "bf-image-input's text for choosing the first image.",
1838
+ "readonly": true,
1839
+ "default": "'Upload'"
1840
+ },
1841
+ {
1842
+ "name": "imageInputReplace",
1843
+ "kind": "property",
1844
+ "type": "string",
1845
+ "required": true,
1846
+ "doc": "bf-image-input's text for replacing the image.",
1847
+ "readonly": true,
1848
+ "default": "'Replace'"
1849
+ },
1850
+ {
1851
+ "name": "imageInputRemove",
1852
+ "kind": "property",
1853
+ "type": "string",
1854
+ "required": true,
1855
+ "doc": "bf-image-input's text for removing the image.",
1856
+ "readonly": true,
1857
+ "default": "'Remove'"
1858
+ },
1859
+ {
1860
+ "name": "chatThread",
1861
+ "kind": "property",
1862
+ "type": "string",
1863
+ "required": true,
1864
+ "doc": "bf-chat-thread's accessible name (its `role=\"log\"`) when no `label` is set.",
1865
+ "readonly": true,
1866
+ "default": "'Conversation'"
1867
+ },
1868
+ {
1869
+ "name": "chatJumpToLatest",
1870
+ "kind": "property",
1871
+ "type": "string",
1872
+ "required": true,
1873
+ "doc": "bf-chat-thread's button that scrolls back to the newest message and follows it again.",
1874
+ "readonly": true,
1875
+ "default": "'Jump to latest'"
1876
+ },
1877
+ {
1878
+ "name": "chatMessageStopped",
1879
+ "kind": "property",
1880
+ "type": "string",
1881
+ "required": true,
1882
+ "doc": "bf-chat-message's status line for a reply the user stopped.",
1883
+ "readonly": true,
1884
+ "default": "'Stopped'"
1885
+ },
1886
+ {
1887
+ "name": "chatMessageFailed",
1888
+ "kind": "property",
1889
+ "type": "string",
1890
+ "required": true,
1891
+ "doc": "bf-chat-message's status line for a message that failed.",
1892
+ "readonly": true,
1893
+ "default": "'Something went wrong'"
1894
+ },
1895
+ {
1896
+ "name": "chatComposer",
1897
+ "kind": "property",
1898
+ "type": "string",
1899
+ "required": true,
1900
+ "doc": "bf-chat-composer's text field name when no `label` or `ariaLabel` is set.",
1901
+ "readonly": true,
1902
+ "default": "'Message'"
1903
+ },
1904
+ {
1905
+ "name": "chatSend",
1906
+ "kind": "property",
1907
+ "type": "string",
1908
+ "required": true,
1909
+ "doc": "bf-chat-composer's send button.",
1910
+ "readonly": true,
1911
+ "default": "'Send'"
1912
+ },
1913
+ {
1914
+ "name": "chatStop",
1915
+ "kind": "property",
1916
+ "type": "string",
1917
+ "required": true,
1918
+ "doc": "bf-chat-composer's stop button, shown in place of send while a reply runs.",
1919
+ "readonly": true,
1920
+ "default": "'Stop'"
1921
+ },
1922
+ {
1923
+ "name": "mediaCardSelect",
1924
+ "kind": "property",
1925
+ "type": "string",
1926
+ "required": true,
1927
+ "doc": "bf-media-card's select button, read before the card's name (\"Select Starfall\").",
1928
+ "readonly": true,
1929
+ "default": "'Select'"
1930
+ },
1931
+ {
1932
+ "name": "imageLoadFailed",
1933
+ "kind": "property",
1934
+ "type": "string",
1935
+ "required": true,
1936
+ "doc": "bf-media-card's, bf-image-tile's and bf-image-viewer's message for an image that failed to load.",
1937
+ "readonly": true,
1938
+ "default": "'The image could not be loaded'"
1939
+ },
1940
+ {
1941
+ "name": "imageTileEmpty",
1942
+ "kind": "property",
1943
+ "type": "string",
1944
+ "required": true,
1945
+ "doc": "bf-image-tile's placeholder text while it has no image yet.",
1946
+ "readonly": true,
1947
+ "default": "'No image yet'"
1948
+ },
1949
+ {
1950
+ "name": "imageTileSelected",
1951
+ "kind": "property",
1952
+ "type": "string",
1953
+ "required": true,
1954
+ "doc": "bf-image-tile's selected state, read before the tile's title (\"Selected, Dragon\").",
1955
+ "readonly": true,
1956
+ "default": "'Selected'"
1957
+ },
1958
+ {
1959
+ "name": "imageViewer",
1960
+ "kind": "property",
1961
+ "type": "string",
1962
+ "required": true,
1963
+ "doc": "bf-image-viewer's name.",
1964
+ "readonly": true,
1965
+ "default": "'Image viewer'"
1966
+ },
1967
+ {
1968
+ "name": "imageViewerPrevious",
1969
+ "kind": "property",
1970
+ "type": "string",
1971
+ "required": true,
1972
+ "doc": "bf-image-viewer's button that shows the previous image.",
1973
+ "readonly": true,
1974
+ "default": "'Previous image'"
1975
+ },
1976
+ {
1977
+ "name": "imageViewerNext",
1978
+ "kind": "property",
1979
+ "type": "string",
1980
+ "required": true,
1981
+ "doc": "bf-image-viewer's button that shows the next image.",
1982
+ "readonly": true,
1983
+ "default": "'Next image'"
1984
+ },
1985
+ {
1986
+ "name": "imageViewerPosition",
1987
+ "kind": "property",
1988
+ "type": "(position: number, count: number) => string",
1989
+ "required": true,
1990
+ "doc": "bf-image-viewer's counter: the shown image's position (1-based) among the images.",
1991
+ "readonly": true,
1992
+ "default": "(position, count) => `${position} of ${count}`"
1993
+ },
1572
1994
  {
1573
1995
  "name": "validation",
1574
1996
  "kind": "property",
@@ -1601,22 +2023,71 @@
1601
2023
  "signature": "type BfLabelsOverrides = Partial<Omit<BfLabels, 'validation'>> & { readonly validation?: Partial<BfValidationMessages>; }"
1602
2024
  },
1603
2025
  {
1604
- "name": "BfPageHeaderHeadingLevel",
1605
- "slug": "bf-page-header-heading-level",
2026
+ "name": "BfMediaCardAspect",
2027
+ "slug": "bf-media-card-aspect",
1606
2028
  "kind": "type",
1607
2029
  "entryPoint": "@bitforgehq/ui",
1608
- "file": "src/components/page-header/page-header.component.ts",
1609
- "summary": "The heading level of a page header title, one for a page or two",
1610
- "description": "The heading level of a `bf-page-header` title: `1` for the page, `2` for a section header.",
2030
+ "file": "src/components/media-card/media-card.component.ts",
2031
+ "summary": "The four aspect ratios of a media card's image area, wide to portrait",
2032
+ "description": "The aspect ratio of a `bf-media-card`'s image area: 16:9 (default), 4:3, square or 3:4.",
1611
2033
  "members": [],
1612
2034
  "methods": [],
1613
2035
  "slots": [],
1614
2036
  "references": [],
1615
- "usedBy": ["bf-page-header-component"],
1616
- "since": "0.3.1",
2037
+ "usedBy": ["bf-media-card-component"],
2038
+ "since": "0.5.0",
2039
+ "signature": "type BfMediaCardAspect = '16/9' | '4/3' | '1/1' | '3/4'",
2040
+ "values": ["16/9", "4/3", "1/1", "3/4"]
2041
+ },
2042
+ {
2043
+ "name": "BfMotionListDirective",
2044
+ "slug": "bf-motion-list-directive",
2045
+ "kind": "directive",
2046
+ "entryPoint": "@bitforgehq/ui",
2047
+ "file": "src/components/motion-list/motion-list.directive.ts",
2048
+ "summary": "Glides the items of a list or grid to their new place when it changes",
2049
+ "description": "Glides the items of an app's list or grid to their new place when items are added, removed or\nreordered, instead of letting them jump (the FLIP technique). Put `bfMotionList` on the element\nwhose direct children are the items, usually the one around an `@for`. Each item remembers\nwhere it was; after the DOM changes, every item that moved slides from its old place to its new\none over 200 ms (`--bf-duration-layout`, on the settle curve). Pair it with Angular's\n`animate.enter=\"motion-safe:animate-item-enter\"` and\n`animate.leave=\"motion-safe:animate-item-leave\"` on the items, so new items fade and rise in and\nremoved ones fade out before the rest close the gap. Nothing moves under\n`prefers-reduced-motion: reduce`, and nothing glides when the container is resized. It moves\nitems within one container: an item moved to another list leaves one and enters the other.",
2050
+ "members": [],
2051
+ "methods": [],
2052
+ "slots": [],
2053
+ "references": [],
2054
+ "usedBy": [],
2055
+ "since": "0.5.0",
2056
+ "selector": "[bfMotionList]"
2057
+ },
2058
+ {
2059
+ "name": "BfPageHeaderHeadingLevel",
2060
+ "slug": "bf-page-header-heading-level",
2061
+ "kind": "type",
2062
+ "entryPoint": "@bitforgehq/ui",
2063
+ "file": "src/components/page-header/page-header.component.ts",
2064
+ "summary": "The heading level of a page header title, one for a page or two",
2065
+ "description": "The heading level of a `bf-page-header` title: `1` for the page, `2` for a section header.",
2066
+ "members": [],
2067
+ "methods": [],
2068
+ "slots": [],
2069
+ "references": [],
2070
+ "usedBy": ["bf-page-header-component"],
2071
+ "since": "0.3.1",
1617
2072
  "signature": "type BfPageHeaderHeadingLevel = 1 | 2",
1618
2073
  "values": ["1", "2"]
1619
2074
  },
2075
+ {
2076
+ "name": "BfPaginationPositionLabel",
2077
+ "slug": "bf-pagination-position-label",
2078
+ "kind": "type",
2079
+ "entryPoint": "@bitforgehq/ui",
2080
+ "file": "src/components/pagination/pagination.component.ts",
2081
+ "summary": "Function that writes a compact pager's position text, such as \"v3 of 7\"",
2082
+ "description": "Writes a compact `bf-pagination`'s position text from the current page and the page count, such\nas \"v3 of 7\" for page 3 of 7.",
2083
+ "members": [],
2084
+ "methods": [],
2085
+ "slots": [],
2086
+ "references": [],
2087
+ "usedBy": ["bf-pagination-component"],
2088
+ "since": "0.5.0",
2089
+ "signature": "type BfPaginationPositionLabel = (page: number, count: number) => string"
2090
+ },
1620
2091
  {
1621
2092
  "name": "BfProgressSize",
1622
2093
  "slug": "bf-progress-size",
@@ -1651,6 +2122,22 @@
1651
2122
  "signature": "type BfProgressTone = 'primary' | 'success' | 'warning' | 'danger'",
1652
2123
  "values": ["primary", "success", "warning", "danger"]
1653
2124
  },
2125
+ {
2126
+ "name": "BfProseDirective",
2127
+ "slug": "bf-prose-directive",
2128
+ "kind": "directive",
2129
+ "entryPoint": "@bitforgehq/ui",
2130
+ "file": "src/components/chat-thread/prose.directive.ts",
2131
+ "summary": "Styles rendered markdown with the library tokens: headings, lists, code and quotes",
2132
+ "description": "Styles rendered markdown inside its element: headings, paragraphs, lists, links, inline code,\ncode blocks, quotes and rules, through the semantic tokens only (so a theme override restyles\nit). The app renders the markdown to HTML itself (and sanitises it); `bfProse` only styles it.\nA `bf-chat-message` body is a `bfProse` element already.",
2133
+ "members": [],
2134
+ "methods": [],
2135
+ "slots": [],
2136
+ "references": [],
2137
+ "usedBy": [],
2138
+ "since": "0.5.0",
2139
+ "selector": "[bfProse]"
2140
+ },
1654
2141
  {
1655
2142
  "name": "BfRadioGroupOrientation",
1656
2143
  "slug": "bf-radio-group-orientation",
@@ -1715,6 +2202,64 @@
1715
2202
  "since": "0.1.0",
1716
2203
  "signature": "interface BfRadioOption<T = string>"
1717
2204
  },
2205
+ {
2206
+ "name": "BfRejectedFile",
2207
+ "slug": "bf-rejected-file",
2208
+ "kind": "interface",
2209
+ "entryPoint": "@bitforgehq/ui",
2210
+ "file": "src/components/_shared/file-rules.ts",
2211
+ "summary": "A picked or dropped file that broke a rule, with the rule and its message",
2212
+ "description": "A picked or dropped file that broke a rule, with the rule and its message.",
2213
+ "members": [
2214
+ {
2215
+ "name": "file",
2216
+ "kind": "property",
2217
+ "type": "File",
2218
+ "required": true,
2219
+ "doc": "The file that was not added.",
2220
+ "readonly": true
2221
+ },
2222
+ {
2223
+ "name": "reason",
2224
+ "kind": "property",
2225
+ "type": "BfRejectedFileReason",
2226
+ "required": true,
2227
+ "doc": "The rule it broke: `type` (not accepted), `size` (over `maxSize`) or `count` (over the limit).",
2228
+ "readonly": true,
2229
+ "expandedType": "'type' | 'size' | 'count'"
2230
+ },
2231
+ {
2232
+ "name": "message",
2233
+ "kind": "property",
2234
+ "type": "string",
2235
+ "required": true,
2236
+ "doc": "The user-facing text for the rule, from the labels.",
2237
+ "readonly": true
2238
+ }
2239
+ ],
2240
+ "methods": [],
2241
+ "slots": [],
2242
+ "references": ["bf-rejected-file-reason"],
2243
+ "usedBy": ["bf-file-input-component", "bf-image-input-component"],
2244
+ "since": "0.5.0"
2245
+ },
2246
+ {
2247
+ "name": "BfRejectedFileReason",
2248
+ "slug": "bf-rejected-file-reason",
2249
+ "kind": "type",
2250
+ "entryPoint": "@bitforgehq/ui",
2251
+ "file": "src/components/_shared/file-rules.ts",
2252
+ "summary": "The rule a refused file broke, its type, its size or the file count",
2253
+ "description": "The rule a refused file broke: `type` (not accepted), `size` (over `maxSize`) or `count` (over\nthe limit).",
2254
+ "members": [],
2255
+ "methods": [],
2256
+ "slots": [],
2257
+ "references": [],
2258
+ "usedBy": ["bf-rejected-file"],
2259
+ "since": "0.5.0",
2260
+ "signature": "type BfRejectedFileReason = 'type' | 'size' | 'count'",
2261
+ "values": ["type", "size", "count"]
2262
+ },
1718
2263
  {
1719
2264
  "name": "BfSegmentedSize",
1720
2265
  "slug": "bf-segmented-size",
@@ -1777,7 +2322,7 @@
1777
2322
  "slug": "bf-select-option",
1778
2323
  "kind": "interface",
1779
2324
  "entryPoint": "@bitforgehq/ui",
1780
- "file": "src/components/select/select.component.ts",
2325
+ "file": "src/components/_shared/select-option.ts",
1781
2326
  "summary": "One choice of a select with its value, its label and a disabled flag",
1782
2327
  "description": "One choice of `bf-select`; `value` is any type (a string by default).",
1783
2328
  "members": [
@@ -1809,7 +2354,12 @@
1809
2354
  "references": [],
1810
2355
  "usedBy": ["bf-select-component"],
1811
2356
  "since": "0.1.0",
1812
- "signature": "interface BfSelectOption<T = string>"
2357
+ "signature": "interface BfSelectOption<T = string>",
2358
+ "alsoExportedFrom": [
2359
+ {
2360
+ "entryPoint": "@bitforgehq/ui/overlay"
2361
+ }
2362
+ ]
1813
2363
  },
1814
2364
  {
1815
2365
  "name": "BfSidebarStateService",
@@ -1851,6 +2401,7 @@
1851
2401
  "bf-button-component",
1852
2402
  "bf-button-size",
1853
2403
  "bf-calendar-component",
2404
+ "bf-chat-composer-component",
1854
2405
  "bf-checkbox-component",
1855
2406
  "bf-chip-component",
1856
2407
  "bf-combobox-component",
@@ -1860,7 +2411,9 @@
1860
2411
  "bf-defaults-options",
1861
2412
  "bf-field-control-state",
1862
2413
  "bf-field-size",
2414
+ "bf-file-input-component",
1863
2415
  "bf-icon-button-component",
2416
+ "bf-image-input-component",
1864
2417
  "bf-input-component",
1865
2418
  "bf-menu-button-component",
1866
2419
  "bf-menu-component",
@@ -2685,7 +3238,7 @@
2685
3238
  "entryPoint": "@bitforgehq/ui",
2686
3239
  "file": "src/config/labels.ts",
2687
3240
  "summary": "Replaces built-in strings for an app or a sub-tree, such as a translation",
2688
- "description": "Replaces built-in strings, merged over the parent's (validation merged key by key); a key left\nout or set to `undefined` keeps the parent's string. In `ApplicationConfig.providers` it covers\nevery string. In a component's `providers` it covers that sub-tree's widgets and form controls\n(`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `tableSelectAll`, `tableSortBy`,\n`tableSortNone`, `tableSortAscending`, `tableSortDescending`, `theme`, `themeSystem`, `themeLight`, `themeDark`,\n`breadcrumb`, `breadcrumbExpand`, `navigation`, `navBadge`, `sidebarCollapse`, `sidebarExpand`,\n`skipToContent`, `pagination`, `previousPage`, `nextPage`, `pageOf`, `goToPage`, `tabGroup`,\n`calendarPreviousMonth`, `calendarNextMonth`, `calendarChooseMonth`, `calendarChooseYear`,\n`statTrendUp`, `statTrendDown`, `statTrendFlat`, `comboboxEmpty`, `comboboxRemove`,\n`dateInputDay`, `dateInputMonth`, `dateInputYear`, `dateInputOpenCalendar`, `dateInputInvalid`,\n`dateInputUnavailable`, `timeInputHour`, `timeInputMinute`, `timeInputSecond`,\n`timeInputDayPeriod`, `timeInputOpenList`, `timeInputInvalid`, `timeInputMin`, `timeInputMax`,\n`chart`, `chartLegend`, `chartValues`, `chartShowData`, `chartHideData`, `chartCategory`,\n`chartValue`, `chartEmpty`, `chartError`, `listItemUnread`, `validation`); the overlay services (`ok`, `cancel`,\n`actions`, `sheet`, `modal`, `close`, `expand`, `collapse`, `sheetPosition`, `dialog`,\n`notifications`) are root singletons and pick it up only when the caller passes its injector:\n`open(…, { injector: inject(Injector) })`.",
3241
+ "description": "Replaces built-in strings, merged over the parent's (validation merged key by key); a key left\nout or set to `undefined` keeps the parent's string. In `ApplicationConfig.providers` it covers\nevery string. In a component's `providers` it covers that sub-tree's widgets and form controls\n(`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `tableSelectAll`, `tableSortBy`,\n`tableSortNone`, `tableSortAscending`, `tableSortDescending`, `theme`, `themeSystem`, `themeLight`, `themeDark`,\n`breadcrumb`, `breadcrumbExpand`, `navigation`, `navBadge`, `sidebarCollapse`, `sidebarExpand`,\n`skipToContent`, `pagination`, `previousPage`, `nextPage`, `pageOf`, `goToPage`, `tabGroup`,\n`calendarPreviousMonth`, `calendarNextMonth`, `calendarChooseMonth`, `calendarChooseYear`,\n`statTrendUp`, `statTrendDown`, `statTrendFlat`, `comboboxEmpty`, `comboboxRemove`,\n`dateInputDay`, `dateInputMonth`, `dateInputYear`, `dateInputOpenCalendar`, `dateInputInvalid`,\n`dateInputUnavailable`, `timeInputHour`, `timeInputMinute`, `timeInputSecond`,\n`timeInputDayPeriod`, `timeInputOpenList`, `timeInputInvalid`, `timeInputMin`, `timeInputMax`,\n`chart`, `chartLegend`, `chartValues`, `chartShowData`, `chartHideData`, `chartCategory`,\n`chartValue`, `chartEmpty`, `chartError`, `listItemUnread`,\n`fileInputChoose`, `fileInputDropHint`, `fileInputDropzone`, `fileInputTapToChoose`, `fileInputRemove`,\n`fileInputDismiss`, `fileInputAdded`, `fileInputNotAdded`, `fileInputRemoved`, `fileInputCount`,\n`fileRejectedType`, `fileRejectedSize`, `fileRejectedCount`,\n`imageInputChoose`, `imageInputUpload`, `imageInputReplace`, `imageInputRemove`,\n`chatThread`, `chatJumpToLatest`, `chatMessageStopped`, `chatMessageFailed`, `chatComposer`,\n`chatSend`, `chatStop`, `mediaCardSelect`, `imageLoadFailed`, `imageTileEmpty`,\n`imageTileSelected`, `validation`); the overlay\nservices (`ok`, `cancel`, `actions`, `sheet`, `modal`, `close`, `expand`, `collapse`,\n`sheetPosition`, `dialog`, `notifications`, `imageViewer`, `imageViewerPrevious`,\n`imageViewerNext`, `imageViewerPosition`) are root singletons and pick it up only when the caller passes its injector:\n`open(…, { injector: inject(Injector) })`.",
2689
3242
  "members": [],
2690
3243
  "methods": [
2691
3244
  {
@@ -2700,7 +3253,7 @@
2700
3253
  }
2701
3254
  ],
2702
3255
  "returns": "Provider",
2703
- "doc": "Replaces built-in strings, merged over the parent's (validation merged key by key); a key left\nout or set to `undefined` keeps the parent's string. In `ApplicationConfig.providers` it covers\nevery string. In a component's `providers` it covers that sub-tree's widgets and form controls\n(`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `tableSelectAll`, `tableSortBy`,\n`tableSortNone`, `tableSortAscending`, `tableSortDescending`, `theme`, `themeSystem`, `themeLight`, `themeDark`,\n`breadcrumb`, `breadcrumbExpand`, `navigation`, `navBadge`, `sidebarCollapse`, `sidebarExpand`,\n`skipToContent`, `pagination`, `previousPage`, `nextPage`, `pageOf`, `goToPage`, `tabGroup`,\n`calendarPreviousMonth`, `calendarNextMonth`, `calendarChooseMonth`, `calendarChooseYear`,\n`statTrendUp`, `statTrendDown`, `statTrendFlat`, `comboboxEmpty`, `comboboxRemove`,\n`dateInputDay`, `dateInputMonth`, `dateInputYear`, `dateInputOpenCalendar`, `dateInputInvalid`,\n`dateInputUnavailable`, `timeInputHour`, `timeInputMinute`, `timeInputSecond`,\n`timeInputDayPeriod`, `timeInputOpenList`, `timeInputInvalid`, `timeInputMin`, `timeInputMax`,\n`chart`, `chartLegend`, `chartValues`, `chartShowData`, `chartHideData`, `chartCategory`,\n`chartValue`, `chartEmpty`, `chartError`, `listItemUnread`, `validation`); the overlay services (`ok`, `cancel`,\n`actions`, `sheet`, `modal`, `close`, `expand`, `collapse`, `sheetPosition`, `dialog`,\n`notifications`) are root singletons and pick it up only when the caller passes its injector:\n`open(…, { injector: inject(Injector) })`."
3256
+ "doc": "Replaces built-in strings, merged over the parent's (validation merged key by key); a key left\nout or set to `undefined` keeps the parent's string. In `ApplicationConfig.providers` it covers\nevery string. In a component's `providers` it covers that sub-tree's widgets and form controls\n(`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `tableSelectAll`, `tableSortBy`,\n`tableSortNone`, `tableSortAscending`, `tableSortDescending`, `theme`, `themeSystem`, `themeLight`, `themeDark`,\n`breadcrumb`, `breadcrumbExpand`, `navigation`, `navBadge`, `sidebarCollapse`, `sidebarExpand`,\n`skipToContent`, `pagination`, `previousPage`, `nextPage`, `pageOf`, `goToPage`, `tabGroup`,\n`calendarPreviousMonth`, `calendarNextMonth`, `calendarChooseMonth`, `calendarChooseYear`,\n`statTrendUp`, `statTrendDown`, `statTrendFlat`, `comboboxEmpty`, `comboboxRemove`,\n`dateInputDay`, `dateInputMonth`, `dateInputYear`, `dateInputOpenCalendar`, `dateInputInvalid`,\n`dateInputUnavailable`, `timeInputHour`, `timeInputMinute`, `timeInputSecond`,\n`timeInputDayPeriod`, `timeInputOpenList`, `timeInputInvalid`, `timeInputMin`, `timeInputMax`,\n`chart`, `chartLegend`, `chartValues`, `chartShowData`, `chartHideData`, `chartCategory`,\n`chartValue`, `chartEmpty`, `chartError`, `listItemUnread`,\n`fileInputChoose`, `fileInputDropHint`, `fileInputDropzone`, `fileInputTapToChoose`, `fileInputRemove`,\n`fileInputDismiss`, `fileInputAdded`, `fileInputNotAdded`, `fileInputRemoved`, `fileInputCount`,\n`fileRejectedType`, `fileRejectedSize`, `fileRejectedCount`,\n`imageInputChoose`, `imageInputUpload`, `imageInputReplace`, `imageInputRemove`,\n`chatThread`, `chatJumpToLatest`, `chatMessageStopped`, `chatMessageFailed`, `chatComposer`,\n`chatSend`, `chatStop`, `mediaCardSelect`, `imageLoadFailed`, `imageTileEmpty`,\n`imageTileSelected`, `validation`); the overlay\nservices (`ok`, `cancel`, `actions`, `sheet`, `modal`, `close`, `expand`, `collapse`,\n`sheetPosition`, `dialog`, `notifications`, `imageViewer`, `imageViewerPrevious`,\n`imageViewerNext`, `imageViewerPosition`) are root singletons and pick it up only when the caller passes its injector:\n`open(…, { injector: inject(Injector) })`."
2704
3257
  }
2705
3258
  ],
2706
3259
  "slots": [],
@@ -3558,138 +4111,433 @@
3558
4111
  "signature": "interface BfDialogTemplateContext<D = unknown, R = unknown>"
3559
4112
  },
3560
4113
  {
3561
- "name": "BfMenuButtonVariant",
3562
- "slug": "bf-menu-button-variant",
3563
- "kind": "type",
3564
- "entryPoint": "@bitforgehq/ui/overlay",
3565
- "file": "overlay/menu-button/menu-button.component.ts",
3566
- "summary": "The three visual styles of a menu button, matching the button styles",
3567
- "description": "The visual style of a `bf-menu-button`: outline, text or tonal, as `bf-button`'s.",
3568
- "members": [],
3569
- "methods": [],
3570
- "slots": [],
3571
- "references": [],
3572
- "usedBy": ["bf-menu-button-component", "bf-theme-menu-button-component"],
3573
- "since": "0.3.0",
3574
- "signature": "type BfMenuButtonVariant = 'outline' | 'text' | 'tonal'",
3575
- "values": ["outline", "text", "tonal"]
3576
- },
3577
- {
3578
- "name": "BfMenuDividerDirective",
3579
- "slug": "bf-menu-divider-directive",
3580
- "kind": "directive",
4114
+ "name": "BfImageViewerActionsContext",
4115
+ "slug": "bf-image-viewer-actions-context",
4116
+ "kind": "interface",
3581
4117
  "entryPoint": "@bitforgehq/ui/overlay",
3582
- "file": "overlay/menu/menu-item.directive.ts",
3583
- "summary": "A line between groups of menu items that keyboard focus never lands on",
3584
- "description": "A line between groups of menu items (role `separator`, not focusable).",
3585
- "members": [],
4118
+ "file": "overlay/image-viewer/image-viewer-ref.ts",
4119
+ "summary": "What the viewer's actions template receives: the shown image, its index and the ref",
4120
+ "description": "Context of the `actions` template of `BfImageViewerService.open()`: `let-image`,\n`let-index=\"index\"` and `let-ref=\"ref\"`.",
4121
+ "members": [
4122
+ {
4123
+ "name": "$implicit",
4124
+ "kind": "property",
4125
+ "type": "BfImageViewerImage",
4126
+ "required": true,
4127
+ "doc": "The image the viewer shows (`let-image`)."
4128
+ },
4129
+ {
4130
+ "name": "index",
4131
+ "kind": "property",
4132
+ "type": "number",
4133
+ "required": true,
4134
+ "doc": "Its 0-based index in the set (`let-index=\"index\"`)."
4135
+ },
4136
+ {
4137
+ "name": "ref",
4138
+ "kind": "property",
4139
+ "type": "BfImageViewerRef",
4140
+ "required": true,
4141
+ "doc": "The viewer's ref (`let-ref=\"ref\"`), to close it or step."
4142
+ }
4143
+ ],
3586
4144
  "methods": [],
3587
4145
  "slots": [],
3588
- "references": [],
3589
- "usedBy": [],
3590
- "since": "0.3.0",
3591
- "selector": "[bfMenuDivider]"
4146
+ "references": ["bf-image-viewer-image", "bf-image-viewer-ref"],
4147
+ "usedBy": ["bf-image-viewer-options"],
4148
+ "since": "0.5.0"
3592
4149
  },
3593
4150
  {
3594
- "name": "BfMenuGroupDirective",
3595
- "slug": "bf-menu-group-directive",
3596
- "kind": "directive",
4151
+ "name": "BfImageViewerImage",
4152
+ "slug": "bf-image-viewer-image",
4153
+ "kind": "interface",
3597
4154
  "entryPoint": "@bitforgehq/ui/overlay",
3598
- "file": "overlay/menu/menu-item.directive.ts",
3599
- "summary": "Groups related menu items; radio items in one group exclude each other",
3600
- "description": "A group of menu items (role `group`); radio items in one group are exclusive. Name it with\n`aria-label` when its items share a topic (\"Density\").",
3601
- "members": [],
4155
+ "file": "overlay/image-viewer/image-viewer-ref.ts",
4156
+ "summary": "One image the viewer shows: its URL, its name as alternative text and a caption",
4157
+ "description": "One image of a `BfImageViewerService.open()` set.",
4158
+ "members": [
4159
+ {
4160
+ "name": "src",
4161
+ "kind": "property",
4162
+ "type": "string",
4163
+ "required": true,
4164
+ "doc": "URL of the full-size image."
4165
+ },
4166
+ {
4167
+ "name": "label",
4168
+ "kind": "property",
4169
+ "type": "string",
4170
+ "required": true,
4171
+ "doc": "The image's name: its alternative text (`alt`), read when it shows and announced after a step (required: the viewer shows nothing else that names it)."
4172
+ },
4173
+ {
4174
+ "name": "caption",
4175
+ "kind": "property",
4176
+ "type": "string",
4177
+ "required": false,
4178
+ "doc": "Text shown under the image; none shows no caption.",
4179
+ "optional": true
4180
+ }
4181
+ ],
3602
4182
  "methods": [],
3603
4183
  "slots": [],
3604
4184
  "references": [],
3605
- "usedBy": [],
3606
- "since": "0.3.0",
3607
- "selector": "[bfMenuGroup]"
4185
+ "usedBy": [
4186
+ "bf-image-viewer-actions-context",
4187
+ "bf-image-viewer-options",
4188
+ "bf-image-viewer-ref"
4189
+ ],
4190
+ "since": "0.5.0"
3608
4191
  },
3609
4192
  {
3610
- "name": "BfMenuItemCheckboxDirective",
3611
- "slug": "bf-menu-item-checkbox-directive",
3612
- "kind": "directive",
4193
+ "name": "BfImageViewerOptions",
4194
+ "slug": "bf-image-viewer-options",
4195
+ "kind": "interface",
3613
4196
  "entryPoint": "@bitforgehq/ui/overlay",
3614
- "file": "overlay/menu/menu-item.directive.ts",
3615
- "summary": "A menu row that toggles an option on and off with a check mark",
3616
- "description": "A toggle row of a `bf-menu` (role `menuitemcheckbox`) with a check mark while `checked`.\nActivating it (click, `Enter`, `Space`) flips its own `checked` (`aria-checked`), emits\n`triggered`, then `changed` (and `checkedChange`) with the new state, and closes the menu. Bind\nit two-way, `[(checked)]`, so your state always follows the item.",
4197
+ "file": "overlay/image-viewer/image-viewer.service.ts",
4198
+ "summary": "Options of an image viewer: its images, the first one, its thumbnail and actions",
4199
+ "description": "Options of `BfImageViewerService.open()`.",
3617
4200
  "members": [
3618
4201
  {
3619
- "name": "checked",
3620
- "kind": "model",
3621
- "type": "boolean",
4202
+ "name": "images",
4203
+ "kind": "property",
4204
+ "type": "readonly BfImageViewerImage[]",
4205
+ "required": true,
4206
+ "doc": "The images to step through, in order; at least one."
4207
+ },
4208
+ {
4209
+ "name": "index",
4210
+ "kind": "property",
4211
+ "type": "number",
3622
4212
  "required": false,
3623
- "doc": "Whether the item is checked. The item flips it itself on activation (and emits `checkedChange`), so bind it two-way: `[(checked)]`.",
3624
- "default": "false",
3625
- "twoWay": true
4213
+ "doc": "Index of the image shown first, wrapped into the set.",
4214
+ "optional": true,
4215
+ "default": "0"
3626
4216
  },
3627
4217
  {
3628
- "name": "changed",
3629
- "kind": "output",
3630
- "type": "boolean",
4218
+ "name": "origin",
4219
+ "kind": "property",
4220
+ "type": "BfImageViewerOrigin",
3631
4221
  "required": false,
3632
- "doc": "Emitted with the new state right after the user toggles the item."
4222
+ "doc": "The thumbnail the viewer zooms out of and back into (or a function returning the thumbnail of an image by index); none fades the viewer in and out.",
4223
+ "optional": true,
4224
+ "expandedType": "HTMLElement | (index: number) => HTMLElement | null | undefined"
3633
4225
  },
3634
4226
  {
3635
- "name": "bfMenuItemDisabled",
3636
- "kind": "input",
3637
- "type": "boolean",
4227
+ "name": "actions",
4228
+ "kind": "property",
4229
+ "type": "TemplateRef<BfImageViewerActionsContext>",
3638
4230
  "required": false,
3639
- "doc": "Whether the item is disabled: it stays focusable and announced, but does not activate."
4231
+ "doc": "Actions under the image, beside its caption (a download link, a \"Use this one\" button); its context is `{ $implicit: image, index, ref }`.",
4232
+ "optional": true
3640
4233
  },
3641
4234
  {
3642
- "name": "bfMenuItemTypeahead",
3643
- "kind": "input",
3644
- "type": "string | null",
4235
+ "name": "ariaLabel",
4236
+ "kind": "property",
4237
+ "type": "string",
3645
4238
  "required": false,
3646
- "doc": "The text typeahead matches the item by (default: its text content)."
4239
+ "doc": "Accessible name of the viewer; empty uses `provideBfLabels()`'s `imageViewer`.",
4240
+ "optional": true
3647
4241
  },
3648
4242
  {
3649
- "name": "triggered",
3650
- "kind": "output",
3651
- "type": "void",
4243
+ "name": "closeOnNavigation",
4244
+ "kind": "property",
4245
+ "type": "boolean",
3652
4246
  "required": false,
3653
- "doc": "Emits when the item is activated (click, `Enter` or `Space`), before `checked` flips."
4247
+ "doc": "A navigation to another URL path closes the viewer (default true).",
4248
+ "optional": true,
4249
+ "default": "true"
4250
+ },
4251
+ {
4252
+ "name": "injector",
4253
+ "kind": "property",
4254
+ "type": "Injector",
4255
+ "required": false,
4256
+ "doc": "Parent of the viewer's injector and source of its labels (default the root injector). Pass the opener's `inject(Injector)` so a feature-level `provideBfLabels()` reaches the viewer.",
4257
+ "optional": true
3654
4258
  }
3655
4259
  ],
3656
4260
  "methods": [],
3657
4261
  "slots": [],
4262
+ "references": [
4263
+ "bf-image-viewer-actions-context",
4264
+ "bf-image-viewer-image",
4265
+ "bf-image-viewer-origin"
4266
+ ],
4267
+ "usedBy": ["bf-image-viewer-service"],
4268
+ "since": "0.5.0"
4269
+ },
4270
+ {
4271
+ "name": "BfImageViewerOrigin",
4272
+ "slug": "bf-image-viewer-origin",
4273
+ "kind": "type",
4274
+ "entryPoint": "@bitforgehq/ui/overlay",
4275
+ "file": "overlay/image-viewer/image-viewer-ref.ts",
4276
+ "summary": "The thumbnail an image viewer zooms from and back into, or a lookup per image",
4277
+ "description": "Where the viewer zooms from and back to: the thumbnail that was clicked, or a function that\nreturns the thumbnail of any image of the set (so closing after stepping zooms into the right\none), `null` for none.",
4278
+ "members": [],
4279
+ "methods": [],
4280
+ "slots": [],
3658
4281
  "references": [],
3659
- "usedBy": [],
3660
- "since": "0.3.0",
3661
- "selector": "button[bfMenuItemCheckbox]"
4282
+ "usedBy": ["bf-image-viewer-options"],
4283
+ "since": "0.5.0",
4284
+ "signature": "type BfImageViewerOrigin = HTMLElement | ((index: number) => HTMLElement | null | undefined) | null"
3662
4285
  },
3663
4286
  {
3664
- "name": "BfMenuItemDirective",
3665
- "slug": "bf-menu-item-directive",
3666
- "kind": "directive",
4287
+ "name": "BfImageViewerRef",
4288
+ "slug": "bf-image-viewer-ref",
4289
+ "kind": "class",
3667
4290
  "entryPoint": "@bitforgehq/ui/overlay",
3668
- "file": "overlay/menu/menu-item.directive.ts",
3669
- "summary": "An action row of a menu on a native button or link, with keyboard rules",
3670
- "description": "An action row of a `bf-menu` (role `menuitem`), on a native `<button>` or a link (`<a>` with\n`href` or `routerLink`). Activating it (click, `Enter`, `Space`) emits `triggered`, closes every\nopen menu and returns focus to the trigger. With `[bfMenuTriggerFor]` on the same element it\nopens a submenu instead (and shows a chevron). A disabled item stays focusable and announces\nitself as disabled, but does not activate; a disabled link does not navigate either, also with\n`routerLink`.",
4291
+ "file": "overlay/image-viewer/image-viewer-ref.ts",
4292
+ "summary": "Handle on an open image viewer that steps through its images and closes it",
4293
+ "description": "Handle to an open image viewer, returned by `BfImageViewerService.open()` and injectable in\nits actions template (`inject(BfImageViewerRef)`). `index` is the shown image; `next()`,\n`previous()` and `goTo()` step through the set (wrapping at both ends), `close()` plays the\nexit motion and resolves `afterClosed`.",
3671
4294
  "members": [
3672
4295
  {
3673
- "name": "bfMenuItemDisabled",
3674
- "kind": "input",
3675
- "type": "boolean",
4296
+ "name": "id",
4297
+ "kind": "property",
4298
+ "type": "string",
3676
4299
  "required": false,
3677
- "doc": "Whether the item is disabled: it stays focusable and announced, but does not activate."
4300
+ "doc": "Unique id of the viewer (its overlay's `bf-overlay-N`).",
4301
+ "readonly": true
3678
4302
  },
3679
4303
  {
3680
- "name": "bfMenuItemTypeahead",
3681
- "kind": "input",
3682
- "type": "string | null",
4304
+ "name": "images",
4305
+ "kind": "property",
4306
+ "type": "readonly BfImageViewerImage[]",
3683
4307
  "required": false,
3684
- "doc": "The text typeahead matches the item by (default: its text content)."
4308
+ "doc": "The images of the set, in order.",
4309
+ "readonly": true
3685
4310
  },
3686
4311
  {
3687
- "name": "triggered",
3688
- "kind": "output",
3689
- "type": "void",
4312
+ "name": "afterClosed",
4313
+ "kind": "property",
4314
+ "type": "Promise<void>",
3690
4315
  "required": false,
3691
- "doc": "Emits when the item is activated (click, `Enter` or `Space`), unless it opens a submenu."
3692
- }
4316
+ "doc": "Resolves once the viewer has closed and left the page.",
4317
+ "readonly": true
4318
+ },
4319
+ {
4320
+ "name": "closed",
4321
+ "kind": "property",
4322
+ "type": "Signal<boolean>",
4323
+ "required": false,
4324
+ "doc": "True once the viewer has been detached.",
4325
+ "readonly": true
4326
+ },
4327
+ {
4328
+ "name": "index",
4329
+ "kind": "property",
4330
+ "type": "Signal<number>",
4331
+ "required": false,
4332
+ "doc": "Index (0-based) of the image the viewer shows.",
4333
+ "readonly": true
4334
+ }
4335
+ ],
4336
+ "methods": [
4337
+ {
4338
+ "name": "next",
4339
+ "signature": "next(): void",
4340
+ "params": [],
4341
+ "returns": "void",
4342
+ "doc": "Shows the next image; after the last one, the first."
4343
+ },
4344
+ {
4345
+ "name": "previous",
4346
+ "signature": "previous(): void",
4347
+ "params": [],
4348
+ "returns": "void",
4349
+ "doc": "Shows the previous image; before the first one, the last."
4350
+ },
4351
+ {
4352
+ "name": "goTo",
4353
+ "signature": "goTo(index: number): void",
4354
+ "params": [
4355
+ {
4356
+ "name": "index",
4357
+ "type": "number",
4358
+ "optional": false,
4359
+ "doc": "The 0-based index of the image to show."
4360
+ }
4361
+ ],
4362
+ "returns": "void",
4363
+ "doc": "Shows the image at `index`, wrapped into the set (`-1` is the last one)."
4364
+ },
4365
+ {
4366
+ "name": "close",
4367
+ "signature": "close(): void",
4368
+ "params": [],
4369
+ "returns": "void",
4370
+ "doc": "Closes the viewer: it zooms back into its thumbnail, or fades out. Ignored once closing."
4371
+ }
4372
+ ],
4373
+ "slots": [],
4374
+ "references": ["bf-image-viewer-image"],
4375
+ "usedBy": ["bf-image-viewer-actions-context", "bf-image-viewer-service"],
4376
+ "since": "0.5.0"
4377
+ },
4378
+ {
4379
+ "name": "BfImageViewerService",
4380
+ "slug": "bf-image-viewer-service",
4381
+ "kind": "service",
4382
+ "entryPoint": "@bitforgehq/ui/overlay",
4383
+ "file": "overlay/image-viewer/image-viewer.service.ts",
4384
+ "summary": "Opens a full-screen image viewer that zooms from a thumbnail and steps through a set",
4385
+ "description": "Opens a full-screen image viewer (a lightbox) on the overlay core: one image large over a dark\nscrim, previous and next buttons, the arrow keys, Home and End to step through the set\n(wrapping at both ends), a counter, the caption and optional actions. It zooms out of the\nclicked thumbnail (`origin`) and back into it, cross-fades between images, and fades when there\nis no thumbnail on screen; reduced motion only fades. It is a modal dialog: focus moves to its\nclose button and is trapped, `Escape`, the close button and a click on the scrim close it, the\npage behind it is `inert` and does not scroll, and focus returns to the opener.",
4386
+ "members": [],
4387
+ "methods": [
4388
+ {
4389
+ "name": "open",
4390
+ "signature": "open(options: BfImageViewerOptions): BfImageViewerRef",
4391
+ "params": [
4392
+ {
4393
+ "name": "options",
4394
+ "type": "BfImageViewerOptions",
4395
+ "optional": false,
4396
+ "doc": "The images, the first index, the thumbnail, the actions and the injector."
4397
+ }
4398
+ ],
4399
+ "returns": "BfImageViewerRef",
4400
+ "doc": "Opens the viewer on `options.images`, showing `options.index` first."
4401
+ }
4402
+ ],
4403
+ "slots": [],
4404
+ "references": ["bf-image-viewer-options", "bf-image-viewer-ref"],
4405
+ "usedBy": [],
4406
+ "since": "0.5.0"
4407
+ },
4408
+ {
4409
+ "name": "BfMenuButtonVariant",
4410
+ "slug": "bf-menu-button-variant",
4411
+ "kind": "type",
4412
+ "entryPoint": "@bitforgehq/ui/overlay",
4413
+ "file": "overlay/menu-button/menu-button.component.ts",
4414
+ "summary": "The three visual styles of a menu button, matching the button styles",
4415
+ "description": "The visual style of a `bf-menu-button`: outline, text or tonal, as `bf-button`'s.",
4416
+ "members": [],
4417
+ "methods": [],
4418
+ "slots": [],
4419
+ "references": [],
4420
+ "usedBy": ["bf-menu-button-component", "bf-theme-menu-button-component"],
4421
+ "since": "0.3.0",
4422
+ "signature": "type BfMenuButtonVariant = 'outline' | 'text' | 'tonal'",
4423
+ "values": ["outline", "text", "tonal"]
4424
+ },
4425
+ {
4426
+ "name": "BfMenuDividerDirective",
4427
+ "slug": "bf-menu-divider-directive",
4428
+ "kind": "directive",
4429
+ "entryPoint": "@bitforgehq/ui/overlay",
4430
+ "file": "overlay/menu/menu-item.directive.ts",
4431
+ "summary": "A line between groups of menu items that keyboard focus never lands on",
4432
+ "description": "A line between groups of menu items (role `separator`, not focusable).",
4433
+ "members": [],
4434
+ "methods": [],
4435
+ "slots": [],
4436
+ "references": [],
4437
+ "usedBy": [],
4438
+ "since": "0.3.0",
4439
+ "selector": "[bfMenuDivider]"
4440
+ },
4441
+ {
4442
+ "name": "BfMenuGroupDirective",
4443
+ "slug": "bf-menu-group-directive",
4444
+ "kind": "directive",
4445
+ "entryPoint": "@bitforgehq/ui/overlay",
4446
+ "file": "overlay/menu/menu-item.directive.ts",
4447
+ "summary": "Groups related menu items; radio items in one group exclude each other",
4448
+ "description": "A group of menu items (role `group`); radio items in one group are exclusive. Name it with\n`aria-label` when its items share a topic (\"Density\").",
4449
+ "members": [],
4450
+ "methods": [],
4451
+ "slots": [],
4452
+ "references": [],
4453
+ "usedBy": [],
4454
+ "since": "0.3.0",
4455
+ "selector": "[bfMenuGroup]"
4456
+ },
4457
+ {
4458
+ "name": "BfMenuItemCheckboxDirective",
4459
+ "slug": "bf-menu-item-checkbox-directive",
4460
+ "kind": "directive",
4461
+ "entryPoint": "@bitforgehq/ui/overlay",
4462
+ "file": "overlay/menu/menu-item.directive.ts",
4463
+ "summary": "A menu row that toggles an option on and off with a check mark",
4464
+ "description": "A toggle row of a `bf-menu` (role `menuitemcheckbox`) with a check mark while `checked`.\nActivating it (click, `Enter`, `Space`) flips its own `checked` (`aria-checked`), emits\n`triggered`, then `changed` (and `checkedChange`) with the new state, and closes the menu. Bind\nit two-way, `[(checked)]`, so your state always follows the item.",
4465
+ "members": [
4466
+ {
4467
+ "name": "checked",
4468
+ "kind": "model",
4469
+ "type": "boolean",
4470
+ "required": false,
4471
+ "doc": "Whether the item is checked. The item flips it itself on activation (and emits `checkedChange`), so bind it two-way: `[(checked)]`.",
4472
+ "default": "false",
4473
+ "twoWay": true
4474
+ },
4475
+ {
4476
+ "name": "changed",
4477
+ "kind": "output",
4478
+ "type": "boolean",
4479
+ "required": false,
4480
+ "doc": "Emitted with the new state right after the user toggles the item."
4481
+ },
4482
+ {
4483
+ "name": "bfMenuItemDisabled",
4484
+ "kind": "input",
4485
+ "type": "boolean",
4486
+ "required": false,
4487
+ "doc": "Whether the item is disabled: it stays focusable and announced, but does not activate."
4488
+ },
4489
+ {
4490
+ "name": "bfMenuItemTypeahead",
4491
+ "kind": "input",
4492
+ "type": "string | null",
4493
+ "required": false,
4494
+ "doc": "The text typeahead matches the item by (default: its text content)."
4495
+ },
4496
+ {
4497
+ "name": "triggered",
4498
+ "kind": "output",
4499
+ "type": "void",
4500
+ "required": false,
4501
+ "doc": "Emits when the item is activated (click, `Enter` or `Space`), before `checked` flips."
4502
+ }
4503
+ ],
4504
+ "methods": [],
4505
+ "slots": [],
4506
+ "references": [],
4507
+ "usedBy": [],
4508
+ "since": "0.3.0",
4509
+ "selector": "button[bfMenuItemCheckbox]"
4510
+ },
4511
+ {
4512
+ "name": "BfMenuItemDirective",
4513
+ "slug": "bf-menu-item-directive",
4514
+ "kind": "directive",
4515
+ "entryPoint": "@bitforgehq/ui/overlay",
4516
+ "file": "overlay/menu/menu-item.directive.ts",
4517
+ "summary": "An action row of a menu on a native button or link, with keyboard rules",
4518
+ "description": "An action row of a `bf-menu` (role `menuitem`), on a native `<button>` or a link (`<a>` with\n`href` or `routerLink`). Activating it (click, `Enter`, `Space`) emits `triggered`, closes every\nopen menu and returns focus to the trigger. With `[bfMenuTriggerFor]` on the same element it\nopens a submenu instead (and shows a chevron). A disabled item stays focusable and announces\nitself as disabled, but does not activate; a disabled link does not navigate either, also with\n`routerLink`.",
4519
+ "members": [
4520
+ {
4521
+ "name": "bfMenuItemDisabled",
4522
+ "kind": "input",
4523
+ "type": "boolean",
4524
+ "required": false,
4525
+ "doc": "Whether the item is disabled: it stays focusable and announced, but does not activate."
4526
+ },
4527
+ {
4528
+ "name": "bfMenuItemTypeahead",
4529
+ "kind": "input",
4530
+ "type": "string | null",
4531
+ "required": false,
4532
+ "doc": "The text typeahead matches the item by (default: its text content)."
4533
+ },
4534
+ {
4535
+ "name": "triggered",
4536
+ "kind": "output",
4537
+ "type": "void",
4538
+ "required": false,
4539
+ "doc": "Emits when the item is activated (click, `Enter` or `Space`), unless it opens a submenu."
4540
+ }
3693
4541
  ],
3694
4542
  "methods": [],
3695
4543
  "slots": [],
@@ -5436,6 +6284,30 @@
5436
6284
  "since": "0.3.0",
5437
6285
  "signature": "function provideBfDesktopToast(config?: Partial<BfDesktopToastConfig>): EnvironmentProviders"
5438
6286
  },
6287
+ {
6288
+ "name": "provideBfSelect",
6289
+ "slug": "provide-bf-select",
6290
+ "kind": "function",
6291
+ "entryPoint": "@bitforgehq/ui/overlay",
6292
+ "file": "overlay/select/provide-bf-select.ts",
6293
+ "summary": "Makes a stacked table's Sort by select the styled bf-select, app-wide",
6294
+ "description": "Makes the library's built-in selects use the styled `bf-select`: a stacked `bf-table` then\nrenders its Sort by select as a `bf-select` (the native `<select>` under a coarse pointer, as\n`bf-select` itself does) instead of the plain native one. Add it to\n`ApplicationConfig.providers`.",
6295
+ "members": [],
6296
+ "methods": [
6297
+ {
6298
+ "name": "provideBfSelect",
6299
+ "signature": "provideBfSelect(): EnvironmentProviders",
6300
+ "params": [],
6301
+ "returns": "EnvironmentProviders",
6302
+ "doc": "Makes the library's built-in selects use the styled `bf-select`: a stacked `bf-table` then\nrenders its Sort by select as a `bf-select` (the native `<select>` under a coarse pointer, as\n`bf-select` itself does) instead of the plain native one. Add it to\n`ApplicationConfig.providers`."
6303
+ }
6304
+ ],
6305
+ "slots": [],
6306
+ "references": [],
6307
+ "usedBy": [],
6308
+ "since": "0.5.0",
6309
+ "signature": "function provideBfSelect(): EnvironmentProviders"
6310
+ },
5439
6311
  {
5440
6312
  "name": "scaleIn",
5441
6313
  "slug": "scale-in",
@@ -8691,13 +9563,13 @@
8691
9563
  "signature": "class BfChartHarness extends ComponentHarness"
8692
9564
  },
8693
9565
  {
8694
- "name": "BfComboboxHarness",
8695
- "slug": "bf-combobox-harness",
9566
+ "name": "BfChatComposerHarness",
9567
+ "slug": "bf-chat-composer-harness",
8696
9568
  "kind": "class",
8697
9569
  "entryPoint": "@bitforgehq/ui/testing",
8698
- "file": "testing/harnesses/combobox.harness.ts",
8699
- "summary": "Test harness for the comboboxes: types, reads and picks options and tags",
8700
- "description": "Harness for `bf-combobox` and `bf-multi-combobox`. Its option list renders in the CDK overlay\ncontainer while open (found through the input's `aria-controls`); it works by option label, so a\ntest never needs the option values. Its `label` filter matches the visible label, else the\n`aria-label`.",
9570
+ "file": "testing/harnesses/chat-composer.harness.ts",
9571
+ "summary": "Test harness for the chat composer: types, sends, stops and reads its state",
9572
+ "description": "Harness for `bf-chat-composer` (`@bitforgehq/ui/overlay`). Its `label` filter matches the text\nfield's name: the visible label, else its `aria-label` (\"Message\" by default).",
8701
9573
  "members": [],
8702
9574
  "methods": [
8703
9575
  {
@@ -8705,54 +9577,148 @@
8705
9577
  "signature": "getLabel(): Promise<string>",
8706
9578
  "params": [],
8707
9579
  "returns": "Promise<string>",
8708
- "doc": "The visible label without the required mark, else the `aria-label`."
8709
- },
8710
- {
8711
- "name": "open",
8712
- "signature": "open(): Promise<void>",
8713
- "params": [],
8714
- "returns": "Promise<void>",
8715
- "doc": "Opens the option list with a click into the field; does nothing while it is open."
8716
- },
8717
- {
8718
- "name": "close",
8719
- "signature": "close(): Promise<void>",
8720
- "params": [],
8721
- "returns": "Promise<void>",
8722
- "doc": "Closes the option list with `Escape`, as a user would; does nothing while it is closed."
9580
+ "doc": "The text field's name: the visible label, else its `aria-label`."
8723
9581
  },
8724
9582
  {
8725
- "name": "isOpen",
8726
- "signature": "isOpen(): Promise<boolean>",
9583
+ "name": "getValue",
9584
+ "signature": "getValue(): Promise<string>",
8727
9585
  "params": [],
8728
- "returns": "Promise<boolean>",
8729
- "doc": "Whether the option list is open (`aria-expanded`)."
9586
+ "returns": "Promise<string>",
9587
+ "doc": "The text in the field."
8730
9588
  },
8731
9589
  {
8732
- "name": "type",
8733
- "signature": "type(query: string): Promise<void>",
9590
+ "name": "setValue",
9591
+ "signature": "setValue(text: string): Promise<void>",
8734
9592
  "params": [
8735
9593
  {
8736
- "name": "query",
9594
+ "name": "text",
8737
9595
  "type": "string",
8738
9596
  "optional": false,
8739
- "doc": "The text to type."
9597
+ "doc": "The new text."
8740
9598
  }
8741
9599
  ],
8742
9600
  "returns": "Promise<void>",
8743
- "doc": "Replaces the field's text with `query`, key by key as a user types; the list opens filtered."
9601
+ "doc": "Replaces the text as the user would type it (`changed` and the value update)."
8744
9602
  },
8745
9603
  {
8746
- "name": "getOptionLabels",
8747
- "signature": "getOptionLabels(): Promise<string[]>",
9604
+ "name": "send",
9605
+ "signature": "send(): Promise<void>",
8748
9606
  "params": [],
8749
- "returns": "Promise<string[]>",
8750
- "doc": "The labels of the listed options, in order, opening the list first when it is closed."
9607
+ "returns": "Promise<void>",
9608
+ "doc": "Sends the text with the send button, as a click does. Does nothing while it cannot send."
8751
9609
  },
8752
9610
  {
8753
- "name": "selectOption",
8754
- "signature": "selectOption(label: string): Promise<void>",
8755
- "params": [
9611
+ "name": "pressEnter",
9612
+ "signature": "pressEnter(): Promise<void>",
9613
+ "params": [],
9614
+ "returns": "Promise<void>",
9615
+ "doc": "Sends the text with `Enter` in the field, as the keyboard does."
9616
+ },
9617
+ {
9618
+ "name": "stop",
9619
+ "signature": "stop(): Promise<void>",
9620
+ "params": [],
9621
+ "returns": "Promise<void>",
9622
+ "doc": "Stops the running reply with the stop button. Does nothing unless a reply is running."
9623
+ },
9624
+ {
9625
+ "name": "isRunning",
9626
+ "signature": "isRunning(): Promise<boolean>",
9627
+ "params": [],
9628
+ "returns": "Promise<boolean>",
9629
+ "doc": "Whether a reply is running, so the button stops instead of sending."
9630
+ },
9631
+ {
9632
+ "name": "isDisabled",
9633
+ "signature": "isDisabled(): Promise<boolean>",
9634
+ "params": [],
9635
+ "returns": "Promise<boolean>",
9636
+ "doc": "Whether the composer is disabled (its text field is)."
9637
+ },
9638
+ {
9639
+ "name": "canAct",
9640
+ "signature": "canAct(): Promise<boolean>",
9641
+ "params": [],
9642
+ "returns": "Promise<boolean>",
9643
+ "doc": "Whether the button can send (or stop) now: not disabled and, to send, with text."
9644
+ },
9645
+ {
9646
+ "name": "getButtonLabel",
9647
+ "signature": "getButtonLabel(): Promise<string>",
9648
+ "params": [],
9649
+ "returns": "Promise<string>",
9650
+ "doc": "The button's name, \"Send\" or \"Stop\" by default."
9651
+ }
9652
+ ],
9653
+ "slots": [],
9654
+ "references": [],
9655
+ "usedBy": [],
9656
+ "since": "0.5.0",
9657
+ "signature": "class BfChatComposerHarness extends ComponentHarness"
9658
+ },
9659
+ {
9660
+ "name": "BfComboboxHarness",
9661
+ "slug": "bf-combobox-harness",
9662
+ "kind": "class",
9663
+ "entryPoint": "@bitforgehq/ui/testing",
9664
+ "file": "testing/harnesses/combobox.harness.ts",
9665
+ "summary": "Test harness for the comboboxes: types, reads and picks options and tags",
9666
+ "description": "Harness for `bf-combobox` and `bf-multi-combobox`. Its option list renders in the CDK overlay\ncontainer while open (found through the input's `aria-controls`); it works by option label, so a\ntest never needs the option values. Its `label` filter matches the visible label, else the\n`aria-label`.",
9667
+ "members": [],
9668
+ "methods": [
9669
+ {
9670
+ "name": "getLabel",
9671
+ "signature": "getLabel(): Promise<string>",
9672
+ "params": [],
9673
+ "returns": "Promise<string>",
9674
+ "doc": "The visible label without the required mark, else the `aria-label`."
9675
+ },
9676
+ {
9677
+ "name": "open",
9678
+ "signature": "open(): Promise<void>",
9679
+ "params": [],
9680
+ "returns": "Promise<void>",
9681
+ "doc": "Opens the option list with a click into the field; does nothing while it is open."
9682
+ },
9683
+ {
9684
+ "name": "close",
9685
+ "signature": "close(): Promise<void>",
9686
+ "params": [],
9687
+ "returns": "Promise<void>",
9688
+ "doc": "Closes the option list with `Escape`, as a user would; does nothing while it is closed."
9689
+ },
9690
+ {
9691
+ "name": "isOpen",
9692
+ "signature": "isOpen(): Promise<boolean>",
9693
+ "params": [],
9694
+ "returns": "Promise<boolean>",
9695
+ "doc": "Whether the option list is open (`aria-expanded`)."
9696
+ },
9697
+ {
9698
+ "name": "type",
9699
+ "signature": "type(query: string): Promise<void>",
9700
+ "params": [
9701
+ {
9702
+ "name": "query",
9703
+ "type": "string",
9704
+ "optional": false,
9705
+ "doc": "The text to type."
9706
+ }
9707
+ ],
9708
+ "returns": "Promise<void>",
9709
+ "doc": "Replaces the field's text with `query`, key by key as a user types; the list opens filtered."
9710
+ },
9711
+ {
9712
+ "name": "getOptionLabels",
9713
+ "signature": "getOptionLabels(): Promise<string[]>",
9714
+ "params": [],
9715
+ "returns": "Promise<string[]>",
9716
+ "doc": "The labels of the listed options, in order, opening the list first when it is closed."
9717
+ },
9718
+ {
9719
+ "name": "selectOption",
9720
+ "signature": "selectOption(label: string): Promise<void>",
9721
+ "params": [
8756
9722
  {
8757
9723
  "name": "label",
8758
9724
  "type": "string",
@@ -9125,6 +10091,100 @@
9125
10091
  "since": "0.3.0",
9126
10092
  "signature": "class BfDialogHarness extends ComponentHarness"
9127
10093
  },
10094
+ {
10095
+ "name": "BfFileInputHarness",
10096
+ "slug": "bf-file-input-harness",
10097
+ "kind": "class",
10098
+ "entryPoint": "@bitforgehq/ui/testing",
10099
+ "file": "testing/harnesses/file-input.harness.ts",
10100
+ "summary": "Test harness for the file input: drops files and reads the list and rejections",
10101
+ "description": "Harness for `bf-file-input`, in both looks. `addFiles()` drops files on the field, so they go\nthrough the same `accept`, `maxSize` and `maxFiles` rules as a real drop; read the outcome with\n`getFileNames()` and `getRejected()`. It works by file name, so a test never needs the rows.",
10102
+ "members": [],
10103
+ "methods": [
10104
+ {
10105
+ "name": "getLabel",
10106
+ "signature": "getLabel(): Promise<string>",
10107
+ "params": [],
10108
+ "returns": "Promise<string>",
10109
+ "doc": "The visible label without the required mark, else `ariaLabel`."
10110
+ },
10111
+ {
10112
+ "name": "getErrorText",
10113
+ "signature": "getErrorText(): Promise<string>",
10114
+ "params": [],
10115
+ "returns": "Promise<string>",
10116
+ "doc": "The error text under the field (an explicit message, or the first form error once touched)."
10117
+ },
10118
+ {
10119
+ "name": "getVariant",
10120
+ "signature": "getVariant(): Promise<'field' | 'dropzone'>",
10121
+ "params": [],
10122
+ "returns": "Promise<'field' | 'dropzone'>",
10123
+ "doc": "The look of the field."
10124
+ },
10125
+ {
10126
+ "name": "isDisabled",
10127
+ "signature": "isDisabled(): Promise<boolean>",
10128
+ "params": [],
10129
+ "returns": "Promise<boolean>",
10130
+ "doc": "Whether the field is disabled."
10131
+ },
10132
+ {
10133
+ "name": "isReadonly",
10134
+ "signature": "isReadonly(): Promise<boolean>",
10135
+ "params": [],
10136
+ "returns": "Promise<boolean>",
10137
+ "doc": "Whether the field is read-only: it has no pick target."
10138
+ },
10139
+ {
10140
+ "name": "addFiles",
10141
+ "signature": "addFiles(files: File[]): Promise<void>",
10142
+ "params": [
10143
+ {
10144
+ "name": "files",
10145
+ "type": "File[]",
10146
+ "optional": false,
10147
+ "doc": "The files to drop."
10148
+ }
10149
+ ],
10150
+ "returns": "Promise<void>",
10151
+ "doc": "Drops files on the field, as a user would. On a disabled or read-only field it does nothing,\nlike the UI."
10152
+ },
10153
+ {
10154
+ "name": "getFileNames",
10155
+ "signature": "getFileNames(): Promise<string[]>",
10156
+ "params": [],
10157
+ "returns": "Promise<string[]>",
10158
+ "doc": "The names of the chosen files, in order (rejected files are not included)."
10159
+ },
10160
+ {
10161
+ "name": "getRejected",
10162
+ "signature": "getRejected(): Promise<{ name: string; message: string }[]>",
10163
+ "params": [],
10164
+ "returns": "Promise<{ name: string; message: string }[]>",
10165
+ "doc": "The files the last pick or drop refused, each with its reason, until they are dismissed."
10166
+ },
10167
+ {
10168
+ "name": "removeFile",
10169
+ "signature": "removeFile(name: string): Promise<void>",
10170
+ "params": [
10171
+ {
10172
+ "name": "name",
10173
+ "type": "string",
10174
+ "optional": false,
10175
+ "doc": "The file's name."
10176
+ }
10177
+ ],
10178
+ "returns": "Promise<void>",
10179
+ "doc": "Removes the chosen file with this name, as the row's remove button does. Throws when no\nchosen file has that name or the field cannot be edited."
10180
+ }
10181
+ ],
10182
+ "slots": [],
10183
+ "references": [],
10184
+ "usedBy": [],
10185
+ "since": "0.5.0",
10186
+ "signature": "class BfFileInputHarness extends ComponentHarness"
10187
+ },
9128
10188
  {
9129
10189
  "name": "BfHarnessFilters",
9130
10190
  "slug": "bf-harness-filters",
@@ -9150,6 +10210,323 @@
9150
10210
  "since": "0.3.0",
9151
10211
  "signature": "interface BfHarnessFilters extends BaseHarnessFilters"
9152
10212
  },
10213
+ {
10214
+ "name": "BfImageInputHarness",
10215
+ "slug": "bf-image-input-harness",
10216
+ "kind": "class",
10217
+ "entryPoint": "@bitforgehq/ui/testing",
10218
+ "file": "testing/harnesses/image-input.harness.ts",
10219
+ "summary": "Test harness for the image input: drops an image on it and reads the preview",
10220
+ "description": "Harness for `bf-image-input`. `addFile()` drops the image on the tile, so it goes through the\nsame `accept` and `maxSize` rules as a real drop; read the outcome with `hasPreview()`,\n`getPreviewSrc()` and `getRejectedMessage()`. jsdom has no `URL.createObjectURL`, so a picked\nimage shows no preview there: assert on the bound value, or stub `URL.createObjectURL` to read\nthe preview.",
10221
+ "members": [],
10222
+ "methods": [
10223
+ {
10224
+ "name": "getLabel",
10225
+ "signature": "getLabel(): Promise<string>",
10226
+ "params": [],
10227
+ "returns": "Promise<string>",
10228
+ "doc": "The visible label without the required mark, else the tile's `aria-label`."
10229
+ },
10230
+ {
10231
+ "name": "getErrorText",
10232
+ "signature": "getErrorText(): Promise<string>",
10233
+ "params": [],
10234
+ "returns": "Promise<string>",
10235
+ "doc": "The error text beside the tile (an explicit message, or the first form error once touched)."
10236
+ },
10237
+ {
10238
+ "name": "isDisabled",
10239
+ "signature": "isDisabled(): Promise<boolean>",
10240
+ "params": [],
10241
+ "returns": "Promise<boolean>",
10242
+ "doc": "Whether the control is disabled."
10243
+ },
10244
+ {
10245
+ "name": "isReadonly",
10246
+ "signature": "isReadonly(): Promise<boolean>",
10247
+ "params": [],
10248
+ "returns": "Promise<boolean>",
10249
+ "doc": "Whether the control is read-only: its tile is not a button and there are no Upload or Remove\nbuttons."
10250
+ },
10251
+ {
10252
+ "name": "hasPreview",
10253
+ "signature": "hasPreview(): Promise<boolean>",
10254
+ "params": [],
10255
+ "returns": "Promise<boolean>",
10256
+ "doc": "Whether the tile shows an image, picked or from `src`. A picked image needs\n`URL.createObjectURL`, which jsdom lacks: stub it to see one."
10257
+ },
10258
+ {
10259
+ "name": "getPreviewSrc",
10260
+ "signature": "getPreviewSrc(): Promise<string | null>",
10261
+ "params": [],
10262
+ "returns": "Promise<string | null>",
10263
+ "doc": "The `src` of the shown image."
10264
+ },
10265
+ {
10266
+ "name": "addFile",
10267
+ "signature": "addFile(file: File): Promise<void>",
10268
+ "params": [
10269
+ {
10270
+ "name": "file",
10271
+ "type": "File",
10272
+ "optional": false,
10273
+ "doc": "The image to drop."
10274
+ }
10275
+ ],
10276
+ "returns": "Promise<void>",
10277
+ "doc": "Drops an image on the tile, as a user would. On a disabled or read-only control it does\nnothing, like the UI. It waits on no timer, so it works under fake timers and `fakeAsync`."
10278
+ },
10279
+ {
10280
+ "name": "remove",
10281
+ "signature": "remove(): Promise<void>",
10282
+ "params": [],
10283
+ "returns": "Promise<void>",
10284
+ "doc": "Presses Remove, which clears the picked and the existing image. Throws while there is no\nimage or the control cannot be edited."
10285
+ },
10286
+ {
10287
+ "name": "getRejectedMessage",
10288
+ "signature": "getRejectedMessage(): Promise<string>",
10289
+ "params": [],
10290
+ "returns": "Promise<string>",
10291
+ "doc": "The reason the last pick was refused, until the next pick or Remove."
10292
+ }
10293
+ ],
10294
+ "slots": [],
10295
+ "references": [],
10296
+ "usedBy": [],
10297
+ "since": "0.5.0",
10298
+ "signature": "class BfImageInputHarness extends ComponentHarness"
10299
+ },
10300
+ {
10301
+ "name": "BfImageTileHarness",
10302
+ "slug": "bf-image-tile-harness",
10303
+ "kind": "class",
10304
+ "entryPoint": "@bitforgehq/ui/testing",
10305
+ "file": "testing/harnesses/image-tile.harness.ts",
10306
+ "summary": "Test harness for an image tile: its picture state, title, meta, selection and action",
10307
+ "description": "Harness for `bf-image-tile`. jsdom never loads images, so `loadImage()` and `failImage()` fire\nthe picture's `load` and `error` events the way a browser would; `getState()` then tells what\nthe tile shows. `click()` clicks the tile's `bfAction` link or button.",
10308
+ "members": [],
10309
+ "methods": [
10310
+ {
10311
+ "name": "getTitle",
10312
+ "signature": "getTitle(): Promise<string>",
10313
+ "params": [],
10314
+ "returns": "Promise<string>",
10315
+ "doc": "The tile's title: the text of its default slot."
10316
+ },
10317
+ {
10318
+ "name": "getMeta",
10319
+ "signature": "getMeta(): Promise<string>",
10320
+ "params": [],
10321
+ "returns": "Promise<string>",
10322
+ "doc": "The meta line under the title."
10323
+ },
10324
+ {
10325
+ "name": "getState",
10326
+ "signature": "getState(): Promise<'empty' | 'loading' | 'loaded' | 'failed'>",
10327
+ "params": [],
10328
+ "returns": "Promise<'empty' | 'loading' | 'loaded' | 'failed'>",
10329
+ "doc": "What the picture area shows: `empty` (the placeholder), `loading` (the skeleton), `loaded`\n(the picture) or `failed` (the failure message)."
10330
+ },
10331
+ {
10332
+ "name": "getSrc",
10333
+ "signature": "getSrc(): Promise<string>",
10334
+ "params": [],
10335
+ "returns": "Promise<string>",
10336
+ "doc": "The URL of the picture."
10337
+ },
10338
+ {
10339
+ "name": "getAlt",
10340
+ "signature": "getAlt(): Promise<string>",
10341
+ "params": [],
10342
+ "returns": "Promise<string>",
10343
+ "doc": "The alternative text of the picture."
10344
+ },
10345
+ {
10346
+ "name": "getPlaceholderText",
10347
+ "signature": "getPlaceholderText(): Promise<string>",
10348
+ "params": [],
10349
+ "returns": "Promise<string>",
10350
+ "doc": "The placeholder text while there is no picture."
10351
+ },
10352
+ {
10353
+ "name": "getFailedMessage",
10354
+ "signature": "getFailedMessage(): Promise<string>",
10355
+ "params": [],
10356
+ "returns": "Promise<string>",
10357
+ "doc": "The failure message."
10358
+ },
10359
+ {
10360
+ "name": "isSelected",
10361
+ "signature": "isSelected(): Promise<boolean>",
10362
+ "params": [],
10363
+ "returns": "Promise<boolean>",
10364
+ "doc": "Whether the tile is marked selected."
10365
+ },
10366
+ {
10367
+ "name": "isClickable",
10368
+ "signature": "isClickable(): Promise<boolean>",
10369
+ "params": [],
10370
+ "returns": "Promise<boolean>",
10371
+ "doc": "Whether the tile is clickable (has a `bfAction` link or button)."
10372
+ },
10373
+ {
10374
+ "name": "click",
10375
+ "signature": "click(): Promise<void>",
10376
+ "params": [],
10377
+ "returns": "Promise<void>",
10378
+ "doc": "Clicks the tile's `bfAction` link or button. Throws for a tile without one."
10379
+ },
10380
+ {
10381
+ "name": "loadImage",
10382
+ "signature": "loadImage(): Promise<void>",
10383
+ "params": [],
10384
+ "returns": "Promise<void>",
10385
+ "doc": "Fires the picture's `load` event, as a browser does when it arrives. Throws without one."
10386
+ },
10387
+ {
10388
+ "name": "failImage",
10389
+ "signature": "failImage(): Promise<void>",
10390
+ "params": [],
10391
+ "returns": "Promise<void>",
10392
+ "doc": "Fires the picture's `error` event, as a browser does when it fails. Throws without one."
10393
+ }
10394
+ ],
10395
+ "slots": [],
10396
+ "references": [],
10397
+ "usedBy": [],
10398
+ "since": "0.5.0",
10399
+ "signature": "class BfImageTileHarness extends ComponentHarness"
10400
+ },
10401
+ {
10402
+ "name": "BfImageViewerHarness",
10403
+ "slug": "bf-image-viewer-harness",
10404
+ "kind": "class",
10405
+ "entryPoint": "@bitforgehq/ui/testing",
10406
+ "file": "testing/harnesses/image-viewer.harness.ts",
10407
+ "summary": "Test harness for an image viewer: its image, index, caption, steps and close",
10408
+ "description": "Harness for `bf-image-viewer`, the lightbox `BfImageViewerService.open()` renders. It renders\nin the CDK overlay container outside the tested component, so get it through\n`TestbedHarnessEnvironment.documentRootLoader(fixture)`. jsdom never loads images: call\n`loadImage()` to fire the shown image's `load` event.",
10409
+ "members": [],
10410
+ "methods": [
10411
+ {
10412
+ "name": "getLabel",
10413
+ "signature": "getLabel(): Promise<string>",
10414
+ "params": [],
10415
+ "returns": "Promise<string>",
10416
+ "doc": "The viewer's accessible name (`ariaLabel`, else the `imageViewer` label)."
10417
+ },
10418
+ {
10419
+ "name": "getIndex",
10420
+ "signature": "getIndex(): Promise<number>",
10421
+ "params": [],
10422
+ "returns": "Promise<number>",
10423
+ "doc": "The 0-based index of the shown image."
10424
+ },
10425
+ {
10426
+ "name": "getCount",
10427
+ "signature": "getCount(): Promise<number>",
10428
+ "params": [],
10429
+ "returns": "Promise<number>",
10430
+ "doc": "How many images the viewer steps through."
10431
+ },
10432
+ {
10433
+ "name": "getCounterText",
10434
+ "signature": "getCounterText(): Promise<string>",
10435
+ "params": [],
10436
+ "returns": "Promise<string>",
10437
+ "doc": "The counter's text (\"2 of 5\"); a viewer of one image shows none."
10438
+ },
10439
+ {
10440
+ "name": "getSrc",
10441
+ "signature": "getSrc(): Promise<string>",
10442
+ "params": [],
10443
+ "returns": "Promise<string>",
10444
+ "doc": "The URL of the shown image."
10445
+ },
10446
+ {
10447
+ "name": "getAlt",
10448
+ "signature": "getAlt(): Promise<string>",
10449
+ "params": [],
10450
+ "returns": "Promise<string>",
10451
+ "doc": "The alternative text of the shown image."
10452
+ },
10453
+ {
10454
+ "name": "getCaption",
10455
+ "signature": "getCaption(): Promise<string>",
10456
+ "params": [],
10457
+ "returns": "Promise<string>",
10458
+ "doc": "The caption under the shown image."
10459
+ },
10460
+ {
10461
+ "name": "isLoaded",
10462
+ "signature": "isLoaded(): Promise<boolean>",
10463
+ "params": [],
10464
+ "returns": "Promise<boolean>",
10465
+ "doc": "Whether the shown image has loaded (no spinner and no failure message)."
10466
+ },
10467
+ {
10468
+ "name": "hasFailed",
10469
+ "signature": "hasFailed(): Promise<boolean>",
10470
+ "params": [],
10471
+ "returns": "Promise<boolean>",
10472
+ "doc": "Whether the shown image failed to load (the failure message shows)."
10473
+ },
10474
+ {
10475
+ "name": "loadImage",
10476
+ "signature": "loadImage(): Promise<void>",
10477
+ "params": [],
10478
+ "returns": "Promise<void>",
10479
+ "doc": "Fires the shown image's `load` event, as a browser does when it arrives."
10480
+ },
10481
+ {
10482
+ "name": "failImage",
10483
+ "signature": "failImage(): Promise<void>",
10484
+ "params": [],
10485
+ "returns": "Promise<void>",
10486
+ "doc": "Fires the shown image's `error` event, as a browser does when it fails."
10487
+ },
10488
+ {
10489
+ "name": "next",
10490
+ "signature": "next(): Promise<void>",
10491
+ "params": [],
10492
+ "returns": "Promise<void>",
10493
+ "doc": "Clicks the next button. Throws for a viewer of one image (it has none)."
10494
+ },
10495
+ {
10496
+ "name": "previous",
10497
+ "signature": "previous(): Promise<void>",
10498
+ "params": [],
10499
+ "returns": "Promise<void>",
10500
+ "doc": "Clicks the previous button. Throws for a viewer of one image (it has none)."
10501
+ },
10502
+ {
10503
+ "name": "pressKey",
10504
+ "signature": "pressKey(key: 'ArrowLeft' | 'ArrowRight' | 'Home' | 'End' | 'Escape'): Promise<void>",
10505
+ "params": [
10506
+ {
10507
+ "name": "key",
10508
+ "type": "'ArrowLeft' | 'ArrowRight' | 'Home' | 'End' | 'Escape'",
10509
+ "optional": false,
10510
+ "doc": "The key to press."
10511
+ }
10512
+ ],
10513
+ "returns": "Promise<void>",
10514
+ "doc": "Presses a key inside the viewer: ArrowLeft and ArrowRight step, Home and End jump, Escape\ncloses."
10515
+ },
10516
+ {
10517
+ "name": "close",
10518
+ "signature": "close(): Promise<void>",
10519
+ "params": [],
10520
+ "returns": "Promise<void>",
10521
+ "doc": "Clicks the close button."
10522
+ }
10523
+ ],
10524
+ "slots": [],
10525
+ "references": [],
10526
+ "usedBy": [],
10527
+ "since": "0.5.0",
10528
+ "signature": "class BfImageViewerHarness extends ComponentHarness"
10529
+ },
9153
10530
  {
9154
10531
  "name": "BfJsdomShimOptions",
9155
10532
  "slug": "bf-jsdom-shim-options",
@@ -9184,6 +10561,100 @@
9184
10561
  "usedBy": ["install-bf-jsdom-shims"],
9185
10562
  "since": "0.3.0"
9186
10563
  },
10564
+ {
10565
+ "name": "BfMediaCardHarness",
10566
+ "slug": "bf-media-card-harness",
10567
+ "kind": "class",
10568
+ "entryPoint": "@bitforgehq/ui/testing",
10569
+ "file": "testing/harnesses/media-card.harness.ts",
10570
+ "summary": "Test harness for a media card: its image state, its messages and its selection",
10571
+ "description": "Harness for `bf-media-card`. jsdom never loads images, so `loadImage()` and `failImage()` fire\nthe image's `load` and `error` events the way a browser would; `getState()` then tells what the\nimage area shows.",
10572
+ "members": [],
10573
+ "methods": [
10574
+ {
10575
+ "name": "getTitle",
10576
+ "signature": "getTitle(): Promise<string>",
10577
+ "params": [],
10578
+ "returns": "Promise<string>",
10579
+ "doc": "The card's title: the text of the first heading in its body."
10580
+ },
10581
+ {
10582
+ "name": "getState",
10583
+ "signature": "getState(): Promise<'empty' | 'loading' | 'loaded' | 'failed'>",
10584
+ "params": [],
10585
+ "returns": "Promise<'empty' | 'loading' | 'loaded' | 'failed'>",
10586
+ "doc": "What the image area shows: `empty` (no `src`, not loading), `loading` (the skeleton),\n`loaded` (the image) or `failed` (the failure message)."
10587
+ },
10588
+ {
10589
+ "name": "getSrc",
10590
+ "signature": "getSrc(): Promise<string>",
10591
+ "params": [],
10592
+ "returns": "Promise<string>",
10593
+ "doc": "The URL of the image."
10594
+ },
10595
+ {
10596
+ "name": "getAlt",
10597
+ "signature": "getAlt(): Promise<string>",
10598
+ "params": [],
10599
+ "returns": "Promise<string>",
10600
+ "doc": "The alternative text of the image."
10601
+ },
10602
+ {
10603
+ "name": "getLoadingLabel",
10604
+ "signature": "getLoadingLabel(): Promise<string>",
10605
+ "params": [],
10606
+ "returns": "Promise<string>",
10607
+ "doc": "The caption over the skeleton while loading (the `loading` label when none is set)."
10608
+ },
10609
+ {
10610
+ "name": "getFailedMessage",
10611
+ "signature": "getFailedMessage(): Promise<string>",
10612
+ "params": [],
10613
+ "returns": "Promise<string>",
10614
+ "doc": "The failure message."
10615
+ },
10616
+ {
10617
+ "name": "loadImage",
10618
+ "signature": "loadImage(): Promise<void>",
10619
+ "params": [],
10620
+ "returns": "Promise<void>",
10621
+ "doc": "Fires the image's `load` event, as a browser does when it arrives. Throws without one."
10622
+ },
10623
+ {
10624
+ "name": "failImage",
10625
+ "signature": "failImage(): Promise<void>",
10626
+ "params": [],
10627
+ "returns": "Promise<void>",
10628
+ "doc": "Fires the image's `error` event, as a browser does when it fails. Throws without one."
10629
+ },
10630
+ {
10631
+ "name": "isSelectable",
10632
+ "signature": "isSelectable(): Promise<boolean>",
10633
+ "params": [],
10634
+ "returns": "Promise<boolean>",
10635
+ "doc": "Whether the card has a select button (`selectable`)."
10636
+ },
10637
+ {
10638
+ "name": "isSelected",
10639
+ "signature": "isSelected(): Promise<boolean>",
10640
+ "params": [],
10641
+ "returns": "Promise<boolean>",
10642
+ "doc": "Whether the card is selected (its select button is pressed)."
10643
+ },
10644
+ {
10645
+ "name": "toggleSelected",
10646
+ "signature": "toggleSelected(): Promise<void>",
10647
+ "params": [],
10648
+ "returns": "Promise<void>",
10649
+ "doc": "Clicks the select button, toggling the selection. Throws for a card that is not selectable."
10650
+ }
10651
+ ],
10652
+ "slots": [],
10653
+ "references": [],
10654
+ "usedBy": [],
10655
+ "since": "0.5.0",
10656
+ "signature": "class BfMediaCardHarness extends ComponentHarness"
10657
+ },
9187
10658
  {
9188
10659
  "name": "BfMenuButtonHarness",
9189
10660
  "slug": "bf-menu-button-harness",
@@ -9624,7 +11095,7 @@
9624
11095
  "entryPoint": "@bitforgehq/ui/testing",
9625
11096
  "file": "testing/harnesses/select.harness.ts",
9626
11097
  "summary": "Test harness for the select: reads its label and options and picks one",
9627
- "description": "Harness for `bf-select`. It works by option label, so a test never needs the native option\nvalues (an object option's native value is its index).",
11098
+ "description": "Harness for `bf-select`, in both modes: the styled list under a mouse (its options render in the\nCDK overlay container while open, found through the field's `aria-controls`) and the native\n`<select>` under a coarse pointer. It also drives the native select with `data-bf-select` that a\nstacked `bf-table` renders as its Sort by select without `provideBfSelect()`. It works by option\nlabel, so a test never needs the option values (an object option's native value is its index).",
9628
11099
  "members": [],
9629
11100
  "methods": [
9630
11101
  {
@@ -9634,6 +11105,13 @@
9634
11105
  "returns": "Promise<string>",
9635
11106
  "doc": "The visible label without the required mark, else the `aria-label`."
9636
11107
  },
11108
+ {
11109
+ "name": "isOpen",
11110
+ "signature": "isOpen(): Promise<boolean>",
11111
+ "params": [],
11112
+ "returns": "Promise<boolean>",
11113
+ "doc": "Whether the styled option list is open (`aria-expanded`). Always false for the native select,\nwhose list belongs to the platform."
11114
+ },
9637
11115
  {
9638
11116
  "name": "getValueLabel",
9639
11117
  "signature": "getValueLabel(): Promise<string>",
@@ -9660,7 +11138,7 @@
9660
11138
  }
9661
11139
  ],
9662
11140
  "returns": "Promise<void>",
9663
- "doc": "Chooses the option with this label, as a user would: the select's `value` becomes that\noption's value. Throws, leaving the value as it is, for an unknown or disabled option and\nwhile the select itself is disabled."
11141
+ "doc": "Chooses the option with this label, as a user would: the select's `value` becomes that\noption's value. Throws, leaving the value as it is, for an unknown or disabled option and\nwhile the select itself is disabled. On a read-only select it changes nothing, in both modes:\nthe styled list does not open, and the native select restores the shown option."
9664
11142
  },
9665
11143
  {
9666
11144
  "name": "isDisabled",
@@ -9702,14 +11180,14 @@
9702
11180
  "signature": "focus(): Promise<void>",
9703
11181
  "params": [],
9704
11182
  "returns": "Promise<void>",
9705
- "doc": "Focuses the native select."
11183
+ "doc": "Focuses the field, or the native select."
9706
11184
  },
9707
11185
  {
9708
11186
  "name": "blur",
9709
11187
  "signature": "blur(): Promise<void>",
9710
11188
  "params": [],
9711
11189
  "returns": "Promise<void>",
9712
- "doc": "Blurs the native select, which marks a bound form field touched."
11190
+ "doc": "Blurs the field, or the native select, which marks a bound form field touched."
9713
11191
  }
9714
11192
  ],
9715
11193
  "slots": [],