* [x] Introduce schema version 6: Fix media gallery file type classifications:
* [x] Exclude voice messages from **Documents**.
* [x] Include all media (images + video), regardless of whether we can
display it or not.
* [x] Fix lightbox layout for small screens.
* [x] Add support for unsupported file formats in lightbox:
* [x] Show image icon for unsupported images, e.g. TIFF.
* [x] Show video icon for unsupported videos, e.g. QuickTime.
* [x] Show file icon for other unsupported files, e.g. JSON.
* [x] Show all lightbox variants in style guide.
* [x] Don’t show separator for last document list entry
* [x] **Infrastructure:** Port `colorSVG` to CSS-in-JS for React.
For an easier implementation, we change our original definition of
`initializeAttachmentMetadata`. This means we have to re-run it marked as
version 6 and mark schema version 5 as deprecated as its definition has changed.
This change introduces a standalone module for our protocol buffers as CommonJS
module incl. TypeScript type definitions.
**Rationale:** In order to exclude voice messages from the media gallery,
I needed to get a reference of `AttachmentPointer.Flags.VOICE_MESSAGE`.
Currently, the only way is to use `textsecure.protobuf` which is only accessible
as a global.
* [x] Add `Attachment.isVoiceMessage` as a way to test standalone
Protocol Buffers.
* [x] Add latest version of `protobufjs`. Leave existing version in place to
keep this change less disruptive and since it’s been stable. Hopefully we
can move over to standalone protobufs over time to improve modularity and
maybe even startup performance.
* [x] Add `yarn build-protobuf` command to compile `SignalService.proto` into
standalone CommonJS module and accompanying TypeScript definitions.
~~Included compiled output for ease of use for other developers.
Can revisit if changes become more frequent.~~
Now built as part of `yarn grunt`.
* [x] Update style guide references and make sure they work!
* [x] ⚠️ Change type definition for `Attachment::file` to include `null` as
that’s apparently a valid value for legacy Android voice messages.
This does not work with `ArrayBuffer` out of the box and will need to be
investigated and tested more before switching.
Some APIs also seemed to have changed:
- Before (OOP): `new textsecure.protobuf.WebSocketMessage(…).encode();`
- After (functional):
```
textsecure.protobuf.WebSocketMessage.encode(
new textsecure.protobuf.WebSocketMessage(…)
);
```
This reverts commit d758119d9de4f99742ea941e86180b1d600c2f22.