├── .eslintrc
├── .github
└── workflows
│ └── ci.yml
├── .gitignore
├── .npmignore
├── .prettierrc
├── .vscode
├── extensions.json
└── settings.json
├── README.md
├── __tests__
├── chrome
│ ├── events_kit.test-chrome.ts
│ ├── incito-publication-kit.test-chrome.ts
│ ├── paged-publication-kit.test-chrome.ts
│ ├── sgn.test-chrome.html
│ ├── sgn.test-chrome.ts
│ └── webpack.test-chrome.ts
├── core_kit.test.ts
├── events_kit.test.ts
└── translations.test.ts
├── __tests_utils__
├── style-mock.js
└── webpack-compiler.ts
├── docs
├── incito.md
└── incito_examples
│ ├── css
│ └── incito.css
│ ├── index-pro.html
│ ├── index.html
│ └── js
│ ├── incito-sample.js
│ └── incito.js
├── embeds
└── publication-viewer.html
├── esbuild.mjs
├── examples
├── css
│ ├── paged-publication.css
│ ├── spectre-exp.min.css
│ ├── spectre-icons.css
│ ├── spectre-icons.min.css
│ └── spectre.min.css
├── incito-browser
│ ├── example.json
│ ├── inner.json
│ └── outer.json
├── incito-publication-template.html
├── incito-publication.html
├── incito-viewer.html
├── index.html
├── integrations
│ ├── list-paged-publications.html
│ └── simple-dealer-latest-publication-viewer.html
├── js
│ ├── latlon-geohash.js
│ └── paged-publication.js
├── list-publications-template.html
├── paged-publication-template.html
├── paged-publication.html
└── verso-browser
│ └── verso-browser.html
├── jest.config.json
├── lib
├── config-defaults.ts
├── config.ts
├── incito-browser
│ ├── __tests__
│ │ └── incito.test-jsdom.ts
│ ├── incito.styl
│ ├── incito.ts
│ └── types.ts
├── key-codes.ts
├── kits
│ ├── core-ui
│ │ ├── components
│ │ │ ├── common
│ │ │ │ ├── header.styl
│ │ │ │ ├── header.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── menu-popup.styl
│ │ │ │ ├── menu-popup.ts
│ │ │ │ ├── offer-list.styl
│ │ │ │ ├── offer-list.ts
│ │ │ │ ├── offer-overview.styl
│ │ │ │ ├── offer-overview.ts
│ │ │ │ ├── publication-download.ts
│ │ │ │ ├── shopping-list.styl
│ │ │ │ ├── shopping-list.ts
│ │ │ │ └── sidebar.styl
│ │ │ ├── helpers
│ │ │ │ ├── component.ts
│ │ │ │ └── transformers.ts
│ │ │ ├── incito-publication
│ │ │ │ ├── index.ts
│ │ │ │ ├── main-container.styl
│ │ │ │ ├── main-container.ts
│ │ │ │ ├── section-list.styl
│ │ │ │ └── section-list.ts
│ │ │ ├── list-publications
│ │ │ │ ├── index.ts
│ │ │ │ ├── main-container.styl
│ │ │ │ └── main-container.ts
│ │ │ └── paged-publication
│ │ │ │ ├── index.ts
│ │ │ │ ├── main-container.styl
│ │ │ │ ├── main-container.ts
│ │ │ │ ├── page-decoration-list.styl
│ │ │ │ ├── page-decoration-list.ts
│ │ │ │ ├── page-list.styl
│ │ │ │ └── page-list.ts
│ │ ├── incito-publication.ts
│ │ ├── index.ts
│ │ ├── list-publications.ts
│ │ ├── offer-details.styl
│ │ ├── offer-details.ts
│ │ ├── page-decorations.styl
│ │ ├── page-decorations.ts
│ │ ├── paged-publication.ts
│ │ ├── popover.styl
│ │ ├── popover.ts
│ │ └── single-choice-popover.ts
│ ├── core
│ │ ├── index.ts
│ │ └── request.ts
│ ├── events
│ │ ├── index.ts
│ │ └── tracker.ts
│ ├── incito-publication
│ │ ├── bootstrapper.ts
│ │ ├── controls.ts
│ │ ├── event-tracking.ts
│ │ ├── index.ts
│ │ ├── viewer.styl
│ │ ├── viewer.test-jsdom.ts
│ │ └── viewer.ts
│ └── paged-publication
│ │ ├── bootstrapper.ts
│ │ ├── controls.ts
│ │ ├── core.ts
│ │ ├── event-tracking.ts
│ │ ├── hotspots.ts
│ │ ├── index.ts
│ │ ├── page-spread.ts
│ │ ├── page-spreads.ts
│ │ ├── viewer.styl
│ │ └── viewer.ts
├── sgn-sdk.ts
├── storage
│ └── client-local.ts
├── stylus
│ ├── buttons.styl
│ └── sgn.styl
├── tjek-sdk.ts
├── translations.ts
├── util.test.ts
├── util.ts
└── verso-browser
│ ├── __tests__
│ ├── __snapshots__
│ │ └── smoke.test-node.ts.snap
│ ├── smoke.test-node.ts
│ └── verso.test-jsdom.ts
│ ├── animation.ts
│ ├── page_spread.styl
│ ├── page_spread.ts
│ ├── vendor
│ └── hammer
│ │ ├── Input.js
│ │ ├── Manager.js
│ │ ├── Recognizer.js
│ │ ├── TouchAction.ts
│ │ ├── input
│ │ ├── mouse.js
│ │ ├── pointerevent.js
│ │ ├── touch.js
│ │ └── touchmouse.js
│ │ ├── recognizers
│ │ ├── attribute.js
│ │ ├── pan.js
│ │ ├── pinch.js
│ │ ├── press.js
│ │ ├── rotate.js
│ │ ├── swipe.js
│ │ └── tap.js
│ │ └── utils
│ │ └── prefixed.ts
│ ├── verso.styl
│ └── verso.ts
├── locales
├── da_DK.ts
├── en_US.ts
├── index.ts
├── nb_NO.ts
└── sv_SE.ts
├── package-lock.json
├── package.json
├── publish-npm.mjs
├── tsconfig.json
├── upload-s3.mjs
└── vendor
├── gator.ts
└── microevent.ts
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "jest": true,
5 | "node": true,
6 | "es6": true
7 | },
8 | "globals": {
9 | "browser": true,
10 | "page": true
11 | },
12 | "extends": ["eslint:recommended", "prettier"],
13 | "plugins": ["@typescript-eslint", "playwright"],
14 | "parser": "@typescript-eslint/parser",
15 | "parserOptions": {"project": ["./tsconfig.json"]},
16 | "ignorePatterns": ["examples", "docs", "dist"],
17 | "rules": {
18 | "no-empty": ["error", {"allowEmptyCatch": true}],
19 | "object-shorthand": "warn",
20 | "no-useless-rename": "warn",
21 | "no-var": "warn",
22 | "prefer-const": "warn",
23 | "no-else-return": "warn"
24 | },
25 | "overrides": [
26 | {
27 | "files": ["*.ts", "*.tsx"],
28 | "parser": "@typescript-eslint/parser",
29 | "parserOptions": {"project": ["./tsconfig.json"]},
30 | "extends": [
31 | "eslint:recommended",
32 | "plugin:@typescript-eslint/recommended",
33 | "plugin:@typescript-eslint/recommended-requiring-type-checking",
34 | "plugin:@typescript-eslint/strict"
35 | ],
36 | "rules": {
37 | "no-useless-escape": "off",
38 | "@typescript-eslint/ban-ts-comment": "off",
39 | "@typescript-eslint/prefer-for-of": "off",
40 | "@typescript-eslint/no-unsafe-member-access": "off",
41 | "@typescript-eslint/no-unsafe-call": "off",
42 | "@typescript-eslint/no-unsafe-assignment": "off",
43 | "@typescript-eslint/no-unsafe-argument": "off",
44 | "@typescript-eslint/no-non-null-assertion": "off",
45 | "@typescript-eslint/no-explicit-any": "off",
46 | "@typescript-eslint/restrict-plus-operands": "off",
47 | "@typescript-eslint/no-unnecessary-type-assertion": "off",
48 | "@typescript-eslint/prefer-nullish-coalescing": "off",
49 | "@typescript-eslint/no-unnecessary-condition": "off",
50 | "@typescript-eslint/prefer-includes": "off",
51 | "@typescript-eslint/no-unsafe-return": "off",
52 | "@typescript-eslint/no-dynamic-delete": "off",
53 | "no-self-assign": "off",
54 | "@typescript-eslint/ban-types": "off",
55 | "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
56 | "@typescript-eslint/no-for-in-array": "off",
57 | "@typescript-eslint/no-empty-interface": "off",
58 | "@typescript-eslint/restrict-template-expressions": "off",
59 | "@typescript-eslint/no-empty-function": "off",
60 | "@typescript-eslint/consistent-generic-constructors": "off",
61 | "@typescript-eslint/consistent-type-definitions": "off",
62 | "@typescript-eslint/no-this-alias": "off",
63 | "@typescript-eslint/prefer-optional-chain": "off",
64 | "@typescript-eslint/no-misused-promises": "off",
65 | "@typescript-eslint/no-floating-promises": "off",
66 | "@typescript-eslint/require-await": "off",
67 | "@typescript-eslint/no-unnecessary-type-constraint": "off",
68 | "@typescript-eslint/no-unused-vars": "off",
69 | "@typescript-eslint/no-invalid-void-type": "off",
70 | "@typescript-eslint/consistent-indexed-object-style": "off",
71 | "@typescript-eslint/dot-notation": "off",
72 | "@typescript-eslint/unbound-method": "off",
73 | "prefer-rest-params": "off",
74 | "object-shorthand": "off"
75 | }
76 | }
77 | ]
78 | }
79 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 | on: [push]
3 | jobs:
4 | lint:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - uses: actions/checkout@v4
8 | - uses: actions/setup-node@v4
9 | with:
10 | node-version: 18
11 | cache: 'npm'
12 | - run: npm ci
13 | - run: npm run test:lint
14 | build:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: actions/checkout@v4
18 | - uses: actions/setup-node@v4
19 | with:
20 | node-version: 18
21 | cache: 'npm'
22 | - run: npm ci
23 | - run: npm run build
24 | - uses: actions/upload-artifact@v4
25 | with:
26 | name: built
27 | path: ./dist
28 | retention-days: 1
29 | types:
30 | needs: build
31 | runs-on: ubuntu-latest
32 | steps:
33 | - uses: actions/checkout@v4
34 | - uses: actions/setup-node@v4
35 | with:
36 | node-version: 18
37 | cache: 'npm'
38 | - uses: actions/download-artifact@v4
39 | with:
40 | name: built
41 | path: ./dist
42 | - run: npm ci
43 | - run: npm run test:types
44 | test:
45 | needs: build
46 | runs-on: ubuntu-latest
47 | steps:
48 | - uses: actions/checkout@v4
49 | - uses: actions/setup-node@v4
50 | with:
51 | node-version: 18
52 | cache: 'npm'
53 | - uses: actions/download-artifact@v4
54 | with:
55 | name: built
56 | path: ./dist
57 |
58 | - run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').dependencies['@playwright/test'].version)")" >> $GITHUB_ENV
59 | - name: Cache playwright binaries
60 | uses: actions/cache@v4
61 | id: playwright-cache
62 | with:
63 | path: |
64 | ~/.cache/ms-playwright
65 | key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
66 | - run: npm ci
67 | - run: npx playwright install --with-deps chromium
68 | if: steps.playwright-cache.outputs.cache-hit != 'true'
69 |
70 | - run: npm run test:ci
71 | size:
72 | needs: build
73 | runs-on: ubuntu-latest
74 | steps:
75 | - uses: actions/checkout@v4
76 | - uses: actions/setup-node@v4
77 | with:
78 | node-version: 18
79 | cache: 'npm'
80 | - uses: actions/download-artifact@v4
81 | with:
82 | name: built
83 | path: ./dist
84 | - run: npm ci
85 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .DS_Store
3 | *.swp
4 | npm-debug.log
5 | dist/
6 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .DS_Store
3 | *.swp
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "tabWidth": 4,
4 | "bracketSpacing": false,
5 | "arrowParens": "always",
6 | "trailingComma": "none",
7 | "printWidth": 80
8 | }
9 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
3 | }
4 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "workbench.colorCustomizations": {
3 | "activityBar.background": "#8e273f",
4 | "titleBar.activeBackground": "#62202e",
5 | "titleBar.activeForeground": "#FFF"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/__tests__/chrome/events_kit.test-chrome.ts:
--------------------------------------------------------------------------------
1 | ///
incito-browser
25 | verso-browser
28 | {{pageDecoration.hostname}}
10 | 11 |