@peteai/presentation-editor 0.0.1
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 +58 -0
- package/dist/components/presentation-editor/app.css +12 -0
- package/dist/components/presentation-editor/cognition-slides.d.ts +56 -0
- package/dist/components/presentation-editor/cognition-slides.js +182 -0
- package/dist/components/presentation-editor/cursor-tooltip.svelte +29 -0
- package/dist/components/presentation-editor/cursor-tooltip.svelte.d.ts +18 -0
- package/dist/components/presentation-editor/dragged.svelte +31 -0
- package/dist/components/presentation-editor/dragged.svelte.d.ts +18 -0
- package/dist/components/presentation-editor/header.svelte +66 -0
- package/dist/components/presentation-editor/header.svelte.d.ts +8 -0
- package/dist/components/presentation-editor/index.d.ts +2 -0
- package/dist/components/presentation-editor/index.js +2 -0
- package/dist/components/presentation-editor/layers/active-background-border.svelte +16 -0
- package/dist/components/presentation-editor/layers/active-background-border.svelte.d.ts +18 -0
- package/dist/components/presentation-editor/layers/active-layer-border.svelte +30 -0
- package/dist/components/presentation-editor/layers/active-layer-border.svelte.d.ts +8 -0
- package/dist/components/presentation-editor/layers/buttons/border-button/border-button.svelte +231 -0
- package/dist/components/presentation-editor/layers/buttons/border-button/border-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/buttons/border-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/buttons/border-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/buttons/corner-radius-button/corner-radius-button.svelte +88 -0
- package/dist/components/presentation-editor/layers/buttons/corner-radius-button/corner-radius-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/buttons/corner-radius-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/buttons/corner-radius-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/buttons/flip-button/flip-button.svelte +39 -0
- package/dist/components/presentation-editor/layers/buttons/flip-button/flip-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/buttons/flip-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/buttons/flip-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/buttons/opacity-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/buttons/opacity-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/buttons/opacity-button/opacity-button.svelte +93 -0
- package/dist/components/presentation-editor/layers/buttons/opacity-button/opacity-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/controls/corner-scale-control/corner-scale-control.svelte +179 -0
- package/dist/components/presentation-editor/layers/controls/corner-scale-control/corner-scale-control.svelte.d.ts +184 -0
- package/dist/components/presentation-editor/layers/controls/corner-scale-control/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/controls/corner-scale-control/index.js +4 -0
- package/dist/components/presentation-editor/layers/controls/rotate-control/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/controls/rotate-control/index.js +4 -0
- package/dist/components/presentation-editor/layers/controls/rotate-control/rotate-control.svelte +105 -0
- package/dist/components/presentation-editor/layers/controls/rotate-control/rotate-control.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/controls/side-resize-control/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/controls/side-resize-control/index.js +4 -0
- package/dist/components/presentation-editor/layers/controls/side-resize-control/side-resize-control.svelte +220 -0
- package/dist/components/presentation-editor/layers/controls/side-resize-control/side-resize-control.svelte.d.ts +215 -0
- package/dist/components/presentation-editor/layers/controls/side-scale-control/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/controls/side-scale-control/index.js +4 -0
- package/dist/components/presentation-editor/layers/controls/side-scale-control/side-scale-control.svelte +141 -0
- package/dist/components/presentation-editor/layers/controls/side-scale-control/side-scale-control.svelte.d.ts +114 -0
- package/dist/components/presentation-editor/layers/hovered-layer.svelte +34 -0
- package/dist/components/presentation-editor/layers/hovered-layer.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/index.d.ts +10 -0
- package/dist/components/presentation-editor/layers/index.js +22 -0
- package/dist/components/presentation-editor/layers/layer-button.svelte +38 -0
- package/dist/components/presentation-editor/layers/layer-button.svelte.d.ts +8 -0
- package/dist/components/presentation-editor/layers/layer-thumb-wrapper.svelte +36 -0
- package/dist/components/presentation-editor/layers/layer-thumb-wrapper.svelte.d.ts +15 -0
- package/dist/components/presentation-editor/layers/layer-wrapper.svelte +288 -0
- package/dist/components/presentation-editor/layers/layer-wrapper.svelte.d.ts +10 -0
- package/dist/components/presentation-editor/layers/types/background/background-content.svelte +11 -0
- package/dist/components/presentation-editor/layers/types/background/background-content.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/background/background-layer-buttons.svelte +81 -0
- package/dist/components/presentation-editor/layers/types/background/background-layer-buttons.svelte.d.ts +18 -0
- package/dist/components/presentation-editor/layers/types/background/background-layer-thumb.svelte +12 -0
- package/dist/components/presentation-editor/layers/types/background/background-layer-thumb.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/background/background-layer.svelte +103 -0
- package/dist/components/presentation-editor/layers/types/background/background-layer.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/background/index.d.ts +5 -0
- package/dist/components/presentation-editor/layers/types/background/index.js +7 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/alignment-button/alignment-button.svelte +45 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/alignment-button/alignment-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/alignment-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/alignment-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/bold-button/bold-button.svelte +19 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/bold-button/bold-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/bold-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/bold-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/case-button/case-button.svelte +37 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/case-button/case-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/case-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/case-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/color-button/color-button.svelte +88 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/color-button/color-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/color-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/color-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/font-size-button/font-size-button.svelte +132 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/font-size-button/font-size-button.svelte.d.ts +9 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/font-size-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/font-size-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/italic-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/italic-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/italic-button/italic-button.svelte +19 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/italic-button/italic-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/list-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/list-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/list-button/list-button.svelte +37 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/list-button/list-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/strikethrough-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/strikethrough-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/strikethrough-button/strikethrough-button.svelte +19 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/strikethrough-button/strikethrough-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/underline-button/index.d.ts +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/underline-button/index.js +2 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/underline-button/underline-button.svelte +20 -0
- package/dist/components/presentation-editor/layers/types/html/buttons/underline-button/underline-button.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/editor/Editor.d.ts +4 -0
- package/dist/components/presentation-editor/layers/types/html/editor/Editor.js +4 -0
- package/dist/components/presentation-editor/layers/types/html/editor/createEditor.d.ts +5 -0
- package/dist/components/presentation-editor/layers/types/html/editor/createEditor.js +18 -0
- package/dist/components/presentation-editor/layers/types/html/editor/editor-content.svelte +60 -0
- package/dist/components/presentation-editor/layers/types/html/editor/editor-content.svelte.d.ts +5 -0
- package/dist/components/presentation-editor/layers/types/html/editor/index.d.ts +3 -0
- package/dist/components/presentation-editor/layers/types/html/editor/index.js +3 -0
- package/dist/components/presentation-editor/layers/types/html/editor/types.d.ts +10 -0
- package/dist/components/presentation-editor/layers/types/html/editor/types.js +1 -0
- package/dist/components/presentation-editor/layers/types/html/editor.css +7 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/font-size/font-size.d.ts +20 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/font-size/font-size.js +44 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/font-size/index.d.ts +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/font-size/index.js +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/line-height/index.d.ts +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/line-height/index.js +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/line-height/line-height.d.ts +22 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/line-height/line-height.js +44 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/selection/index.d.ts +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/selection/index.js +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/selection/selection.d.ts +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/selection/selection.js +30 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/text-transform/index.d.ts +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/text-transform/index.js +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/text-transform/text-transform.d.ts +20 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/text-transform/text-transform.js +50 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/unstyled-list/index.d.ts +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/unstyled-list/index.js +3 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/unstyled-list/unstyled-list.d.ts +47 -0
- package/dist/components/presentation-editor/layers/types/html/extensions/unstyled-list/unstyled-list.js +74 -0
- package/dist/components/presentation-editor/layers/types/html/html-content.svelte +21 -0
- package/dist/components/presentation-editor/layers/types/html/html-content.svelte.d.ts +5 -0
- package/dist/components/presentation-editor/layers/types/html/html-layer-active.svelte +159 -0
- package/dist/components/presentation-editor/layers/types/html/html-layer-active.svelte.d.ts +8 -0
- package/dist/components/presentation-editor/layers/types/html/html-layer-buttons.svelte +42 -0
- package/dist/components/presentation-editor/layers/types/html/html-layer-buttons.svelte.d.ts +10 -0
- package/dist/components/presentation-editor/layers/types/html/html-layer-thumb.svelte +24 -0
- package/dist/components/presentation-editor/layers/types/html/html-layer-thumb.svelte.d.ts +8 -0
- package/dist/components/presentation-editor/layers/types/html/html-layer.svelte +97 -0
- package/dist/components/presentation-editor/layers/types/html/html-layer.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/index.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/html/index.js +58 -0
- package/dist/components/presentation-editor/layers/types/image/image-content.svelte +96 -0
- package/dist/components/presentation-editor/layers/types/image/image-content.svelte.d.ts +8 -0
- package/dist/components/presentation-editor/layers/types/image/image-layer-active.svelte +39 -0
- package/dist/components/presentation-editor/layers/types/image/image-layer-active.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/image/image-layer-buttons.svelte +21 -0
- package/dist/components/presentation-editor/layers/types/image/image-layer-buttons.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/image/image-layer-thumb.svelte +13 -0
- package/dist/components/presentation-editor/layers/types/image/image-layer-thumb.svelte.d.ts +8 -0
- package/dist/components/presentation-editor/layers/types/image/image-layer.svelte +80 -0
- package/dist/components/presentation-editor/layers/types/image/image-layer.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/layers/types/image/index.d.ts +5 -0
- package/dist/components/presentation-editor/layers/types/image/index.js +5 -0
- package/dist/components/presentation-editor/layers/utils.d.ts +32 -0
- package/dist/components/presentation-editor/layers/utils.js +92 -0
- package/dist/components/presentation-editor/presentation-editor.svelte +336 -0
- package/dist/components/presentation-editor/presentation-editor.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/presentation-editor.svelte.js +352 -0
- package/dist/components/presentation-editor/sidebar/images-library.svelte +108 -0
- package/dist/components/presentation-editor/sidebar/images-library.svelte.d.ts +3 -0
- package/dist/components/presentation-editor/sidebar/layers.svelte +94 -0
- package/dist/components/presentation-editor/sidebar/layers.svelte.d.ts +18 -0
- package/dist/components/presentation-editor/sidebar/sidebar.svelte +20 -0
- package/dist/components/presentation-editor/sidebar/sidebar.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/sidebar/uploads-image.svelte +64 -0
- package/dist/components/presentation-editor/sidebar/uploads-image.svelte.d.ts +5 -0
- package/dist/components/presentation-editor/slide-editor.svelte +106 -0
- package/dist/components/presentation-editor/slide-editor.svelte.d.ts +7 -0
- package/dist/components/presentation-editor/slide-inner.svelte +53 -0
- package/dist/components/presentation-editor/slide-inner.svelte.d.ts +18 -0
- package/dist/components/presentation-editor/slides-navigation/buttons/slide-delete-button.svelte +32 -0
- package/dist/components/presentation-editor/slides-navigation/buttons/slide-delete-button.svelte.d.ts +10 -0
- package/dist/components/presentation-editor/slides-navigation/buttons/slide-duplicate-button.svelte +34 -0
- package/dist/components/presentation-editor/slides-navigation/buttons/slide-duplicate-button.svelte.d.ts +10 -0
- package/dist/components/presentation-editor/slides-navigation/slide-preview.svelte +134 -0
- package/dist/components/presentation-editor/slides-navigation/slide-preview.svelte.d.ts +11 -0
- package/dist/components/presentation-editor/slides-navigation/slides-navigation.svelte +100 -0
- package/dist/components/presentation-editor/slides-navigation/slides-navigation.svelte.d.ts +3 -0
- package/dist/components/presentation-editor/snapping-guides.svelte +41 -0
- package/dist/components/presentation-editor/snapping-guides.svelte.d.ts +8 -0
- package/dist/components/presentation-editor/types.d.ts +118 -0
- package/dist/components/presentation-editor/types.js +1 -0
- package/dist/components/presentation-editor/utils.d.ts +5 -0
- package/dist/components/presentation-editor/utils.js +348 -0
- package/dist/components/ui/button/button.svelte +94 -0
- package/dist/components/ui/button/button.svelte.d.ts +155 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte +40 -0
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte.d.ts +8 -0
- package/dist/components/ui/context-menu/context-menu-content.svelte +24 -0
- package/dist/components/ui/context-menu/context-menu-content.svelte.d.ts +7 -0
- package/dist/components/ui/context-menu/context-menu-group-heading.svelte +19 -0
- package/dist/components/ui/context-menu/context-menu-group-heading.svelte.d.ts +7 -0
- package/dist/components/ui/context-menu/context-menu-item.svelte +23 -0
- package/dist/components/ui/context-menu/context-menu-item.svelte.d.ts +7 -0
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte +30 -0
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte.d.ts +4 -0
- package/dist/components/ui/context-menu/context-menu-separator.svelte +16 -0
- package/dist/components/ui/context-menu/context-menu-separator.svelte.d.ts +4 -0
- package/dist/components/ui/context-menu/context-menu-shortcut.svelte +20 -0
- package/dist/components/ui/context-menu/context-menu-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/context-menu/context-menu-sub-content.svelte +19 -0
- package/dist/components/ui/context-menu/context-menu-sub-content.svelte.d.ts +4 -0
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte +28 -0
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/context-menu/index.d.ts +16 -0
- package/dist/components/ui/context-menu/index.js +18 -0
- package/dist/components/ui/dialog/dialog-content.svelte +38 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +9 -0
- package/dist/components/ui/dialog/dialog-description.svelte +16 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +20 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +19 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-title.svelte +16 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/index.d.ts +12 -0
- package/dist/components/ui/dialog/index.js +14 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +40 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +21 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +19 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +23 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +23 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +30 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +16 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +20 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +19 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +28 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +25 -0
- package/dist/components/ui/dropdown-menu/index.js +17 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/dist/components/ui/input/input.svelte +22 -0
- package/dist/components/ui/input/input.svelte.d.ts +5 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.js +4 -0
- package/dist/components/ui/label/label.svelte +19 -0
- package/dist/components/ui/label/label.svelte.d.ts +4 -0
- package/dist/components/ui/popover/index.d.ts +6 -0
- package/dist/components/ui/popover/index.js +8 -0
- package/dist/components/ui/popover/popover-content.svelte +25 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +4 -0
- package/dist/components/ui/scroll-area/index.d.ts +3 -0
- package/dist/components/ui/scroll-area/index.js +5 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +29 -0
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte +34 -0
- package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +10 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/dist/components/ui/separator/separator.svelte +22 -0
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/slider/index.d.ts +2 -0
- package/dist/components/ui/slider/index.js +4 -0
- package/dist/components/ui/slider/slider.svelte +34 -0
- package/dist/components/ui/slider/slider.svelte.d.ts +4 -0
- package/dist/components/ui/toggle/index.d.ts +3 -0
- package/dist/components/ui/toggle/index.js +5 -0
- package/dist/components/ui/toggle/toggle.svelte +51 -0
- package/dist/components/ui/toggle/toggle.svelte.d.ts +90 -0
- package/dist/components/ui/tooltip/index.d.ts +6 -0
- package/dist/components/ui/tooltip/index.js +8 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +21 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +4 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +8 -0
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.js +154 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +31 -0
- package/package.json +99 -0
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# create-svelte
|
|
2
|
+
|
|
3
|
+
Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
|
|
4
|
+
|
|
5
|
+
Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
|
|
6
|
+
|
|
7
|
+
## Creating a project
|
|
8
|
+
|
|
9
|
+
If you're seeing this, you've probably already done this step. Congrats!
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# create a new project in the current directory
|
|
13
|
+
npx sv create
|
|
14
|
+
|
|
15
|
+
# create a new project in my-app
|
|
16
|
+
npx sv create my-app
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Developing
|
|
20
|
+
|
|
21
|
+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run dev
|
|
25
|
+
|
|
26
|
+
# or start the server and open the app in a new browser tab
|
|
27
|
+
npm run dev -- --open
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
|
|
31
|
+
|
|
32
|
+
## Building
|
|
33
|
+
|
|
34
|
+
To build your library:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm run package
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
To create a production version of your showcase app:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run build
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You can preview the production build with `npm run preview`.
|
|
47
|
+
|
|
48
|
+
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
|
49
|
+
|
|
50
|
+
## Publishing
|
|
51
|
+
|
|
52
|
+
Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
|
|
53
|
+
|
|
54
|
+
To publish your library to [npm](https://www.npmjs.com):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm publish
|
|
58
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const cognitionImages: {
|
|
2
|
+
id: string;
|
|
3
|
+
src: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const cognitionSlides: ({
|
|
8
|
+
slide_layout_plan: string;
|
|
9
|
+
type: string;
|
|
10
|
+
headline: string;
|
|
11
|
+
subheadline: string;
|
|
12
|
+
image: string;
|
|
13
|
+
caption: string;
|
|
14
|
+
text: string;
|
|
15
|
+
bullets: never[];
|
|
16
|
+
left_type: string;
|
|
17
|
+
right_type: string;
|
|
18
|
+
left_image: string;
|
|
19
|
+
right_image: {
|
|
20
|
+
id: string;
|
|
21
|
+
src: string;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
};
|
|
25
|
+
left_caption: string;
|
|
26
|
+
right_caption: string;
|
|
27
|
+
left_text: string;
|
|
28
|
+
right_text: string;
|
|
29
|
+
left_quote: string;
|
|
30
|
+
right_quote: string;
|
|
31
|
+
left_bullets: string[];
|
|
32
|
+
right_bullets: never[];
|
|
33
|
+
slide_script: string;
|
|
34
|
+
} | {
|
|
35
|
+
slide_layout_plan: string;
|
|
36
|
+
type: string;
|
|
37
|
+
headline: string;
|
|
38
|
+
subheadline: string;
|
|
39
|
+
image: string;
|
|
40
|
+
caption: string;
|
|
41
|
+
text: string;
|
|
42
|
+
bullets: string[];
|
|
43
|
+
left_type: string;
|
|
44
|
+
right_type: string;
|
|
45
|
+
left_image: string;
|
|
46
|
+
right_image: string;
|
|
47
|
+
left_caption: string;
|
|
48
|
+
right_caption: string;
|
|
49
|
+
left_text: string;
|
|
50
|
+
right_text: string;
|
|
51
|
+
left_quote: string;
|
|
52
|
+
right_quote: string;
|
|
53
|
+
left_bullets: never[];
|
|
54
|
+
right_bullets: never[];
|
|
55
|
+
slide_script: string;
|
|
56
|
+
})[];
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import uniqid from 'uniqid';
|
|
2
|
+
export const cognitionImages = [
|
|
3
|
+
{
|
|
4
|
+
id: uniqid(),
|
|
5
|
+
src: 'https://upload.wikimedia.org/wikipedia/commons/4/42/Baby.gnu-800x800.png',
|
|
6
|
+
width: 800,
|
|
7
|
+
height: 800,
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: uniqid(),
|
|
11
|
+
src: 'https://i.imgflip.com/2cpncg.jpg',
|
|
12
|
+
width: 800,
|
|
13
|
+
height: 800,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: uniqid(),
|
|
17
|
+
src: 'https://ae01.alicdn.com/kf/S542f9243753249af8cacfca42bb400d2f/Custom-3D-Photo-Wallpaper-Kids-Bedroom-Modern-Hand-Painted-Cartoon-Universe-Star-Sky-Planet-Children-Room.jpg',
|
|
18
|
+
width: 800,
|
|
19
|
+
height: 800,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: uniqid(),
|
|
23
|
+
src: 'https://www.aestheticroomcore.com/cdn/shop/files/82_b6a22607-136b-4bed-aa76-02bee6b85522.jpg?v=1687803719',
|
|
24
|
+
width: 800,
|
|
25
|
+
height: 800,
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
export const cognitionSlides = [
|
|
29
|
+
{
|
|
30
|
+
slide_layout_plan: "For the first slide, I want to introduce the topic and provide a brief overview of what's to come. A title slide is appropriate here, with a headline that clearly indicates the subject matter and a subheadline that gives some additional context. The image should reflect the high-level topic of AI in acquiring banks. This slide sets the stage for the deeper dive into the statistics and insights that will be covered in subsequent slides.",
|
|
31
|
+
type: 'title',
|
|
32
|
+
headline: 'Acquirer AI Statistics',
|
|
33
|
+
subheadline: 'Understanding the Role of AI in Merchant Profitability',
|
|
34
|
+
image: 'Overview image showing AI technology and acquiring banks',
|
|
35
|
+
caption: '',
|
|
36
|
+
text: '',
|
|
37
|
+
bullets: [],
|
|
38
|
+
left_type: '',
|
|
39
|
+
right_type: '',
|
|
40
|
+
left_image: '',
|
|
41
|
+
right_image: '',
|
|
42
|
+
left_caption: '',
|
|
43
|
+
right_caption: '',
|
|
44
|
+
left_text: '',
|
|
45
|
+
right_text: '',
|
|
46
|
+
left_quote: '',
|
|
47
|
+
right_quote: '',
|
|
48
|
+
left_bullets: [],
|
|
49
|
+
right_bullets: [],
|
|
50
|
+
slide_script: "Acquiring banks in the United States face numerous challenges in maintaining the profitability of their merchant accounts. Almost half of the merchants on their platforms are unprofitable. This session will delve into the statistics and insights on how AI technology helps mitigate these challenges. We'll explore the timeframe required for acquirers to turn a profit, the impact of annual revenue categories, and the role of AI in reducing fraud and enhancing operational efficiency. Our research findings indicate that AI use is widespread among acquirers, with 69% employing it to monitor merchants effectively. This session will also cover the trend of outsourcing AI technology and the key criteria acquirers consider when selecting third-party providers. By investing in AI, acquirers aim to onboard more merchants swiftly and improve overall service quality. The conclusive insights emphasize the market-wide drive toward AI adoption to boost profitability and competitive positioning. These statistics highlight the transformative potential of AI in the acquirer space, making it an indispensable tool for modern merchant monitoring. Understanding these dynamics is crucial for anyone involved in the acquirer or payments industry.",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
slide_layout_plan: "For the second slide, we want to dive into some key statistics that set the stage for the importance of AI in the acquirer industry. A column slide layout would work well here to present a balance of text and visual elements. On the left side, we'll have a list of bullet points summarizing the key statistics about profitability and fraud. On the right side, we'll place an image depicting a statistical graph or infographic related to merchant profitability challenges. This will make the slide visually engaging while providing a concise summary of important data points.",
|
|
54
|
+
type: 'columns',
|
|
55
|
+
headline: 'Key Statistics',
|
|
56
|
+
subheadline: '',
|
|
57
|
+
image: 'Statistical graph or infographic depicting merchant profitability challenges',
|
|
58
|
+
caption: '',
|
|
59
|
+
text: '',
|
|
60
|
+
bullets: [],
|
|
61
|
+
left_type: 'bullets',
|
|
62
|
+
right_type: 'image',
|
|
63
|
+
left_image: '',
|
|
64
|
+
right_image: cognitionImages[0],
|
|
65
|
+
left_caption: '',
|
|
66
|
+
right_caption: '',
|
|
67
|
+
left_text: '',
|
|
68
|
+
right_text: '',
|
|
69
|
+
left_quote: '',
|
|
70
|
+
right_quote: '',
|
|
71
|
+
left_bullets: [
|
|
72
|
+
'19% of merchants onboarded leave too quickly to turn a profit.',
|
|
73
|
+
'12% are unprofitable due to fraudulent activity.',
|
|
74
|
+
'9.3% are unprofitable due to low transaction volumes.',
|
|
75
|
+
'69% of acquirers use AI to monitor merchants.',
|
|
76
|
+
],
|
|
77
|
+
right_bullets: [],
|
|
78
|
+
slide_script: "Let's take a look at some key statistics that highlight the challenges acquirers face in making their merchant accounts profitable. According to our research, 19% of merchants onboarded each month leave too quickly to be profitable. Additionally, fraudulent activity and low transaction volumes make 12% and 9.3% of merchants unprofitable, respectively. It's also key to note that 69% of acquirers have turned to AI to monitor their merchants, aiming to combat these challenges.",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
slide_layout_plan: "For our next slide, we'll focus on the specific influence of AI on profitability and churn rates among acquirers. Given the detailed nature of this topic, we'll opt for a column slide layout to present a combination of textual data and visual cues. On the left side, we'll feature a paragraph that discusses the average time it takes for acquirers to turn a profit and how these metrics vary based on the usage of AI and annual revenue. On the right side, we'll include an image illustrating the 8.8-month average profitability timeline. This visual aid will emphasize the timeframe required for profitability and make the presented data easier to digest.",
|
|
82
|
+
type: 'columns',
|
|
83
|
+
headline: "AI's Impact on Profitability",
|
|
84
|
+
subheadline: '',
|
|
85
|
+
image: '',
|
|
86
|
+
caption: '',
|
|
87
|
+
text: '',
|
|
88
|
+
bullets: [],
|
|
89
|
+
left_type: 'paragraph',
|
|
90
|
+
right_type: 'image',
|
|
91
|
+
left_image: '',
|
|
92
|
+
right_image: cognitionImages[1],
|
|
93
|
+
left_caption: '',
|
|
94
|
+
right_caption: '',
|
|
95
|
+
left_text: "On average, acquirers need 8.8 months to turn a profit from a merchant. However, this duration varies based on the acquirer's revenue and AI usage. For example, larger acquirers generating more than $500 million in annual revenue require around 12.1 months due to higher levels of churn. AI usage often extends the time to profitability owing to the substantial initial costs and setup complexities.",
|
|
96
|
+
right_text: '',
|
|
97
|
+
left_quote: '',
|
|
98
|
+
right_quote: '',
|
|
99
|
+
left_bullets: [],
|
|
100
|
+
right_bullets: [],
|
|
101
|
+
slide_script: "Now, let's delve into how AI impacts the profitability and churn rates among acquirers. Generally, acquirers need about 8.8 months to start making a profit from a merchant. This timeframe, however, can vary. Acquirers with over $500 million in annual revenue, for instance, take around 12.1 months to become profitable, highlighting the significant churn rate they face. The use of AI can further extend this timeframe due to the substantial initial costs and complex setups involved in implementing AI systems. We'll illustrate this with a visual representation of the average profitability timeline to help you grasp these findings better.",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
slide_layout_plan: "Our next slide will review the key statistics around the use of AI among acquirers. We will use a column layout again, which aligns well with splitting quantitative data and visual representation for better clarity. On the left side, we'll display bullets highlighting crucial numbers regarding merchants' profitability, fraud prevention, and onboarding challenges. On the right side, we will include an informative image that represents the AI utilization rates among acquirers. This combination will ensure a well-rounded understanding of AI's statistical impact in the acquiring industry.",
|
|
105
|
+
type: 'columns',
|
|
106
|
+
headline: 'Key Statistics on AI Usage',
|
|
107
|
+
subheadline: '',
|
|
108
|
+
image: '',
|
|
109
|
+
caption: '',
|
|
110
|
+
text: '',
|
|
111
|
+
bullets: [],
|
|
112
|
+
left_type: 'bullets',
|
|
113
|
+
right_type: 'image',
|
|
114
|
+
left_image: '',
|
|
115
|
+
right_image: cognitionImages[2],
|
|
116
|
+
left_caption: '',
|
|
117
|
+
right_caption: '',
|
|
118
|
+
left_text: '',
|
|
119
|
+
right_text: '',
|
|
120
|
+
left_quote: '',
|
|
121
|
+
right_quote: '',
|
|
122
|
+
left_bullets: [
|
|
123
|
+
'19% of merchants leave too quickly to be profitable',
|
|
124
|
+
'Fraudulent activity prevents 12% from being profitable',
|
|
125
|
+
'Low transaction volumes limit profitability for 9.3%',
|
|
126
|
+
'69% of acquirers use AI to monitor their merchants',
|
|
127
|
+
],
|
|
128
|
+
right_bullets: [],
|
|
129
|
+
slide_script: "Let's take a closer look at some compelling statistics surrounding the use of AI among acquiring banks. Our research indicates that 19% of merchants onboarded monthly leave before turning a profit. Fraudulent activities impact 12% of merchants' profitability, while low transaction volumes affect 9.3%. Significantly, 69% of acquirers leverage AI to monitor their merchants, emphasizing AI's crucial role in this industry. On the right side, you'll see a visual representation showcasing how extensively AI is employed for merchant monitoring.",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
slide_layout_plan: "For the next slide, we'll focus on the profitability timeframe and its variation based on revenue and AI usage. We'll again use a column layout to effectively split the textual explanation and a visual representation designed to enhance understanding. The left side will feature a paragraph outlining the duration and variation in profitability of the merchants. The right side will present a graphical image highlighting different timeframes acquirers require to achieve profitability, particularly differentiating between those with AI and without AI.",
|
|
133
|
+
type: 'columns',
|
|
134
|
+
headline: 'Profitability Timeframe and AI Impact',
|
|
135
|
+
subheadline: '',
|
|
136
|
+
image: '',
|
|
137
|
+
caption: '',
|
|
138
|
+
text: '',
|
|
139
|
+
bullets: [],
|
|
140
|
+
left_type: 'paragraph',
|
|
141
|
+
right_type: 'image',
|
|
142
|
+
left_image: '',
|
|
143
|
+
right_image: cognitionImages[3],
|
|
144
|
+
left_caption: '',
|
|
145
|
+
right_caption: '',
|
|
146
|
+
left_text: "On average, acquirers need 8.8 months to turn a profit from a merchant. This duration varies based on the acquirer's revenue and AI usage. For example, acquirers generating more than $500 million in annual revenue need 12.1 months to be profitable. This issue is more pronounced for acquirers using AI, where profitability can take longer due to high initial costs and complex setups.",
|
|
147
|
+
right_text: '',
|
|
148
|
+
left_quote: '',
|
|
149
|
+
right_quote: '',
|
|
150
|
+
left_bullets: [],
|
|
151
|
+
right_bullets: [],
|
|
152
|
+
slide_script: 'In this slide, we will discuss the timeframe required for acquirers to turn a profit from their merchants, and how it varies across different revenue categories and AI usage. On average, acquirers need 8.8 months to break even. However, those generating more than $500 million annually may need up to 12.1 months due to higher churn rates. Interestingly, acquirers utilizing AI might also take longer to achieve profitability due to initial setup costs and complexities, though AI eventually offers significant benefits in fraud detection and operational efficiency. A graph on the right will visually depict these variations.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
slide_layout_plan: 'Shifting focus to the duration it takes for acquirers to become profitable with their merchant accounts. A bullet layout for key statistics along with brief explanatory bullet points provides a quick, effective way for audiences to grasp the essential figures. This layout will avoid clutter and ensure clarity. Key statistics such as the average number of months to profitability and the impact of AI implementation on profitability duration will be prominently featured. No images will be needed for this slide, focusing purely on the textual data.',
|
|
156
|
+
type: 'bullets',
|
|
157
|
+
headline: 'Profitability Duration of Merchant Accounts',
|
|
158
|
+
subheadline: '',
|
|
159
|
+
image: '',
|
|
160
|
+
caption: '',
|
|
161
|
+
text: '',
|
|
162
|
+
bullets: [
|
|
163
|
+
'Acquirers need 8.8 months on average to turn a profit from a merchant.',
|
|
164
|
+
'Acquirers earning more than $500 million annually take 12.1 months to become profitable.',
|
|
165
|
+
'High churn rates and complexities with AI setups can delay profitability.',
|
|
166
|
+
'AI usage can lengthen the time due to initial costs and complex setups.',
|
|
167
|
+
],
|
|
168
|
+
left_type: '',
|
|
169
|
+
right_type: '',
|
|
170
|
+
left_image: '',
|
|
171
|
+
right_image: '',
|
|
172
|
+
left_caption: '',
|
|
173
|
+
right_caption: '',
|
|
174
|
+
left_text: '',
|
|
175
|
+
right_text: '',
|
|
176
|
+
left_quote: '',
|
|
177
|
+
right_quote: '',
|
|
178
|
+
left_bullets: [],
|
|
179
|
+
right_bullets: [],
|
|
180
|
+
slide_script: 'This slide highlights key statistics on the duration required for acquirers to turn a profit from their merchant accounts. It takes an average of 8.8 months for acquirers to become profitable. Notably, those with over $500 million in annual revenue take around 12.1 months due to higher churn rates. The use of AI can also extend this period because of the initial costs and complex setups involved. These statistics underline the time and financial investment necessary for profitability in the acquiring business.',
|
|
181
|
+
},
|
|
182
|
+
];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as Tooltip from '../ui/tooltip/index.js';
|
|
3
|
+
import { getPresentationEditorContext } from './presentation-editor.svelte.js';
|
|
4
|
+
|
|
5
|
+
const editor = getPresentationEditorContext();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
{#if editor.activeAction?.tooltip}
|
|
9
|
+
{@const tooltip = editor.activeAction.tooltip}
|
|
10
|
+
<div
|
|
11
|
+
class="pointer-events-none fixed left-0 top-0 z-10"
|
|
12
|
+
style:transform="translate({tooltip.x}px, {tooltip.y}px)"
|
|
13
|
+
>
|
|
14
|
+
<Tooltip.Provider>
|
|
15
|
+
<Tooltip.Root controlledOpen open={true}>
|
|
16
|
+
<Tooltip.Trigger class="absolute"></Tooltip.Trigger>
|
|
17
|
+
<Tooltip.Content
|
|
18
|
+
side="bottom"
|
|
19
|
+
align="start"
|
|
20
|
+
sideOffset={20}
|
|
21
|
+
alignOffset={20}
|
|
22
|
+
avoidCollisions={false}
|
|
23
|
+
>
|
|
24
|
+
{tooltip.text}
|
|
25
|
+
</Tooltip.Content>
|
|
26
|
+
</Tooltip.Root>
|
|
27
|
+
</Tooltip.Provider>
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const CursorTooltip: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type CursorTooltip = InstanceType<typeof CursorTooltip>;
|
|
18
|
+
export default CursorTooltip;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getPresentationEditorContext } from './presentation-editor.svelte.js';
|
|
3
|
+
|
|
4
|
+
const editor = getPresentationEditorContext();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
{#if editor.dragged}
|
|
8
|
+
{@const dragged = editor.dragged}
|
|
9
|
+
{@const translateX = dragged.x - dragged.offsetX}
|
|
10
|
+
{@const translateY = dragged.y - dragged.offsetY}
|
|
11
|
+
<div
|
|
12
|
+
class="pointer-events-none fixed left-0 top-0 z-10"
|
|
13
|
+
style:opacity={dragged.hidden ? 0 : null}
|
|
14
|
+
style:transform="translate({translateX}px, {translateY}px)"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
class="origin-top-left opacity-50 transition-transform"
|
|
18
|
+
style:transform="scale({dragged.scale || dragged.initialScale})"
|
|
19
|
+
>
|
|
20
|
+
<img
|
|
21
|
+
crossorigin="anonymous"
|
|
22
|
+
src={dragged.image.src}
|
|
23
|
+
alt=""
|
|
24
|
+
class="pointer-events-none max-w-max bg-contain bg-center bg-no-repeat"
|
|
25
|
+
draggable="false"
|
|
26
|
+
style:width="{dragged.image.width}px"
|
|
27
|
+
style:height="{dragged.image.height}px"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
{/if}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const Dragged: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type Dragged = InstanceType<typeof Dragged>;
|
|
18
|
+
export default Dragged;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import UndoIcon from 'lucide-svelte/icons/undo-2';
|
|
3
|
+
import RedoIcon from 'lucide-svelte/icons/redo-2';
|
|
4
|
+
import { Button } from '../ui/button/index.js';
|
|
5
|
+
import type { ActiveSidebar } from './types.js';
|
|
6
|
+
import { getPresentationEditorContext } from './presentation-editor.svelte.js';
|
|
7
|
+
import { BackgroundLayerButtons, HtmlLayerButtons, ImageLayerButtons } from './layers/index.js';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
activeSidebarTab: ActiveSidebar;
|
|
11
|
+
onChange: (tab: ActiveSidebar) => void;
|
|
12
|
+
}
|
|
13
|
+
let { activeSidebarTab, onChange }: Props = $props();
|
|
14
|
+
|
|
15
|
+
const editor = getPresentationEditorContext();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div class="bg-background h-12 w-full border-b border-gray-200 px-2">
|
|
19
|
+
<div class="flex h-full items-center justify-between">
|
|
20
|
+
<div class="grid grid-flow-col items-center gap-2">
|
|
21
|
+
<Button
|
|
22
|
+
variant="ghost"
|
|
23
|
+
size="xs"
|
|
24
|
+
active={activeSidebarTab === 'layers'}
|
|
25
|
+
onclick={() => onChange('layers')}
|
|
26
|
+
>
|
|
27
|
+
Layers
|
|
28
|
+
</Button>
|
|
29
|
+
<Button
|
|
30
|
+
variant="ghost"
|
|
31
|
+
size="xs"
|
|
32
|
+
active={activeSidebarTab === 'images'}
|
|
33
|
+
onclick={() => onChange('images')}
|
|
34
|
+
>
|
|
35
|
+
Images
|
|
36
|
+
</Button>
|
|
37
|
+
<Button
|
|
38
|
+
variant="ghost"
|
|
39
|
+
size="icon-xs"
|
|
40
|
+
disabled={editor.historyIndex === -1}
|
|
41
|
+
onclick={() => editor.historyUndo()}
|
|
42
|
+
>
|
|
43
|
+
<UndoIcon class="h-6 w-6" />
|
|
44
|
+
</Button>
|
|
45
|
+
<Button
|
|
46
|
+
variant="ghost"
|
|
47
|
+
size="icon-xs"
|
|
48
|
+
disabled={editor.historyIndex === editor.historyActions.length - 1}
|
|
49
|
+
onclick={() => editor.historyRedo()}
|
|
50
|
+
>
|
|
51
|
+
<RedoIcon class="h-6 w-6" />
|
|
52
|
+
</Button>
|
|
53
|
+
{#if editor.activeBackground}
|
|
54
|
+
<BackgroundLayerButtons />
|
|
55
|
+
{:else if editor.activeLayer}
|
|
56
|
+
{#if editor.activeLayer.type === 'html'}
|
|
57
|
+
{#if editor.htmlEditor}
|
|
58
|
+
<HtmlLayerButtons bind:layer={editor.activeLayer} htmlEditor={editor.htmlEditor} />
|
|
59
|
+
{/if}
|
|
60
|
+
{:else if editor.activeLayer.type === 'image'}
|
|
61
|
+
<ImageLayerButtons bind:layer={editor.activeLayer} />
|
|
62
|
+
{/if}
|
|
63
|
+
{/if}
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ActiveSidebar } from './types.js';
|
|
2
|
+
interface Props {
|
|
3
|
+
activeSidebarTab: ActiveSidebar;
|
|
4
|
+
onChange: (tab: ActiveSidebar) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const Header: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type Header = ReturnType<typeof Header>;
|
|
8
|
+
export default Header;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getPresentationEditorContext } from '../presentation-editor.svelte.js';
|
|
3
|
+
|
|
4
|
+
const editor = getPresentationEditorContext();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div
|
|
8
|
+
class="pointer-events-none absolute left-0 top-0 h-full w-full"
|
|
9
|
+
style:width={`${editor.width * editor.zoom}px`}
|
|
10
|
+
style:height={`${editor.height * editor.zoom}px`}
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
class="absolute -inset-px border-2 border-purple-500"
|
|
14
|
+
style:box-shadow="0 0 0 1px hsla(0, 0%, 100%, .07), inset 0 0 0 1px hsla(0, 0%, 100%, .07)"
|
|
15
|
+
></div>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const ActiveBackgroundBorder: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type ActiveBackgroundBorder = InstanceType<typeof ActiveBackgroundBorder>;
|
|
18
|
+
export default ActiveBackgroundBorder;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getPresentationEditorContext } from '../presentation-editor.svelte.js';
|
|
3
|
+
import type { Layer } from '../types.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
layer: Layer;
|
|
7
|
+
children?: import('svelte').Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { layer, children }: Props = $props();
|
|
11
|
+
|
|
12
|
+
const editor = getPresentationEditorContext();
|
|
13
|
+
|
|
14
|
+
let scale = $derived(layer.scale ?? 1);
|
|
15
|
+
let rotate = $derived(layer.rotate ?? 0);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div
|
|
19
|
+
class="pointer-events-none absolute left-0 top-0 h-full w-full"
|
|
20
|
+
style:width={`${layer.width * scale * editor.zoom}px`}
|
|
21
|
+
style:height={`${layer.height * scale * editor.zoom}px`}
|
|
22
|
+
style:transform={`translate(${layer.x * editor.zoom}px, ${layer.y * editor.zoom}px) rotate(${rotate}deg)`}
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="absolute -inset-px border-2 border-purple-500"
|
|
26
|
+
style:box-shadow="0 0 0 1px hsla(0, 0%, 100%, .07), inset 0 0 0 1px hsla(0, 0%, 100%, .07)"
|
|
27
|
+
></div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
{@render children?.()}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Layer } from '../types.js';
|
|
2
|
+
interface Props {
|
|
3
|
+
layer: Layer;
|
|
4
|
+
children?: import('svelte').Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const ActiveLayerBorder: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type ActiveLayerBorder = ReturnType<typeof ActiveLayerBorder>;
|
|
8
|
+
export default ActiveLayerBorder;
|