From a417c83ce28b0ef905936bbae48c0b77c2c3a641 Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 17:13:02 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[#24]=20husky=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .commithelperrc.json | 8 ++++++++ .husky/commit-msg | 4 ++++ package.json | 1 + 3 files changed, 13 insertions(+) create mode 100644 .commithelperrc.json create mode 100755 .husky/commit-msg diff --git a/.commithelperrc.json b/.commithelperrc.json new file mode 100644 index 0000000..d355d77 --- /dev/null +++ b/.commithelperrc.json @@ -0,0 +1,8 @@ +{ + "rules": { + "repo": null, + "feature": null, + "feat": null, + "epic": null + } +} diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..ce91266 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx --yes @naverpay/commit-helper@latest $1 diff --git a/package.json b/package.json index 9dc260d..42dfc62 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "description": "common packages of naver financial fe", "version": "0.0.0", "scripts": { + "prepare": "husky install && chmod 777 .husky/*", "start": "turbo run start", "build": "turbo run build", "test": "turbo run test", From f7701bdfd4530ed0a6c0a39c77845c21fd71388d Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 18:01:45 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[#24]=20page=20viewport=20type=20=EC=9D=BC?= =?UTF-8?q?=EB=B6=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-pdf/src/pdfjs-dist/types/pdfjs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-pdf/src/pdfjs-dist/types/pdfjs.d.ts b/packages/react-pdf/src/pdfjs-dist/types/pdfjs.d.ts index 80163ef..532873e 100644 --- a/packages/react-pdf/src/pdfjs-dist/types/pdfjs.d.ts +++ b/packages/react-pdf/src/pdfjs-dist/types/pdfjs.d.ts @@ -337,7 +337,7 @@ interface PDFPageViewport { transforms: number[]; rotation: number - clone(options: PDFPageViewportOptions): PDFPageViewport; + clone(options: Partial): PDFPageViewport; convertToViewportPoint(x: number, y: number): number[]; // [x, y] convertToViewportRectangle(rect: number[]): number[]; // [x1, y1, x2, y2] convertToPdfPoint(x: number, y: number): number[]; // [x, y] From b90681e001f6fc042eabb8ef5391b726138d450f Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 18:02:05 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[#24]=20type=20import=20=EC=9D=BC=EB=B6=80?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-pdf/src/components/layer/Text.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-pdf/src/components/layer/Text.tsx b/packages/react-pdf/src/components/layer/Text.tsx index d7ec5f6..e2544ad 100644 --- a/packages/react-pdf/src/components/layer/Text.tsx +++ b/packages/react-pdf/src/components/layer/Text.tsx @@ -3,10 +3,9 @@ import {memo, useCallback, useMemo, useState} from 'react' import classNames from 'classnames/bind' import {useIsomorphicLayoutEffect} from '../../hooks/useIsomorphicLayoutEffect' -import {TextContent} from '../../pdfjs-dist/types/pdfjs' import styles from './Text.module.scss' -import type {PDFPageProxy, TextContentItem} from '../../pdfjs-dist/types/pdfjs' +import type {TextContent, PDFPageProxy, TextContentItem} from '../../pdfjs-dist/types/pdfjs' const cx = classNames.bind(styles) From c43fad4db9e161de0d0038d4d9b1e67fe688a1b1 Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 18:03:06 +0900 Subject: [PATCH 4/9] =?UTF-8?q?[#24]=20linkService=EB=A5=BC=20pdf=20contex?= =?UTF-8?q?t=EC=97=90=EC=84=9C=20=EC=A3=BC=EC=9E=85=ED=95=A0=20=EC=88=98?= =?UTF-8?q?=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=ED=95=A9?= =?UTF-8?q?=EB=8B=88=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react-pdf/src/components/PdfViewer.tsx | 3 +- packages/react-pdf/src/contexts/pdf.tsx | 35 +++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/packages/react-pdf/src/components/PdfViewer.tsx b/packages/react-pdf/src/components/PdfViewer.tsx index 8fa9178..75b0b4b 100644 --- a/packages/react-pdf/src/components/PdfViewer.tsx +++ b/packages/react-pdf/src/components/PdfViewer.tsx @@ -8,7 +8,6 @@ import {Pages, PagesProps} from './Pages' export type PDFViewerProps = PagesProps & { pdfUrl: string - header?: ReactNode footer?: ReactNode tokenize?: boolean @@ -53,7 +52,7 @@ export function PDFViewer({pdfUrl, renderMode = 'canvas', header, footer, option } return ( - + {header} {footer} diff --git a/packages/react-pdf/src/contexts/pdf.tsx b/packages/react-pdf/src/contexts/pdf.tsx index dfff096..627b27b 100644 --- a/packages/react-pdf/src/contexts/pdf.tsx +++ b/packages/react-pdf/src/contexts/pdf.tsx @@ -1,15 +1,46 @@ import {PropsWithChildren, createContext, useContext, useMemo} from 'react' +import {useIsomorphicLayoutEffect} from '../hooks/useIsomorphicLayoutEffect' +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import {PDFLinkService} from '../pdfjs-dist/lib/web/pdf_link_service' + import type {PDFDocumentProxy} from '../pdfjs-dist/types/pdfjs' export interface PDFProviderContext { pdf: PDFDocumentProxy + linkService: PDFLinkService } const Context = createContext(undefined) -export function PDFProvider({pdf, children}: PropsWithChildren) { - const value = useMemo(() => ({pdf}), [pdf]) +const linkService = new PDFLinkService() + +export function PDFProvider({ + pdf, + externalLinkTarget, + children, +}: PropsWithChildren<{pdf: PDFDocumentProxy; externalLinkTarget?: '_self' | '_blank' | '_parent' | '_top'}>) { + useIsomorphicLayoutEffect(() => { + Object.defineProperty(linkService, 'externalLinkTarget', { + get() { + switch (externalLinkTarget) { + case '_self': + return 1 + case '_blank': + return 2 + case '_parent': + return 3 + case '_top': + return 4 + default: + return 0 + } + }, + }) + }, []) + + const value = useMemo(() => ({pdf, linkService}), [pdf]) return {children} } From b1f0a86ad36c80025cb012896ac67699926a8639 Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 18:03:47 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[#24]=20annotation=20layer=20=EB=A5=BC=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=ED=95=A9=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/layer/Annotation.module.scss | 274 ++++++++++++++++++ .../src/components/layer/Annotation.tsx | 51 +++- 2 files changed, 321 insertions(+), 4 deletions(-) create mode 100644 packages/react-pdf/src/components/layer/Annotation.module.scss diff --git a/packages/react-pdf/src/components/layer/Annotation.module.scss b/packages/react-pdf/src/components/layer/Annotation.module.scss new file mode 100644 index 0000000..2d1d31c --- /dev/null +++ b/packages/react-pdf/src/components/layer/Annotation.module.scss @@ -0,0 +1,274 @@ +/* Copyright 2014 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.annotationLayer { + section { + position: absolute; + } + + .linkAnnotation > a, + .buttonWidgetAnnotation.pushButton > a { + position: absolute; + font-size: 1em; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + + .linkAnnotation > a, + .buttonWidgetAnnotation.pushButton > a { + background: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') 0 0 repeat; + } + + .linkAnnotation > a:hover, + .buttonWidgetAnnotation.pushButton > a:hover { + opacity: 0.2; + background: #ff0; + box-shadow: 0px 2px 10px #ff0; + } + + .textAnnotation img { + position: absolute; + cursor: pointer; + } + + .textWidgetAnnotation { + input, + textarea { + background-color: rgba(0, 54, 255, 0.13); + border: 1px solid transparent; + box-sizing: border-box; + font-size: 9px; + height: 100%; + margin: 0; + padding: 0 3px; + vertical-align: top; + width: 100%; + } + } + + .choiceWidgetAnnotation select { + background-color: rgba(0, 54, 255, 0.13); + border: 1px solid transparent; + box-sizing: border-box; + font-size: 9px; + height: 100%; + margin: 0; + padding: 0 3px; + vertical-align: top; + width: 100%; + } + + .buttonWidgetAnnotation { + &.checkBox input, + &.radioButton input { + background-color: rgba(0, 54, 255, 0.13); + border: 1px solid transparent; + box-sizing: border-box; + font-size: 9px; + height: 100%; + margin: 0; + padding: 0 3px; + vertical-align: top; + width: 100%; + } + } + + .choiceWidgetAnnotation select option { + padding: 0; + } + + .buttonWidgetAnnotation.radioButton input { + border-radius: 50%; + } + + .textWidgetAnnotation { + textarea { + font: message-box; + font-size: 9px; + resize: none; + } + + input[disabled], + textarea[disabled] { + background: none; + border: 1px solid transparent; + cursor: not-allowed; + } + } + + .choiceWidgetAnnotation select[disabled] { + background: none; + border: 1px solid transparent; + cursor: not-allowed; + } + + .buttonWidgetAnnotation { + &.checkBox input[disabled], + &.radioButton input[disabled] { + background: none; + border: 1px solid transparent; + cursor: not-allowed; + } + } + + .textWidgetAnnotation { + input:hover, + textarea:hover { + border: 1px solid #000; + } + } + + .choiceWidgetAnnotation select:hover { + border: 1px solid #000; + } + + .buttonWidgetAnnotation { + &.checkBox input:hover, + &.radioButton input:hover { + border: 1px solid #000; + } + } + + .textWidgetAnnotation { + input:focus, + textarea:focus { + background: none; + border: 1px solid transparent; + } + } + + .choiceWidgetAnnotation select:focus { + background: none; + border: 1px solid transparent; + } + + .buttonWidgetAnnotation { + &.checkBox input:checked { + &:before, + &:after { + background-color: #000; + content: ''; + display: block; + position: absolute; + } + } + + &.radioButton input:checked:before { + background-color: #000; + content: ''; + display: block; + position: absolute; + } + + &.checkBox input:checked { + &:before, + &:after { + height: 80%; + left: 45%; + width: 1px; + } + + &:before { + transform: rotate(45deg); + } + + &:after { + transform: rotate(-45deg); + } + } + + &.radioButton input:checked:before { + border-radius: 50%; + height: 50%; + left: 30%; + top: 20%; + width: 50%; + } + } + + .textWidgetAnnotation input.comb { + font-family: monospace; + padding-left: 2px; + padding-right: 0; + + &:focus { + /* + * Letter spacing is placed on the right side of each character. Hence, the + * letter spacing of the last character may be placed outside the visible + * area, causing horizontal scrolling. We avoid this by extending the width + * when the element has focus and revert this when it loses focus. + */ + width: 115%; + } + } + + .buttonWidgetAnnotation { + &.checkBox input, + &.radioButton input { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + padding: 0; + } + } + + .popupWrapper { + position: absolute; + width: 20em; + } + + .popup { + position: absolute; + z-index: 200; + max-width: 20em; + background-color: #ffff99; + box-shadow: 0px 2px 5px #333; + border-radius: 2px; + padding: 0.6em; + margin-left: 5px; + cursor: pointer; + font: message-box; + word-wrap: break-word; + + h1 { + font-size: 1em; + border-bottom: 1px solid #000000; + margin: 0; + padding-bottom: 0.2em; + } + + p { + margin: 0; + padding-top: 0.2em; + } + } + + .highlightAnnotation, + .underlineAnnotation, + .squigglyAnnotation, + .strikeoutAnnotation, + .lineAnnotation svg line, + .squareAnnotation svg rect, + .circleAnnotation svg ellipse, + .polylineAnnotation svg polyline, + .polygonAnnotation svg polygon, + .stampAnnotation, + .fileAttachmentAnnotation { + cursor: pointer; + } +} diff --git a/packages/react-pdf/src/components/layer/Annotation.tsx b/packages/react-pdf/src/components/layer/Annotation.tsx index 88741ba..17e89f6 100644 --- a/packages/react-pdf/src/components/layer/Annotation.tsx +++ b/packages/react-pdf/src/components/layer/Annotation.tsx @@ -1,15 +1,24 @@ -import {memo, useState} from 'react' +import {memo, useCallback, useState} from 'react' +import classNames from 'classnames/bind' + +import {usePdfContext} from '../../contexts/pdf' import {useIsomorphicLayoutEffect} from '../../hooks/useIsomorphicLayoutEffect' -import {PDFAnnotations} from '../../pdfjs-dist/types/pdfjs' +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import * as pdfjs from '../../pdfjs-dist/legacy/build/pdf' +import styles from './Annotation.module.scss' + +import type {PDFAnnotations, PDFPageProxy} from '../../pdfjs-dist/types/pdfjs' -import type {PDFPageProxy} from '../../pdfjs-dist/types/pdfjs' +const cx = classNames.bind(styles) interface AnnotationLayerProps { page: PDFPageProxy } export const AnnotationLayer = memo(function AnnotationLayer({page}: AnnotationLayerProps) { + const {linkService} = usePdfContext() const [annotations, setAnnotations] = useState() useIsomorphicLayoutEffect(() => { @@ -20,9 +29,43 @@ export const AnnotationLayer = memo(function AnnotationLayer({page}: AnnotationL init() }, [page]) + const drawAnnotation = useCallback( + (element: HTMLDivElement | null) => { + if (!element) { + return + } + const viewport = page.getViewport({scale: 1}).clone({dontFlip: true}) + const parameters = {annotations, div: element, linkService, page, renderInteractiveForms: false, viewport} + + try { + pdfjs?.AnnotationLayer?.render(parameters) + } catch {} + + const children = element.children + + if (children.length > 0 && children?.[0]) { + const firstChildren = children[0] as HTMLElement + firstChildren.style.position = 'absolute' + + const aTags = firstChildren.getElementsByTagName('a') as unknown as HTMLAnchorElement[] + + if (aTags.length > 0) { + for (const elem of aTags) { + elem.style.position = 'absolute' + elem.style.top = '0' + elem.style.left = '0' + elem.style.width = '100%' + elem.style.height = '100%' + } + } + } + }, + [annotations, linkService, page], + ) + if (!annotations) { return null } - return null + return
}) From 00cc1ddf8800ba2d5426aed5a3d730f2445efca0 Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 18:04:34 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[#24]=20=EB=A7=81=ED=81=AC=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20pdf=EB=A1=9C=20storybook=20pdf=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-pdf/storybook/pdf-viewer.stories.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-pdf/storybook/pdf-viewer.stories.tsx b/packages/react-pdf/storybook/pdf-viewer.stories.tsx index 81e160d..8de7750 100644 --- a/packages/react-pdf/storybook/pdf-viewer.stories.tsx +++ b/packages/react-pdf/storybook/pdf-viewer.stories.tsx @@ -10,8 +10,7 @@ const meta = { } export default meta -const PDF_URL = - 'https://fs.pstatic.net/contents/resource/loan/personal-compare/required/0/1668583261818/gi_creditLoanNF_02.pdf' +const PDF_URL = 'https://financial.pstatic.net/static/terms-policy/npay-usage/231025.pdf' export function 기본_PdfViewer() { return From 5117378d658f5c85287e9f614432dc58bb64c579 Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 18:13:23 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[#24]=20linkService=20=EC=85=8B=ED=8C=85=20?= =?UTF-8?q?=EC=9C=84=EC=B9=98=EB=A5=BC=20=EB=B3=80=EA=B2=BD=ED=95=A9?= =?UTF-8?q?=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react-pdf/src/components/PdfViewer.tsx | 2 +- .../src/components/layer/Annotation.tsx | 26 +++++++++++-- packages/react-pdf/src/contexts/pdf.tsx | 38 +++---------------- 3 files changed, 29 insertions(+), 37 deletions(-) diff --git a/packages/react-pdf/src/components/PdfViewer.tsx b/packages/react-pdf/src/components/PdfViewer.tsx index 75b0b4b..1fced97 100644 --- a/packages/react-pdf/src/components/PdfViewer.tsx +++ b/packages/react-pdf/src/components/PdfViewer.tsx @@ -52,7 +52,7 @@ export function PDFViewer({pdfUrl, renderMode = 'canvas', header, footer, option } return ( - + {header} {footer} diff --git a/packages/react-pdf/src/components/layer/Annotation.tsx b/packages/react-pdf/src/components/layer/Annotation.tsx index 17e89f6..042e577 100644 --- a/packages/react-pdf/src/components/layer/Annotation.tsx +++ b/packages/react-pdf/src/components/layer/Annotation.tsx @@ -1,12 +1,14 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ import {memo, useCallback, useState} from 'react' import classNames from 'classnames/bind' import {usePdfContext} from '../../contexts/pdf' import {useIsomorphicLayoutEffect} from '../../hooks/useIsomorphicLayoutEffect' -// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import * as pdfjs from '../../pdfjs-dist/legacy/build/pdf' +// @ts-ignore +import {PDFLinkService} from '../pdfjs-dist/lib/web/pdf_link_service' import styles from './Annotation.module.scss' import type {PDFAnnotations, PDFPageProxy} from '../../pdfjs-dist/types/pdfjs' @@ -17,8 +19,23 @@ interface AnnotationLayerProps { page: PDFPageProxy } +function getExternalLinkTargetValue(externalLinkTarget?: '_self' | '_blank' | '_parent' | '_top') { + switch (externalLinkTarget) { + case '_self': + return 1 + case '_blank': + return 2 + case '_parent': + return 3 + case '_top': + return 4 + default: + return 0 + } +} + export const AnnotationLayer = memo(function AnnotationLayer({page}: AnnotationLayerProps) { - const {linkService} = usePdfContext() + const {options} = usePdfContext() const [annotations, setAnnotations] = useState() useIsomorphicLayoutEffect(() => { @@ -34,6 +51,9 @@ export const AnnotationLayer = memo(function AnnotationLayer({page}: AnnotationL if (!element) { return } + const linkService = new PDFLinkService({ + externalLinkTarget: getExternalLinkTargetValue(options?.externalLinkTarget), + }) const viewport = page.getViewport({scale: 1}).clone({dontFlip: true}) const parameters = {annotations, div: element, linkService, page, renderInteractiveForms: false, viewport} @@ -60,7 +80,7 @@ export const AnnotationLayer = memo(function AnnotationLayer({page}: AnnotationL } } }, - [annotations, linkService, page], + [annotations, options?.externalLinkTarget, page], ) if (!annotations) { diff --git a/packages/react-pdf/src/contexts/pdf.tsx b/packages/react-pdf/src/contexts/pdf.tsx index 627b27b..394b028 100644 --- a/packages/react-pdf/src/contexts/pdf.tsx +++ b/packages/react-pdf/src/contexts/pdf.tsx @@ -1,46 +1,18 @@ import {PropsWithChildren, createContext, useContext, useMemo} from 'react' -import {useIsomorphicLayoutEffect} from '../hooks/useIsomorphicLayoutEffect' -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import {PDFLinkService} from '../pdfjs-dist/lib/web/pdf_link_service' - import type {PDFDocumentProxy} from '../pdfjs-dist/types/pdfjs' export interface PDFProviderContext { pdf: PDFDocumentProxy - linkService: PDFLinkService + options?: { + externalLinkTarget?: '_self' | '_blank' | '_parent' | '_top' + } } const Context = createContext(undefined) -const linkService = new PDFLinkService() - -export function PDFProvider({ - pdf, - externalLinkTarget, - children, -}: PropsWithChildren<{pdf: PDFDocumentProxy; externalLinkTarget?: '_self' | '_blank' | '_parent' | '_top'}>) { - useIsomorphicLayoutEffect(() => { - Object.defineProperty(linkService, 'externalLinkTarget', { - get() { - switch (externalLinkTarget) { - case '_self': - return 1 - case '_blank': - return 2 - case '_parent': - return 3 - case '_top': - return 4 - default: - return 0 - } - }, - }) - }, []) - - const value = useMemo(() => ({pdf, linkService}), [pdf]) +export function PDFProvider({pdf, options = {}, children}: PropsWithChildren) { + const value = useMemo(() => ({pdf, options}), [options, pdf]) return {children} } From b269c6b337a0038f6ece07c4f333203b3873d52c Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 18:13:58 +0900 Subject: [PATCH 8/9] =?UTF-8?q?[#24]=20=EC=8A=A4=ED=86=A0=EB=A6=AC?= =?UTF-8?q?=EB=B6=81=EC=97=90=EC=84=9C=20pdf=20link=EB=8A=94=20=EC=83=88?= =?UTF-8?q?=EC=B0=BD=EC=9C=BC=EB=A1=9C=20=EC=97=B4=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=ED=95=A9=EB=8B=88?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-pdf/storybook/pdf-viewer.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-pdf/storybook/pdf-viewer.stories.tsx b/packages/react-pdf/storybook/pdf-viewer.stories.tsx index 8de7750..73a2cd0 100644 --- a/packages/react-pdf/storybook/pdf-viewer.stories.tsx +++ b/packages/react-pdf/storybook/pdf-viewer.stories.tsx @@ -13,5 +13,5 @@ export default meta const PDF_URL = 'https://financial.pstatic.net/static/terms-policy/npay-usage/231025.pdf' export function 기본_PdfViewer() { - return + return } From f1c240330273f60ac56810d6995aaaada32c9100 Mon Sep 17 00:00:00 2001 From: oneweek-lee Date: Wed, 24 Apr 2024 18:17:06 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[#24]=20=EC=9E=98=EB=AA=BB=EB=90=9C=20impor?= =?UTF-8?q?t=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-pdf/src/components/layer/Annotation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-pdf/src/components/layer/Annotation.tsx b/packages/react-pdf/src/components/layer/Annotation.tsx index 042e577..8c6c2e7 100644 --- a/packages/react-pdf/src/components/layer/Annotation.tsx +++ b/packages/react-pdf/src/components/layer/Annotation.tsx @@ -8,7 +8,7 @@ import {useIsomorphicLayoutEffect} from '../../hooks/useIsomorphicLayoutEffect' // @ts-ignore import * as pdfjs from '../../pdfjs-dist/legacy/build/pdf' // @ts-ignore -import {PDFLinkService} from '../pdfjs-dist/lib/web/pdf_link_service' +import {PDFLinkService} from '../../pdfjs-dist/lib/web/pdf_link_service' import styles from './Annotation.module.scss' import type {PDFAnnotations, PDFPageProxy} from '../../pdfjs-dist/types/pdfjs'