diff --git a/.gitignore b/.gitignore index 9c436a0..0f30ae3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,5 @@ /test/public/*.js /test/public/*.js.map -/test/public/storybook - -/storybook-static .DS_Store diff --git a/.storybook/main.ts b/.storybook/main.ts deleted file mode 100644 index 6a78d07..0000000 --- a/.storybook/main.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type {StorybookConfig} from '@storybook/svelte-vite' -const config: StorybookConfig = { - stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx|svelte)'], - addons: [ - '@storybook/addon-links', - '@storybook/addon-essentials', - '@storybook/addon-interactions', - '@storybook/addon-svelte-csf', - ], - framework: { - name: '@storybook/svelte-vite', - options: {}, - }, - core: { - disableTelemetry: true, // 👈 Disables telemetry - }, - docs: { - autodocs: 'tag', - }, - staticDirs: ['./public'], -} -export default config diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html deleted file mode 100644 index d294403..0000000 --- a/.storybook/preview-head.html +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/.storybook/preview.ts b/.storybook/preview.ts deleted file mode 100644 index 805ab4d..0000000 --- a/.storybook/preview.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type {Preview} from '@storybook/svelte' -import '../src/styles/variables.scss' -import '../src/styles/buttonStyles.css' - -const preview: Preview = { - parameters: { - backgrounds: { - default: 'White', - values: [ - {name: 'White', value: '#ffffff'}, - {name: 'Black', value: '#000000'}, - ], - }, - actions: {argTypesRegex: '^on[A-Z].*'}, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/, - }, - }, - }, -} - -export default preview diff --git a/.storybook/public/favicon.ico b/.storybook/public/favicon.ico deleted file mode 100644 index f608a86..0000000 Binary files a/.storybook/public/favicon.ico and /dev/null differ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..72446f4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/package.json b/package.json index c1d704d..f7b4f7e 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,8 @@ "scripts": { "build": "rollup -c --bundleConfigAsCjs", "build-test": "rollup -c test/rollup.config.js --bundleConfigAsCjs", - "build-storybook": "storybook build -o test/public/storybook", "dev": "rollup -c test/rollup.config.js --bundleConfigAsCjs -w", - "serve": "sirv test/public --no-clear --host", - "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "serve": "sirv test/public --no-clear --host" }, "directories": { "lib": "lib" @@ -50,19 +47,10 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-replace": "^5.0.2", - "@rollup/plugin-typescript": "^10", - "@storybook/addon-essentials": "^7.0.0-beta.59", - "@storybook/addon-interactions": "^7.0.0-beta.59", - "@storybook/addon-links": "^7.0.0-beta.59", - "@storybook/addon-svelte-csf": "^3.0.0-next.3", - "@storybook/blocks": "^7.0.0-alpha.8", - "@storybook/svelte": "^7.0.0-beta.59", - "@storybook/svelte-vite": "^7.0.0-beta.59", - "@storybook/testing-library": "^0.0.14-next.1", - "@sveltejs/vite-plugin-svelte": "^2.0.3", - "@tsconfig/svelte": "^3.0.0", - "@typescript-eslint/eslint-plugin": "^5.49.0", - "@typescript-eslint/parser": "^5.49.0", + "@rollup/plugin-typescript": "^11.1.2", + "@tsconfig/svelte": "^5.0.0", + "@typescript-eslint/eslint-plugin": "^5.61.0", + "@typescript-eslint/parser": "^5.61.0", "@wharfkit/session": "^1.0.0", "@wharfkit/transact-plugin-autocorrect": "^1.0.0", "@wharfkit/transact-plugin-cosigner": "^1.0.0", @@ -75,29 +63,26 @@ "@wharfkit/wallet-plugin-mock": "^1.0.0", "@wharfkit/wallet-plugin-privatekey": "^1.0.0", "@wharfkit/wallet-plugin-wombat": "^1.0.0", - "core-js": "^3.27.2", - "eslint": "^8.32.0", - "eslint-config-prettier": "^8.6.0", + "core-js": "^3.31.0", + "eslint": "^8.44.0", + "eslint-config-prettier": "^8.8.0", "eslint-plugin-prettier": "^4.2.1", "node-sass": "^8.0.0", "prettier": "^2.8.3", - "react": "^18.2.0", - "react-dom": "^18.2.0", "rollup": "^2.70.2", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-dts": "^4.2.1", "rollup-plugin-gzip": "^3.1.0", "rollup-plugin-livereload": "^2.0.0", - "rollup-plugin-svelte": "^7.1.0", + "rollup-plugin-svelte": "^7.1.5", "rollup-plugin-terser": "^7.0.0", "sass": "^1.58.3", "sirv-cli": "^2.0.0", - "storybook": "^7.0.0-beta.59", - "svelte": "^3.55.1", - "svelte-preprocess": "^5.0.1", + "svelte": "^4.0.3", + "svelte-preprocess": "^5.0.4", "sveltekit-i18n": "^2.2.2", - "tslib": "^2.4.1", - "typescript": "^4.9.4", + "tslib": "^2.6.0", + "typescript": "^5.0.0", "vite": "^4.1.4", "yarn-deduplicate": "^6.0.1" }, diff --git a/src/lib/qrcode/QRCode.ts b/src/lib/qrcode/QRCode.ts index 5a65ed9..1b11e4e 100644 --- a/src/lib/qrcode/QRCode.ts +++ b/src/lib/qrcode/QRCode.ts @@ -27,7 +27,7 @@ export default class QRCode { this.dataCache = null } - isDark(row: string | number, col: string | number) { + isDark(row: number, col: number) { if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) { throw new Error(row + ',' + col) } @@ -234,7 +234,7 @@ export default class QRCode { for (let col = this.moduleCount - 1; col > 0; col -= 2) { if (col == 6) col-- - for (;;) { + for (; ;) { for (let c = 0; c < 2; c++) { if (this.modules[row][col - c] == null) { let dark = false @@ -294,10 +294,10 @@ export default class QRCode { if (buffer.getLengthInBits() > totalDataCount * 8) { throw new Error( 'code length overflow. (' + - buffer.getLengthInBits() + - '>' + - totalDataCount * 8 + - ')' + buffer.getLengthInBits() + + '>' + + totalDataCount * 8 + + ')' ) } @@ -312,7 +312,7 @@ export default class QRCode { } // padding - for (;;) { + for (; ;) { if (buffer.getLengthInBits() >= totalDataCount * 8) { break } @@ -327,7 +327,7 @@ export default class QRCode { return QRCode.createBytes(buffer, rsBlocks) } - static createBytes(buffer: {buffer: number[]}, rsBlocks: string | any[]) { + static createBytes(buffer: { buffer: number[] }, rsBlocks: string | any[]) { let offset = 0 let maxDcCount = 0 diff --git a/src/stories/Asset.stories.svelte b/src/stories/Asset.stories.svelte deleted file mode 100644 index db53214..0000000 --- a/src/stories/Asset.stories.svelte +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/src/stories/Button.stories.svelte b/src/stories/Button.stories.svelte deleted file mode 100644 index 482c737..0000000 --- a/src/stories/Button.stories.svelte +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/stories/ButtonGroup.stories.svelte b/src/stories/ButtonGroup.stories.svelte deleted file mode 100644 index 52f3656..0000000 --- a/src/stories/ButtonGroup.stories.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - - - - -
- -
-
- - diff --git a/src/stories/Checkbox.stories.svelte b/src/stories/Checkbox.stories.svelte deleted file mode 100644 index c885ead..0000000 --- a/src/stories/Checkbox.stories.svelte +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - -
- - - Auto approve this transaction -
-
- - diff --git a/src/stories/Countdown.stories.svelte b/src/stories/Countdown.stories.svelte deleted file mode 100644 index b1dc125..0000000 --- a/src/stories/Countdown.stories.svelte +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/stories/Header.stories.svelte b/src/stories/Header.stories.svelte deleted file mode 100644 index 9fe4128..0000000 --- a/src/stories/Header.stories.svelte +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - -
- -
-
- - -
- -
-
diff --git a/src/stories/HeaderButton.stories.svelte b/src/stories/HeaderButton.stories.svelte deleted file mode 100644 index 41f1081..0000000 --- a/src/stories/HeaderButton.stories.svelte +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - {}} /> - - - - {}} /> - diff --git a/src/stories/Link.stories.svelte b/src/stories/Link.stories.svelte deleted file mode 100644 index c8edc8d..0000000 --- a/src/stories/Link.stories.svelte +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/stories/List.stories.svelte b/src/stories/List.stories.svelte deleted file mode 100644 index 259287f..0000000 --- a/src/stories/List.stories.svelte +++ /dev/null @@ -1,44 +0,0 @@ - - - - -