@canopycanopycanopy/b-ber-reader-react 3.0.10 → 4.0.0
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/dist/index.mjs +19863 -0
- package/dist/styles.css +2 -1
- package/index.d.ts +3 -1
- package/package.json +37 -58
- package/dist/353.js +0 -1
- package/dist/fonts/CrimsonPro-Regular.ttf +0 -0
- package/dist/fonts/CrimsonPro-SemiBold.ttf +0 -0
- package/dist/fonts/material-icons.woff +0 -0
- package/dist/fonts/material-icons.woff2 +0 -0
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -46
package/index.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ export interface NavigationHeaderProps {
|
|
|
100
100
|
uiOptions: UiOptions
|
|
101
101
|
showSidebar: SidebarName | null
|
|
102
102
|
spine: Spine
|
|
103
|
-
currentSpineItemIndex:number
|
|
103
|
+
currentSpineItemIndex: number
|
|
104
104
|
metadata: Metadata
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -209,4 +209,6 @@ export type BberReaderProps = RequireOneOf<
|
|
|
209
209
|
|
|
210
210
|
declare const BberReader: React.FunctionComponent<BberReaderProps>
|
|
211
211
|
|
|
212
|
+
export declare const Reader: React.FunctionComponent<BberReaderProps>
|
|
213
|
+
|
|
212
214
|
export default BberReader
|
package/package.json
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopycanopycanopy/b-ber-reader-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "dist/index.
|
|
5
|
+
"main": "dist/index.mjs",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"./dist/styles.css": "./dist/styles.css"
|
|
14
|
+
},
|
|
6
15
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"analyze": "./scripts/analyze.sh",
|
|
13
|
-
"watch": "./scripts/watch.sh",
|
|
14
|
-
"build": "./scripts/build.sh",
|
|
15
|
-
"start": "./scripts/start.sh",
|
|
16
|
+
"version": "node ./scripts/version.js",
|
|
17
|
+
"clean": "rimraf dist",
|
|
18
|
+
"build": "vite build --config vite.config.lib.js",
|
|
19
|
+
"watch": "vite build --watch --config vite.config.lib.js",
|
|
20
|
+
"start": "vite --config vite.config.js",
|
|
16
21
|
"test:watch": "jest --watch",
|
|
17
22
|
"test": "jest",
|
|
18
|
-
"
|
|
19
|
-
"webpack-bundle-analyzer": "webpack-bundle-analyzer",
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
20
24
|
"bundle": "npm run build && npm pack"
|
|
21
25
|
},
|
|
22
26
|
"author": "Triple Canopy <b-ber@canopycanopycanopy.com> (https://triplecanopy.github.io/)",
|
|
@@ -25,63 +29,40 @@
|
|
|
25
29
|
"access": "public"
|
|
26
30
|
},
|
|
27
31
|
"devDependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
32
|
+
"@testing-library/dom": "^10.4.0",
|
|
33
|
+
"@testing-library/react": "^16.3.0",
|
|
34
|
+
"@types/css-tree": "^2.3.11",
|
|
35
|
+
"@types/detect-browser": "^3.0.0",
|
|
36
|
+
"@types/history": "^4.7.11",
|
|
37
|
+
"@types/prop-types": "^15.7.15",
|
|
38
|
+
"@types/react": "^19.2.17",
|
|
39
|
+
"@types/react-dom": "^19.2.3",
|
|
40
|
+
"@types/use-sync-external-store": "^0.0.6",
|
|
41
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
36
42
|
"autoprefixer": "^9.6.1",
|
|
37
|
-
"babel-eslint": "^8.2.2",
|
|
38
|
-
"babel-loader": "^8.2.3",
|
|
39
43
|
"buffer": "^6.0.3",
|
|
40
44
|
"concurrently": "^3.5.1",
|
|
41
45
|
"core-js": "^3.6.4",
|
|
42
|
-
"css-loader": "^0.28.10",
|
|
43
46
|
"cssnano": "^4.1.10",
|
|
44
|
-
"eslint": "^7.32.0",
|
|
45
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
46
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
47
|
-
"eslint-plugin-babel": "^4.1.2",
|
|
48
|
-
"eslint-plugin-import": "^2.22.1",
|
|
49
|
-
"eslint-plugin-jsx-a11y": "^6.0.3",
|
|
50
|
-
"eslint-plugin-react": "^7.7.0",
|
|
51
47
|
"express": "^4.17.3",
|
|
52
|
-
"file-loader": "^6.2.0",
|
|
53
48
|
"handlebars": "^4.7.7",
|
|
54
|
-
"
|
|
55
|
-
"jest": "^
|
|
56
|
-
"jest-environment-jsdom": "^
|
|
57
|
-
"jest-environment-jsdom-global": "^1.1.0",
|
|
58
|
-
"material-icons": "^1.0.0",
|
|
59
|
-
"mini-css-extract-plugin": "^1.6.2",
|
|
49
|
+
"jest": "^29.7.0",
|
|
50
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
51
|
+
"jest-environment-jsdom-global": "^4.0.0",
|
|
60
52
|
"nodemon": "^2.0.15",
|
|
61
53
|
"os-browserify": "^0.3.0",
|
|
62
54
|
"postcss": "^7.0.14",
|
|
63
55
|
"postcss-cssnext": "^3.1.0",
|
|
64
56
|
"postcss-import": "^11.1.0",
|
|
65
|
-
"postcss-loader": "^2.1.1",
|
|
66
57
|
"prop-types": "^15.6.1",
|
|
67
|
-
"react-test-renderer": ">=16.4 <=
|
|
68
|
-
"redux-mock-store": "^1.5.4",
|
|
58
|
+
"react-test-renderer": ">=16.4 <=19",
|
|
69
59
|
"resize-observer-polyfill": "^1.5.0",
|
|
70
60
|
"rimraf": "^2.7.1",
|
|
71
|
-
"sass": "^1.
|
|
72
|
-
"sass-loader": "^13.0.2",
|
|
61
|
+
"sass": "^1.70.0",
|
|
73
62
|
"setimmediate": "^1.0.5",
|
|
74
63
|
"stream-browserify": "^3.0.0",
|
|
75
|
-
"style-loader": "^0.20.2",
|
|
76
|
-
"sugarss": "^1.0.1",
|
|
77
64
|
"tar": "^6.1.11",
|
|
78
|
-
"
|
|
79
|
-
"webpack": "^5.74.0",
|
|
80
|
-
"webpack-bundle-analyzer": "^4.6.1",
|
|
81
|
-
"webpack-cleanup-plugin": "^0.5.1",
|
|
82
|
-
"webpack-cli": "^4.10.0",
|
|
83
|
-
"webpack-dev-server": "^4.11.1",
|
|
84
|
-
"webpack-remove-empty-scripts": "^1.0.1",
|
|
65
|
+
"vite": "^8.0.16",
|
|
85
66
|
"xmlhttprequest-ssl": "^2.0.0"
|
|
86
67
|
},
|
|
87
68
|
"dependencies": {
|
|
@@ -96,15 +77,13 @@
|
|
|
96
77
|
"quote": "^0.4.0",
|
|
97
78
|
"react-attr-converter": "^0.3.1",
|
|
98
79
|
"react-player": "^2.10.1",
|
|
99
|
-
"react-redux": "^7.1.3",
|
|
100
|
-
"redux": "^4.0.5",
|
|
101
|
-
"redux-thunk": "^2.3.0",
|
|
102
80
|
"url-search-params-polyfill": "^4.0.0",
|
|
81
|
+
"use-sync-external-store": "^1.5.0",
|
|
103
82
|
"xml-js": "^1.6.2"
|
|
104
83
|
},
|
|
105
84
|
"peerDependencies": {
|
|
106
|
-
"react": ">=16.2.0 <=
|
|
107
|
-
"react-dom": ">=16.2.0 <=
|
|
85
|
+
"react": ">=16.2.0 <=19",
|
|
86
|
+
"react-dom": ">=16.2.0 <=19"
|
|
108
87
|
},
|
|
109
88
|
"files": [
|
|
110
89
|
"dist",
|
|
@@ -124,5 +103,5 @@
|
|
|
124
103
|
"url": "https://maxwellsimmer.com"
|
|
125
104
|
}
|
|
126
105
|
],
|
|
127
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "435b9c7e6b97d3fbdeb21f2308283597040ebfc8"
|
|
128
107
|
}
|
package/dist/353.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkBberReader=self.webpackChunkBberReader||[]).push([[353],{31016:(e,t,r)=>{var a,n=Object.create,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,c=(e,t,r,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of o(t))p.call(e,n)||n===r||i(e,n,{get:()=>t[n],enumerable:!(a=l(t,n))||a.enumerable});return e},d=(e,t,r)=>(((e,t,r)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),u={};((e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})})(u,{default:()=>g}),e.exports=(a=u,c(i({},"__esModule",{value:!0}),a));var h=((e,t,r)=>(r=null!=e?n(s(e)):{},c(e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)))(r(64012));const m="64px",b={};class g extends h.Component{constructor(){super(...arguments),d(this,"mounted",!1),d(this,"state",{image:null}),d(this,"handleKeyPress",(e=>{"Enter"!==e.key&&" "!==e.key||this.props.onClick()}))}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:r}=this.props;e.url===t&&e.light===r||this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t,oEmbedUrl:r}){if(!h.default.isValidElement(t))if("string"!=typeof t){if(!b[e])return this.setState({image:null}),window.fetch(r.replace("{url}",e)).then((e=>e.json())).then((t=>{if(t.thumbnail_url&&this.mounted){const r=t.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:r}),b[e]=r}}));this.setState({image:b[e]})}else this.setState({image:t})}render(){const{light:e,onClick:t,playIcon:r,previewTabIndex:a,previewAriaLabel:n}=this.props,{image:i}=this.state,l=h.default.isValidElement(e),o={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:i&&!l?`url(${i})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...o},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:m,width:m,height:m,position:l?"absolute":void 0,...o},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},p=h.default.createElement("div",{style:s.shadow,className:"react-player__shadow"},h.default.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return h.default.createElement("div",{style:s.preview,className:"react-player__preview",onClick:t,tabIndex:a,onKeyPress:this.handleKeyPress,...n?{"aria-label":n}:{}},l?e:null,r||p)}}}}]);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|