@aivex/ui 1.2.0-dev.54 → 1.2.0-dev.56
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/README.md +57 -1
- package/dist/DESIGN.md +241 -0
- package/dist/comment.cjs +1 -1
- package/dist/comment.js +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.d.cts +42 -0
- package/dist/components/Avatar/Avatar.d.ts +24 -0
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/index.d.cts +2 -0
- package/dist/components/Avatar/index.d.ts +2 -2
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.d.cts +93 -0
- package/dist/components/Badge/Badge.d.ts +58 -0
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/index.d.cts +2 -0
- package/dist/components/Badge/index.d.ts +2 -2
- package/dist/components/BreadCrumb/BreadCrumb.cjs.map +1 -1
- package/dist/components/BreadCrumb/BreadCrumb.d.cts +57 -0
- package/dist/components/BreadCrumb/BreadCrumb.d.ts +32 -2
- package/dist/components/BreadCrumb/BreadCrumb.js.map +1 -1
- package/dist/components/BreadCrumb/index.d.cts +2 -0
- package/dist/components/BreadCrumb/index.d.ts +2 -2
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.cts +50 -0
- package/dist/components/Button/Button.d.ts +31 -1
- package/dist/components/Button/Button.js +25 -24
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/index.d.cts +2 -0
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.cjs.map +1 -1
- package/dist/components/Calendar/Calendar.d.cts +81 -0
- package/dist/components/Calendar/Calendar.d.ts +48 -5
- package/dist/components/Calendar/Calendar.js +104 -57
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Calendar/date.cjs +1 -1
- package/dist/components/Calendar/date.cjs.map +1 -1
- package/dist/components/Calendar/date.d.cts +35 -0
- package/dist/components/Calendar/date.d.ts +10 -0
- package/dist/components/Calendar/date.js +22 -1
- package/dist/components/Calendar/date.js.map +1 -1
- package/dist/components/Calendar/index.d.cts +2 -0
- package/dist/components/Calendar/index.d.ts +2 -2
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.d.cts +46 -0
- package/dist/components/Card/Card.d.ts +30 -3
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/index.d.cts +2 -0
- package/dist/components/Card/index.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.cts +37 -0
- package/dist/components/Checkbox/Checkbox.d.ts +24 -0
- package/dist/components/Checkbox/Checkbox.js +24 -23
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/ChipsCheckbox.cjs.map +1 -1
- package/dist/components/Checkbox/ChipsCheckbox.d.cts +24 -0
- package/dist/components/Checkbox/ChipsCheckbox.d.ts +15 -0
- package/dist/components/Checkbox/ChipsCheckbox.js.map +1 -1
- package/dist/components/Checkbox/index.d.cts +4 -0
- package/dist/components/Checkbox/index.d.ts +4 -4
- package/dist/components/Coachmark/Coachmark.cjs.map +1 -1
- package/dist/components/Coachmark/Coachmark.d.cts +87 -0
- package/dist/components/Coachmark/Coachmark.d.ts +39 -8
- package/dist/components/Coachmark/Coachmark.js.map +1 -1
- package/dist/components/Coachmark/index.d.cts +2 -0
- package/dist/components/Coachmark/index.d.ts +2 -2
- package/dist/components/Comment/CommentInput.cjs +1 -1
- package/dist/components/Comment/CommentInput.cjs.map +1 -1
- package/dist/components/Comment/CommentInput.d.cts +75 -0
- package/dist/components/Comment/CommentInput.d.ts +46 -6
- package/dist/components/Comment/CommentInput.js +15 -14
- package/dist/components/Comment/CommentInput.js.map +1 -1
- package/dist/components/Comment/CommentPin.cjs +1 -1
- package/dist/components/Comment/CommentPin.cjs.map +1 -1
- package/dist/components/Comment/CommentPin.d.cts +48 -0
- package/dist/components/Comment/CommentPin.d.ts +35 -4
- package/dist/components/Comment/CommentPin.js +29 -20
- package/dist/components/Comment/CommentPin.js.map +1 -1
- package/dist/components/Comment/MentionInput.cjs +1 -1
- package/dist/components/Comment/MentionInput.cjs.map +1 -1
- package/dist/components/Comment/MentionInput.d.cts +45 -0
- package/dist/components/Comment/MentionInput.d.ts +19 -4
- package/dist/components/Comment/MentionInput.js +51 -38
- package/dist/components/Comment/MentionInput.js.map +1 -1
- package/dist/components/Comment/MentionList.cjs +1 -1
- package/dist/components/Comment/MentionList.cjs.map +1 -1
- package/dist/components/Comment/MentionList.d.cts +19 -0
- package/dist/components/Comment/MentionList.d.ts +3 -3
- package/dist/components/Comment/MentionList.js +1 -1
- package/dist/components/Comment/MentionList.js.map +1 -1
- package/dist/components/Comment/index.d.cts +4 -0
- package/dist/components/Comment/index.d.ts +4 -4
- package/dist/components/Comment/mentionContent.d.cts +5 -0
- package/dist/components/Comment/types.d.cts +16 -0
- package/dist/components/Comment/types.d.ts +6 -2
- package/dist/components/Comment/useMentionSuggestion.cjs +1 -1
- package/dist/components/Comment/useMentionSuggestion.cjs.map +1 -1
- package/dist/components/Comment/useMentionSuggestion.d.cts +19 -0
- package/dist/components/Comment/useMentionSuggestion.d.ts +6 -2
- package/dist/components/Comment/useMentionSuggestion.js +72 -62
- package/dist/components/Comment/useMentionSuggestion.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.map +1 -1
- package/dist/components/DataGrid/DataGrid.d.cts +136 -0
- package/dist/components/DataGrid/DataGrid.d.ts +77 -5
- package/dist/components/DataGrid/DataGrid.js +109 -106
- package/dist/components/DataGrid/DataGrid.js.map +1 -1
- package/dist/components/DataGrid/DataGridColumnSettings.cjs +1 -1
- package/dist/components/DataGrid/DataGridColumnSettings.cjs.map +1 -1
- package/dist/components/DataGrid/DataGridColumnSettings.d.cts +41 -0
- package/dist/components/DataGrid/DataGridColumnSettings.d.ts +21 -3
- package/dist/components/DataGrid/DataGridColumnSettings.js +8 -5
- package/dist/components/DataGrid/DataGridColumnSettings.js.map +1 -1
- package/dist/components/DataGrid/DataGridPrimitives.cjs.map +1 -1
- package/dist/components/DataGrid/DataGridPrimitives.d.cts +167 -0
- package/dist/components/DataGrid/DataGridPrimitives.d.ts +81 -1
- package/dist/components/DataGrid/DataGridPrimitives.js.map +1 -1
- package/dist/components/DataGrid/DataGridRows.d.cts +66 -0
- package/dist/components/DataGrid/index.d.cts +8 -0
- package/dist/components/DataGrid/index.d.ts +6 -6
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.d.cts +66 -0
- package/dist/components/Dialog/Dialog.d.ts +47 -1
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/index.d.cts +2 -0
- package/dist/components/Dialog/index.d.ts +2 -2
- package/dist/components/Divider/Divider.cjs.map +1 -1
- package/dist/components/Divider/Divider.d.cts +30 -0
- package/dist/components/Divider/Divider.d.ts +19 -0
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/Divider/index.d.cts +2 -0
- package/dist/components/Divider/index.d.ts +2 -2
- package/dist/components/DraggableScroll/DraggableScroll.cjs.map +1 -1
- package/dist/components/DraggableScroll/DraggableScroll.d.cts +47 -0
- package/dist/components/DraggableScroll/DraggableScroll.d.ts +32 -1
- package/dist/components/DraggableScroll/DraggableScroll.js.map +1 -1
- package/dist/components/DraggableScroll/index.d.cts +2 -0
- package/dist/components/DraggableScroll/index.d.ts +2 -2
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.d.cts +149 -0
- package/dist/components/Drawer/Drawer.d.ts +119 -12
- package/dist/components/Drawer/Drawer.js +87 -29
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/index.d.cts +2 -0
- package/dist/components/Drawer/index.d.ts +2 -2
- package/dist/components/Field/Field.cjs +1 -1
- package/dist/components/Field/Field.cjs.map +1 -1
- package/dist/components/Field/Field.d.cts +100 -0
- package/dist/components/Field/Field.d.ts +59 -5
- package/dist/components/Field/Field.js +49 -42
- package/dist/components/Field/Field.js.map +1 -1
- package/dist/components/Field/index.d.cts +1 -0
- package/dist/components/Field/index.d.ts +1 -1
- package/dist/components/FilterModal/FilterModal.cjs +1 -1
- package/dist/components/FilterModal/FilterModal.cjs.map +1 -1
- package/dist/components/FilterModal/FilterModal.d.cts +83 -0
- package/dist/components/FilterModal/FilterModal.d.ts +52 -1
- package/dist/components/FilterModal/FilterModal.js +5 -4
- package/dist/components/FilterModal/FilterModal.js.map +1 -1
- package/dist/components/FilterModal/index.d.cts +2 -0
- package/dist/components/FilterModal/index.d.ts +2 -2
- package/dist/components/Icon/index.cjs.map +1 -1
- package/dist/components/Icon/index.d.cts +2077 -0
- package/dist/components/Icon/index.d.ts +41 -0
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Icon/svgA11y.d.cts +10 -0
- package/dist/components/Icon/uniqueSvgIds.d.cts +8 -0
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.d.cts +45 -0
- package/dist/components/IconButton/IconButton.d.ts +31 -3
- package/dist/components/IconButton/IconButton.js +25 -24
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton/index.d.cts +2 -0
- package/dist/components/IconButton/index.d.ts +2 -2
- package/dist/components/Illustration/Illustration.cjs +2 -0
- package/dist/components/Illustration/Illustration.cjs.map +1 -0
- package/dist/components/Illustration/Illustration.d.cts +37 -0
- package/dist/components/Illustration/Illustration.d.ts +37 -0
- package/dist/components/Illustration/Illustration.js +40 -0
- package/dist/components/Illustration/Illustration.js.map +1 -0
- package/dist/components/Illustration/assets/box-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/box-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/box-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/box-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/box-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/box-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/box-light.webp.js +7 -0
- package/dist/components/Illustration/assets/box-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/equipment-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/equipment-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/equipment-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/equipment-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/equipment-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/equipment-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/equipment-light.webp.js +7 -0
- package/dist/components/Illustration/assets/equipment-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/failed-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/failed-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/failed-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/failed-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/failed-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/failed-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/failed-light.webp.js +7 -0
- package/dist/components/Illustration/assets/failed-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/file-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/file-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/file-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/file-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/file-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/file-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/file-light.webp.js +7 -0
- package/dist/components/Illustration/assets/file-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/images-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/images-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/images-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/images-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/images-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/images-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/images-light.webp.js +7 -0
- package/dist/components/Illustration/assets/images-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/letter-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/letter-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/letter-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/letter-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/letter-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/letter-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/letter-light.webp.js +7 -0
- package/dist/components/Illustration/assets/letter-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/message-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/message-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/message-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/message-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/message-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/message-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/message-light.webp.js +7 -0
- package/dist/components/Illustration/assets/message-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/network-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/network-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/network-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/network-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/network-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/network-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/network-light.webp.js +7 -0
- package/dist/components/Illustration/assets/network-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/no-data-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/no-data-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/no-data-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/no-data-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/no-data-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/no-data-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/no-data-light.webp.js +7 -0
- package/dist/components/Illustration/assets/no-data-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/paper-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/paper-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/paper-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/paper-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/paper-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/paper-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/paper-light.webp.js +7 -0
- package/dist/components/Illustration/assets/paper-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/success-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/success-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/success-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/success-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/success-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/success-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/success-light.webp.js +7 -0
- package/dist/components/Illustration/assets/success-light.webp.js.map +1 -0
- package/dist/components/Illustration/assets/warning-dark.webp.cjs +2 -0
- package/dist/components/Illustration/assets/warning-dark.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/warning-dark.webp.js +7 -0
- package/dist/components/Illustration/assets/warning-dark.webp.js.map +1 -0
- package/dist/components/Illustration/assets/warning-light.webp.cjs +2 -0
- package/dist/components/Illustration/assets/warning-light.webp.cjs.map +1 -0
- package/dist/components/Illustration/assets/warning-light.webp.js +7 -0
- package/dist/components/Illustration/assets/warning-light.webp.js.map +1 -0
- package/dist/components/Illustration/illustrations.cjs +2 -0
- package/dist/components/Illustration/illustrations.cjs.map +1 -0
- package/dist/components/Illustration/illustrations.d.cts +81 -0
- package/dist/components/Illustration/illustrations.d.ts +81 -0
- package/dist/components/Illustration/illustrations.js +104 -0
- package/dist/components/Illustration/illustrations.js.map +1 -0
- package/dist/components/Illustration/index.d.cts +1 -0
- package/dist/components/Illustration/index.d.ts +1 -0
- package/dist/components/InputBase/InputBase.cjs.map +1 -1
- package/dist/components/InputBase/InputBase.d.cts +59 -0
- package/dist/components/InputBase/InputBase.d.ts +30 -0
- package/dist/components/InputBase/InputBase.js.map +1 -1
- package/dist/components/InputBase/index.d.cts +1 -0
- package/dist/components/InputBase/index.d.ts +1 -1
- package/dist/components/InputBase/useInputState.d.cts +19 -0
- package/dist/components/InteractionLayer/InteractionLayer.cjs.map +1 -1
- package/dist/components/InteractionLayer/InteractionLayer.d.cts +43 -0
- package/dist/components/InteractionLayer/InteractionLayer.d.ts +34 -0
- package/dist/components/InteractionLayer/InteractionLayer.js.map +1 -1
- package/dist/components/InteractionLayer/index.d.cts +1 -0
- package/dist/components/InteractionLayer/index.d.ts +1 -1
- package/dist/components/Logo/index.cjs.map +1 -1
- package/dist/components/Logo/index.d.cts +73 -0
- package/dist/components/Logo/index.d.ts +27 -1
- package/dist/components/Logo/index.js.map +1 -1
- package/dist/components/Menu/Menu.cjs.map +1 -1
- package/dist/components/Menu/Menu.d.cts +146 -0
- package/dist/components/Menu/Menu.d.ts +62 -0
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Menu/index.d.cts +2 -0
- package/dist/components/Menu/index.d.ts +2 -2
- package/dist/components/Messagebox/Messagebox.cjs.map +1 -1
- package/dist/components/Messagebox/Messagebox.d.cts +50 -0
- package/dist/components/Messagebox/Messagebox.d.ts +33 -3
- package/dist/components/Messagebox/Messagebox.js.map +1 -1
- package/dist/components/Messagebox/index.d.cts +2 -0
- package/dist/components/Messagebox/index.d.ts +2 -2
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.cts +137 -0
- package/dist/components/Modal/Modal.d.ts +95 -2
- package/dist/components/Modal/Modal.js +0 -1
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/ModalBase.cjs.map +1 -1
- package/dist/components/Modal/ModalBase.d.cts +71 -0
- package/dist/components/Modal/ModalBase.d.ts +39 -1
- package/dist/components/Modal/ModalBase.js.map +1 -1
- package/dist/components/Modal/index.d.cts +4 -0
- package/dist/components/Modal/index.d.ts +4 -4
- package/dist/components/Nav/Nav.cjs.map +1 -1
- package/dist/components/Nav/Nav.d.cts +69 -0
- package/dist/components/Nav/Nav.d.ts +46 -0
- package/dist/components/Nav/Nav.js.map +1 -1
- package/dist/components/Nav/index.d.cts +2 -0
- package/dist/components/Nav/index.d.ts +2 -2
- package/dist/components/Overlay/Overlay.cjs.map +1 -1
- package/dist/components/Overlay/Overlay.d.cts +36 -0
- package/dist/components/Overlay/Overlay.d.ts +21 -3
- package/dist/components/Overlay/Overlay.js.map +1 -1
- package/dist/components/Overlay/index.d.cts +2 -0
- package/dist/components/Overlay/index.d.ts +2 -2
- package/dist/components/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/components/Pagination/Pagination.d.cts +68 -0
- package/dist/components/Pagination/Pagination.d.ts +43 -1
- package/dist/components/Pagination/Pagination.js +55 -41
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/index.d.cts +2 -0
- package/dist/components/Pagination/index.d.ts +2 -2
- package/dist/components/Panel/Panel.cjs +1 -1
- package/dist/components/Panel/Panel.cjs.map +1 -1
- package/dist/components/Panel/Panel.d.cts +124 -0
- package/dist/components/Panel/Panel.d.ts +119 -8
- package/dist/components/Panel/Panel.js +83 -46
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/Panel/index.d.cts +2 -0
- package/dist/components/Panel/index.d.ts +2 -2
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.d.cts +96 -0
- package/dist/components/Popover/Popover.d.ts +42 -0
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover/index.d.cts +2 -0
- package/dist/components/Popover/index.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.cjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.cts +45 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +32 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressBar/index.d.cts +2 -0
- package/dist/components/ProgressBar/index.d.ts +2 -2
- package/dist/components/Radio/Radio.cjs.map +1 -1
- package/dist/components/Radio/Radio.d.cts +32 -0
- package/dist/components/Radio/Radio.d.ts +21 -0
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/index.d.cts +2 -0
- package/dist/components/Radio/index.d.ts +2 -2
- package/dist/components/ScrollArea/ScrollArea.cjs.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.d.cts +42 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +24 -0
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/components/ScrollArea/index.d.cts +2 -0
- package/dist/components/ScrollArea/index.d.ts +2 -2
- package/dist/components/Segmented/Segmented.cjs.map +1 -1
- package/dist/components/Segmented/Segmented.d.cts +41 -0
- package/dist/components/Segmented/Segmented.d.ts +26 -0
- package/dist/components/Segmented/Segmented.js.map +1 -1
- package/dist/components/Segmented/index.d.cts +2 -0
- package/dist/components/Segmented/index.d.ts +2 -2
- package/dist/components/SelectBox/SelectBox.cjs +1 -1
- package/dist/components/SelectBox/SelectBox.cjs.map +1 -1
- package/dist/components/SelectBox/SelectBox.d.cts +95 -0
- package/dist/components/SelectBox/SelectBox.d.ts +55 -3
- package/dist/components/SelectBox/SelectBox.js +17 -12
- package/dist/components/SelectBox/SelectBox.js.map +1 -1
- package/dist/components/SelectBox/index.d.cts +2 -0
- package/dist/components/SelectBox/index.d.ts +2 -2
- package/dist/components/SelectButton/SelectButton.cjs +1 -1
- package/dist/components/SelectButton/SelectButton.cjs.map +1 -1
- package/dist/components/SelectButton/SelectButton.d.cts +54 -0
- package/dist/components/SelectButton/SelectButton.d.ts +37 -1
- package/dist/components/SelectButton/SelectButton.js +31 -31
- package/dist/components/SelectButton/SelectButton.js.map +1 -1
- package/dist/components/SelectButton/index.d.cts +2 -0
- package/dist/components/SelectButton/index.d.ts +2 -2
- package/dist/components/ShapeEditor/ShapeEditor.cjs +1 -1
- package/dist/components/ShapeEditor/ShapeEditor.cjs.map +1 -1
- package/dist/components/ShapeEditor/ShapeEditor.d.cts +40 -0
- package/dist/components/ShapeEditor/ShapeEditor.d.ts +36 -3
- package/dist/components/ShapeEditor/ShapeEditor.js +1 -1
- package/dist/components/ShapeEditor/ShapeEditor.js.map +1 -1
- package/dist/components/ShapeEditor/ShapeViewer.cjs +1 -1
- package/dist/components/ShapeEditor/ShapeViewer.cjs.map +1 -1
- package/dist/components/ShapeEditor/ShapeViewer.d.cts +92 -0
- package/dist/components/ShapeEditor/ShapeViewer.d.ts +55 -5
- package/dist/components/ShapeEditor/ShapeViewer.js +47 -41
- package/dist/components/ShapeEditor/ShapeViewer.js.map +1 -1
- package/dist/components/ShapeEditor/_components/AssistantOverlay.d.cts +17 -0
- package/dist/components/ShapeEditor/_components/AssistantOverlay.d.ts +2 -2
- package/dist/components/ShapeEditor/_components/ContextMenu.d.cts +13 -0
- package/dist/components/ShapeEditor/_components/ContextMenu.d.ts +1 -1
- package/dist/components/ShapeEditor/_components/CursorGuide.d.cts +8 -0
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.d.cts +17 -0
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.d.ts +1 -1
- package/dist/components/ShapeEditor/_components/Minimap.d.cts +46 -0
- package/dist/components/ShapeEditor/_components/Minimap.d.ts +6 -6
- package/dist/components/ShapeEditor/_components/MinimapShape.d.cts +6 -0
- package/dist/components/ShapeEditor/_components/MinimapShape.d.ts +1 -1
- package/dist/components/ShapeEditor/_components/RegionOverlay.d.cts +21 -0
- package/dist/components/ShapeEditor/_components/RegionOverlay.d.ts +1 -1
- package/dist/components/ShapeEditor/_components/SelectionInfo.d.cts +20 -0
- package/dist/components/ShapeEditor/_components/SelectionInfo.d.ts +3 -3
- package/dist/components/ShapeEditor/_components/SettingsPanel.cjs.map +1 -1
- package/dist/components/ShapeEditor/_components/SettingsPanel.d.cts +28 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.d.ts +5 -5
- package/dist/components/ShapeEditor/_components/SettingsPanel.js.map +1 -1
- package/dist/components/ShapeEditor/_constants.cjs +1 -1
- package/dist/components/ShapeEditor/_constants.cjs.map +1 -1
- package/dist/components/ShapeEditor/_constants.d.cts +15 -0
- package/dist/components/ShapeEditor/_constants.d.ts +0 -21
- package/dist/components/ShapeEditor/_constants.js +1 -1
- package/dist/components/ShapeEditor/_constants.js.map +1 -1
- package/dist/components/ShapeEditor/_model/brush.d.cts +3 -0
- package/dist/components/ShapeEditor/_model/brush.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/clipboard.d.cts +22 -0
- package/dist/components/ShapeEditor/_model/clipboard.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/cursors.d.cts +23 -0
- package/dist/components/ShapeEditor/_model/cursors.d.ts +2 -2
- package/dist/components/ShapeEditor/_model/geometry.cjs.map +1 -1
- package/dist/components/ShapeEditor/_model/geometry.d.cts +182 -0
- package/dist/components/ShapeEditor/_model/geometry.d.ts +17 -1
- package/dist/components/ShapeEditor/_model/geometry.js.map +1 -1
- package/dist/components/ShapeEditor/_model/imageDiagnosis.cjs +1 -1
- package/dist/components/ShapeEditor/_model/imageDiagnosis.cjs.map +1 -1
- package/dist/components/ShapeEditor/_model/imageDiagnosis.d.cts +38 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.d.ts +4 -1
- package/dist/components/ShapeEditor/_model/imageDiagnosis.js +29 -20
- package/dist/components/ShapeEditor/_model/imageDiagnosis.js.map +1 -1
- package/dist/components/ShapeEditor/_model/imageLoad.d.cts +29 -0
- package/dist/components/ShapeEditor/_model/imageSignature.d.cts +18 -0
- package/dist/components/ShapeEditor/_model/imageTiles.d.cts +11 -0
- package/dist/components/ShapeEditor/_model/keymap.cjs.map +1 -1
- package/dist/components/ShapeEditor/_model/keymap.d.cts +17 -0
- package/dist/components/ShapeEditor/_model/keymap.d.ts +2 -0
- package/dist/components/ShapeEditor/_model/keymap.js.map +1 -1
- package/dist/components/ShapeEditor/_model/overlays.d.cts +108 -0
- package/dist/components/ShapeEditor/_model/overlays.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/pinIcon.d.cts +13 -0
- package/dist/components/ShapeEditor/_model/polygonFill.d.cts +2 -0
- package/dist/components/ShapeEditor/_model/polygonFill.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/props.d.cts +13 -0
- package/dist/components/ShapeEditor/_model/props.d.ts +8 -8
- package/dist/components/ShapeEditor/_model/scalarMask.d.cts +21 -0
- package/dist/components/ShapeEditor/_model/scalarMask.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/shapeHitTest.d.cts +14 -0
- package/dist/components/ShapeEditor/_model/shapeHitTest.d.ts +2 -2
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.d.cts +16 -0
- package/dist/components/ShapeEditor/_model/shapeRenderStyle.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/strings.cjs.map +1 -1
- package/dist/components/ShapeEditor/_model/strings.d.cts +62 -0
- package/dist/components/ShapeEditor/_model/strings.d.ts +2 -1
- package/dist/components/ShapeEditor/_model/strings.js.map +1 -1
- package/dist/components/ShapeEditor/_model/tools.cjs.map +1 -1
- package/dist/components/ShapeEditor/_model/tools.d.cts +29 -0
- package/dist/components/ShapeEditor/_model/tools.d.ts +4 -2
- package/dist/components/ShapeEditor/_model/tools.js.map +1 -1
- package/dist/components/ShapeEditor/_model/types/assistant.d.cts +37 -0
- package/dist/components/ShapeEditor/_model/types/assistant.d.ts +3 -1
- package/dist/components/ShapeEditor/_model/types/handle.d.cts +124 -0
- package/dist/components/ShapeEditor/_model/types/handle.d.ts +30 -4
- package/dist/components/ShapeEditor/_model/types/props.d.cts +430 -0
- package/dist/components/ShapeEditor/_model/types/props.d.ts +83 -20
- package/dist/components/ShapeEditor/_model/viewSettings.cjs.map +1 -1
- package/dist/components/ShapeEditor/_model/viewSettings.d.cts +73 -0
- package/dist/components/ShapeEditor/_model/viewSettings.d.ts +13 -1
- package/dist/components/ShapeEditor/_model/viewSettings.js.map +1 -1
- package/dist/components/ShapeEditor/_model/viewerPatch.d.cts +60 -0
- package/dist/components/ShapeEditor/_model/viewerPatch.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/viewport.d.cts +36 -0
- package/dist/components/ShapeEditor/_model/viewport.d.ts +1 -1
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.cjs +1 -1
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.cjs.map +1 -1
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.cts +121 -0
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.ts +5 -5
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.js +1 -1
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.js.map +1 -1
- package/dist/components/ShapeEditor/_renderers/imageLayer.d.cts +35 -0
- package/dist/components/ShapeEditor/_renderers/overlayLayer.d.cts +36 -0
- package/dist/components/ShapeEditor/_renderers/overlayLayer.d.ts +2 -2
- package/dist/components/ShapeEditor/_renderers/previewLayer.cjs +1 -1
- package/dist/components/ShapeEditor/_renderers/previewLayer.cjs.map +1 -1
- package/dist/components/ShapeEditor/_renderers/previewLayer.d.cts +34 -0
- package/dist/components/ShapeEditor/_renderers/previewLayer.d.ts +5 -3
- package/dist/components/ShapeEditor/_renderers/previewLayer.js +3 -0
- package/dist/components/ShapeEditor/_renderers/previewLayer.js.map +1 -1
- package/dist/components/ShapeEditor/_renderers/shapeLayer.d.cts +49 -0
- package/dist/components/ShapeEditor/_renderers/shapeLayer.d.ts +3 -3
- package/dist/components/ShapeEditor/_renderers/shapePainter.d.cts +27 -0
- package/dist/components/ShapeEditor/_renderers/shapePainter.d.ts +1 -1
- package/dist/components/ShapeEditor/_renderers/transformDriver.d.cts +55 -0
- package/dist/components/ShapeEditor/_renderers/transformDriver.d.ts +3 -3
- package/dist/components/ShapeEditor/_renderers/transformSession.d.cts +74 -0
- package/dist/components/ShapeEditor/_renderers/transformSession.d.ts +1 -1
- package/dist/components/ShapeEditor/_renderers/transformerLayer.d.cts +69 -0
- package/dist/components/ShapeEditor/_renderers/transformerLayer.d.ts +2 -2
- package/dist/components/ShapeEditor/_renderers/types.d.cts +129 -0
- package/dist/components/ShapeEditor/_renderers/types.d.ts +6 -6
- package/dist/components/ShapeEditor/_state/buildContextMenuItems.d.cts +26 -0
- package/dist/components/ShapeEditor/_state/buildContextMenuItems.d.ts +5 -5
- package/dist/components/ShapeEditor/_state/buildHotkeyActions.d.cts +42 -0
- package/dist/components/ShapeEditor/_state/buildHotkeyActions.d.ts +7 -7
- package/dist/components/ShapeEditor/_state/createInteractionController.d.cts +73 -0
- package/dist/components/ShapeEditor/_state/createInteractionController.d.ts +9 -9
- package/dist/components/ShapeEditor/_state/drawSessionState.d.cts +6 -0
- package/dist/components/ShapeEditor/_state/drawSessionState.d.ts +2 -2
- package/dist/components/ShapeEditor/_state/useAssistant.d.cts +48 -0
- package/dist/components/ShapeEditor/_state/useAssistant.d.ts +3 -3
- package/dist/components/ShapeEditor/_state/useDrawSession.d.cts +61 -0
- package/dist/components/ShapeEditor/_state/useDrawSession.d.ts +5 -5
- package/dist/components/ShapeEditor/_state/useEditorDocument.d.cts +23 -0
- package/dist/components/ShapeEditor/_state/useEditorDocument.d.ts +1 -1
- package/dist/components/ShapeEditor/_state/useEditorHandle.d.cts +34 -0
- package/dist/components/ShapeEditor/_state/useEditorHandle.d.ts +9 -9
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.cjs +1 -1
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.cjs.map +1 -1
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.cts +25 -0
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.ts +1 -1
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.js +15 -15
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.js.map +1 -1
- package/dist/components/ShapeEditor/_state/useEditorView.d.cts +15 -0
- package/dist/components/ShapeEditor/_state/useEditorView.d.ts +1 -1
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.cjs +1 -1
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.cjs.map +1 -1
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.cts +89 -0
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.ts +6 -6
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.js +23 -20
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.js.map +1 -1
- package/dist/components/ShapeEditor/_state/useLatestRef.d.cts +7 -0
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.d.cts +27 -0
- package/dist/components/ShapeEditor/_state/useMinimapNavigation.d.ts +1 -1
- package/dist/components/ShapeEditor/_state/useMinimapSync.d.cts +26 -0
- package/dist/components/ShapeEditor/_state/useMinimapSync.d.ts +3 -3
- package/dist/components/ShapeEditor/_state/useSelectionActions.d.cts +31 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.d.ts +2 -2
- package/dist/components/ShapeEditor/_state/useSelectionInfoOverlay.d.cts +32 -0
- package/dist/components/ShapeEditor/_state/useSelectionInfoOverlay.d.ts +4 -4
- package/dist/components/ShapeEditor/_state/useSelectionModel.d.cts +24 -0
- package/dist/components/ShapeEditor/_state/useSelectionModel.d.ts +4 -4
- package/dist/components/ShapeEditor/_state/useViewportControls.d.cts +23 -0
- package/dist/components/ShapeEditor/_state/useViewportControls.d.ts +3 -3
- package/dist/components/ShapeEditor/index.d.cts +13 -0
- package/dist/components/ShapeEditor/index.d.ts +13 -8
- package/dist/components/Shortcut/Shortcut.cjs.map +1 -1
- package/dist/components/Shortcut/Shortcut.d.cts +24 -0
- package/dist/components/Shortcut/Shortcut.d.ts +16 -0
- package/dist/components/Shortcut/Shortcut.js.map +1 -1
- package/dist/components/Shortcut/index.d.cts +2 -0
- package/dist/components/Shortcut/index.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.cts +26 -0
- package/dist/components/Skeleton/Skeleton.d.ts +19 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton/index.d.cts +2 -0
- package/dist/components/Skeleton/index.d.ts +2 -2
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.d.cts +45 -0
- package/dist/components/Slider/Slider.d.ts +33 -1
- package/dist/components/Slider/Slider.js +18 -14
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider/index.d.cts +2 -0
- package/dist/components/Slider/index.d.ts +2 -2
- package/dist/components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.d.cts +32 -0
- package/dist/components/Spinner/Spinner.d.ts +18 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner/index.d.cts +2 -0
- package/dist/components/Spinner/index.d.ts +2 -2
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.d.cts +29 -0
- package/dist/components/Switch/Switch.d.ts +16 -0
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch/index.d.cts +2 -0
- package/dist/components/Switch/index.d.ts +2 -2
- package/dist/components/Tab/Tab.cjs.map +1 -1
- package/dist/components/Tab/Tab.d.cts +45 -0
- package/dist/components/Tab/Tab.d.ts +26 -0
- package/dist/components/Tab/Tab.js.map +1 -1
- package/dist/components/Tab/index.d.cts +2 -0
- package/dist/components/Tab/index.d.ts +2 -2
- package/dist/components/Tag/Tag.cjs.map +1 -1
- package/dist/components/Tag/Tag.d.cts +50 -0
- package/dist/components/Tag/Tag.d.ts +32 -1
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Tag/index.d.cts +2 -0
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tagbox/Tagbox.cjs +1 -1
- package/dist/components/Tagbox/Tagbox.cjs.map +1 -1
- package/dist/components/Tagbox/Tagbox.d.cts +67 -0
- package/dist/components/Tagbox/Tagbox.d.ts +46 -3
- package/dist/components/Tagbox/Tagbox.js +5 -3
- package/dist/components/Tagbox/Tagbox.js.map +1 -1
- package/dist/components/Tagbox/index.d.cts +2 -0
- package/dist/components/Tagbox/index.d.ts +2 -2
- package/dist/components/Textarea/Textarea.cjs +1 -1
- package/dist/components/Textarea/Textarea.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.d.cts +51 -0
- package/dist/components/Textarea/Textarea.d.ts +32 -3
- package/dist/components/Textarea/Textarea.js +20 -19
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/index.d.cts +2 -0
- package/dist/components/Textarea/index.d.ts +2 -2
- package/dist/components/Textbox/Textbox.cjs.map +1 -1
- package/dist/components/Textbox/Textbox.d.cts +49 -0
- package/dist/components/Textbox/Textbox.d.ts +30 -1
- package/dist/components/Textbox/Textbox.js.map +1 -1
- package/dist/components/Textbox/index.d.cts +2 -0
- package/dist/components/Textbox/index.d.ts +2 -2
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.cts +99 -0
- package/dist/components/Toast/Toast.d.ts +72 -4
- package/dist/components/Toast/Toast.js +3 -2
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/index.d.cts +2 -0
- package/dist/components/Toast/index.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.cjs.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.d.cts +41 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +21 -0
- package/dist/components/ToggleButton/ToggleButton.js.map +1 -1
- package/dist/components/ToggleButton/index.d.cts +2 -0
- package/dist/components/ToggleButton/index.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.cts +40 -0
- package/dist/components/Tooltip/Tooltip.d.ts +27 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/index.d.cts +2 -0
- package/dist/components/Tooltip/index.d.ts +2 -2
- package/dist/components/TruncatedText/TruncatedText.cjs.map +1 -1
- package/dist/components/TruncatedText/TruncatedText.d.cts +44 -0
- package/dist/components/TruncatedText/TruncatedText.d.ts +22 -0
- package/dist/components/TruncatedText/TruncatedText.js.map +1 -1
- package/dist/components/TruncatedText/index.d.cts +2 -0
- package/dist/components/TruncatedText/index.d.ts +2 -2
- package/dist/components/Typography/Typography.cjs.map +1 -1
- package/dist/components/Typography/Typography.d.cts +33 -0
- package/dist/components/Typography/Typography.d.ts +21 -0
- package/dist/components/Typography/Typography.js.map +1 -1
- package/dist/components/Typography/index.d.cts +2 -0
- package/dist/components/Typography/index.d.ts +2 -2
- package/dist/components/UploadArea/UploadArea.cjs +1 -1
- package/dist/components/UploadArea/UploadArea.cjs.map +1 -1
- package/dist/components/UploadArea/UploadArea.d.cts +82 -0
- package/dist/components/UploadArea/UploadArea.d.ts +66 -1
- package/dist/components/UploadArea/UploadArea.js +55 -34
- package/dist/components/UploadArea/UploadArea.js.map +1 -1
- package/dist/components/UploadArea/index.d.cts +2 -0
- package/dist/components/UploadArea/index.d.ts +2 -2
- package/dist/illustration.cjs +1 -0
- package/dist/illustration.js +3 -0
- package/dist/index.d.cts +52 -0
- package/dist/index.d.ts +52 -52
- package/dist/llms-full.txt +5993 -0
- package/dist/llms.txt +118 -0
- package/dist/shape-editor.cjs +2 -1
- package/dist/shape-editor.cjs.map +1 -0
- package/dist/shape-editor.js +8 -3
- package/dist/shape-editor.js.map +1 -0
- package/dist/styles.css +2 -2
- package/dist/tailwind.css +434 -0
- package/dist/tokens/tokens.css +1 -1
- package/dist/utils/cn.d.cts +12 -0
- package/dist/utils/cn.d.ts +10 -0
- package/dist/utils/keyboard.d.cts +3 -0
- package/dist/utils/sheet.cjs +2 -0
- package/dist/utils/sheet.cjs.map +1 -0
- package/dist/utils/sheet.d.cts +17 -0
- package/dist/utils/sheet.d.ts +17 -0
- package/dist/utils/sheet.js +7 -0
- package/dist/utils/sheet.js.map +1 -0
- package/dist/utils/useControllableState.d.cts +17 -0
- package/dist/utils/useModalAutoFocus.d.cts +11 -0
- package/dist/utils/useResizableWidth.cjs +2 -0
- package/dist/utils/useResizableWidth.cjs.map +1 -0
- package/dist/utils/useResizableWidth.d.cts +30 -0
- package/dist/utils/useResizableWidth.d.ts +30 -0
- package/dist/utils/useResizableWidth.js +32 -0
- package/dist/utils/useResizableWidth.js.map +1 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +54 -17
|
@@ -10,20 +10,26 @@
|
|
|
10
10
|
* draftStyle/draftMeta로 호스트가 주입한다. id는 에디터가 클라이언트 생성한다.
|
|
11
11
|
*/
|
|
12
12
|
import type { ReactNode, Ref } from "react";
|
|
13
|
-
import type { EditorShape, Point, ShapeInteraction, ShapeStyle } from "../geometry";
|
|
14
|
-
import type { EditorImageDiagnosis } from "../imageDiagnosis";
|
|
15
|
-
import type { KeymapOverrides } from "../keymap";
|
|
16
|
-
import type { RegionMask } from "../overlays";
|
|
17
|
-
import type { EditorStringsOverride } from "../strings";
|
|
18
|
-
import type { Tool } from "../tools";
|
|
19
|
-
import type { ViewSettingItemKey, ViewSettings } from "../viewSettings";
|
|
20
|
-
import type { EditorAssistant } from "./assistant";
|
|
21
|
-
import type { DrawSessionChange, ShapeEditorHandle } from "./handle";
|
|
13
|
+
import type { EditorShape, Point, ShapeInteraction, ShapeStyle } from "../geometry.js";
|
|
14
|
+
import type { EditorImageDiagnosis } from "../imageDiagnosis.js";
|
|
15
|
+
import type { KeymapOverrides } from "../keymap.js";
|
|
16
|
+
import type { RegionMask } from "../overlays.js";
|
|
17
|
+
import type { EditorStringsOverride } from "../strings.js";
|
|
18
|
+
import type { Tool } from "../tools.js";
|
|
19
|
+
import type { ViewSettingItemKey, ViewSettings } from "../viewSettings.js";
|
|
20
|
+
import type { EditorAssistant } from "./assistant.js";
|
|
21
|
+
import type { DrawSessionChange, ShapeEditorHandle } from "./handle.js";
|
|
22
|
+
/** 이미지 좌표에 고정해 띄우는 HTML 마커(예: 코멘트 핀). 줌과 무관하게 화면 크기가 유지된다. */
|
|
22
23
|
export interface EditorOverlayMarker<TMeta = unknown> {
|
|
24
|
+
/** 마커 식별자(React key) */
|
|
23
25
|
id: string;
|
|
26
|
+
/** 앵커점(이미지 px 좌표) */
|
|
24
27
|
point: Point;
|
|
28
|
+
/** true면 클릭·키보드 상호작용 없음(button 역할 제거, pointer-events 없음) */
|
|
25
29
|
disabled?: boolean;
|
|
30
|
+
/** 선택 상태 — 다른 마커 위로 올리고 aria-pressed를 켠다 */
|
|
26
31
|
selected?: boolean;
|
|
32
|
+
/** 호스트 전용 데이터. renderOverlayMarker·onOverlayMarkerClick에 그대로 돌려준다 */
|
|
27
33
|
meta?: TMeta;
|
|
28
34
|
/**
|
|
29
35
|
* 앵커점을 마커 콘텐츠의 어디에 맞출지. "center"(기본)=중앙, "topLeft"=좌상단 원점.
|
|
@@ -36,16 +42,22 @@ export interface EditorOverlayMarker<TMeta = unknown> {
|
|
|
36
42
|
export type ContextMenuItem = {
|
|
37
43
|
/** 기본 항목 식별자(예: "delete"). 호스트는 라벨 문자열 대신 이걸로 필터링한다. */
|
|
38
44
|
id?: string;
|
|
45
|
+
/** 표시 문구 */
|
|
39
46
|
label: string;
|
|
47
|
+
/** 항목 선택 시 실행 */
|
|
40
48
|
onClick: () => void;
|
|
49
|
+
/** 비활성 표시 */
|
|
41
50
|
disabled?: boolean;
|
|
51
|
+
/** 파괴적 동작 강조색 */
|
|
42
52
|
danger?: boolean;
|
|
53
|
+
/** 우측에 표시할 단축키 문구 */
|
|
43
54
|
shortcut?: string;
|
|
44
55
|
/** 라벨 왼쪽에 표시할 아이콘(예: AI 어시스트 항목의 마법봉). */
|
|
45
56
|
icon?: ReactNode;
|
|
46
57
|
} | {
|
|
47
58
|
separator: true;
|
|
48
59
|
};
|
|
60
|
+
/** 외부 도구에 전달되는 포인터 이벤트 요약(DOM 이벤트와 분리된 직렬화 형태). */
|
|
49
61
|
export interface EditorPointerEvent {
|
|
50
62
|
pointerId?: number;
|
|
51
63
|
button?: number;
|
|
@@ -53,26 +65,47 @@ export interface EditorPointerEvent {
|
|
|
53
65
|
altKey?: boolean;
|
|
54
66
|
ctrlKey?: boolean;
|
|
55
67
|
metaKey?: boolean;
|
|
68
|
+
/** 캔버스 기준 화면 px 좌표 */
|
|
56
69
|
global?: Point;
|
|
70
|
+
/** 포인터가 캔버스 안에서 끝났는지(포인터업) */
|
|
57
71
|
insideCanvas?: boolean;
|
|
58
72
|
}
|
|
73
|
+
/** 캔버스 뷰포트 변환. 화면 좌표 = 이미지 좌표 × scale + (x, y). */
|
|
59
74
|
export interface EditorCanvasViewport {
|
|
75
|
+
/** 줌 배율(1 = 100%) */
|
|
60
76
|
scale: number;
|
|
77
|
+
/** 이미지 원점의 화면 x 오프셋(px) */
|
|
61
78
|
x: number;
|
|
79
|
+
/** 이미지 원점의 화면 y 오프셋(px) */
|
|
62
80
|
y: number;
|
|
63
81
|
}
|
|
82
|
+
/** 외부 도구 포인터 콜백에 전달되는 문맥. */
|
|
64
83
|
export interface EditorExternalToolContext {
|
|
84
|
+
/** 포인터 위치(이미지 px 좌표) */
|
|
65
85
|
point: Point;
|
|
86
|
+
/** 포인터 아래 도형 id(없으면 null/undefined) */
|
|
66
87
|
targetId?: string | null;
|
|
88
|
+
/** 원 포인터 이벤트 요약 */
|
|
67
89
|
event: EditorPointerEvent;
|
|
90
|
+
/** 에디터가 읽기전용(readOnly 또는 locked) 상태인지 */
|
|
68
91
|
readOnly?: boolean;
|
|
92
|
+
/** 현재 뷰포트 변환 */
|
|
69
93
|
viewport: EditorCanvasViewport;
|
|
70
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* 호스트가 주입하는 커스텀 도구(예: 코멘트 찍기). `activeTool`이 이 `id`와 같을 때
|
|
97
|
+
* 캔버스 포인터 입력이 여기 콜백으로 전달된다.
|
|
98
|
+
*/
|
|
71
99
|
export interface EditorExternalTool {
|
|
100
|
+
/** 도구 id — activeTool 값으로 쓴다(기본 TOOL 값과 겹치지 않게) */
|
|
72
101
|
id: string;
|
|
102
|
+
/** 도구 활성 시 캔버스 CSS cursor */
|
|
73
103
|
cursor?: string;
|
|
104
|
+
/** 캔버스 포인터다운 */
|
|
74
105
|
onPointerDown?: (ctx: EditorExternalToolContext) => void;
|
|
106
|
+
/** 캔버스 포인터무브 */
|
|
75
107
|
onPointerMove?: (ctx: EditorExternalToolContext) => void;
|
|
108
|
+
/** 캔버스 포인터업 */
|
|
76
109
|
onPointerUp?: (ctx: EditorExternalToolContext) => void;
|
|
77
110
|
/**
|
|
78
111
|
* Esc 처리. false를 반환하면 "취소할 것이 없었다"는 뜻으로 Esc 사슬이 계속
|
|
@@ -138,6 +171,10 @@ export interface ShapeEditorDocument<TMeta = unknown> {
|
|
|
138
171
|
}
|
|
139
172
|
/** 미니맵 패널이 붙는 뷰어 모서리. */
|
|
140
173
|
export type MinimapPosition = "bottom-left" | "bottom-right" | "top-left" | "top-right";
|
|
174
|
+
/**
|
|
175
|
+
* `ShapeEditor` props. `TMeta`는 도형 meta, `TMarkerMeta`는 오버레이 마커 meta 타입.
|
|
176
|
+
* 필수는 `document`와 `activeTool`뿐이며 그리기에는 `draftStyle`이 필요하다.
|
|
177
|
+
*/
|
|
141
178
|
export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
142
179
|
/** 편집 문서(시드 계약). null = 문서 없음(시드 대기) — 센티널 값 대신 null로. */
|
|
143
180
|
document: ShapeEditorDocument<TMeta> | null;
|
|
@@ -153,8 +190,9 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
153
190
|
*/
|
|
154
191
|
renderImageState?: (status: "loading" | "error" | "missing", diagnosis?: EditorImageDiagnosis | null) => ReactNode;
|
|
155
192
|
/**
|
|
156
|
-
* true면 이미지를 반투명 검정으로 덮는다(레이블은 위에 밝게).
|
|
157
|
-
*
|
|
193
|
+
* true면 이미지를 반투명 검정으로 덮는다(레이블은 위에 밝게).
|
|
194
|
+
* 작업 완료·잠금처럼 이미지를 더 손대지 않는 상태를 보여 줄 때 켠다.
|
|
195
|
+
* @default false
|
|
158
196
|
*/
|
|
159
197
|
dimmed?: boolean;
|
|
160
198
|
/**
|
|
@@ -168,14 +206,20 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
168
206
|
selectedIds?: string[];
|
|
169
207
|
/**
|
|
170
208
|
* true면 SELECT 도구의 빈 공간 드래그 마퀴(범위 선택)를 끈다 — 클릭 단건 선택만.
|
|
171
|
-
* 빈 공간 클릭 시 선택 해제는 그대로 동작한다.
|
|
172
|
-
*
|
|
209
|
+
* 빈 공간 클릭 시 선택 해제는 그대로 동작한다. 한 번에 하나만 고르는
|
|
210
|
+
* 뷰어형 화면에서 켠다.
|
|
173
211
|
*/
|
|
174
212
|
disableMarquee?: boolean;
|
|
213
|
+
/** 현재 도구(TOOL 값 또는 externalTools의 id). 호스트가 소유하고 onActiveToolChange로 동기화한다 */
|
|
175
214
|
activeTool: Tool;
|
|
176
215
|
/** 없으면 그리기 비활성. */
|
|
177
216
|
draftStyle?: ShapeStyle;
|
|
217
|
+
/** 새 도형의 meta(예: 현재 클래스 id) */
|
|
178
218
|
draftMeta?: TMeta;
|
|
219
|
+
/**
|
|
220
|
+
* 읽기전용 뷰어 모드. 문서를 바꾸는 모든 상호작용·undo를 막고 알림도 하지 않는다.
|
|
221
|
+
* 선택·팬·줌·복사는 허용하며 컨텍스트 메뉴는 복사/선택/확대만 남는다. 편집 시도 알림이 필요하면 `locked`.
|
|
222
|
+
*/
|
|
179
223
|
readOnly?: boolean;
|
|
180
224
|
/**
|
|
181
225
|
* 편집 잠금. true면 문서를 바꾸는 상호작용(그리기/이동/편집/어시스트)을 막고,
|
|
@@ -183,7 +227,7 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
183
227
|
* 잘라내기·핸들의 createShapes/updateShapes/deleteShapes)에는 `onLockedInteraction`을
|
|
184
228
|
* 호출한다. 그 밖의 변경 경로(실행 취소, 겹침 순서, 핸들의 선택 기반 액션 등)는
|
|
185
229
|
* 알림 없이 막는다. 클릭 선택·마퀴·복사·팬·우클릭메뉴·외부도구(코멘트)는 허용.
|
|
186
|
-
*
|
|
230
|
+
* 작업 완료처럼 편집을 막되 시도는 알려야 하는 상태에서 켠다.
|
|
187
231
|
*/
|
|
188
232
|
locked?: boolean;
|
|
189
233
|
/** locked 상태에서 편집을 시도했을 때(호스트가 확인 모달 등을 띄운다). */
|
|
@@ -209,9 +253,13 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
209
253
|
decorationShapes?: EditorShape<TMeta>[];
|
|
210
254
|
/** 이미지 위 가림 효과. 제품 의미는 호스트가 해석하고 에디터는 순수 영역만 렌더링한다. */
|
|
211
255
|
regionMask?: RegionMask;
|
|
256
|
+
/** 이미지 좌표에 띄울 HTML 마커 목록 */
|
|
212
257
|
overlayMarkers?: EditorOverlayMarker<TMarkerMeta>[];
|
|
258
|
+
/** 마커 내용 렌더(예: `<CommentPin />`). 없으면 마커를 그리지 않는다 */
|
|
213
259
|
renderOverlayMarker?: (marker: EditorOverlayMarker<TMarkerMeta>) => ReactNode;
|
|
260
|
+
/** 마커 클릭·Enter·Space(disabled 제외) */
|
|
214
261
|
onOverlayMarkerClick?: (marker: EditorOverlayMarker<TMarkerMeta>) => void;
|
|
262
|
+
/** 이미지 좌표계에 맞춰 변환되는 커스텀 오버레이 레이어 렌더(이미지 크기·뷰포트 제공) */
|
|
215
263
|
renderImageOverlay?: (props: {
|
|
216
264
|
image: {
|
|
217
265
|
w: number;
|
|
@@ -219,9 +267,10 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
219
267
|
};
|
|
220
268
|
viewport: EditorCanvasViewport;
|
|
221
269
|
}) => ReactNode;
|
|
270
|
+
/** 호스트 정의 커스텀 도구 목록 */
|
|
222
271
|
externalTools?: EditorExternalTool[];
|
|
223
272
|
/**
|
|
224
|
-
* AI 어시스트(SAM 식). 제공하면 ASSISTANT_POLYGON/ASSISTANT_POINT 도구가 동작한다.
|
|
273
|
+
* AI 어시스트(SAM 식). 제공하면 ASSISTANT_POLYGON/ASSISTANT_RECT/ASSISTANT_POINT 도구가 동작한다.
|
|
225
274
|
* 에디터가 프롬프트를 모아 infer로 넘기고, 결과 폴리곤을 프리뷰→Enter로 커밋한다
|
|
226
275
|
* (draftStyle/draftMeta 적용). Esc로 취소.
|
|
227
276
|
*/
|
|
@@ -234,6 +283,7 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
234
283
|
/**
|
|
235
284
|
* 선택 라벨 배지에서 도형 색을 나타내는 색 점을 숨긴다. 기본 false(표시).
|
|
236
285
|
* 클래스 색이 도메인상 의미가 없는 호스트에서 사용.
|
|
286
|
+
* @default false
|
|
237
287
|
*/
|
|
238
288
|
hideSelectionLabelDot?: boolean;
|
|
239
289
|
/**
|
|
@@ -260,14 +310,19 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
260
310
|
/**
|
|
261
311
|
* 미니맵 패널(축소맵+줌바+설정 버튼) 표시 여부(기본 true).
|
|
262
312
|
* 읽기전용 프리뷰 등 크롬이 부담스러운 콜사이트에서 끈다.
|
|
313
|
+
* @default true
|
|
263
314
|
*/
|
|
264
315
|
showMinimap?: boolean;
|
|
265
316
|
/**
|
|
266
317
|
* 미니맵 패널이 붙는 모서리(기본 "bottom-left"). 위쪽 모서리에서는 줌 바가
|
|
267
318
|
* 위에 고정되고 축소맵이 아래로 펼쳐진다.
|
|
319
|
+
* @default "bottom-left"
|
|
268
320
|
*/
|
|
269
321
|
minimapPosition?: MinimapPosition;
|
|
270
|
-
/**
|
|
322
|
+
/**
|
|
323
|
+
* 미니맵 패널의 보기설정(기어) 버튼 표시 여부(기본 true).
|
|
324
|
+
* @default true
|
|
325
|
+
*/
|
|
271
326
|
showViewSettings?: boolean;
|
|
272
327
|
/**
|
|
273
328
|
* 우클릭 컨텍스트 메뉴 항목 커스터마이즈. 에디터 기본 항목(defaults: 복제/삭제/
|
|
@@ -284,8 +339,8 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
284
339
|
*/
|
|
285
340
|
strings?: EditorStringsOverride;
|
|
286
341
|
/**
|
|
287
|
-
* 보기 설정 팝오버의 항목 구성(표시 여부·순서).
|
|
288
|
-
* 예:
|
|
342
|
+
* 보기 설정 팝오버의 항목 구성(표시 여부·순서). 쓰는 화면에 필요 없는 항목
|
|
343
|
+
* (예: 단순화 강도·픽셀화)을 빼거나 순서를 바꿀 때 준다.
|
|
289
344
|
* 미지정 시 전 항목(기존 순서).
|
|
290
345
|
*/
|
|
291
346
|
viewSettingItems?: ViewSettingItemKey[];
|
|
@@ -300,7 +355,10 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
300
355
|
* 호스트가 영속화하거나 외부 설정 UI와 동기화하는 데 쓴다.
|
|
301
356
|
*/
|
|
302
357
|
onViewSettingsChange?: (settings: ViewSettings) => void;
|
|
303
|
-
/**
|
|
358
|
+
/**
|
|
359
|
+
* 붓 도구 반경(이미지 px, 기본 20).
|
|
360
|
+
* @default 20
|
|
361
|
+
*/
|
|
304
362
|
brushSize?: number;
|
|
305
363
|
/**
|
|
306
364
|
* 단축키 재정의. 액션→조합키("mod+shift+z" 등, 배열 가능). 미지정 액션은 기본값,
|
|
@@ -320,10 +378,14 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
320
378
|
width: number;
|
|
321
379
|
height: number;
|
|
322
380
|
};
|
|
323
|
-
/**
|
|
381
|
+
/**
|
|
382
|
+
* zoomBound·zoomToShapes 애니메이션 길이(ms, 기본 300).
|
|
383
|
+
* @default 300
|
|
384
|
+
*/
|
|
324
385
|
zoomAnimationDuration?: number;
|
|
325
386
|
/** 에디터 내부에서 활성 도구가 바뀔 때(예: 그리기 완료 후 자동 복귀) 발생. */
|
|
326
387
|
onActiveToolChange?: (tool: Tool) => void;
|
|
388
|
+
/** 선택 도형 id 목록이 바뀔 때. controlled 모드면 이 값으로 selectedIds를 갱신한다 */
|
|
327
389
|
onSelectionChange?: (ids: string[]) => void;
|
|
328
390
|
/**
|
|
329
391
|
* 폴리곤/라인 정점 편집모드 진입/해제 통지(더블클릭 진입, 툴·선택 변경 시 해제).
|
|
@@ -345,6 +407,7 @@ export interface ShapeEditorProps<TMeta = unknown, TMarkerMeta = unknown> {
|
|
|
345
407
|
* undo/redo 시에도 현재 문서 기준의 역연산 이벤트로 발생한다.
|
|
346
408
|
*/
|
|
347
409
|
onShapesDeleted?: (ids: string[]) => void;
|
|
410
|
+
/** 팬·줌으로 뷰포트가 바뀔 때 */
|
|
348
411
|
onViewportChange?: (viewport: EditorCanvasViewport) => void;
|
|
349
412
|
/** 이동·리사이즈·정점 편집 중인 도형 좌표. 문서 커밋 전 시각 동기화용이다. */
|
|
350
413
|
onShapesTransformPreview?: (updates: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewSettings.cjs","names":[],"sources":["../../../../src/components/ShapeEditor/_model/viewSettings.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"viewSettings.cjs","names":[],"sources":["../../../../src/components/ShapeEditor/_model/viewSettings.ts"],"sourcesContent":["/**\n * 에디터-로컬 보기/조작 환경설정(도메인 무관). `defaultViewSettings`로 시드하고,\n * 필요하면 `viewSettings`로 외부에서 동기화한다(내부 변경은 `onViewSettingsChange`).\n */\nexport interface ViewSettings {\n /** 이미지 밝기 배율(0.5~1.5, 1 = 원본) */\n brightness: number;\n /** 이미지 대비 배율(0.5~1.5, 1 = 원본) */\n contrast: number;\n /** 커서 십자 가이드선 표시 */\n showCursorGuide: boolean;\n /** 이미지 보간. false면 픽셀화(최근접) 표시 */\n imageSmoothing: boolean;\n /** 도형 기본 선 두께(화면 px, 1~10) */\n strokeSize: number;\n /** 자유선/붓→폴리곤 단순화 강도(RDP epsilon, 이미지 px). 높을수록 점이 적어짐. */\n simplifyStrength: number;\n /** regionMask 가림 효과 표시 */\n showRegionMask: boolean;\n /** 문서(이미지)를 바꿔도 현재 줌·위치 유지 */\n keepZoomOnImageChange: boolean;\n /** 휠/두 손가락 스크롤을 줌으로(끄면 팬). 핀치·⌘/Ctrl+휠 줌은 항상 동작 */\n wheelZoom: boolean;\n /** 휠/핀치 확대·축소 민감도 배율(1 = 기본). 마우스별 휠 이벤트 밀도 차이 보정용. */\n zoomSensitivity: number;\n}\n\n/** 보기 설정 기본값. defaultViewSettings에서 지정하지 않은 키가 따른다. */\nexport const DEFAULT_VIEW_SETTINGS: ViewSettings = {\n brightness: 1,\n contrast: 1,\n showCursorGuide: false,\n imageSmoothing: true,\n strokeSize: 2,\n simplifyStrength: 1.5,\n showRegionMask: true,\n keepZoomOnImageChange: false,\n wheelZoom: true,\n zoomSensitivity: 1,\n};\n\n/** 숫자형 보기 설정의 허용 범위 — 슬라이더와 클램프가 공유하는 단일 출처. */\nexport interface ViewSettingRange {\n min: number;\n max: number;\n step: number;\n}\n\n/**\n * 밝기/대비는 0에 가까우면 완전 검정·평면 회색이 되어 이미지가 사라지고,\n * 너무 높으면 화이트아웃된다. 사진을 계속 식별할 수 있는 구간으로 묶는다.\n */\nexport const VIEW_SETTING_RANGES = {\n brightness: { min: 0.5, max: 1.5, step: 0.05 },\n contrast: { min: 0.5, max: 1.5, step: 0.05 },\n strokeSize: { min: 1, max: 10, step: 0.5 },\n simplifyStrength: { min: 0.5, max: 5, step: 0.5 },\n zoomSensitivity: { min: 0.2, max: 3, step: 0.1 },\n} as const satisfies Partial<Record<keyof ViewSettings, ViewSettingRange>>;\n\ntype RangedKey = keyof typeof VIEW_SETTING_RANGES;\n\nconst RANGED_KEYS = Object.keys(VIEW_SETTING_RANGES) as RangedKey[];\n\n/**\n * 범위 밖 값을 허용 구간 안으로 되돌린다(구버전 저장값 마이그레이션 겸용).\n * NaN/Infinity는 기본값으로 되살린다. 지정되지 않은(undefined) 키는 만들어내지 않으므로\n * 부분 패치에도 그대로 쓸 수 있다. 고칠 게 없으면 새 객체를 만들지 않고 입력을 그대로 반환한다.\n */\nexport function clampViewSettings<T extends Partial<ViewSettings>>(settings: T): T {\n const fixes: Partial<Record<RangedKey, number>> = {};\n for (const key of RANGED_KEYS) {\n const value = settings[key];\n if (value === undefined) continue;\n const { min, max } = VIEW_SETTING_RANGES[key];\n const fixed = Number.isFinite(value)\n ? Math.min(max, Math.max(min, value as number))\n : DEFAULT_VIEW_SETTINGS[key];\n if (fixed !== value) fixes[key] = fixed;\n }\n return Object.keys(fixes).length ? { ...settings, ...fixes } : settings;\n}\n\n/** 보기 설정 항목 키 — 슬라이더 5종 + 토글 5종. */\nexport type ViewSettingItemKey =\n | \"brightness\"\n | \"contrast\"\n | \"strokeSize\"\n | \"simplifyStrength\"\n | \"zoomSensitivity\"\n | \"pixelation\"\n | \"cursorGuide\"\n | \"regionMask\"\n | \"keepZoomOnImageChange\"\n | \"wheelZoom\";\n"],"mappings":"aA4BA,IAAa,EAAsC,CACjD,WAAY,EACZ,SAAU,EACV,gBAAiB,GACjB,eAAgB,GAChB,WAAY,EACZ,iBAAkB,IAClB,eAAgB,GAChB,sBAAuB,GACvB,UAAW,GACX,gBAAiB,EAClB,CAaY,EAAsB,CACjC,WAAY,CAAE,IAAK,GAAK,IAAK,IAAK,KAAM,IAAM,CAC9C,SAAU,CAAE,IAAK,GAAK,IAAK,IAAK,KAAM,IAAM,CAC5C,WAAY,CAAE,IAAK,EAAG,IAAK,GAAI,KAAM,GAAK,CAC1C,iBAAkB,CAAE,IAAK,GAAK,IAAK,EAAG,KAAM,GAAK,CACjD,gBAAiB,CAAE,IAAK,GAAK,IAAK,EAAG,KAAM,GAAK,CACjD,CAIK,EAAc,OAAO,KAAK,EAAoB,CAOpD,SAAgB,EAAmD,EAAgB,CACjF,IAAM,EAA4C,EAAE,CACpD,IAAK,IAAM,KAAO,EAAa,CAC7B,IAAM,EAAQ,EAAS,GACvB,GAAI,IAAU,IAAA,GAAW,SACzB,GAAM,CAAE,MAAK,OAAQ,EAAoB,GACnC,EAAQ,OAAO,SAAS,EAAM,CAChC,KAAK,IAAI,EAAK,KAAK,IAAI,EAAK,EAAgB,CAAC,CAC7C,EAAsB,GACtB,IAAU,IAAO,EAAM,GAAO,GAEpC,OAAO,OAAO,KAAK,EAAM,CAAC,OAAS,CAAE,GAAG,EAAU,GAAG,EAAO,CAAG"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 에디터-로컬 보기/조작 환경설정(도메인 무관). `defaultViewSettings`로 시드하고,
|
|
3
|
+
* 필요하면 `viewSettings`로 외부에서 동기화한다(내부 변경은 `onViewSettingsChange`).
|
|
4
|
+
*/
|
|
5
|
+
export interface ViewSettings {
|
|
6
|
+
/** 이미지 밝기 배율(0.5~1.5, 1 = 원본) */
|
|
7
|
+
brightness: number;
|
|
8
|
+
/** 이미지 대비 배율(0.5~1.5, 1 = 원본) */
|
|
9
|
+
contrast: number;
|
|
10
|
+
/** 커서 십자 가이드선 표시 */
|
|
11
|
+
showCursorGuide: boolean;
|
|
12
|
+
/** 이미지 보간. false면 픽셀화(최근접) 표시 */
|
|
13
|
+
imageSmoothing: boolean;
|
|
14
|
+
/** 도형 기본 선 두께(화면 px, 1~10) */
|
|
15
|
+
strokeSize: number;
|
|
16
|
+
/** 자유선/붓→폴리곤 단순화 강도(RDP epsilon, 이미지 px). 높을수록 점이 적어짐. */
|
|
17
|
+
simplifyStrength: number;
|
|
18
|
+
/** regionMask 가림 효과 표시 */
|
|
19
|
+
showRegionMask: boolean;
|
|
20
|
+
/** 문서(이미지)를 바꿔도 현재 줌·위치 유지 */
|
|
21
|
+
keepZoomOnImageChange: boolean;
|
|
22
|
+
/** 휠/두 손가락 스크롤을 줌으로(끄면 팬). 핀치·⌘/Ctrl+휠 줌은 항상 동작 */
|
|
23
|
+
wheelZoom: boolean;
|
|
24
|
+
/** 휠/핀치 확대·축소 민감도 배율(1 = 기본). 마우스별 휠 이벤트 밀도 차이 보정용. */
|
|
25
|
+
zoomSensitivity: number;
|
|
26
|
+
}
|
|
27
|
+
/** 보기 설정 기본값. defaultViewSettings에서 지정하지 않은 키가 따른다. */
|
|
28
|
+
export declare const DEFAULT_VIEW_SETTINGS: ViewSettings;
|
|
29
|
+
/** 숫자형 보기 설정의 허용 범위 — 슬라이더와 클램프가 공유하는 단일 출처. */
|
|
30
|
+
export interface ViewSettingRange {
|
|
31
|
+
min: number;
|
|
32
|
+
max: number;
|
|
33
|
+
step: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 밝기/대비는 0에 가까우면 완전 검정·평면 회색이 되어 이미지가 사라지고,
|
|
37
|
+
* 너무 높으면 화이트아웃된다. 사진을 계속 식별할 수 있는 구간으로 묶는다.
|
|
38
|
+
*/
|
|
39
|
+
export declare const VIEW_SETTING_RANGES: {
|
|
40
|
+
readonly brightness: {
|
|
41
|
+
readonly min: 0.5;
|
|
42
|
+
readonly max: 1.5;
|
|
43
|
+
readonly step: 0.05;
|
|
44
|
+
};
|
|
45
|
+
readonly contrast: {
|
|
46
|
+
readonly min: 0.5;
|
|
47
|
+
readonly max: 1.5;
|
|
48
|
+
readonly step: 0.05;
|
|
49
|
+
};
|
|
50
|
+
readonly strokeSize: {
|
|
51
|
+
readonly min: 1;
|
|
52
|
+
readonly max: 10;
|
|
53
|
+
readonly step: 0.5;
|
|
54
|
+
};
|
|
55
|
+
readonly simplifyStrength: {
|
|
56
|
+
readonly min: 0.5;
|
|
57
|
+
readonly max: 5;
|
|
58
|
+
readonly step: 0.5;
|
|
59
|
+
};
|
|
60
|
+
readonly zoomSensitivity: {
|
|
61
|
+
readonly min: 0.2;
|
|
62
|
+
readonly max: 3;
|
|
63
|
+
readonly step: 0.1;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* 범위 밖 값을 허용 구간 안으로 되돌린다(구버전 저장값 마이그레이션 겸용).
|
|
68
|
+
* NaN/Infinity는 기본값으로 되살린다. 지정되지 않은(undefined) 키는 만들어내지 않으므로
|
|
69
|
+
* 부분 패치에도 그대로 쓸 수 있다. 고칠 게 없으면 새 객체를 만들지 않고 입력을 그대로 반환한다.
|
|
70
|
+
*/
|
|
71
|
+
export declare function clampViewSettings<T extends Partial<ViewSettings>>(settings: T): T;
|
|
72
|
+
/** 보기 설정 항목 키 — 슬라이더 5종 + 토글 5종. */
|
|
73
|
+
export type ViewSettingItemKey = "brightness" | "contrast" | "strokeSize" | "simplifyStrength" | "zoomSensitivity" | "pixelation" | "cursorGuide" | "regionMask" | "keepZoomOnImageChange" | "wheelZoom";
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* 에디터-로컬 보기/조작 환경설정(도메인 무관). `defaultViewSettings`로 시드하고,
|
|
3
|
+
* 필요하면 `viewSettings`로 외부에서 동기화한다(내부 변경은 `onViewSettingsChange`).
|
|
4
|
+
*/
|
|
2
5
|
export interface ViewSettings {
|
|
6
|
+
/** 이미지 밝기 배율(0.5~1.5, 1 = 원본) */
|
|
3
7
|
brightness: number;
|
|
8
|
+
/** 이미지 대비 배율(0.5~1.5, 1 = 원본) */
|
|
4
9
|
contrast: number;
|
|
10
|
+
/** 커서 십자 가이드선 표시 */
|
|
5
11
|
showCursorGuide: boolean;
|
|
12
|
+
/** 이미지 보간. false면 픽셀화(최근접) 표시 */
|
|
6
13
|
imageSmoothing: boolean;
|
|
14
|
+
/** 도형 기본 선 두께(화면 px, 1~10) */
|
|
7
15
|
strokeSize: number;
|
|
8
16
|
/** 자유선/붓→폴리곤 단순화 강도(RDP epsilon, 이미지 px). 높을수록 점이 적어짐. */
|
|
9
17
|
simplifyStrength: number;
|
|
18
|
+
/** regionMask 가림 효과 표시 */
|
|
10
19
|
showRegionMask: boolean;
|
|
20
|
+
/** 문서(이미지)를 바꿔도 현재 줌·위치 유지 */
|
|
11
21
|
keepZoomOnImageChange: boolean;
|
|
22
|
+
/** 휠/두 손가락 스크롤을 줌으로(끄면 팬). 핀치·⌘/Ctrl+휠 줌은 항상 동작 */
|
|
12
23
|
wheelZoom: boolean;
|
|
13
24
|
/** 휠/핀치 확대·축소 민감도 배율(1 = 기본). 마우스별 휠 이벤트 밀도 차이 보정용. */
|
|
14
25
|
zoomSensitivity: number;
|
|
15
26
|
}
|
|
27
|
+
/** 보기 설정 기본값. defaultViewSettings에서 지정하지 않은 키가 따른다. */
|
|
16
28
|
export declare const DEFAULT_VIEW_SETTINGS: ViewSettings;
|
|
17
29
|
/** 숫자형 보기 설정의 허용 범위 — 슬라이더와 클램프가 공유하는 단일 출처. */
|
|
18
30
|
export interface ViewSettingRange {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewSettings.js","names":[],"sources":["../../../../src/components/ShapeEditor/_model/viewSettings.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"viewSettings.js","names":[],"sources":["../../../../src/components/ShapeEditor/_model/viewSettings.ts"],"sourcesContent":["/**\n * 에디터-로컬 보기/조작 환경설정(도메인 무관). `defaultViewSettings`로 시드하고,\n * 필요하면 `viewSettings`로 외부에서 동기화한다(내부 변경은 `onViewSettingsChange`).\n */\nexport interface ViewSettings {\n /** 이미지 밝기 배율(0.5~1.5, 1 = 원본) */\n brightness: number;\n /** 이미지 대비 배율(0.5~1.5, 1 = 원본) */\n contrast: number;\n /** 커서 십자 가이드선 표시 */\n showCursorGuide: boolean;\n /** 이미지 보간. false면 픽셀화(최근접) 표시 */\n imageSmoothing: boolean;\n /** 도형 기본 선 두께(화면 px, 1~10) */\n strokeSize: number;\n /** 자유선/붓→폴리곤 단순화 강도(RDP epsilon, 이미지 px). 높을수록 점이 적어짐. */\n simplifyStrength: number;\n /** regionMask 가림 효과 표시 */\n showRegionMask: boolean;\n /** 문서(이미지)를 바꿔도 현재 줌·위치 유지 */\n keepZoomOnImageChange: boolean;\n /** 휠/두 손가락 스크롤을 줌으로(끄면 팬). 핀치·⌘/Ctrl+휠 줌은 항상 동작 */\n wheelZoom: boolean;\n /** 휠/핀치 확대·축소 민감도 배율(1 = 기본). 마우스별 휠 이벤트 밀도 차이 보정용. */\n zoomSensitivity: number;\n}\n\n/** 보기 설정 기본값. defaultViewSettings에서 지정하지 않은 키가 따른다. */\nexport const DEFAULT_VIEW_SETTINGS: ViewSettings = {\n brightness: 1,\n contrast: 1,\n showCursorGuide: false,\n imageSmoothing: true,\n strokeSize: 2,\n simplifyStrength: 1.5,\n showRegionMask: true,\n keepZoomOnImageChange: false,\n wheelZoom: true,\n zoomSensitivity: 1,\n};\n\n/** 숫자형 보기 설정의 허용 범위 — 슬라이더와 클램프가 공유하는 단일 출처. */\nexport interface ViewSettingRange {\n min: number;\n max: number;\n step: number;\n}\n\n/**\n * 밝기/대비는 0에 가까우면 완전 검정·평면 회색이 되어 이미지가 사라지고,\n * 너무 높으면 화이트아웃된다. 사진을 계속 식별할 수 있는 구간으로 묶는다.\n */\nexport const VIEW_SETTING_RANGES = {\n brightness: { min: 0.5, max: 1.5, step: 0.05 },\n contrast: { min: 0.5, max: 1.5, step: 0.05 },\n strokeSize: { min: 1, max: 10, step: 0.5 },\n simplifyStrength: { min: 0.5, max: 5, step: 0.5 },\n zoomSensitivity: { min: 0.2, max: 3, step: 0.1 },\n} as const satisfies Partial<Record<keyof ViewSettings, ViewSettingRange>>;\n\ntype RangedKey = keyof typeof VIEW_SETTING_RANGES;\n\nconst RANGED_KEYS = Object.keys(VIEW_SETTING_RANGES) as RangedKey[];\n\n/**\n * 범위 밖 값을 허용 구간 안으로 되돌린다(구버전 저장값 마이그레이션 겸용).\n * NaN/Infinity는 기본값으로 되살린다. 지정되지 않은(undefined) 키는 만들어내지 않으므로\n * 부분 패치에도 그대로 쓸 수 있다. 고칠 게 없으면 새 객체를 만들지 않고 입력을 그대로 반환한다.\n */\nexport function clampViewSettings<T extends Partial<ViewSettings>>(settings: T): T {\n const fixes: Partial<Record<RangedKey, number>> = {};\n for (const key of RANGED_KEYS) {\n const value = settings[key];\n if (value === undefined) continue;\n const { min, max } = VIEW_SETTING_RANGES[key];\n const fixed = Number.isFinite(value)\n ? Math.min(max, Math.max(min, value as number))\n : DEFAULT_VIEW_SETTINGS[key];\n if (fixed !== value) fixes[key] = fixed;\n }\n return Object.keys(fixes).length ? { ...settings, ...fixes } : settings;\n}\n\n/** 보기 설정 항목 키 — 슬라이더 5종 + 토글 5종. */\nexport type ViewSettingItemKey =\n | \"brightness\"\n | \"contrast\"\n | \"strokeSize\"\n | \"simplifyStrength\"\n | \"zoomSensitivity\"\n | \"pixelation\"\n | \"cursorGuide\"\n | \"regionMask\"\n | \"keepZoomOnImageChange\"\n | \"wheelZoom\";\n"],"mappings":";;AA4BA,IAAa,IAAsC;CACjD,YAAY;CACZ,UAAU;CACV,iBAAiB;CACjB,gBAAgB;CAChB,YAAY;CACZ,kBAAkB;CAClB,gBAAgB;CAChB,uBAAuB;CACvB,WAAW;CACX,iBAAiB;CAClB,EAaY,IAAsB;CACjC,YAAY;EAAE,KAAK;EAAK,KAAK;EAAK,MAAM;EAAM;CAC9C,UAAU;EAAE,KAAK;EAAK,KAAK;EAAK,MAAM;EAAM;CAC5C,YAAY;EAAE,KAAK;EAAG,KAAK;EAAI,MAAM;EAAK;CAC1C,kBAAkB;EAAE,KAAK;EAAK,KAAK;EAAG,MAAM;EAAK;CACjD,iBAAiB;EAAE,KAAK;EAAK,KAAK;EAAG,MAAM;EAAK;CACjD,EAIK,IAAc,OAAO,KAAK,EAAoB;AAOpD,SAAgB,EAAmD,GAAgB;CACjF,IAAM,IAA4C,EAAE;AACpD,MAAK,IAAM,KAAO,GAAa;EAC7B,IAAM,IAAQ,EAAS;AACvB,MAAI,MAAU,KAAA,EAAW;EACzB,IAAM,EAAE,QAAK,WAAQ,EAAoB,IACnC,IAAQ,OAAO,SAAS,EAAM,GAChC,KAAK,IAAI,GAAK,KAAK,IAAI,GAAK,EAAgB,CAAC,GAC7C,EAAsB;AAC1B,EAAI,MAAU,MAAO,EAAM,KAAO;;AAEpC,QAAO,OAAO,KAAK,EAAM,CAAC,SAAS;EAAE,GAAG;EAAU,GAAG;EAAO,GAAG"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type Point } from "./geometry.cjs";
|
|
2
|
+
export interface Size {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}
|
|
6
|
+
export interface Rect extends Size {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}
|
|
10
|
+
/** 이미지 좌표계 → 컨테이너 CSS px 변환(`screen = coord * scale + offset`). */
|
|
11
|
+
export interface ViewerTransform {
|
|
12
|
+
scale: number;
|
|
13
|
+
offsetX: number;
|
|
14
|
+
offsetY: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function computeViewerTransform({ viewport, image, focusPoints, zoomPadding, focusFit, }: {
|
|
17
|
+
viewport: Size;
|
|
18
|
+
image: Size;
|
|
19
|
+
focusPoints?: Point[];
|
|
20
|
+
zoomPadding: number;
|
|
21
|
+
focusFit: "contain" | "cover";
|
|
22
|
+
}): ViewerTransform;
|
|
23
|
+
/** 컨테이너에 보이는 이미지 영역(좌표계 단위, 이미지 경계로 클램프). 보이는 부분이 없으면 null. */
|
|
24
|
+
export declare function getVisibleImageRect(transform: ViewerTransform, viewport: Size, image: Size): Rect | null;
|
|
25
|
+
/**
|
|
26
|
+
* 보이는 영역만 잘라 화면 해상도로 줄인 패치 계획. 원본 픽셀 경계로 정렬하고,
|
|
27
|
+
* 원본보다 확대된 화면에서는 원본 해상도에서 멈춘다(업스케일은 그리기 단계가 한다).
|
|
28
|
+
* `density`는 화면이 요구하는 좌표 1단위당 기기 픽셀 수.
|
|
29
|
+
*/
|
|
30
|
+
export declare function planImagePatch({ visible, image, natural, density, }: {
|
|
31
|
+
visible: Rect;
|
|
32
|
+
image: Size;
|
|
33
|
+
natural: Size;
|
|
34
|
+
density: number;
|
|
35
|
+
}): {
|
|
36
|
+
source: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
rect: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
outputWidth: number;
|
|
49
|
+
outputHeight: number;
|
|
50
|
+
};
|
|
51
|
+
/** 기존 패치가 지금 보이는 영역을 요구 해상도 이상으로 덮는지 — 덮으면 원본을 다시 디코딩할 필요가 없다. */
|
|
52
|
+
export declare function patchCovers(patch: {
|
|
53
|
+
rect: Rect;
|
|
54
|
+
outputWidth: number;
|
|
55
|
+
outputHeight: number;
|
|
56
|
+
}, visible: Rect, required: {
|
|
57
|
+
density: number;
|
|
58
|
+
natural: Size;
|
|
59
|
+
image: Size;
|
|
60
|
+
}): boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { BBox, EditorShape, Point, ShapeType } from "./geometry.cjs";
|
|
2
|
+
/** 기존 Editor `TARGET_CONTAINER_RATIO` — 레이블 줌 시 화면 대비 목표 비율. */
|
|
3
|
+
export declare const TARGET_CONTAINER_RATIO = 0.3;
|
|
4
|
+
export declare const DEFAULT_ZOOM_ANIMATION_MS = 300;
|
|
5
|
+
export declare const MIN_VIEWPORT_SCALE = 0.05;
|
|
6
|
+
export declare const MAX_VIEWPORT_SCALE = 20;
|
|
7
|
+
/**
|
|
8
|
+
* 렌더러 화면 변환(배율 + 평행이동, 화면 px). 공개 `Viewport`(geometry, position 중첩)와
|
|
9
|
+
* 별개인 내부 표현이다 — 렌더러 계약(`_renderers/types`)이 이 타입을 재노출한다.
|
|
10
|
+
*/
|
|
11
|
+
export interface Viewport {
|
|
12
|
+
scale: number;
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ZoomBounds {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function easeOutCubic(t: number): number;
|
|
23
|
+
export declare function bboxToZoomBounds(b: BBox): ZoomBounds;
|
|
24
|
+
export declare function zoomBoundsFromPoints(type: ShapeType, points: Point[]): ZoomBounds | null;
|
|
25
|
+
export declare function zoomBoundsFromShapes(shapes: EditorShape[]): ZoomBounds | null;
|
|
26
|
+
export interface ViewportZoomOptions {
|
|
27
|
+
pad?: number;
|
|
28
|
+
containerRatio?: number;
|
|
29
|
+
minScale?: number;
|
|
30
|
+
maxScale?: number;
|
|
31
|
+
}
|
|
32
|
+
/** 레이블 리스트 클릭 등 — 기존 Editor `animateToBounds`와 동일한 스케일 계산. */
|
|
33
|
+
export declare function viewportForZoomBounds(bounds: ZoomBounds, screenW: number, screenH: number, options?: ViewportZoomOptions): Viewport | null;
|
|
34
|
+
/** 선택 영역 맞춤 — 화면에 bbox가 최대한 들어오도록. */
|
|
35
|
+
export declare function viewportForBBox(b: BBox, screenW: number, screenH: number, pad?: number): Viewport | null;
|
|
36
|
+
export declare function animateViewport(from: Viewport, to: Viewport, apply: (viewport: Viewport) => void, duration?: number): () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BBox, EditorShape, Point, ShapeType } from "./geometry";
|
|
1
|
+
import type { BBox, EditorShape, Point, ShapeType } from "./geometry.js";
|
|
2
2
|
/** 기존 Editor `TARGET_CONTAINER_RATIO` — 레이블 줌 시 화면 대비 목표 비율. */
|
|
3
3
|
export declare const TARGET_CONTAINER_RATIO = 0.3;
|
|
4
4
|
export declare const DEFAULT_ZOOM_ANIMATION_MS = 300;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../_model/geometry.cjs`),t=require(`../_model/imageLoad.cjs`),n=require(`./imageLayer.cjs`),r=require(`./transformSession.cjs`),i=require(`./shapePainter.cjs`),a=require(`./overlayLayer.cjs`),o=require(`./previewLayer.cjs`),s=require(`./shapeLayer.cjs`),c=require(`./transformDriver.cjs`),l=require(`./transformerLayer.cjs`);require(`pixi.js/unsafe-eval`);let u=require(`pixi.js`);var d=class{constructor(e,t){this.app=new u.Application,this.world=new u.Container,this.bgLayer=new u.Container,this.overlayLayer=new u.Container,this.shapeLayer=new u.Container,this.selLayer=new u.Container,this.previewLayer=new u.Container,this.handleLayer=new u.Container,this.filter=new u.ColorMatrixFilter,this.imageWidth=0,this.imageHeight=0,this.baseCursor=`default`,this.strokeSize=2,this.shapes=[],this.selected=[],this.lastAppliedScale=-1,this.destroyed=!1,this.transformEnabled=!1,this.host=e,this.cb=t,this.painter=new i.ShapePainter({scale:()=>this.world.scale.x,strokeSize:()=>this.strokeSize}),this.image=new n.ImageLayer(this.bgLayer,this.filter,{isLive:()=>this.isLive(),render:()=>this.app.render()}),this.shapeView=new s.ShapeLayer(this.shapeLayer,this.selLayer,this.painter,{shapes:()=>this.shapes,selected:()=>this.selected,scale:()=>this.world.scale.x,transformActive:()=>!!this.transform.active,transformEnabled:()=>this.transformEnabled,emitCursorHint:e=>this.emitCursorHint(e),onShapePointerDown:(e,t)=>this.cb.onPointerDown(this.toImage(e),t,this.ev(e))}),this.preview=new o.PreviewLayer(this.previewLayer,this.painter,{scale:()=>this.world.scale.x}),this.overlay=new a.OverlayLayer(this.overlayLayer,this.painter,{element:this.host,imageWidth:()=>this.imageWidth,imageHeight:()=>this.imageHeight,scale:()=>this.world.scale.x,isLive:()=>this.isLive(),render:()=>this.app.render()}),this.transform=new c.TransformDriver(this.createTransformHost()),this.transformer=new l.TransformerLayer(this.handleLayer,this.selLayer,this.world,this.transform,{shapes:()=>this.shapes,selected:()=>this.selected,transformEnabled:()=>this.transformEnabled,strokeSize:()=>this.strokeSize,toImage:e=>this.toImage(e),emitCursorHint:e=>this.emitCursorHint(e),liveUpdateShape:(e,t)=>this.liveUpdateShape(e,t)})}createTransformHost(){return{shapes:()=>this.shapes,callbacks:this.cb,ensureTransformer:()=>this.transformer.ensureTransformer(),drawTransformer:()=>this.drawTransformer(),drawSelectionBorders:()=>this.shapeView.drawSelectionBorders(),updateSelectionBordersLive:e=>this.shapeView.updateSelectionBordersLive(e),setTransformerOutline:e=>this.transformer.setTransformerOutline(e),setTransformerOutlinePoints:e=>this.transformer.setTransformerOutlinePoints(e),layoutBoxHandles:e=>this.transformer.repositionHandlesForBox(e),layoutOrientedHandles:e=>this.transformer.repositionOrientedHandles(e),layoutPolygonHandles:(e,t)=>this.transformer.repositionPolygonHandles(e,t),hasVertexHandles:()=>this.transformer.hasVertexHandles(),previewShapes:(e,t,n)=>{if(e.kind!==`move`){for(let e of n)this.liveUpdateShape(e.id,e.points);return}this.shapeView.previewMove(e,t)},clearShapePreview:e=>{e.kind===`move`&&this.shapeView.resetMoveOffsets()},repaintShape:(e,t)=>this.liveUpdateShape(e,t),applyCursor:()=>this.applyCursor()}}ev(e){return{pointerId:e.pointerId,button:e.button,shiftKey:e.shiftKey,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,global:{x:e.global.x,y:e.global.y}}}async init(){if(await this.app.init({resizeTo:this.host,background:`#111111`,antialias:!0,autoDensity:!0,resolution:window.devicePixelRatio||1,preference:`webgl`}),this.destroyed){this.app.destroy(!0);return}this.host.appendChild(this.app.canvas);let e=this.app.renderer.gl,t=e?.getParameter(e.MAX_TEXTURE_SIZE);this.image.limitTileSize(t),this.applyCursor(),this.overlay.mount(),this.world.addChild(this.bgLayer,this.overlayLayer,this.shapeLayer,this.selLayer,this.previewLayer),this.app.stage.addChild(this.world,this.handleLayer),this.world.visible=!1,this.app.stage.eventMode=`static`,this.syncHitArea(),this.app.stage.on(`pointerdown`,e=>{this.cb.onPointerDown(this.toImage(e),null,this.ev(e))}),this.app.stage.on(`pointermove`,e=>{if(this.transform.active){this.transform.move(this.toImage(e));return}this.cb.onPointerMove(this.toImage(e),this.ev(e))});let n=(e,t)=>{if(this.transform.active){this.transform.end();return}this.cb.onPointerUp(this.toImage(e),{pointerId:e.pointerId,global:{x:e.global.x,y:e.global.y},shiftKey:e.shiftKey,insideCanvas:t})};this.app.stage.on(`pointerup`,e=>n(e,!0)),this.app.stage.on(`pointerupoutside`,e=>n(e,!1)),this.app.renderer.on(`resize`,()=>this.syncHitArea())}syncHitArea(){let{w:e,h:t}=this.screenSize;this.app.stage.hitArea=new u.Rectangle(0,0,e,t)}isLive(){return!this.destroyed&&!!this.app.renderer}destroy(){this.destroyed=!0,this.image.clearImageTiles(),this.app.renderer&&this.app.destroy(!0,{children:!0})}get screenSize(){return{w:this.app.renderer.screen.width,h:this.app.renderer.screen.height}}setCursor(e){this.baseCursor=e,this.shapeView.syncShapeCursors(),this.applyCursor()}emitCursorHint(e){this.cb.onCursorHint?.(e)}applyCursor(){if(this.destroyed||!this.app.renderer)return;let e=this.app.canvas;e&&(e.style.cursor=this.baseCursor)}get dom(){return this.app.canvas}toImage(e){let t=this.world.toLocal(e.global);return{x:t.x,y:t.y}}async setImage(e,n,r,i){let a=this.image.nextLoadToken(),o=await t.loadCorsImage(e,i);if(this.destroyed||!this.image.isCurrentLoad(a))return!0;if(!o)return this.imageWidth||=n?.width??800,this.imageHeight||=n?.height??600,!1;this.imageWidth=n?.width??o.naturalWidth,this.imageHeight=n?.height??o.naturalHeight;let s=r?.width??this.imageWidth,c=r?.height??this.imageHeight;return this.image.showImage(o,s,c),!0}setFilter(e,t){this.image.setFilter(e,t)}setRenderDefaults(e){let t=e.strokeWidth??this.strokeSize;this.strokeSize!==t&&(this.strokeSize=t,this.setShapes(this.shapes,this.selected))}clearImage(){this.destroyed||this.image.clearImage()}setImageSmoothing(e){this.image.setImageSmoothing(e)}setOverlays(e,t){this.overlay.setOverlays(e,t)}setRegionOverlay(e){this.overlay.setRegionOverlay(e)}get viewport(){return{scale:this.world.scale.x,x:this.world.x,y:this.world.y}}applyViewport(e){let t=e.scale!==this.lastAppliedScale;this.lastAppliedScale=e.scale,this.world.scale.set(e.scale),this.world.position.set(e.x,e.y),this.world.visible=!0,t&&this.restrokeShapes(),this.transform.refresh()||this.drawTransformer(),this.cb.onViewportChange?.()}fit(){if(!this.imageWidth||!this.imageHeight)return;let{w:e,h:t}=this.screenSize,n=Math.min(e/this.imageWidth,t/this.imageHeight);this.applyViewport({scale:n,x:(e-this.imageWidth*n)/2,y:(t-this.imageHeight*n)/2})}zoom100(){if(!this.imageWidth||!this.imageHeight)return;let{w:e,h:t}=this.screenSize;this.applyViewport({scale:1,x:(e-this.imageWidth)/2,y:(t-this.imageHeight)/2})}zoomAt(e,t,n,r=.05,i=20){let a=this.world.scale.x,o=Math.min(i,Math.max(r,a*n)),s=(e-this.world.x)/a,c=(t-this.world.y)/a;this.applyViewport({scale:o,x:e-s*o,y:t-c*o})}panBy(e,t){this.applyViewport({scale:this.world.scale.x,x:this.world.x+e,y:this.world.y+t})}setShapes(e,t){this.shapes=r.cloneShapes(e),this.selected=t,this.transform.cancelIfStale(),!this.transform.active&&(this.shapeView.drawShapes(),this.shapeView.drawSelectionBorders(),this.drawTransformer())}setSelection(e){this.selected=e,this.transformer.syncSelection(e),!this.transform.active&&(this.shapeView.drawSelectionBorders(),this.drawTransformer())}setEditing(e){this.transformer.setEditing(e)}getVertexSelection(){return this.transformer.getVertexSelection()}setVertexSelection(e){this.transformer.setVertexSelection(e)}setTransformEnabled(e){this.transformEnabled=e,e||this.cancelTransform(),this.shapeView.syncShapeCursors(),this.drawTransformer()}setPanMode(e){this.handleLayer.interactiveChildren=!e}liveUpdateShape(e,t){this.shapeView.liveUpdateShape(e,t)}shapesIntersecting(e){return r.intersectingShapeIds(this.shapes,e)}shapesAt(t){return this.shapes.filter(n=>{let r=e.getBBox(n.points);return t.x>=r.minX&&t.x<=r.maxX&&t.y>=r.minY&&t.y<=r.maxY}).map(e=>e.id)}clearPreview(){this.preview.clearPreview()}clearMarquee(){this.preview.clearMarquee()}previewBox(e,t,n,r){this.preview.previewBox(e,t,n,r)}previewPoly(e,t,n,r,i=[],a=!0){this.preview.previewPoly(e,t,n,r,i,a)}previewScalarMask(e,t){this.preview.previewScalarMask(e,t)}previewMarquee(e,t){this.preview.previewMarquee(e,t)}restrokeShapes(){this.shapeView.restrokeShapes(),this.shapeView.drawSelectionBorders(),this.overlay.redrawRegionOutline(),this.preview.repaintPreview()}drawTransformer(){this.transformer.drawTransformer()}beginMove(e,t,n){this.transform.beginMove(e,t,n)}cancelTransform(){return this.transform.cancel()}};exports.PixiRenderer=d;
|
|
1
|
+
"use client";require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../_model/geometry.cjs`),t=require(`../_model/imageLoad.cjs`),n=require(`./imageLayer.cjs`),r=require(`./transformSession.cjs`),i=require(`./shapePainter.cjs`),a=require(`./overlayLayer.cjs`),o=require(`./previewLayer.cjs`),s=require(`./shapeLayer.cjs`),c=require(`./transformDriver.cjs`),l=require(`./transformerLayer.cjs`);require(`pixi.js/unsafe-eval`);let u=require(`pixi.js`);var d=class{constructor(e,t){this.app=new u.Application,this.world=new u.Container,this.bgLayer=new u.Container,this.overlayLayer=new u.Container,this.shapeLayer=new u.Container,this.selLayer=new u.Container,this.previewLayer=new u.Container,this.handleLayer=new u.Container,this.filter=new u.ColorMatrixFilter,this.imageWidth=0,this.imageHeight=0,this.baseCursor=`default`,this.strokeSize=2,this.shapes=[],this.selected=[],this.lastAppliedScale=-1,this.destroyed=!1,this.transformEnabled=!1,this.host=e,this.cb=t,this.painter=new i.ShapePainter({scale:()=>this.world.scale.x,strokeSize:()=>this.strokeSize}),this.image=new n.ImageLayer(this.bgLayer,this.filter,{isLive:()=>this.isLive(),render:()=>this.app.render()}),this.shapeView=new s.ShapeLayer(this.shapeLayer,this.selLayer,this.painter,{shapes:()=>this.shapes,selected:()=>this.selected,scale:()=>this.world.scale.x,transformActive:()=>!!this.transform.active,transformEnabled:()=>this.transformEnabled,emitCursorHint:e=>this.emitCursorHint(e),onShapePointerDown:(e,t)=>this.cb.onPointerDown(this.toImage(e),t,this.ev(e))}),this.preview=new o.PreviewLayer(this.previewLayer,this.painter,{scale:()=>this.world.scale.x}),this.overlay=new a.OverlayLayer(this.overlayLayer,this.painter,{element:this.host,imageWidth:()=>this.imageWidth,imageHeight:()=>this.imageHeight,scale:()=>this.world.scale.x,isLive:()=>this.isLive(),render:()=>this.app.render()}),this.transform=new c.TransformDriver(this.createTransformHost()),this.transformer=new l.TransformerLayer(this.handleLayer,this.selLayer,this.world,this.transform,{shapes:()=>this.shapes,selected:()=>this.selected,transformEnabled:()=>this.transformEnabled,strokeSize:()=>this.strokeSize,toImage:e=>this.toImage(e),emitCursorHint:e=>this.emitCursorHint(e),liveUpdateShape:(e,t)=>this.liveUpdateShape(e,t)})}createTransformHost(){return{shapes:()=>this.shapes,callbacks:this.cb,ensureTransformer:()=>this.transformer.ensureTransformer(),drawTransformer:()=>this.drawTransformer(),drawSelectionBorders:()=>this.shapeView.drawSelectionBorders(),updateSelectionBordersLive:e=>this.shapeView.updateSelectionBordersLive(e),setTransformerOutline:e=>this.transformer.setTransformerOutline(e),setTransformerOutlinePoints:e=>this.transformer.setTransformerOutlinePoints(e),layoutBoxHandles:e=>this.transformer.repositionHandlesForBox(e),layoutOrientedHandles:e=>this.transformer.repositionOrientedHandles(e),layoutPolygonHandles:(e,t)=>this.transformer.repositionPolygonHandles(e,t),hasVertexHandles:()=>this.transformer.hasVertexHandles(),previewShapes:(e,t,n)=>{if(e.kind!==`move`){for(let e of n)this.liveUpdateShape(e.id,e.points);return}this.shapeView.previewMove(e,t)},clearShapePreview:e=>{e.kind===`move`&&this.shapeView.resetMoveOffsets()},repaintShape:(e,t)=>this.liveUpdateShape(e,t),applyCursor:()=>this.applyCursor()}}ev(e){return{pointerId:e.pointerId,button:e.button,shiftKey:e.shiftKey,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,global:{x:e.global.x,y:e.global.y}}}async init(){if(await this.app.init({resizeTo:this.host,background:`#111111`,antialias:!0,autoDensity:!0,resolution:window.devicePixelRatio||1,preference:`webgl`}),this.destroyed){this.app.destroy(!0);return}this.host.appendChild(this.app.canvas);let e=this.app.renderer.gl,t=e?.getParameter(e.MAX_TEXTURE_SIZE);this.image.limitTileSize(t),this.applyCursor(),this.overlay.mount(),this.world.addChild(this.bgLayer,this.overlayLayer,this.shapeLayer,this.selLayer,this.previewLayer),this.app.stage.addChild(this.world,this.handleLayer),this.world.visible=!1,this.app.stage.eventMode=`static`,this.syncHitArea(),this.app.stage.on(`pointerdown`,e=>{this.cb.onPointerDown(this.toImage(e),null,this.ev(e))}),this.app.stage.on(`pointermove`,e=>{if(this.transform.active){this.transform.move(this.toImage(e));return}this.cb.onPointerMove(this.toImage(e),this.ev(e))});let n=(e,t)=>{if(this.transform.active){this.transform.end();return}this.cb.onPointerUp(this.toImage(e),{pointerId:e.pointerId,global:{x:e.global.x,y:e.global.y},shiftKey:e.shiftKey,insideCanvas:t})};this.app.stage.on(`pointerup`,e=>n(e,!0)),this.app.stage.on(`pointerupoutside`,e=>n(e,!1)),this.app.renderer.on(`resize`,()=>this.syncHitArea())}syncHitArea(){let{w:e,h:t}=this.screenSize;this.app.stage.hitArea=new u.Rectangle(0,0,e,t)}isLive(){return!this.destroyed&&!!this.app.renderer}destroy(){this.destroyed=!0,this.image.clearImageTiles(),this.preview.destroy(),this.app.renderer&&this.app.destroy(!0,{children:!0}),this.filter.destroy()}get screenSize(){return{w:this.app.renderer.screen.width,h:this.app.renderer.screen.height}}setCursor(e){this.baseCursor=e,this.shapeView.syncShapeCursors(),this.applyCursor()}emitCursorHint(e){this.cb.onCursorHint?.(e)}applyCursor(){if(this.destroyed||!this.app.renderer)return;let e=this.app.canvas;e&&(e.style.cursor=this.baseCursor)}get dom(){return this.app.canvas}toImage(e){let t=this.world.toLocal(e.global);return{x:t.x,y:t.y}}async setImage(e,n,r,i){let a=this.image.nextLoadToken(),o=await t.loadCorsImage(e,i);if(this.destroyed||!this.image.isCurrentLoad(a))return!0;if(!o)return this.imageWidth||=n?.width??800,this.imageHeight||=n?.height??600,!1;this.imageWidth=n?.width??o.naturalWidth,this.imageHeight=n?.height??o.naturalHeight;let s=r?.width??this.imageWidth,c=r?.height??this.imageHeight;return this.image.showImage(o,s,c),!0}setFilter(e,t){this.image.setFilter(e,t)}setRenderDefaults(e){let t=e.strokeWidth??this.strokeSize;this.strokeSize!==t&&(this.strokeSize=t,this.setShapes(this.shapes,this.selected))}clearImage(){this.destroyed||this.image.clearImage()}setImageSmoothing(e){this.image.setImageSmoothing(e)}setOverlays(e,t){this.overlay.setOverlays(e,t)}setRegionOverlay(e){this.overlay.setRegionOverlay(e)}get viewport(){return{scale:this.world.scale.x,x:this.world.x,y:this.world.y}}applyViewport(e){let t=e.scale!==this.lastAppliedScale;this.lastAppliedScale=e.scale,this.world.scale.set(e.scale),this.world.position.set(e.x,e.y),this.world.visible=!0,t&&this.restrokeShapes(),this.transform.refresh()||this.drawTransformer(),this.cb.onViewportChange?.()}fit(){if(!this.imageWidth||!this.imageHeight)return;let{w:e,h:t}=this.screenSize,n=Math.min(e/this.imageWidth,t/this.imageHeight);this.applyViewport({scale:n,x:(e-this.imageWidth*n)/2,y:(t-this.imageHeight*n)/2})}zoom100(){if(!this.imageWidth||!this.imageHeight)return;let{w:e,h:t}=this.screenSize;this.applyViewport({scale:1,x:(e-this.imageWidth)/2,y:(t-this.imageHeight)/2})}zoomAt(e,t,n,r=.05,i=20){let a=this.world.scale.x,o=Math.min(i,Math.max(r,a*n)),s=(e-this.world.x)/a,c=(t-this.world.y)/a;this.applyViewport({scale:o,x:e-s*o,y:t-c*o})}panBy(e,t){this.applyViewport({scale:this.world.scale.x,x:this.world.x+e,y:this.world.y+t})}setShapes(e,t){this.shapes=r.cloneShapes(e),this.selected=t,this.transform.cancelIfStale(),!this.transform.active&&(this.shapeView.drawShapes(),this.shapeView.drawSelectionBorders(),this.drawTransformer())}setSelection(e){this.selected=e,this.transformer.syncSelection(e),!this.transform.active&&(this.shapeView.drawSelectionBorders(),this.drawTransformer())}setEditing(e){this.transformer.setEditing(e)}getVertexSelection(){return this.transformer.getVertexSelection()}setVertexSelection(e){this.transformer.setVertexSelection(e)}setTransformEnabled(e){this.transformEnabled=e,e||this.cancelTransform(),this.shapeView.syncShapeCursors(),this.drawTransformer()}setPanMode(e){this.handleLayer.interactiveChildren=!e}liveUpdateShape(e,t){this.shapeView.liveUpdateShape(e,t)}shapesIntersecting(e){return r.intersectingShapeIds(this.shapes,e)}shapesAt(t){return this.shapes.filter(n=>{let r=e.getBBox(n.points);return t.x>=r.minX&&t.x<=r.maxX&&t.y>=r.minY&&t.y<=r.maxY}).map(e=>e.id)}clearPreview(){this.preview.clearPreview()}clearMarquee(){this.preview.clearMarquee()}previewBox(e,t,n,r){this.preview.previewBox(e,t,n,r)}previewPoly(e,t,n,r,i=[],a=!0){this.preview.previewPoly(e,t,n,r,i,a)}previewScalarMask(e,t){this.preview.previewScalarMask(e,t)}previewMarquee(e,t){this.preview.previewMarquee(e,t)}restrokeShapes(){this.shapeView.restrokeShapes(),this.shapeView.drawSelectionBorders(),this.overlay.redrawRegionOutline(),this.preview.repaintPreview()}drawTransformer(){this.transformer.drawTransformer()}beginMove(e,t,n){this.transform.beginMove(e,t,n)}cancelTransform(){return this.transform.cancel()}};exports.PixiRenderer=d;
|
|
2
2
|
//# sourceMappingURL=PixiRenderer.cjs.map
|