@toneflix/flipbook-native 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Cover.d.ts CHANGED
@@ -6,8 +6,8 @@ export interface CoverViewProps {
6
6
  }
7
7
  /** The front cover, laid out by the book's `coverDesign`. */
8
8
  export declare function CoverView({ book, width, showImages }: CoverViewProps): import("react").JSX.Element;
9
- /** The back cover: the same board, with the imprint. */
9
+ /** The back cover: the same board, with the brand and imprint. */
10
10
  export declare function BackCoverView({ book, width }: {
11
- book: Pick<FlipbookBook, 'theme' | 'imprint' | 'coverDesign'>;
11
+ book: Pick<FlipbookBook, 'theme' | 'imprint' | 'brand' | 'coverDesign'>;
12
12
  width: number;
13
13
  }): import("react").JSX.Element;
package/lib/Cover.js CHANGED
@@ -102,11 +102,11 @@ export function CoverView({ book, width, showImages = true }) {
102
102
  };
103
103
  return (_jsx(Board, { book: book, width: width, hinge: "left", children: designs[book.coverDesign ?? 'classic']() }));
104
104
  }
105
- /** The back cover: the same board, with the imprint. */
105
+ /** The back cover: the same board, with the brand and imprint. */
106
106
  export function BackCoverView({ book, width }) {
107
107
  const color = COVER_THEMES[book.theme ?? 'classic'].ink;
108
108
  const unit = width / 100;
109
- return (_jsxs(Board, { book: book, width: width, hinge: "right", children: [book.coverDesign === 'gilt' && _jsx(GiltFrame, { unit: unit, color: color }), _jsxs(View, { style: [styles.imprint, { bottom: 10 * unit }], children: [_jsx(Ornament, { size: 9 * unit, color: color }), book.imprint ? (_jsx(Text, { style: [styles.kicker, { marginTop: 2 * unit, fontSize: 2.4 * unit, letterSpacing: 0.72 * unit, color, opacity: 0.6 }], children: book.imprint.toUpperCase() })) : null] })] }));
109
+ return (_jsxs(Board, { book: book, width: width, hinge: "right", children: [book.coverDesign === 'gilt' && _jsx(GiltFrame, { unit: unit, color: color }), _jsxs(View, { style: [styles.imprint, { bottom: 10 * unit }], children: [_jsx(Ornament, { size: 9 * unit, color: color }), book.brand ? (_jsx(Text, { style: [styles.kicker, { marginTop: 2 * unit, fontSize: 3 * unit, letterSpacing: 0.9 * unit, color }], children: book.brand.toUpperCase() })) : null, book.imprint ? (_jsx(Text, { style: [styles.kicker, { marginTop: 2 * unit, fontSize: 2.4 * unit, letterSpacing: 0.72 * unit, color, opacity: 0.6 }], children: book.imprint.toUpperCase() })) : null] })] }));
110
110
  }
111
111
  const styles = StyleSheet.create({
112
112
  board: { overflow: 'hidden' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toneflix/flipbook-native",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "An expressive flipbook for creating personalised and interactive reading and photo viewing experiences, for React Native and Expo.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://toneflix.github.io/flipbook/frameworks/react-native",
@@ -29,7 +29,7 @@
29
29
  "assets"
30
30
  ],
31
31
  "dependencies": {
32
- "@toneflix/flipbook-core": "^0.3.4"
32
+ "@toneflix/flipbook-core": "^0.3.5"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "expo-screen-orientation": "*",
package/src/Cover.tsx CHANGED
@@ -404,8 +404,8 @@ export function CoverView({ book, width, showImages = true }: CoverViewProps) {
404
404
  )
405
405
  }
406
406
 
407
- /** The back cover: the same board, with the imprint. */
408
- export function BackCoverView({ book, width }: { book: Pick<FlipbookBook, 'theme' | 'imprint' | 'coverDesign'>; width: number }) {
407
+ /** The back cover: the same board, with the brand and imprint. */
408
+ export function BackCoverView({ book, width }: { book: Pick<FlipbookBook, 'theme' | 'imprint' | 'brand' | 'coverDesign'>; width: number }) {
409
409
  const color = COVER_THEMES[book.theme ?? 'classic'].ink
410
410
  const unit = width / 100
411
411
 
@@ -414,6 +414,11 @@ export function BackCoverView({ book, width }: { book: Pick<FlipbookBook, 'theme
414
414
  {book.coverDesign === 'gilt' && <GiltFrame unit={unit} color={color} />}
415
415
  <View style={[styles.imprint, { bottom: 10 * unit }]}>
416
416
  <Ornament size={9 * unit} color={color} />
417
+ {book.brand ? (
418
+ <Text style={[styles.kicker, { marginTop: 2 * unit, fontSize: 3 * unit, letterSpacing: 0.9 * unit, color }]}>
419
+ {book.brand.toUpperCase()}
420
+ </Text>
421
+ ) : null}
417
422
  {book.imprint ? (
418
423
  <Text style={[styles.kicker, { marginTop: 2 * unit, fontSize: 2.4 * unit, letterSpacing: 0.72 * unit, color, opacity: 0.6 }]}>
419
424
  {book.imprint.toUpperCase()}