@peteai/presentation-editor 0.0.6 → 0.0.8
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 +38 -38
- package/dist/components/editor/active-layers-buttons.svelte +56 -0
- package/dist/components/editor/active-layers.svelte +237 -0
- package/dist/components/editor/active-layers.svelte.d.ts +8 -0
- package/dist/components/{presentation-editor/cognition-slides.d.ts → editor/cognition-pages.d.ts} +1 -1
- package/dist/components/{presentation-editor/cognition-slides.js → editor/cognition-pages.js} +1 -1
- package/dist/components/{presentation-editor → editor}/cursor-tooltip.svelte +6 -2
- package/dist/components/editor/cursor-tooltip.svelte.d.ts +7 -0
- package/dist/components/{presentation-editor → editor}/dragged.svelte +7 -3
- package/dist/components/editor/dragged.svelte.d.ts +7 -0
- package/dist/components/{presentation-editor/presentation-editor.svelte → editor/editor.svelte} +64 -61
- package/dist/components/editor/editor.svelte.d.ts +4 -0
- package/dist/components/editor/editor.svelte.js +1169 -0
- package/dist/components/editor/header.svelte +62 -0
- package/dist/components/editor/header.svelte.d.ts +7 -0
- package/dist/components/{presentation-editor → editor}/hotkeys.svelte +48 -16
- package/dist/components/editor/index.d.ts +3 -0
- package/dist/components/editor/index.js +3 -0
- package/dist/components/{presentation-editor → editor}/layers/active-background-border.svelte +2 -2
- package/dist/components/{presentation-editor → editor}/layers/active-layer-border.svelte +5 -8
- package/dist/components/editor/layers/buttons/border-button/border-button-colors.svelte +59 -0
- package/dist/components/editor/layers/buttons/border-button/border-button-colors.svelte.d.ts +9 -0
- package/dist/components/{presentation-editor → editor}/layers/buttons/border-button/border-button.svelte +47 -65
- package/dist/components/{presentation-editor → editor}/layers/buttons/corner-radius-button/corner-radius-button.svelte +24 -28
- package/dist/components/{presentation-editor → editor}/layers/buttons/flip-button/flip-button.svelte +11 -12
- package/dist/components/{presentation-editor → editor}/layers/buttons/opacity-button/opacity-button.svelte +33 -44
- package/dist/components/{presentation-editor → editor}/layers/controls/corner-scale-control/corner-scale-control.svelte +27 -32
- package/dist/components/editor/layers/controls/group-resize-control/group-resize-control.svelte +418 -0
- package/dist/components/{presentation-editor → editor}/layers/controls/rotate-control/rotate-control.svelte +33 -34
- package/dist/components/editor/layers/controls/rotate-control/rotate-control.svelte.d.ts +6 -0
- package/dist/components/{presentation-editor → editor}/layers/controls/side-resize-control/side-resize-control.svelte +22 -26
- package/dist/components/{presentation-editor → editor}/layers/controls/side-scale-control/side-scale-control.svelte +13 -15
- package/dist/components/{presentation-editor → editor}/layers/controls/side-scale-control/side-scale-control.svelte.d.ts +2 -2
- package/dist/components/editor/layers/index.d.ts +10 -0
- package/dist/components/{presentation-editor → editor}/layers/index.js +8 -5
- package/dist/components/{presentation-editor → editor}/layers/layer-button.svelte +14 -8
- package/dist/components/{presentation-editor → editor}/layers/layer-thumb-wrapper.svelte +5 -6
- package/dist/components/{presentation-editor → editor}/layers/layer-wrapper.svelte +46 -57
- package/dist/components/editor/layers/types/background/background-content-image.svelte +36 -0
- package/dist/components/{presentation-editor → editor}/layers/types/background/background-layer-buttons.svelte +6 -6
- package/dist/components/editor/layers/types/background/background-layer-content.svelte +21 -0
- package/dist/components/{presentation-editor → editor}/layers/types/background/background-layer-content.svelte.d.ts +2 -2
- package/dist/components/{presentation-editor → editor}/layers/types/background/background-layer.svelte +7 -9
- package/dist/components/editor/layers/types/group/group-child-wrapper.svelte +44 -0
- package/dist/components/editor/layers/types/group/group-child-wrapper.svelte.d.ts +9 -0
- package/dist/components/editor/layers/types/group/group-layer-content.svelte +45 -0
- package/dist/components/editor/layers/types/group/group-layer-content.svelte.d.ts +9 -0
- package/dist/components/editor/layers/types/group/group-layer.svelte +33 -0
- package/dist/components/editor/layers/types/group/group-layer.svelte.d.ts +8 -0
- package/dist/components/editor/layers/types/group/index.d.ts +3 -0
- package/dist/components/editor/layers/types/group/index.js +3 -0
- package/dist/components/editor/layers/types/image/controls/image-rotate-control/image-rotate-control.svelte +120 -0
- package/dist/components/editor/layers/types/image/controls/image-rotate-control/image-rotate-control.svelte.d.ts +8 -0
- package/dist/components/editor/layers/types/image/controls/image-rotate-control/index.d.ts +2 -0
- package/dist/components/editor/layers/types/image/controls/image-rotate-control/index.js +4 -0
- package/dist/components/editor/layers/types/image/controls/image-scale-control/image-scale-control.svelte +154 -0
- package/dist/components/editor/layers/types/image/controls/image-scale-control/image-scale-control.svelte.d.ts +91 -0
- package/dist/components/editor/layers/types/image/controls/image-scale-control/index.d.ts +2 -0
- package/dist/components/editor/layers/types/image/controls/image-scale-control/index.js +4 -0
- package/dist/components/{presentation-editor → editor}/layers/types/image/image-layer-active.svelte +10 -13
- package/dist/components/{presentation-editor → editor}/layers/types/image/image-layer-content.svelte +15 -12
- package/dist/components/editor/layers/types/image/image-layer-crop.svelte +182 -0
- package/dist/components/editor/layers/types/image/image-layer-crop.svelte.d.ts +10 -0
- package/dist/components/{presentation-editor → editor}/layers/types/image/image-layer.svelte +24 -14
- package/dist/components/editor/layers/types/image/index.d.ts +4 -0
- package/dist/components/editor/layers/types/image/index.js +4 -0
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/alignment-button/alignment-button.svelte +13 -14
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/alignment-button/alignment-button.svelte.d.ts +2 -2
- package/dist/components/editor/layers/types/text/buttons/bold-button/bold-button.svelte +65 -0
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/bold-button/bold-button.svelte.d.ts +2 -2
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/case-button/case-button.svelte +24 -30
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/case-button/case-button.svelte.d.ts +2 -2
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/color-button/color-button.svelte +4 -4
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/color-button/color-button.svelte.d.ts +2 -2
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/font-family-button/font-family-button.svelte +4 -4
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/font-family-button/font-family-button.svelte.d.ts +2 -2
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/font-size-button/font-size-button.svelte +33 -40
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/font-size-button/font-size-button.svelte.d.ts +2 -2
- package/dist/components/editor/layers/types/text/buttons/italic-button/italic-button.svelte +65 -0
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/italic-button/italic-button.svelte.d.ts +2 -2
- package/dist/components/editor/layers/types/text/buttons/list-button/list-button.svelte +113 -0
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/list-button/list-button.svelte.d.ts +2 -2
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/strikethrough-button/strikethrough-button.svelte +10 -11
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/strikethrough-button/strikethrough-button.svelte.d.ts +2 -2
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/underline-button/underline-button.svelte +10 -11
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/underline-button/underline-button.svelte.d.ts +2 -2
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/utils.d.ts +2 -0
- package/dist/components/editor/layers/types/text/editor/utils.js +166 -0
- package/dist/components/editor/layers/types/text/extensions/list/index.d.ts +3 -0
- package/dist/components/editor/layers/types/text/extensions/list/index.js +3 -0
- package/dist/components/editor/layers/types/text/extensions/list/list.d.ts +67 -0
- package/dist/components/editor/layers/types/text/extensions/list/list.js +237 -0
- package/dist/components/editor/layers/types/text/extensions/list-item/index.d.ts +3 -0
- package/dist/components/editor/layers/types/text/extensions/list-item/index.js +3 -0
- package/dist/components/editor/layers/types/text/extensions/list-item/list-item.d.ts +13 -0
- package/dist/components/editor/layers/types/text/extensions/list-item/list-item.js +262 -0
- package/dist/components/editor/layers/types/text/extensions/list-item-paragraph/index.d.ts +3 -0
- package/dist/components/editor/layers/types/text/extensions/list-item-paragraph/index.js +3 -0
- package/dist/components/editor/layers/types/text/extensions/list-item-paragraph/list-item-paragraph.d.ts +14 -0
- package/dist/components/editor/layers/types/text/extensions/list-item-paragraph/list-item-paragraph.js +27 -0
- package/dist/components/editor/layers/types/text/extensions/paragraph/index.d.ts +3 -0
- package/dist/components/editor/layers/types/text/extensions/paragraph/index.js +3 -0
- package/dist/components/editor/layers/types/text/extensions/paragraph/paragraph.d.ts +6 -0
- package/dist/components/editor/layers/types/text/extensions/paragraph/paragraph.js +28 -0
- package/dist/components/editor/layers/types/text/extensions/preserve-formatting-on-clear/index.d.ts +3 -0
- package/dist/components/editor/layers/types/text/extensions/preserve-formatting-on-clear/index.js +3 -0
- package/dist/components/editor/layers/types/text/extensions/preserve-formatting-on-clear/preserve-formatting-on-clear.d.ts +2 -0
- package/dist/components/editor/layers/types/text/extensions/preserve-formatting-on-clear/preserve-formatting-on-clear.js +74 -0
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/text-transform/text-transform.js +1 -4
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions.js +13 -23
- package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/html-content.svelte +0 -9
- package/dist/components/editor/layers/types/text/index.d.ts +5 -0
- package/dist/components/editor/layers/types/text/index.js +5 -0
- package/dist/components/{presentation-editor/layers/types/html/html-layer-content.svelte → editor/layers/types/text/text-layer-content.svelte} +2 -2
- package/dist/components/editor/layers/types/text/text-layer-content.svelte.d.ts +9 -0
- package/dist/components/editor/layers/types/text/text-layer-edit.svelte +114 -0
- package/dist/components/editor/layers/types/text/text-layer-edit.svelte.d.ts +9 -0
- package/dist/components/editor/layers/types/text/text-layer.svelte +125 -0
- package/dist/components/editor/layers/types/text/text-layer.svelte.d.ts +7 -0
- package/dist/components/{presentation-editor → editor}/layers/utils.d.ts +32 -24
- package/dist/components/{presentation-editor → editor}/layers/utils.js +152 -102
- package/dist/components/{presentation-editor → editor}/menu/background-menu-content.svelte +24 -24
- package/dist/components/{presentation-editor → editor}/menu/background-menu-content.svelte.d.ts +4 -4
- package/dist/components/{presentation-editor → editor}/menu/layer-menu-content.svelte +62 -38
- package/dist/components/{presentation-editor/menu/slide-menu-content.svelte → editor/menu/page-menu-content.svelte} +19 -19
- package/dist/components/editor/menu/page-menu-content.svelte.d.ts +9 -0
- package/dist/components/{presentation-editor/slide-editor.svelte → editor/page-editor.svelte} +30 -25
- package/dist/components/editor/page-editor.svelte.d.ts +7 -0
- package/dist/components/{presentation-editor/slide-inner.svelte → editor/page-inner.svelte} +5 -5
- package/dist/components/{presentation-editor/sidebar/sidebar.svelte.d.ts → editor/page-inner.svelte.d.ts} +3 -3
- package/dist/components/editor/page.svelte +69 -0
- package/dist/components/editor/page.svelte.d.ts +4 -0
- package/dist/components/editor/pages-navigation/page-preview.svelte +36 -0
- package/dist/components/editor/pages-navigation/page-preview.svelte.d.ts +8 -0
- package/dist/components/{presentation-editor/slides-navigation/slide-preview.svelte → editor/pages-navigation/pages-navigation-item.svelte} +21 -41
- package/dist/components/editor/pages-navigation/pages-navigation-item.svelte.d.ts +11 -0
- package/dist/components/{presentation-editor/slides-navigation/slides-navigation.svelte → editor/pages-navigation/pages-navigation.svelte} +26 -21
- package/dist/components/editor/pages-navigation/pages-navigation.svelte.d.ts +7 -0
- package/dist/components/{presentation-editor → editor}/sidebar/color-sidebar/color-sidebar-color.svelte +1 -1
- package/dist/components/{presentation-editor → editor}/sidebar/color-sidebar/color-sidebar-gradient-picker.svelte +2 -2
- package/dist/components/{presentation-editor → editor}/sidebar/color-sidebar/color-sidebar.svelte +92 -89
- package/dist/components/{presentation-editor → editor}/sidebar/font-sidebar/font-sidebar-button.svelte +3 -3
- package/dist/components/{presentation-editor → editor}/sidebar/font-sidebar/font-sidebar.svelte +34 -39
- package/dist/components/editor/sidebar/image-crop-sidebar.svelte +112 -0
- package/dist/components/editor/sidebar/image-crop-sidebar.svelte.d.ts +7 -0
- package/dist/components/{presentation-editor/sidebar/position-slidebar.svelte → editor/sidebar/position-sidebar.svelte} +26 -20
- package/dist/components/editor/sidebar/position-sidebar.svelte.d.ts +3 -0
- package/dist/components/{presentation-editor → editor}/sidebar/sidebar-text-tab-button.svelte +5 -5
- package/dist/components/{presentation-editor → editor}/sidebar/sidebar-text-tab.svelte +5 -5
- package/dist/components/{presentation-editor → editor}/sidebar/sidebar-uploads-tab.svelte +4 -4
- package/dist/components/{presentation-editor → editor}/sidebar/sidebar-wrapper.svelte +6 -4
- package/dist/components/{presentation-editor → editor}/sidebar/sidebar.svelte +17 -10
- package/dist/components/editor/sidebar/sidebar.svelte.d.ts +7 -0
- package/dist/components/{presentation-editor → editor}/sidebar/uploads-image.svelte +3 -3
- package/dist/components/editor/types.d.ts +283 -0
- package/dist/components/{presentation-editor → editor}/utils.d.ts +14 -6
- package/dist/components/{presentation-editor → editor}/utils.js +98 -63
- package/dist/components/ui/color-picker/color-picker.svelte +2 -2
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte +2 -2
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/dialog/dialog-content.svelte +3 -3
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +3 -3
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +2 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/components/ui/slider/slider.svelte +28 -20
- package/dist/index.d.ts +12 -6
- package/dist/index.js +5 -3
- package/package.json +42 -38
- package/dist/components/presentation-editor/active-layers-buttons.svelte +0 -53
- package/dist/components/presentation-editor/active-layers.svelte +0 -181
- package/dist/components/presentation-editor/active-layers.svelte.d.ts +0 -3
- package/dist/components/presentation-editor/cursor-tooltip.svelte.d.ts +0 -18
- package/dist/components/presentation-editor/dragged.svelte.d.ts +0 -18
- package/dist/components/presentation-editor/header.svelte +0 -54
- package/dist/components/presentation-editor/header.svelte.d.ts +0 -18
- package/dist/components/presentation-editor/index.d.ts +0 -2
- package/dist/components/presentation-editor/index.js +0 -2
- package/dist/components/presentation-editor/layers/controls/group-resize-control/group-resize-control.svelte +0 -337
- package/dist/components/presentation-editor/layers/controls/rotate-control/rotate-control.svelte.d.ts +0 -3
- package/dist/components/presentation-editor/layers/index.d.ts +0 -9
- package/dist/components/presentation-editor/layers/types/background/background-content-image.svelte +0 -41
- package/dist/components/presentation-editor/layers/types/background/background-layer-content.svelte +0 -19
- package/dist/components/presentation-editor/layers/types/html/buttons/bold-button/bold-button.svelte +0 -71
- package/dist/components/presentation-editor/layers/types/html/buttons/italic-button/italic-button.svelte +0 -71
- package/dist/components/presentation-editor/layers/types/html/buttons/list-button/list-button.svelte +0 -90
- package/dist/components/presentation-editor/layers/types/html/editor/utils.js +0 -88
- package/dist/components/presentation-editor/layers/types/html/extensions/unstyled-list/index.d.ts +0 -3
- package/dist/components/presentation-editor/layers/types/html/extensions/unstyled-list/index.js +0 -3
- package/dist/components/presentation-editor/layers/types/html/extensions/unstyled-list/unstyled-list.d.ts +0 -47
- package/dist/components/presentation-editor/layers/types/html/extensions/unstyled-list/unstyled-list.js +0 -74
- package/dist/components/presentation-editor/layers/types/html/html-layer-content.svelte.d.ts +0 -9
- package/dist/components/presentation-editor/layers/types/html/html-layer-edit.svelte +0 -103
- package/dist/components/presentation-editor/layers/types/html/html-layer-edit.svelte.d.ts +0 -8
- package/dist/components/presentation-editor/layers/types/html/html-layer.svelte +0 -105
- package/dist/components/presentation-editor/layers/types/html/html-layer.svelte.d.ts +0 -7
- package/dist/components/presentation-editor/layers/types/html/index.d.ts +0 -5
- package/dist/components/presentation-editor/layers/types/html/index.js +0 -5
- package/dist/components/presentation-editor/layers/types/image/index.d.ts +0 -3
- package/dist/components/presentation-editor/layers/types/image/index.js +0 -3
- package/dist/components/presentation-editor/menu/slide-menu-content.svelte.d.ts +0 -9
- package/dist/components/presentation-editor/presentation-editor.svelte.d.ts +0 -4
- package/dist/components/presentation-editor/presentation-editor.svelte.js +0 -813
- package/dist/components/presentation-editor/sidebar/position-slidebar.svelte.d.ts +0 -18
- package/dist/components/presentation-editor/slide-editor.svelte.d.ts +0 -7
- package/dist/components/presentation-editor/slide-inner.svelte.d.ts +0 -18
- package/dist/components/presentation-editor/slides-navigation/slide-preview.svelte.d.ts +0 -11
- package/dist/components/presentation-editor/slides-navigation/slides-navigation.svelte.d.ts +0 -3
- package/dist/components/presentation-editor/types.d.ts +0 -158
- /package/dist/components/{presentation-editor → editor}/active-layers-buttons.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/color-indicator/color-indicator-gradient-def.svelte +0 -0
- /package/dist/components/{presentation-editor → editor}/color-indicator/color-indicator-gradient-def.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/color-indicator/color-indicator-gradient.svelte +0 -0
- /package/dist/components/{presentation-editor → editor}/color-indicator/color-indicator-gradient.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/color-indicator/color-indicator.svelte +0 -0
- /package/dist/components/{presentation-editor → editor}/color-indicator/color-indicator.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/color-indicator/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/color-indicator/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/fonts.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/fonts.js +0 -0
- /package/dist/components/{presentation-editor → editor}/hotkeys.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/active-background-border.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/active-layer-border.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/border-button/border-button.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/border-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/border-button/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/corner-radius-button/corner-radius-button.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/corner-radius-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/corner-radius-button/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/flip-button/flip-button.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/flip-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/flip-button/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/opacity-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/opacity-button/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/buttons/opacity-button/opacity-button.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/corner-scale-control/corner-scale-control.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/corner-scale-control/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/corner-scale-control/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/group-resize-control/group-resize-control.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/group-resize-control/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/group-resize-control/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/rotate-control/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/rotate-control/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/side-resize-control/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/side-resize-control/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/side-resize-control/side-resize-control.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/side-scale-control/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/controls/side-scale-control/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/layer-button.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/layer-thumb-wrapper.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/layer-wrapper.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/types/background/background-content-image.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/types/background/background-layer-buttons.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/types/background/background-layer.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/types/background/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/types/background/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/types/image/image-layer-active.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/types/image/image-layer-content.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/layers/types/image/image-layer.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/alignment-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/alignment-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/bold-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/bold-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/case-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/case-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/color-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/color-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/font-family-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/font-family-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/font-size-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/font-size-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/italic-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/italic-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/list-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/list-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/strikethrough-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/strikethrough-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/underline-button/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/buttons/underline-button/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/Editor.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/Editor.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/createEditor.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/createEditor.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/editor-content.svelte +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/editor-content.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/types.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor/types.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/editor.css +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/font-family/font-family.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/font-family/font-family.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/font-family/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/font-family/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/font-size/font-size.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/font-size/font-size.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/font-size/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/font-size/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/line-height/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/line-height/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/line-height/line-height.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/line-height/line-height.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/selection/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/selection/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/selection/selection.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/selection/selection.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/text-transform/index.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/text-transform/index.js +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions/text-transform/text-transform.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/extensions.d.ts +0 -0
- /package/dist/components/{presentation-editor/layers/types/html → editor/layers/types/text}/html-content.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/menu/layer-menu-content.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/color-sidebar/color-sidebar-color.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/color-sidebar/color-sidebar-gradient-picker.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/color-sidebar/color-sidebar.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/color-sidebar/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/color-sidebar/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/font-sidebar/font-sidebar-button.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/font-sidebar/font-sidebar.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/font-sidebar/index.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/font-sidebar/index.js +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/sidebar-text-tab-button.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/sidebar-text-tab.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/sidebar-uploads-tab.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/sidebar-wrapper.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/sidebar/uploads-image.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/snapping-guides.svelte +0 -0
- /package/dist/components/{presentation-editor → editor}/snapping-guides.svelte.d.ts +0 -0
- /package/dist/components/{presentation-editor → editor}/types.js +0 -0
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export const rotatePointOld = (point, angleRad) => {
|
|
3
|
-
const cos = Math.cos(angleRad);
|
|
4
|
-
const sin = Math.sin(angleRad);
|
|
5
|
-
return {
|
|
6
|
-
x: point.x * cos - point.y * sin,
|
|
7
|
-
y: point.x * sin + point.y * cos,
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
const getPoints = (origin, width, height) => {
|
|
1
|
+
const getOriginRelativePoint = (origin, width, height) => {
|
|
11
2
|
const halfWidth = width / 2;
|
|
12
3
|
const halfHeight = height / 2;
|
|
13
4
|
switch (origin) {
|
|
@@ -33,40 +24,48 @@ const getPoints = (origin, width, height) => {
|
|
|
33
24
|
throw new Error(`Unknown origin: ${origin}`);
|
|
34
25
|
}
|
|
35
26
|
};
|
|
36
|
-
export const calculateLayerTransform = (layer) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
export const calculateLayerTransform = (layer, groupScale = 1) => ({
|
|
28
|
+
x: layer.x * groupScale,
|
|
29
|
+
y: layer.y * groupScale,
|
|
30
|
+
width: layer.width * groupScale,
|
|
31
|
+
height: layer.height * groupScale,
|
|
32
|
+
rotate: layer.rotate,
|
|
33
|
+
scale: layer.scale,
|
|
34
|
+
});
|
|
42
35
|
export const calculateNewPosition = (origin, transform, newWidth, newHeight) => {
|
|
43
|
-
const { x, y, width, height, rotate } = transform;
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
const { x, y, width: rawWidth, height: rawHeight, rotate, scale } = transform;
|
|
37
|
+
const width = rawWidth * scale;
|
|
38
|
+
const height = rawHeight * scale;
|
|
39
|
+
// Get relative points based on origin for old and new dimensions
|
|
40
|
+
const oldPoint = getOriginRelativePoint(origin, width, height);
|
|
41
|
+
const newPoint = getOriginRelativePoint(origin, newWidth, newHeight);
|
|
42
|
+
// Calculate position delta
|
|
43
|
+
const delta = {
|
|
44
|
+
x: newPoint.x - oldPoint.x,
|
|
45
|
+
y: newPoint.y - oldPoint.y,
|
|
46
|
+
};
|
|
47
|
+
// Apply rotation if needed
|
|
48
|
+
const rotatedDelta = rotate !== 0 ? rotatePoint(degToRad(rotate), delta) : delta;
|
|
49
|
+
// Calculate new position accounting for size difference and delta
|
|
55
50
|
return {
|
|
56
|
-
newX: x -
|
|
57
|
-
newY: y -
|
|
51
|
+
newX: x - rotatedDelta.x - (newWidth - width) / 2,
|
|
52
|
+
newY: y - rotatedDelta.y - (newHeight - height) / 2,
|
|
58
53
|
};
|
|
59
54
|
};
|
|
60
55
|
export function calculateBoundingBox(transform) {
|
|
61
|
-
const { x, y, width, height, rotate } = transform;
|
|
56
|
+
const { x, y, width: rawWidth, height: rawHeight, rotate, scale } = transform;
|
|
57
|
+
const width = rawWidth * scale;
|
|
58
|
+
const height = rawHeight * scale;
|
|
62
59
|
if (rotate === 0) {
|
|
63
60
|
return { x, y, width, height };
|
|
64
61
|
}
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
62
|
+
const rad = degToRad(rotate);
|
|
63
|
+
const cos = Math.cos(rad);
|
|
64
|
+
const sin = Math.sin(rad);
|
|
65
|
+
const hw = width / 2;
|
|
66
|
+
const hh = height / 2;
|
|
67
|
+
const maxX = Math.abs(hw * cos) + Math.abs(hh * sin);
|
|
68
|
+
const maxY = Math.abs(hw * sin) + Math.abs(hh * cos);
|
|
70
69
|
return {
|
|
71
70
|
x: x + width / 2 - maxX,
|
|
72
71
|
y: y + height / 2 - maxY,
|
|
@@ -77,38 +76,29 @@ export function calculateBoundingBox(transform) {
|
|
|
77
76
|
export function degToRad(deg) {
|
|
78
77
|
return (deg * Math.PI) / 180;
|
|
79
78
|
}
|
|
80
|
-
export function rotatePoint(p,
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
const
|
|
79
|
+
export function rotatePoint(rad, p, center = { x: 0, y: 0 }) {
|
|
80
|
+
const cos = Math.cos(rad);
|
|
81
|
+
const sin = Math.sin(rad);
|
|
82
|
+
const dx = p.x - center.x;
|
|
83
|
+
const dy = p.y - center.y;
|
|
85
84
|
return {
|
|
86
|
-
x:
|
|
87
|
-
y:
|
|
85
|
+
x: center.x + dx * cos - dy * sin,
|
|
86
|
+
y: center.y + dx * sin + dy * cos,
|
|
88
87
|
};
|
|
89
88
|
}
|
|
90
89
|
export function getRotatedCorners(rect) {
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const hw = rect.width / 2;
|
|
95
|
-
const hh = rect.height / 2;
|
|
90
|
+
const rad = degToRad(rect.rotate);
|
|
91
|
+
const cx = rect.x + (rect.width * rect.scale) / 2;
|
|
92
|
+
const cy = rect.y + (rect.height * rect.scale) / 2;
|
|
93
|
+
const hw = (rect.width * rect.scale) / 2;
|
|
94
|
+
const hh = (rect.height * rect.scale) / 2;
|
|
96
95
|
const corners = [
|
|
97
96
|
{ x: cx - hw, y: cy - hh },
|
|
98
97
|
{ x: cx + hw, y: cy - hh },
|
|
99
98
|
{ x: cx + hw, y: cy + hh },
|
|
100
99
|
{ x: cx - hw, y: cy + hh },
|
|
101
100
|
];
|
|
102
|
-
return corners.map((p) => rotatePoint(p, { x: cx, y: cy }
|
|
103
|
-
}
|
|
104
|
-
export function calculateBoundingBoxSize(width, height, rotate) {
|
|
105
|
-
const theta = degToRad(rotate);
|
|
106
|
-
const cosTheta = Math.abs(Math.cos(theta));
|
|
107
|
-
const sinTheta = Math.abs(Math.sin(theta));
|
|
108
|
-
return {
|
|
109
|
-
width: width * cosTheta + height * sinTheta,
|
|
110
|
-
height: width * sinTheta + height * cosTheta,
|
|
111
|
-
};
|
|
101
|
+
return corners.map((p) => rotatePoint(rad, p, { x: cx, y: cy }));
|
|
112
102
|
}
|
|
113
103
|
export function isRotatedVertically(rotate) {
|
|
114
104
|
const rotationNormalized = ((rotate % 360) + 360) % 360;
|
|
@@ -170,13 +160,13 @@ export function getRotatedBoundingBox(center, width, height, rotate) {
|
|
|
170
160
|
height: maxY - minY,
|
|
171
161
|
};
|
|
172
162
|
}
|
|
173
|
-
export function calculateGroupRotatedBoundingBox(
|
|
174
|
-
if (!
|
|
175
|
-
return
|
|
176
|
-
const allCorners =
|
|
177
|
-
const
|
|
178
|
-
// Rotate all points to align with desired
|
|
179
|
-
const rotatedPoints = allCorners.map((p) => rotatePoint(
|
|
163
|
+
export function calculateGroupRotatedBoundingBox(transforms, rotate = 0) {
|
|
164
|
+
if (!rotate)
|
|
165
|
+
return calculateGroupBoundingBox(transforms);
|
|
166
|
+
const allCorners = transforms.flatMap((t) => getRotatedCorners(t));
|
|
167
|
+
const rad = degToRad(rotate);
|
|
168
|
+
// Rotate all points to align with desired angle
|
|
169
|
+
const rotatedPoints = allCorners.map((p) => rotatePoint(-rad, p));
|
|
180
170
|
// Compute AABB of rotated points
|
|
181
171
|
const xs = rotatedPoints.map((p) => p.x);
|
|
182
172
|
const ys = rotatedPoints.map((p) => p.y);
|
|
@@ -191,33 +181,57 @@ export function calculateGroupRotatedBoundingBox(rects, groupRotate = 0) {
|
|
|
191
181
|
y: (minY + maxY) / 2,
|
|
192
182
|
};
|
|
193
183
|
// Rotate center back to original space
|
|
194
|
-
const center = rotatePoint(
|
|
195
|
-
|
|
184
|
+
const center = rotatePoint(rad, centerRotated);
|
|
185
|
+
return {
|
|
196
186
|
x: center.x - width / 2,
|
|
197
187
|
y: center.y - height / 2,
|
|
198
188
|
width,
|
|
199
189
|
height,
|
|
200
|
-
rotate
|
|
190
|
+
rotate,
|
|
191
|
+
scale: 1,
|
|
201
192
|
};
|
|
202
|
-
return bbox;
|
|
203
193
|
}
|
|
204
|
-
export function calculateRelativeRects(bbox,
|
|
205
|
-
const
|
|
206
|
-
const bboxCenter = {
|
|
207
|
-
|
|
208
|
-
|
|
194
|
+
export function calculateRelativeRects(bbox, absoluteRects) {
|
|
195
|
+
const rad = degToRad(bbox.rotate); // inverse to align bbox with axes
|
|
196
|
+
const bboxCenter = {
|
|
197
|
+
x: bbox.x + (bbox.width * bbox.scale) / 2,
|
|
198
|
+
y: bbox.y + (bbox.height * bbox.scale) / 2,
|
|
199
|
+
};
|
|
200
|
+
return absoluteRects.map((rect) => {
|
|
201
|
+
// Get center of original absolute rect
|
|
209
202
|
const center = {
|
|
210
|
-
x: rect.x + rect.width / 2,
|
|
211
|
-
y: rect.y + rect.height / 2,
|
|
203
|
+
x: rect.x + (rect.width * rect.scale) / 2,
|
|
204
|
+
y: rect.y + (rect.height * rect.scale) / 2,
|
|
212
205
|
};
|
|
213
206
|
// Rotate center ralatively to the bbox center
|
|
214
|
-
const relativeCenter = rotatePoint(center, bboxCenter
|
|
207
|
+
const relativeCenter = rotatePoint(-rad, center, bboxCenter);
|
|
215
208
|
return {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
height: rect.height,
|
|
209
|
+
...rect,
|
|
210
|
+
x: ((relativeCenter.x - bbox.x) / bbox.scale - (rect.width * rect.scale) / 2) / bbox.scale,
|
|
211
|
+
y: ((relativeCenter.y - bbox.y) / bbox.scale - (rect.height * rect.scale) / 2) / bbox.scale,
|
|
220
212
|
rotate: rect.rotate - bbox.rotate,
|
|
213
|
+
scale: rect.scale / bbox.scale,
|
|
214
|
+
};
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
export function calculateAbsoluteRects(bbox, rects) {
|
|
218
|
+
const rad = degToRad(bbox.rotate);
|
|
219
|
+
const bboxCenter = {
|
|
220
|
+
x: bbox.x + (bbox.width * bbox.scale) / 2,
|
|
221
|
+
y: bbox.y + (bbox.height * bbox.scale) / 2,
|
|
222
|
+
};
|
|
223
|
+
return rects.map((rect) => {
|
|
224
|
+
const relativeCenter = {
|
|
225
|
+
x: bbox.x + (rect.x + (rect.width * rect.scale) / 2) * bbox.scale,
|
|
226
|
+
y: bbox.y + (rect.y + (rect.height * rect.scale) / 2) * bbox.scale,
|
|
227
|
+
};
|
|
228
|
+
const center = rotatePoint(rad, relativeCenter, bboxCenter);
|
|
229
|
+
return {
|
|
230
|
+
...rect,
|
|
231
|
+
x: center.x - (rect.width * rect.scale * bbox.scale) / 2,
|
|
232
|
+
y: center.y - (rect.height * rect.scale * bbox.scale) / 2,
|
|
233
|
+
rotate: rect.rotate + bbox.rotate,
|
|
234
|
+
scale: rect.scale * bbox.scale,
|
|
221
235
|
};
|
|
222
236
|
});
|
|
223
237
|
}
|
|
@@ -259,7 +273,7 @@ export function calculateGroupBoundingBox(transforms) {
|
|
|
259
273
|
minY = Math.min(minY, bbox.y);
|
|
260
274
|
maxY = Math.max(maxY, bbox.y + bbox.height);
|
|
261
275
|
});
|
|
262
|
-
return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
|
|
276
|
+
return { x: minX, y: minY, width: maxX - minX, height: maxY - minY, rotate: 0, scale: 1 };
|
|
263
277
|
}
|
|
264
278
|
const minScaleToContain = (rotatedRect, rect) => {
|
|
265
279
|
const { width: rw, height: rh, rotate } = rotatedRect;
|
|
@@ -278,12 +292,14 @@ const minScaleToContain = (rotatedRect, rect) => {
|
|
|
278
292
|
};
|
|
279
293
|
export function calculateImageCover(image, bbox) {
|
|
280
294
|
const scale = minScaleToContain(image, bbox);
|
|
295
|
+
const width = bbox.width / scale;
|
|
296
|
+
const height = bbox.height / scale;
|
|
281
297
|
return {
|
|
282
|
-
width
|
|
283
|
-
height
|
|
298
|
+
width,
|
|
299
|
+
height,
|
|
284
300
|
scale,
|
|
285
|
-
offsetX: (
|
|
286
|
-
offsetY: (
|
|
301
|
+
offsetX: (width - image.width) / 2,
|
|
302
|
+
offsetY: (height - image.height) / 2,
|
|
287
303
|
};
|
|
288
304
|
}
|
|
289
305
|
export const defaultColor = '#000000';
|
|
@@ -307,21 +323,55 @@ export function buildBackgroundCircleStyle(colors) {
|
|
|
307
323
|
.join(', ');
|
|
308
324
|
return `background-image: conic-gradient(${gradientColors})`;
|
|
309
325
|
}
|
|
310
|
-
export
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
const { x, y
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
326
|
+
export function getImageLayerBboxRelativeToImageCenter(layer) {
|
|
327
|
+
const { width, height, image, offsetX, offsetY, imageRotate } = layer;
|
|
328
|
+
// current image center in layer coords (rotation doesn't change it)
|
|
329
|
+
const imageCenter = { x: image.width / 2 + offsetX, y: image.height / 2 + offsetY };
|
|
330
|
+
const imageRad = degToRad(imageRotate);
|
|
331
|
+
// For each corner, compute v = corner - C, rotate by -theta, accumulate max abs X/Y
|
|
332
|
+
const corners = [
|
|
333
|
+
{ x: 0, y: 0 },
|
|
334
|
+
{ x: width, y: 0 },
|
|
335
|
+
{ x: width, y: height },
|
|
336
|
+
{ x: 0, y: height },
|
|
337
|
+
].map((p) => {
|
|
338
|
+
const v = { x: p.x - imageCenter.x, y: p.y - imageCenter.y }; // layer->center
|
|
339
|
+
return rotatePoint(-imageRad, v); // bring into image unrotated axes
|
|
340
|
+
});
|
|
341
|
+
// Compute AABB of rotated points
|
|
342
|
+
const xs = corners.map((p) => p.x);
|
|
343
|
+
const ys = corners.map((p) => p.y);
|
|
344
|
+
const minX = Math.min(...xs);
|
|
345
|
+
const maxX = Math.max(...xs);
|
|
346
|
+
const minY = Math.min(...ys);
|
|
347
|
+
const maxY = Math.max(...ys);
|
|
348
|
+
return { minX, minY, maxX, maxY };
|
|
349
|
+
}
|
|
350
|
+
export function calculateImageLayerPropsForImageRotate(layer, imageRotate) {
|
|
351
|
+
const { width, height, scale, image, offsetX, offsetY } = layer;
|
|
352
|
+
// image half-width and half-height
|
|
353
|
+
const ihw = image.width / 2;
|
|
354
|
+
const ihh = image.height / 2;
|
|
355
|
+
// current image center in layer coords (rotation doesn't change it)
|
|
356
|
+
const imageCenter = { x: ihw + offsetX, y: ihh + offsetY };
|
|
357
|
+
const bbox = getImageLayerBboxRelativeToImageCenter({ ...layer, imageRotate });
|
|
358
|
+
const maxAbsX = Math.max(Math.abs(bbox.minX), Math.abs(bbox.maxX));
|
|
359
|
+
const maxAbsY = Math.max(Math.abs(bbox.minY), Math.abs(bbox.maxY));
|
|
360
|
+
// Required scale so half-extents of (Iw*s, Ih*s) cover maxAbsX/Y:
|
|
361
|
+
// Iw*s/2 >= maxAbsX => s >= 2*maxAbsX / Iw
|
|
362
|
+
// Ih*s/2 >= maxAbsY => s >= 2*maxAbsY / Ih
|
|
363
|
+
const sReqX = (2 * maxAbsX) / image.width;
|
|
364
|
+
const sReqY = (2 * maxAbsY) / image.height;
|
|
365
|
+
const minScaleFactor = Math.max(sReqX, sReqY);
|
|
366
|
+
if (minScaleFactor < 1) {
|
|
367
|
+
return { imageRotate };
|
|
324
368
|
}
|
|
325
|
-
|
|
326
|
-
|
|
369
|
+
return {
|
|
370
|
+
imageRotate,
|
|
371
|
+
scale: scale * minScaleFactor,
|
|
372
|
+
width: width / minScaleFactor,
|
|
373
|
+
height: height / minScaleFactor,
|
|
374
|
+
offsetX: imageCenter.x / minScaleFactor - ihw,
|
|
375
|
+
offsetY: imageCenter.y / minScaleFactor - ihh,
|
|
376
|
+
};
|
|
327
377
|
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import CopyIcon from 'lucide
|
|
3
|
-
import PasteIcon from 'lucide
|
|
4
|
-
import DuplicateIcon from 'lucide
|
|
5
|
-
import AddIcon from 'lucide
|
|
6
|
-
import TrashIcon from 'lucide
|
|
7
|
-
import LockIcon from 'lucide
|
|
8
|
-
import UnlockIcon from 'lucide
|
|
9
|
-
import ExtractImageIcon from 'lucide
|
|
2
|
+
import CopyIcon from '@lucide/svelte/icons/copy';
|
|
3
|
+
import PasteIcon from '@lucide/svelte/icons/clipboard';
|
|
4
|
+
import DuplicateIcon from '@lucide/svelte/icons/copy-plus';
|
|
5
|
+
import AddIcon from '@lucide/svelte/icons/file-plus-2';
|
|
6
|
+
import TrashIcon from '@lucide/svelte/icons/trash-2';
|
|
7
|
+
import LockIcon from '@lucide/svelte/icons/lock-keyhole';
|
|
8
|
+
import UnlockIcon from '@lucide/svelte/icons/lock-keyhole-open';
|
|
9
|
+
import ExtractImageIcon from '@lucide/svelte/icons/square-arrow-out-up-right';
|
|
10
10
|
import * as DropdownMenu from '../../ui/dropdown-menu/index.js';
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
11
|
+
import type { Editor } from '../editor.svelte.js';
|
|
12
|
+
import type { Page } from '../types.js';
|
|
13
13
|
import { checkIfMac } from '../../../utils.js';
|
|
14
14
|
|
|
15
15
|
interface Props {
|
|
16
|
-
editor:
|
|
17
|
-
|
|
16
|
+
editor: Editor;
|
|
17
|
+
page: Page;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
let { editor,
|
|
20
|
+
let { editor, page }: Props = $props();
|
|
21
21
|
|
|
22
|
-
const locked = $derived(
|
|
22
|
+
const locked = $derived(page.locked || page.backgroundLocked);
|
|
23
23
|
|
|
24
24
|
const isMac = checkIfMac();
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
|
-
<DropdownMenu.Item onclick={() => editor.
|
|
27
|
+
<DropdownMenu.Item onclick={() => editor.copyPage(page.id)}>
|
|
28
28
|
<CopyIcon />
|
|
29
29
|
Copy
|
|
30
30
|
<DropdownMenu.Shortcut>{isMac ? '⌘C' : 'Ctrl+C'}</DropdownMenu.Shortcut>
|
|
31
31
|
</DropdownMenu.Item>
|
|
32
32
|
<DropdownMenu.Item
|
|
33
33
|
onclick={() => editor.clipboardPaste()}
|
|
34
|
-
disabled={!editor.clipboard || (
|
|
34
|
+
disabled={!editor.clipboard || (page.locked && !('layers' in editor.clipboard))}
|
|
35
35
|
>
|
|
36
36
|
<PasteIcon />
|
|
37
37
|
Paste
|
|
38
38
|
<DropdownMenu.Shortcut>{isMac ? '⌘V' : 'Ctrl+V'}</DropdownMenu.Shortcut>
|
|
39
39
|
</DropdownMenu.Item>
|
|
40
|
-
<DropdownMenu.Item onclick={() => editor.
|
|
40
|
+
<DropdownMenu.Item onclick={() => editor.addPage()}>
|
|
41
41
|
<AddIcon />
|
|
42
42
|
Add page
|
|
43
43
|
<DropdownMenu.Shortcut>{isMac ? '⌘⏎' : 'Ctrl+⏎'}</DropdownMenu.Shortcut>
|
|
44
44
|
</DropdownMenu.Item>
|
|
45
|
-
<DropdownMenu.Item onclick={() => editor.
|
|
45
|
+
<DropdownMenu.Item onclick={() => editor.duplicatePage(page)}>
|
|
46
46
|
<DuplicateIcon />
|
|
47
47
|
Duplicate page
|
|
48
48
|
<DropdownMenu.Shortcut>{isMac ? '⌘D' : 'Ctrl+D'}</DropdownMenu.Shortcut>
|
|
49
49
|
</DropdownMenu.Item>
|
|
50
|
-
<DropdownMenu.Item onclick={() => editor.removeBackground(
|
|
50
|
+
<DropdownMenu.Item onclick={() => editor.removeBackground(page.id)} disabled={locked}>
|
|
51
51
|
<TrashIcon />
|
|
52
|
-
{#if
|
|
52
|
+
{#if page.backgroundImage}
|
|
53
53
|
Delete background image
|
|
54
54
|
{:else}
|
|
55
55
|
Delete background
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
|
|
60
60
|
<DropdownMenu.Separator />
|
|
61
61
|
|
|
62
|
-
<DropdownMenu.Item onclick={() => editor.backgroundToggleLocked(
|
|
63
|
-
{#if
|
|
62
|
+
<DropdownMenu.Item onclick={() => editor.backgroundToggleLocked(page.id)} disabled={page.locked}>
|
|
63
|
+
{#if page.backgroundLocked}
|
|
64
64
|
<UnlockIcon />
|
|
65
65
|
Unlock background
|
|
66
66
|
{:else}
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
<DropdownMenu.Shortcut>{isMac ? '⌥⇧L' : 'Alt+Shift+L'}</DropdownMenu.Shortcut>
|
|
71
71
|
</DropdownMenu.Item>
|
|
72
72
|
|
|
73
|
-
{#if
|
|
73
|
+
{#if page.backgroundImage}
|
|
74
74
|
<DropdownMenu.Separator />
|
|
75
75
|
|
|
76
|
-
<DropdownMenu.Item onclick={() => editor.backgroundImageToLayer(
|
|
76
|
+
<DropdownMenu.Item onclick={() => editor.backgroundImageToLayer(page.id)} disabled={locked}>
|
|
77
77
|
<ExtractImageIcon />
|
|
78
78
|
Detach image from background
|
|
79
79
|
</DropdownMenu.Item>
|
package/dist/components/{presentation-editor → editor}/menu/background-menu-content.svelte.d.ts
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Editor } from '../editor.svelte.js';
|
|
2
|
+
import type { Page } from '../types.js';
|
|
3
3
|
interface Props {
|
|
4
|
-
editor:
|
|
5
|
-
|
|
4
|
+
editor: Editor;
|
|
5
|
+
page: Page;
|
|
6
6
|
}
|
|
7
7
|
declare const BackgroundMenuContent: import("svelte").Component<Props, {}, "">;
|
|
8
8
|
type BackgroundMenuContent = ReturnType<typeof BackgroundMenuContent>;
|
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import CopyIcon from 'lucide
|
|
3
|
-
import PasteIcon from 'lucide
|
|
4
|
-
import DuplicateIcon from 'lucide
|
|
5
|
-
import TrashIcon from 'lucide
|
|
6
|
-
import LayerIcon from 'lucide
|
|
7
|
-
import LayerBringForwardIcon from 'lucide
|
|
8
|
-
import LayerBringToFrontIcon from 'lucide
|
|
9
|
-
import LayerSendBackwardIcon from 'lucide
|
|
10
|
-
import LayerSendToBackIcon from 'lucide
|
|
11
|
-
import AlignLeftIcon from 'lucide
|
|
12
|
-
import AlignCenterIcon from 'lucide
|
|
13
|
-
import AlignRightIcon from 'lucide
|
|
14
|
-
import AlignTopIcon from 'lucide
|
|
15
|
-
import AlignMiddleIcon from 'lucide
|
|
16
|
-
import AlignBottomIcon from 'lucide
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
2
|
+
import CopyIcon from '@lucide/svelte/icons/copy';
|
|
3
|
+
import PasteIcon from '@lucide/svelte/icons/clipboard';
|
|
4
|
+
import DuplicateIcon from '@lucide/svelte/icons/copy-plus';
|
|
5
|
+
import TrashIcon from '@lucide/svelte/icons/trash-2';
|
|
6
|
+
import LayerIcon from '@lucide/svelte/icons/layers';
|
|
7
|
+
import LayerBringForwardIcon from '@lucide/svelte/icons/arrow-up';
|
|
8
|
+
import LayerBringToFrontIcon from '@lucide/svelte/icons/arrow-up-to-line';
|
|
9
|
+
import LayerSendBackwardIcon from '@lucide/svelte/icons/arrow-down';
|
|
10
|
+
import LayerSendToBackIcon from '@lucide/svelte/icons/arrow-down-to-line';
|
|
11
|
+
import AlignLeftIcon from '@lucide/svelte/icons/align-start-vertical';
|
|
12
|
+
import AlignCenterIcon from '@lucide/svelte/icons/align-center-vertical';
|
|
13
|
+
import AlignRightIcon from '@lucide/svelte/icons/align-end-vertical';
|
|
14
|
+
import AlignTopIcon from '@lucide/svelte/icons/align-start-horizontal';
|
|
15
|
+
import AlignMiddleIcon from '@lucide/svelte/icons/align-center-horizontal';
|
|
16
|
+
import AlignBottomIcon from '@lucide/svelte/icons/align-end-horizontal';
|
|
17
|
+
import GroupIcon from '@lucide/svelte/icons/group';
|
|
18
|
+
import UngroupIcon from '@lucide/svelte/icons/ungroup';
|
|
19
|
+
import LockIcon from '@lucide/svelte/icons/lock-keyhole';
|
|
20
|
+
import UnlockIcon from '@lucide/svelte/icons/lock-keyhole-open';
|
|
21
|
+
import SetAsBackgroundIcon from '@lucide/svelte/icons/image-upscale';
|
|
20
22
|
import * as DropdownMenu from '../../ui/dropdown-menu/index.js';
|
|
21
|
-
import {
|
|
23
|
+
import { getEditorContext } from '../editor.svelte.js';
|
|
22
24
|
import { checkIfMac } from '../../../utils.js';
|
|
23
25
|
|
|
24
|
-
const editor =
|
|
26
|
+
const editor = getEditorContext();
|
|
25
27
|
|
|
26
28
|
const someLayersLocked = $derived(editor.activeLayers.some((layer) => layer.locked));
|
|
27
|
-
const locked = $derived(editor.
|
|
29
|
+
const locked = $derived(editor.activePage.locked || someLayersLocked);
|
|
28
30
|
|
|
29
31
|
const isMac = checkIfMac();
|
|
30
32
|
|
|
31
33
|
const activeLayerIds = $derived(editor.activeLayers.map((l) => l.id));
|
|
34
|
+
const selectedLayerIds = $derived(editor.selectedLayers.map((l) => l.id));
|
|
32
35
|
|
|
33
36
|
const singleImageLayer = $derived(
|
|
34
37
|
editor.activeLayers.length === 1 && editor.activeLayers[0].type === 'image'
|
|
@@ -36,10 +39,10 @@
|
|
|
36
39
|
: null,
|
|
37
40
|
);
|
|
38
41
|
|
|
39
|
-
let overlaps = editor.getLayerOverlaps(editor.
|
|
42
|
+
let overlaps = editor.getLayerOverlaps(editor.activePage, editor.activeLayers);
|
|
40
43
|
</script>
|
|
41
44
|
|
|
42
|
-
<DropdownMenu.Item onclick={() => editor.copyLayers(editor.
|
|
45
|
+
<DropdownMenu.Item onclick={() => editor.copyLayers(editor.activePage.id, activeLayerIds)}>
|
|
43
46
|
<CopyIcon />
|
|
44
47
|
Copy
|
|
45
48
|
<DropdownMenu.Shortcut>{isMac ? '⌘C' : 'Ctrl+C'}</DropdownMenu.Shortcut>
|
|
@@ -55,7 +58,7 @@
|
|
|
55
58
|
<DropdownMenu.Shortcut>{isMac ? '⌘D' : 'Ctrl+D'}</DropdownMenu.Shortcut>
|
|
56
59
|
</DropdownMenu.Item>
|
|
57
60
|
<DropdownMenu.Item
|
|
58
|
-
onclick={() => editor.removeLayers(editor.
|
|
61
|
+
onclick={() => editor.removeLayers(editor.activePage.id, selectedLayerIds)}
|
|
59
62
|
disabled={locked}
|
|
60
63
|
>
|
|
61
64
|
<TrashIcon />
|
|
@@ -74,7 +77,7 @@
|
|
|
74
77
|
<DropdownMenu.SubContent class="w-56" align="start">
|
|
75
78
|
<DropdownMenu.Item
|
|
76
79
|
disabled={overlaps.forward === undefined}
|
|
77
|
-
onclick={() => editor.moveLayers(editor.
|
|
80
|
+
onclick={() => editor.moveLayers(editor.activePage.id, activeLayerIds, 'forward')}
|
|
78
81
|
>
|
|
79
82
|
<LayerBringForwardIcon />
|
|
80
83
|
Bring forward
|
|
@@ -82,7 +85,7 @@
|
|
|
82
85
|
</DropdownMenu.Item>
|
|
83
86
|
<DropdownMenu.Item
|
|
84
87
|
disabled={overlaps.front === undefined}
|
|
85
|
-
onclick={() => editor.moveLayers(editor.
|
|
88
|
+
onclick={() => editor.moveLayers(editor.activePage.id, activeLayerIds, 'front')}
|
|
86
89
|
>
|
|
87
90
|
<LayerBringToFrontIcon />
|
|
88
91
|
Bring to front
|
|
@@ -90,7 +93,7 @@
|
|
|
90
93
|
</DropdownMenu.Item>
|
|
91
94
|
<DropdownMenu.Item
|
|
92
95
|
disabled={overlaps.backward === undefined}
|
|
93
|
-
onclick={() => editor.moveLayers(editor.
|
|
96
|
+
onclick={() => editor.moveLayers(editor.activePage.id, activeLayerIds, 'backward')}
|
|
94
97
|
>
|
|
95
98
|
<LayerSendBackwardIcon />
|
|
96
99
|
Send backward
|
|
@@ -98,7 +101,7 @@
|
|
|
98
101
|
</DropdownMenu.Item>
|
|
99
102
|
<DropdownMenu.Item
|
|
100
103
|
disabled={overlaps.back === undefined}
|
|
101
|
-
onclick={() => editor.moveLayers(editor.
|
|
104
|
+
onclick={() => editor.moveLayers(editor.activePage.id, activeLayerIds, 'back')}
|
|
102
105
|
>
|
|
103
106
|
<LayerSendToBackIcon />
|
|
104
107
|
Send to back
|
|
@@ -115,38 +118,38 @@
|
|
|
115
118
|
</DropdownMenu.SubTrigger>
|
|
116
119
|
<DropdownMenu.SubContent class="w-32" align="start">
|
|
117
120
|
<DropdownMenu.Item
|
|
118
|
-
onclick={() => editor.alignLayers(editor.
|
|
121
|
+
onclick={() => editor.alignLayers(editor.activePage.id, activeLayerIds, 'left')}
|
|
119
122
|
>
|
|
120
123
|
<AlignLeftIcon />
|
|
121
124
|
Left
|
|
122
125
|
</DropdownMenu.Item>
|
|
123
126
|
<DropdownMenu.Item
|
|
124
|
-
onclick={() => editor.alignLayers(editor.
|
|
127
|
+
onclick={() => editor.alignLayers(editor.activePage.id, activeLayerIds, 'center')}
|
|
125
128
|
>
|
|
126
129
|
<AlignCenterIcon />
|
|
127
130
|
Center
|
|
128
131
|
</DropdownMenu.Item>
|
|
129
132
|
<DropdownMenu.Item
|
|
130
|
-
onclick={() => editor.alignLayers(editor.
|
|
133
|
+
onclick={() => editor.alignLayers(editor.activePage.id, activeLayerIds, 'right')}
|
|
131
134
|
>
|
|
132
135
|
<AlignRightIcon />
|
|
133
136
|
Right
|
|
134
137
|
</DropdownMenu.Item>
|
|
135
138
|
<DropdownMenu.Separator />
|
|
136
139
|
<DropdownMenu.Item
|
|
137
|
-
onclick={() => editor.alignLayers(editor.
|
|
140
|
+
onclick={() => editor.alignLayers(editor.activePage.id, activeLayerIds, 'top')}
|
|
138
141
|
>
|
|
139
142
|
<AlignTopIcon />
|
|
140
143
|
Top
|
|
141
144
|
</DropdownMenu.Item>
|
|
142
145
|
<DropdownMenu.Item
|
|
143
|
-
onclick={() => editor.alignLayers(editor.
|
|
146
|
+
onclick={() => editor.alignLayers(editor.activePage.id, activeLayerIds, 'middle')}
|
|
144
147
|
>
|
|
145
148
|
<AlignMiddleIcon />
|
|
146
149
|
Middle
|
|
147
150
|
</DropdownMenu.Item>
|
|
148
151
|
<DropdownMenu.Item
|
|
149
|
-
onclick={() => editor.alignLayers(editor.
|
|
152
|
+
onclick={() => editor.alignLayers(editor.activePage.id, activeLayerIds, 'bottom')}
|
|
150
153
|
>
|
|
151
154
|
<AlignBottomIcon />
|
|
152
155
|
Bottom
|
|
@@ -156,10 +159,31 @@
|
|
|
156
159
|
|
|
157
160
|
<DropdownMenu.Separator />
|
|
158
161
|
|
|
162
|
+
{#if editor.activeLayers.length > 1}
|
|
163
|
+
<DropdownMenu.Item
|
|
164
|
+
onclick={() => editor.groupLayers(editor.activePage.id, activeLayerIds)}
|
|
165
|
+
disabled={locked}
|
|
166
|
+
>
|
|
167
|
+
<GroupIcon />
|
|
168
|
+
Group
|
|
169
|
+
<DropdownMenu.Shortcut>{isMac ? '⌘G' : 'Ctrl+G'}</DropdownMenu.Shortcut>
|
|
170
|
+
</DropdownMenu.Item>
|
|
171
|
+
{/if}
|
|
172
|
+
|
|
173
|
+
{#if editor.activeLayers.every((layer) => layer.type === 'group')}
|
|
174
|
+
<DropdownMenu.Item
|
|
175
|
+
onclick={() => editor.ungroupLayers(editor.activePage.id, activeLayerIds)}
|
|
176
|
+
disabled={locked}
|
|
177
|
+
>
|
|
178
|
+
<UngroupIcon />
|
|
179
|
+
Ungroup
|
|
180
|
+
<DropdownMenu.Shortcut>{isMac ? '⇧⌘G' : 'Ctrl+Shift+G'}</DropdownMenu.Shortcut>
|
|
181
|
+
</DropdownMenu.Item>
|
|
182
|
+
{/if}
|
|
183
|
+
|
|
159
184
|
<DropdownMenu.Item
|
|
160
|
-
onclick={() =>
|
|
161
|
-
|
|
162
|
-
disabled={editor.activeSlide.locked}
|
|
185
|
+
onclick={() => editor.toggleLayersLocked(editor.activePage.id, activeLayerIds, !someLayersLocked)}
|
|
186
|
+
disabled={editor.activePage.locked}
|
|
163
187
|
>
|
|
164
188
|
{#if someLayersLocked}
|
|
165
189
|
<UnlockIcon />
|
|
@@ -174,7 +198,7 @@
|
|
|
174
198
|
{#if singleImageLayer}
|
|
175
199
|
<DropdownMenu.Separator />
|
|
176
200
|
<DropdownMenu.Item
|
|
177
|
-
onclick={() => editor.imageLayerToBackground(editor.
|
|
201
|
+
onclick={() => editor.imageLayerToBackground(editor.activePage.id, singleImageLayer.id)}
|
|
178
202
|
disabled={locked}
|
|
179
203
|
>
|
|
180
204
|
<SetAsBackgroundIcon />
|