Skip to content

Commit

Permalink
Merge pull request #16 from doradsoft/npm-pack
Browse files Browse the repository at this point in the history
Npm pack
  • Loading branch information
doradsoft authored Jul 7, 2024
2 parents 596add1 + d9163bb commit 4d1b1d8
Show file tree
Hide file tree
Showing 7 changed files with 1,248 additions and 4,332 deletions.
2 changes: 1 addition & 1 deletion base/dist/flipbook.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion base/dist/flipbook.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions base/src/flipbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class FlipBook {
const leafIndex = Math.floor(pageIndex / 2)
const isOddPage = (pageIndex + 1) % 2 === 1
// TODO: set dynamically by parameter and not by hardcoding eq 0
// TODO: set prev-page / next-page classes for prev/next pages as accordingally
pageElement.classList.add(
isOddPage ? 'odd' : 'even',
...(pageIndex === 0 ? ['current-page'] : [])
Expand Down Expand Up @@ -366,6 +367,7 @@ class FlipBook {
action.bind(pageElement.classList)('current-page')
}
// TODO expose to outside using https://github.com/open-draft/strict-event-emitter, and just be a consumer internally.
// TODO: set prev-page / next-page classes for prev/next pages as accordingally
}
jumpToPage(pageIndex: number) {
// TODO: drop as probably totally replaced ith onTurned. maybe change onTurned name to onPageChanged.
Expand Down
7 changes: 7 additions & 0 deletions react/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
devops/
test/
jest.config.js
html-flip-book-react*.tgz
tsconfig.json
vite.config.ts
Loading

0 comments on commit 4d1b1d8

Please sign in to comment.