@widgetic/editor 3.11.4 → 4.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 +245 -0
- package/dist/assets/fonts.json +331 -0
- package/dist/assets/icons/ic-browser/audio.svg +7 -0
- package/dist/assets/icons/ic-browser/document.svg +11 -0
- package/dist/assets/icons/ic-browser/error.svg +5 -0
- package/dist/assets/icons/ic-browser/folder.svg +28 -0
- package/dist/assets/icons/ic-browser/player-pause.svg +1 -0
- package/dist/assets/icons/ic-browser/player-play.svg +1 -0
- package/dist/assets/icons/ic-browser/trash.svg +1 -0
- package/dist/assets/icons/ic-fixed-position/background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-left-background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-left-background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-left-icon.svg +4 -0
- package/dist/assets/icons/ic-fixed-position/bottom-right-background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-right-background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-right-icon.svg +4 -0
- package/dist/assets/icons/ic-fixed-position/center-bottom-icon.svg +5 -0
- package/dist/assets/icons/ic-fixed-position/center-center-icon.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/center-left-icon.svg +5 -0
- package/dist/assets/icons/ic-fixed-position/center-right-icon.svg +5 -0
- package/dist/assets/icons/ic-fixed-position/center-top-icon.svg +5 -0
- package/dist/assets/icons/ic-fixed-position/top-left-background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/top-left-background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/top-left-icon.svg +4 -0
- package/dist/assets/icons/ic-fixed-position/top-right-background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/top-right-background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/top-right-icon.svg +4 -0
- package/dist/assets/icons/trash.svg +1 -0
- package/dist/components/MockWidget.svelte +108 -0
- package/dist/components/MockWidget.svelte.d.ts +22 -0
- package/dist/components/WidgetPreview.svelte +852 -0
- package/dist/components/WidgetPreview.svelte.d.ts +100 -0
- package/dist/components/color-select/ColorSelect.svelte +258 -0
- package/dist/components/color-select/ColorSelect.svelte.d.ts +42 -0
- package/dist/components/color-select/color.d.ts +25 -0
- package/dist/components/color-select/color.js +21 -0
- package/dist/components/color-select/constants.d.ts +5 -0
- package/dist/components/color-select/constants.js +5 -0
- package/dist/components/color-select/render.d.ts +5 -0
- package/dist/components/color-select/render.js +77 -0
- package/dist/components/color-select/shaders.d.ts +3 -0
- package/dist/components/color-select/shaders.js +8 -0
- package/dist/components/editors/EmbedEditor.svelte +700 -0
- package/dist/components/editors/EmbedEditor.svelte.d.ts +50 -0
- package/dist/components/editors/PropsEditor.svelte +3952 -0
- package/dist/components/editors/PropsEditor.svelte.d.ts +62 -0
- package/dist/components/editors/props-editor.css +73 -0
- package/dist/components/ic/AngleInputController.svelte +276 -0
- package/dist/components/ic/AngleInputController.svelte.d.ts +26 -0
- package/dist/components/ic/BrowserInputController.svelte +724 -0
- package/dist/components/ic/BrowserInputController.svelte.d.ts +39 -0
- package/dist/components/ic/CheckboxInputController.svelte +203 -0
- package/dist/components/ic/CheckboxInputController.svelte.d.ts +41 -0
- package/dist/components/ic/ColorPickerInputController.svelte +1584 -0
- package/dist/components/ic/ColorPickerInputController.svelte.d.ts +50 -0
- package/dist/components/ic/DateFieldInputController.svelte +453 -0
- package/dist/components/ic/DateFieldInputController.svelte.d.ts +35 -0
- package/dist/components/ic/DatePickerInputController.svelte +364 -0
- package/dist/components/ic/DatePickerInputController.svelte.d.ts +28 -0
- package/dist/components/ic/DropdownInputController.svelte +226 -0
- package/dist/components/ic/DropdownInputController.svelte.d.ts +43 -0
- package/dist/components/ic/FixedPositionInputController.svelte +353 -0
- package/dist/components/ic/FixedPositionInputController.svelte.d.ts +23 -0
- package/dist/components/ic/FontInputController.svelte +2062 -0
- package/dist/components/ic/FontInputController.svelte.d.ts +47 -0
- package/dist/components/ic/InputControllerHeader.svelte +147 -0
- package/dist/components/ic/InputControllerHeader.svelte.d.ts +23 -0
- package/dist/components/ic/NumberControls.svelte +299 -0
- package/dist/components/ic/NumberControls.svelte.d.ts +30 -0
- package/dist/components/ic/NumberInputController.svelte +397 -0
- package/dist/components/ic/NumberInputController.svelte.d.ts +30 -0
- package/dist/components/ic/PositionInputController.svelte +252 -0
- package/dist/components/ic/PositionInputController.svelte.d.ts +37 -0
- package/dist/components/ic/RadioGroupInputController.svelte +162 -0
- package/dist/components/ic/RadioGroupInputController.svelte.d.ts +38 -0
- package/dist/components/ic/RangeCalendarInputController.svelte +262 -0
- package/dist/components/ic/RangeCalendarInputController.svelte.d.ts +32 -0
- package/dist/components/ic/RoundedCornersInputController.svelte +469 -0
- package/dist/components/ic/RoundedCornersInputController.svelte.d.ts +37 -0
- package/dist/components/ic/SliderInputController.svelte +411 -0
- package/dist/components/ic/SliderInputController.svelte.d.ts +46 -0
- package/dist/components/ic/SliderRangeInputController.svelte +155 -0
- package/dist/components/ic/SliderRangeInputController.svelte.d.ts +33 -0
- package/dist/components/ic/SwitchInputController.svelte +107 -0
- package/dist/components/ic/SwitchInputController.svelte.d.ts +24 -0
- package/dist/components/ic/TagsInputController.svelte +125 -0
- package/dist/components/ic/TagsInputController.svelte.d.ts +27 -0
- package/dist/components/ic/TextAreaInputController.svelte +1804 -0
- package/dist/components/ic/TextAreaInputController.svelte.d.ts +13 -0
- package/dist/components/ic/TextAreaPreviewInputController.svelte +476 -0
- package/dist/components/ic/TextAreaPreviewInputController.svelte.d.ts +28 -0
- package/dist/components/ic/TextInputController.svelte +70 -0
- package/dist/components/ic/TextInputController.svelte.d.ts +30 -0
- package/dist/components/ic/TimeInputController.svelte +434 -0
- package/dist/components/ic/TimeInputController.svelte.d.ts +25 -0
- package/dist/components/ic/VectorInputController.svelte +1826 -0
- package/dist/components/ic/VectorInputController.svelte.d.ts +47 -0
- package/dist/components/ic/index.d.ts +39 -0
- package/dist/components/ic/index.js +24 -0
- package/dist/components/ic/shared/CategoryTabs.svelte +40 -0
- package/dist/components/ic/shared/CategoryTabs.svelte.d.ts +25 -0
- package/dist/components/ic/shared/ItemGrid.svelte +181 -0
- package/dist/components/ic/shared/ItemGrid.svelte.d.ts +35 -0
- package/dist/components/ic/shared/RecentItemsSection.svelte +260 -0
- package/dist/components/ic/shared/RecentItemsSection.svelte.d.ts +35 -0
- package/dist/components/ic/shared/index.d.ts +8 -0
- package/dist/components/ic/shared/index.js +9 -0
- package/dist/components/icons/addnew.svelte +21 -0
- package/dist/components/icons/addnew.svelte.d.ts +20 -0
- package/dist/components/icons/drag.svelte +29 -0
- package/dist/components/icons/drag.svelte.d.ts +20 -0
- package/dist/components/icons/drag.svg +1 -0
- package/dist/components/icons/locked.svelte +4 -0
- package/dist/components/icons/locked.svelte.d.ts +26 -0
- package/dist/components/icons/locked.svg +4 -0
- package/dist/components/icons/ok.svelte +20 -0
- package/dist/components/icons/ok.svelte.d.ts +20 -0
- package/dist/components/icons/ok.svg +11 -0
- package/dist/components/icons/unlocked.svelte +4 -0
- package/dist/components/icons/unlocked.svelte.d.ts +26 -0
- package/dist/components/icons/unlocked.svg +4 -0
- package/dist/components/icons/x.svelte +14 -0
- package/dist/components/icons/x.svelte.d.ts +20 -0
- package/dist/components/icons/x.svg +5 -0
- package/dist/components/ui/arrows/OpacitySliderArrows.svelte +43 -0
- package/dist/components/ui/arrows/OpacitySliderArrows.svelte.d.ts +23 -0
- package/dist/components/ui/checkerboard-background/CheckerboardBackground.svelte +15 -0
- package/dist/components/ui/checkerboard-background/CheckerboardBackground.svelte.d.ts +20 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.js +19 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -0
- package/dist/stores/userSession.d.ts +7 -0
- package/dist/stores/userSession.js +28 -0
- package/dist/utils/FontManager.d.ts +276 -0
- package/dist/utils/FontManager.js +1283 -0
- package/dist/utils/MediaManager.d.ts +35 -0
- package/dist/utils/MediaManager.js +59 -0
- package/dist/utils/VectorManager.d.ts +190 -0
- package/dist/utils/VectorManager.js +754 -0
- package/dist/utils/colorAutocomplete.d.ts +10 -0
- package/dist/utils/colorAutocomplete.js +28 -0
- package/dist/utils/colorNames.d.ts +3 -0
- package/dist/utils/colorNames.js +152 -0
- package/dist/utils/colorTransparency.d.ts +52 -0
- package/dist/utils/colorTransparency.js +114 -0
- package/dist/utils/fontUtils.d.ts +34 -0
- package/dist/utils/fontUtils.js +132 -0
- package/dist/utils/passiveEvents.js +20 -0
- package/dist/utils/recentColors.d.ts +10 -0
- package/dist/utils/recentColors.js +63 -0
- package/dist/utils/skipFonts.d.ts +3 -0
- package/dist/utils/skipFonts.js +49 -0
- package/dist/utils/vectorUtils.d.ts +34 -0
- package/dist/utils/vectorUtils.js +71 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.js +38 -0
- package/package.json +134 -74
- package/.babelrc +0 -10
- package/.bowerrc +0 -4
- package/.nvmrc +0 -1
- package/Gruntfile.coffee +0 -69
- package/bower.json +0 -28
- package/css/browser/entries/activateable.styl +0 -29
- package/css/browser/entries/audio.styl +0 -39
- package/css/browser/entries/folder.styl +0 -79
- package/css/browser/entries/image.styl +0 -26
- package/css/browser/entries/index.styl +0 -66
- package/css/browser/entries/rss.styl +0 -11
- package/css/browser/entries/video.styl +0 -11
- package/css/browser/index.styl +0 -86
- package/css/browser/intent/index.styl +0 -61
- package/css/browser/nav/index.styl +0 -73
- package/css/browser/social-browser.styl +0 -23
- package/css/controls/clock.styl +0 -110
- package/css/controls/config.styl +0 -6
- package/css/controls/control-audio-details.styl +0 -63
- package/css/controls/control-audio.styl +0 -28
- package/css/controls/control-browser.styl +0 -48
- package/css/controls/control-color.styl +0 -423
- package/css/controls/control-date_time.styl +0 -191
- package/css/controls/control-dropdown.styl +0 -79
- package/css/controls/control-font.styl +0 -147
- package/css/controls/control-image-details.styl +0 -35
- package/css/controls/control-image.styl +0 -43
- package/css/controls/control-order-picker.styl +0 -29
- package/css/controls/control-position.styl +0 -390
- package/css/controls/control-range.styl +0 -68
- package/css/controls/control-scale.styl +0 -30
- package/css/controls/control-slider.styl +0 -38
- package/css/controls/control-spinner.styl +0 -39
- package/css/controls/control-textarea.styl +0 -52
- package/css/controls/control-toggle.styl +0 -34
- package/css/controls/control-url.styl +0 -32
- package/css/controls/control-video-details.styl +0 -85
- package/css/controls/control-video.styl +0 -43
- package/css/controls/general.styl +0 -98
- package/css/controls/index.styl +0 -25
- package/css/editor/colors.styl +0 -7
- package/css/editor/content/directinput.styl +0 -47
- package/css/editor/content/index.styl +0 -111
- package/css/editor/content/message.styl +0 -53
- package/css/editor/content/tabs.styl +0 -75
- package/css/editor/copied-from-old-style.styl +0 -197
- package/css/editor/details/bulk-editor.styl +0 -104
- package/css/editor/details/index.styl +0 -21
- package/css/editor/details/item.styl +0 -153
- package/css/editor/embed.styl +0 -106
- package/css/editor/footer.styl +0 -180
- package/css/editor/full-editor.styl +0 -16
- package/css/editor/index.styl +0 -124
- package/css/editor/login-popup.styl +0 -13
- package/css/editor/preview.styl +0 -257
- package/css/editor/skin/editor/index.styl +0 -54
- package/css/editor/skin/editor/tabs.styl +0 -111
- package/css/editor/skin/index.styl +0 -138
- package/css/editor/skin/popup.styl +0 -152
- package/css/editor/skin/presets/dropdown.styl +0 -61
- package/css/editor/skin/presets/index.styl +0 -86
- package/css/editor/skin/presets/list.styl +0 -244
- package/css/editor/tooltips.styl +0 -85
- package/css/fonts.styl +0 -47
- package/css/icons/BlogvioEditor.dev.svg +0 -112
- package/css/icons.styl +0 -16
- package/css/img/arrow-right-rounded-v-small.png +0 -0
- package/css/img/browser-folder-separator.png +0 -0
- package/css/img/calendar-input-icons.png +0 -0
- package/css/img/check.png +0 -0
- package/css/img/close.png +0 -0
- package/css/img/composition/edit-icon.png +0 -0
- package/css/img/content/audio-icon.png +0 -0
- package/css/img/content/folder-icon.png +0 -0
- package/css/img/content/messages/error-background.png +0 -0
- package/css/img/content/messages/error-icon.png +0 -0
- package/css/img/content/messages/notification-background.png +0 -0
- package/css/img/content/messages/notification-icon.png +0 -0
- package/css/img/content/no-files-audio.png +0 -0
- package/css/img/content/no-files-image.png +0 -0
- package/css/img/content/no-files-video.png +0 -0
- package/css/img/content/no-files.png +0 -0
- package/css/img/content/rss-icon.png +0 -0
- package/css/img/content/selected.png +0 -0
- package/css/img/content/video-icon.png +0 -0
- package/css/img/content/with-control-text.png +0 -0
- package/css/img/control-dropdown-arrow.png +0 -0
- package/css/img/control-image-valid.png +0 -0
- package/css/img/control-position-icon.png +0 -0
- package/css/img/control-scale-lock-icon.png +0 -0
- package/css/img/control-slider-arrows-hover.png +0 -0
- package/css/img/control-slider-arrows.png +0 -0
- package/css/img/control-spinner-buttons-hover.png +0 -0
- package/css/img/control-spinner-buttons.png +0 -0
- package/css/img/control-textarea-bold-active.png +0 -0
- package/css/img/control-textarea-bold.png +0 -0
- package/css/img/control-textarea-italic-active.png +0 -0
- package/css/img/control-textarea-italic.png +0 -0
- package/css/img/control-textarea-underline-active.png +0 -0
- package/css/img/control-textarea-underline.png +0 -0
- package/css/img/custom-checkbox-sprite.png +0 -0
- package/css/img/details/item-collapse-icon.png +0 -0
- package/css/img/details/item-expand-icon.png +0 -0
- package/css/img/details/item-sort-icon.png +0 -0
- package/css/img/done-arrow.png +0 -0
- package/css/img/fb-logo-icon-w.png +0 -0
- package/css/img/grid-icons.png +0 -0
- package/css/img/icon-reference.png +0 -0
- package/css/img/indicator.png +0 -0
- package/css/img/loader.gif +0 -0
- package/css/img/loaders/audio-white.png +0 -0
- package/css/img/loaders/audio.png +0 -0
- package/css/img/loaders/photo-white.png +0 -0
- package/css/img/loaders/photo.png +0 -0
- package/css/img/loaders/util-white.png +0 -0
- package/css/img/loaders/util.png +0 -0
- package/css/img/loaders/video-white.png +0 -0
- package/css/img/loaders/video.png +0 -0
- package/css/img/maximize.png +0 -0
- package/css/img/minimize.png +0 -0
- package/css/img/next-btn.png +0 -0
- package/css/img/search-icon-sprite.png +0 -0
- package/css/img/services/blogvio.png +0 -0
- package/css/img/services/drive.png +0 -0
- package/css/img/services/dropbox-login.png +0 -0
- package/css/img/services/dropbox.png +0 -0
- package/css/img/services/facebook-login.png +0 -0
- package/css/img/services/facebook.png +0 -0
- package/css/img/services/flickr-login.png +0 -0
- package/css/img/services/flickr.png +0 -0
- package/css/img/services/instagram-login.png +0 -0
- package/css/img/services/instagram.png +0 -0
- package/css/img/services/text.png +0 -0
- package/css/img/services/uploads.png +0 -0
- package/css/img/services/uploads.svg +0 -689
- package/css/img/services/webaddress-bw.png +0 -0
- package/css/img/services/webaddress.png +0 -0
- package/css/img/services/webadress.png +0 -0
- package/css/img/services/websearch.png +0 -0
- package/css/img/services/wix.png +0 -0
- package/css/img/skin/item-active-indicator.png +0 -0
- package/css/img/skin/item-hover-icon.png +0 -0
- package/css/img/skin/overwrite.png +0 -0
- package/css/img/skin/popup-name-icon.png +0 -0
- package/css/img/skin/popup-save.png +0 -0
- package/css/img/skin/preset.png +0 -0
- package/css/img/skin/presets-arrow-purple.png +0 -0
- package/css/img/tw-icon-w.png +0 -0
- package/css/img/warning.png +0 -0
- package/css/img/white-rounded-check.png +0 -0
- package/css/index.styl +0 -9
- package/css/mixins.styl +0 -62
- package/css/scrollable.styl +0 -101
- package/karma.conf.js +0 -73
- package/lib/control.js +0 -1
- package/lib/controls.js +0 -1
- package/lib/core.editor.js +0 -4
- package/lib/core.js +0 -1
- package/lib/core.vendor.js +0 -3
- package/lib/dev/control.js +0 -845
- package/lib/dev/controls.js +0 -7774
- package/lib/dev/core.editor.js +0 -6439
- package/lib/dev/core.js +0 -1486
- package/lib/dev/core.vendor.js +0 -10708
- package/lib/dev/editor.css +0 -166
- package/lib/dev/editor.js +0 -29710
- package/lib/dev/editor.vendor.js +0 -15119
- package/lib/dev/jquery.nanoscroller.js.map +0 -10
- package/lib/editor.css +0 -167
- package/lib/editor.js +0 -49
- package/lib/editor.vendor.js +0 -11
- package/src/api/index.coffee +0 -23
- package/src/api/mixin.coffee +0 -89
- package/src/browser/controller/entry/audio.coffee +0 -38
- package/src/browser/controller/entry/button.coffee +0 -16
- package/src/browser/controller/entry/file.coffee +0 -35
- package/src/browser/controller/entry/folder.coffee +0 -14
- package/src/browser/controller/entry/image.coffee +0 -24
- package/src/browser/controller/entry/index.coffee +0 -18
- package/src/browser/controller/entry/rss.coffee +0 -5
- package/src/browser/controller/entry/video.coffee +0 -4
- package/src/browser/controller/index.coffee +0 -289
- package/src/browser/controller/instagram.coffee +0 -129
- package/src/browser/controller/navbar.coffee +0 -48
- package/src/browser/controller/social.coffee +0 -213
- package/src/browser/model/entry.coffee +0 -18
- package/src/browser/model/index.coffee +0 -34
- package/src/core/controller/font-loader.coffee +0 -65
- package/src/core/controller/lazyload.coffee +0 -14
- package/src/core/controller/overlay.coffee +0 -146
- package/src/core/controller/popup.coffee +0 -36
- package/src/core/controller/scrollable.coffee +0 -68
- package/src/core/controls/audio.coffee +0 -56
- package/src/core/controls/browser.coffee +0 -271
- package/src/core/controls/color.coffee +0 -121
- package/src/core/controls/date-time/calendar/index.coffee +0 -99
- package/src/core/controls/date-time/calendar/months.coffee +0 -52
- package/src/core/controls/date-time/calendar/years.coffee +0 -58
- package/src/core/controls/date-time/clock.coffee +0 -62
- package/src/core/controls/date-time/helper.coffee +0 -31
- package/src/core/controls/date-time/index.coffee +0 -62
- package/src/core/controls/date-time/popup.coffee +0 -56
- package/src/core/controls/details/audio.coffee +0 -33
- package/src/core/controls/details/image.coffee +0 -19
- package/src/core/controls/details/video.coffee +0 -14
- package/src/core/controls/dropdown.coffee +0 -100
- package/src/core/controls/font/font-item.coffee +0 -22
- package/src/core/controls/font/font-list.coffee +0 -108
- package/src/core/controls/font/fonts-popup.coffee +0 -91
- package/src/core/controls/font/index.coffee +0 -66
- package/src/core/controls/image.coffee +0 -37
- package/src/core/controls/index.coffee +0 -88
- package/src/core/controls/orderPicker.coffee +0 -93
- package/src/core/controls/position/grid-panel.coffee +0 -75
- package/src/core/controls/position/index.coffee +0 -98
- package/src/core/controls/position/panel.coffee +0 -68
- package/src/core/controls/position/pixel-panel.coffee +0 -54
- package/src/core/controls/position/popup.coffee +0 -63
- package/src/core/controls/position/reference-panel.coffee +0 -26
- package/src/core/controls/range.coffee +0 -191
- package/src/core/controls/rss.coffee +0 -16
- package/src/core/controls/scale.coffee +0 -78
- package/src/core/controls/slider.coffee +0 -122
- package/src/core/controls/stepper.coffee +0 -97
- package/src/core/controls/text.coffee +0 -54
- package/src/core/controls/textarea.coffee +0 -78
- package/src/core/controls/toggle.coffee +0 -29
- package/src/core/controls/url.coffee +0 -88
- package/src/core/controls/video.coffee +0 -9
- package/src/core/embed/api.js +0 -178
- package/src/core/embed/controller.js +0 -331
- package/src/core/models/composition.coffee +0 -178
- package/src/core/models/content.coffee +0 -79
- package/src/core/models/skin.coffee +0 -91
- package/src/core/models/user.coffee +0 -6
- package/src/core/models/widget.coffee +0 -88
- package/src/core/router/index.coffee +0 -44
- package/src/core/services/container/index.js +0 -18
- package/src/core/services/container/instance.js +0 -3
- package/src/core/services/content.js +0 -80
- package/src/core/services/instagram.coffee +0 -47
- package/src/core/services/mixin/events.js +0 -17
- package/src/core/services/service.js +0 -1
- package/src/core/services/sounds.js +0 -81
- package/src/core/services/uploads.js +0 -299
- package/src/core/utils/popup.coffee +0 -67
- package/src/core/utils/should-show.coffee +0 -12
- package/src/core/views/audio-details.pug +0 -9
- package/src/core/views/audio.pug +0 -7
- package/src/core/views/browser.pug +0 -4
- package/src/core/views/color.pug +0 -8
- package/src/core/views/date-time/calendar.pug +0 -3
- package/src/core/views/date-time/clock.pug +0 -12
- package/src/core/views/date-time/grid.pug +0 -6
- package/src/core/views/date-time/input.pug +0 -4
- package/src/core/views/date-time/table.pug +0 -6
- package/src/core/views/dropdown.pug +0 -9
- package/src/core/views/font/font-item.pug +0 -3
- package/src/core/views/font/fonts-list.pug +0 -7
- package/src/core/views/font/fonts-popup.pug +0 -5
- package/src/core/views/font/index.pug +0 -7
- package/src/core/views/image-details.pug +0 -6
- package/src/core/views/image.pug +0 -5
- package/src/core/views/input-layout.pug +0 -15
- package/src/core/views/order-items.pug +0 -7
- package/src/core/views/order-picker.pug +0 -7
- package/src/core/views/pixelpanel.pug +0 -69
- package/src/core/views/position.pug +0 -10
- package/src/core/views/range.pug +0 -9
- package/src/core/views/scale.pug +0 -7
- package/src/core/views/slider.pug +0 -6
- package/src/core/views/stepper.pug +0 -6
- package/src/core/views/text.pug +0 -4
- package/src/core/views/textarea.pug +0 -8
- package/src/core/views/toggle.pug +0 -5
- package/src/core/views/video-details.pug +0 -7
- package/src/core/views/video.pug +0 -4
- package/src/core/widget/index.coffee +0 -66
- package/src/editor/content/browser/dropzone.html +0 -268
- package/src/editor/content/browser/file.html +0 -124
- package/src/editor/content/browser/scroll-pane.html +0 -32
- package/src/editor/content/browser/service.html +0 -53
- package/src/editor/content/browser/upload.coffee +0 -44
- package/src/editor/content/browser/upload.html +0 -439
- package/src/editor/content/index.coffee +0 -294
- package/src/editor/content/input/field.coffee +0 -45
- package/src/editor/content/input/index.coffee +0 -115
- package/src/editor/content/service/base/photoitem.coffee +0 -49
- package/src/editor/content/service/cache.coffee +0 -20
- package/src/editor/content/service/default.coffee +0 -59
- package/src/editor/content/service/dropbox.coffee +0 -71
- package/src/editor/content/service/facebook.coffee +0 -143
- package/src/editor/content/service/flickr.coffee +0 -85
- package/src/editor/content/service/google-drive-sdk.coffee +0 -18
- package/src/editor/content/service/google-drive.coffee +0 -144
- package/src/editor/content/service/instagram-social.coffee +0 -84
- package/src/editor/content/service/instagram.coffee +0 -168
- package/src/editor/content/service/share-popup.coffee +0 -15
- package/src/editor/content/service/soundcloud.coffee +0 -163
- package/src/editor/content/tab.coffee +0 -27
- package/src/editor/details/bulk-editor/attributes-panel.coffee +0 -11
- package/src/editor/details/bulk-editor/index.coffee +0 -86
- package/src/editor/details/index.coffee +0 -156
- package/src/editor/details/item/attributes.coffee +0 -45
- package/src/editor/details/item/index.coffee +0 -82
- package/src/editor/editor.coffee +0 -274
- package/src/editor/footer/breadcrumb.coffee +0 -17
- package/src/editor/footer/index.coffee +0 -36
- package/src/editor/index.coffee +0 -79
- package/src/editor/listeners/embed-listener.coffee +0 -143
- package/src/editor/login-popup.coffee +0 -29
- package/src/editor/notification-controller.coffee +0 -35
- package/src/editor/popup.coffee +0 -68
- package/src/editor/remote-preview.coffee +0 -68
- package/src/editor/save/index.coffee +0 -62
- package/src/editor/skin/delete.coffee +0 -33
- package/src/editor/skin/editor/index.coffee +0 -188
- package/src/editor/skin/editor/panel.coffee +0 -37
- package/src/editor/skin/index.coffee +0 -126
- package/src/editor/skin/save.coffee +0 -58
- package/src/editor/skin/selector/index.coffee +0 -59
- package/src/editor/skin/selector/item.coffee +0 -123
- package/src/editor/skin/selector/list.coffee +0 -97
- package/src/editor/views/embed.pug +0 -10
- package/src/editor/views/loginbutton.pug +0 -8
- package/src/editor/views/popup.pug +0 -17
- package/src/editor/views/presets.pug +0 -8
- package/src/editor/views/presetslist-header.pug +0 -8
- package/src/editor/views/skinitem.pug +0 -13
- package/src/modules/control.js +0 -3
- package/src/modules/controls.js +0 -29
- package/src/modules/core.js +0 -19
- package/src/modules/editor.js +0 -80
- package/test/config.js +0 -3
- package/test/core/models/skin-spec.js +0 -209
- package/webpack.config.js +0 -46
- package/webpack.config.prod.js +0 -9
- /package/{src/core/views/date-time/popup.pug → dist/utils/passiveEvents.d.ts} +0 -0
|
@@ -0,0 +1,700 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* EmbedEditor Component
|
|
4
|
+
*
|
|
5
|
+
* A specialized editor for embedding and customizing widget code with:
|
|
6
|
+
* - One-click copy functionality for embed codes
|
|
7
|
+
* - Visual code highlighting for better readability
|
|
8
|
+
* - Integrated property customization via PropsEditor
|
|
9
|
+
* - Responsive design with configurable dimensions
|
|
10
|
+
*
|
|
11
|
+
* Note: Requires a valid embedSchema for property customization
|
|
12
|
+
*/
|
|
13
|
+
-->
|
|
14
|
+
<script lang="ts">
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* SVELTE IMPORTS
|
|
18
|
+
*/
|
|
19
|
+
import { onMount, createEventDispatcher, onDestroy } from 'svelte';
|
|
20
|
+
|
|
21
|
+
const dispatch = createEventDispatcher();
|
|
22
|
+
|
|
23
|
+
// Add Sonner import
|
|
24
|
+
import {toast, CopyableHeader} from '@widgetic/design-system/components';
|
|
25
|
+
|
|
26
|
+
// Add OK icon import
|
|
27
|
+
import OK from '../icons/ok.svelte';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* LOCAL SVELTE COMPONENTS IMPORTS
|
|
31
|
+
*/
|
|
32
|
+
import PropsEditor from './PropsEditor.svelte';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* SHADCN COMPONENTS
|
|
36
|
+
*/
|
|
37
|
+
import { Button, ScrollArea } from '@widgetic/design-system/components';
|
|
38
|
+
|
|
39
|
+
// Add DragHandle import
|
|
40
|
+
import DragHandle from '../icons/drag.svelte';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Component Configuration Props
|
|
44
|
+
* width/height: Control overall component dimensions
|
|
45
|
+
* headerHeight: Space allocated for embed code display section
|
|
46
|
+
* embedSchema: Defines customizable properties for the embedded widget
|
|
47
|
+
*
|
|
48
|
+
* Note: headerHeight affects the vertical space distribution between
|
|
49
|
+
* the embed code display and property editor sections
|
|
50
|
+
*/
|
|
51
|
+
let className = '';
|
|
52
|
+
export { className as class };
|
|
53
|
+
export let style = '';
|
|
54
|
+
// header embed props
|
|
55
|
+
export let embedHeaderText = 'Embed code';
|
|
56
|
+
export let embedCode = '';
|
|
57
|
+
// editor props
|
|
58
|
+
export let height = 720;
|
|
59
|
+
// export let headerHeight = 215;
|
|
60
|
+
//
|
|
61
|
+
export let embedSchema: any;
|
|
62
|
+
// Initial values for embed options (overrides schema defaultValue)
|
|
63
|
+
export let initialValues: Record<string, any> = {};
|
|
64
|
+
// When false, skip the outer full-page dark wrapper (for embedding inside another layout)
|
|
65
|
+
export let standalone = true;
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* LOCAL VARIABLES
|
|
70
|
+
*/
|
|
71
|
+
// Loading state variable
|
|
72
|
+
let loading: boolean = true;
|
|
73
|
+
// Add drag handle visibility state
|
|
74
|
+
let isDragHandleVisible = false;
|
|
75
|
+
|
|
76
|
+
// Add drag state variables and functions
|
|
77
|
+
let isDragging = false;
|
|
78
|
+
let initialMousePos = { x: 0, y: 0 };
|
|
79
|
+
let initialEditorPos = { left: 0, top: 0 };
|
|
80
|
+
let embedEditorElement: HTMLElement | null = null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* ON MOUNT
|
|
84
|
+
*/
|
|
85
|
+
onMount(() => {
|
|
86
|
+
console.log('EMBED EDITOR Mounted!');
|
|
87
|
+
|
|
88
|
+
// show loader while fetching schemas
|
|
89
|
+
// loading = true;
|
|
90
|
+
|
|
91
|
+
// hide loader
|
|
92
|
+
loading = false;
|
|
93
|
+
|
|
94
|
+
// Setup draggable functionality for EmbedEditor after loading
|
|
95
|
+
setTimeout(setupDraggable, 300);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// Add cleanup for event listeners
|
|
99
|
+
onDestroy(() => {
|
|
100
|
+
document.removeEventListener('mousemove', handleMouseMove);
|
|
101
|
+
document.removeEventListener('mouseup', handleMouseUp);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// Add the draggable setup function
|
|
105
|
+
function setupDraggable() {
|
|
106
|
+
// Find the EmbedEditor element
|
|
107
|
+
embedEditorElement = document.querySelector('.embed-editor-container');
|
|
108
|
+
|
|
109
|
+
if (!embedEditorElement) return;
|
|
110
|
+
|
|
111
|
+
// Find the existing drag handle container
|
|
112
|
+
const dragHandleContainer = embedEditorElement.querySelector('.drag-handle-container') as HTMLElement;
|
|
113
|
+
|
|
114
|
+
if (dragHandleContainer) {
|
|
115
|
+
// Only add the mousedown event to the drag handle container
|
|
116
|
+
dragHandleContainer.addEventListener('mousedown', handleMouseDown as EventListener);
|
|
117
|
+
|
|
118
|
+
// Make the drag handle container always visible
|
|
119
|
+
dragHandleContainer.style.opacity = '0';
|
|
120
|
+
|
|
121
|
+
// Increase opacity on hover
|
|
122
|
+
dragHandleContainer.addEventListener('mouseenter', () => {
|
|
123
|
+
dragHandleContainer.style.opacity = '1';
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
dragHandleContainer.addEventListener('mouseleave', () => {
|
|
127
|
+
dragHandleContainer.style.opacity = '0';
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Remove the need for mouse enter/leave to show drag handle
|
|
132
|
+
embedEditorElement.removeEventListener('mouseenter', handleHeaderMouseEnter);
|
|
133
|
+
embedEditorElement.removeEventListener('mouseleave', handleHeaderMouseLeave);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Mouse event handlers for dragging
|
|
137
|
+
function handleMouseDown(e: MouseEvent) {
|
|
138
|
+
e.preventDefault();
|
|
139
|
+
|
|
140
|
+
if (!embedEditorElement) return;
|
|
141
|
+
|
|
142
|
+
isDragging = true;
|
|
143
|
+
|
|
144
|
+
// Get initial mouse position
|
|
145
|
+
initialMousePos = { x: e.clientX, y: e.clientY };
|
|
146
|
+
|
|
147
|
+
// Get the current position of the editor
|
|
148
|
+
const rect = embedEditorElement.getBoundingClientRect();
|
|
149
|
+
|
|
150
|
+
// Get the computed style
|
|
151
|
+
const computedStyle = window.getComputedStyle(embedEditorElement);
|
|
152
|
+
|
|
153
|
+
// Check the current position type
|
|
154
|
+
const currentPosition = computedStyle.position;
|
|
155
|
+
|
|
156
|
+
// Set the editor position to absolute and calculate initial position
|
|
157
|
+
embedEditorElement.style.position = 'absolute';
|
|
158
|
+
|
|
159
|
+
// If it's the first time we're dragging, set up initial position
|
|
160
|
+
if (currentPosition !== 'absolute') {
|
|
161
|
+
// Convert to absolute positioning without changing the visual position
|
|
162
|
+
embedEditorElement.style.margin = '0';
|
|
163
|
+
embedEditorElement.style.width = `${rect.width}px`;
|
|
164
|
+
embedEditorElement.style.height = `${rect.height}px`;
|
|
165
|
+
|
|
166
|
+
// Get the parent element's computed style
|
|
167
|
+
const parentElement = embedEditorElement.parentElement;
|
|
168
|
+
const parentRect = parentElement ? parentElement.getBoundingClientRect() : { left: 0, top: 0 };
|
|
169
|
+
|
|
170
|
+
// Calculate initial absolute position with parent offset
|
|
171
|
+
const initialLeft = rect.left - parentRect.left;
|
|
172
|
+
const initialTop = rect.top - parentRect.top;
|
|
173
|
+
|
|
174
|
+
// Set the initial position
|
|
175
|
+
embedEditorElement.style.left = `${initialLeft}px`;
|
|
176
|
+
embedEditorElement.style.top = `${initialTop}px`;
|
|
177
|
+
|
|
178
|
+
// Store initial values for drag calculation
|
|
179
|
+
initialEditorPos = {
|
|
180
|
+
left: initialLeft,
|
|
181
|
+
top: initialTop
|
|
182
|
+
};
|
|
183
|
+
} else {
|
|
184
|
+
// If already absolute, use current left/top values
|
|
185
|
+
initialEditorPos = {
|
|
186
|
+
left: parseInt(computedStyle.left) || 0,
|
|
187
|
+
top: parseInt(computedStyle.top) || 0
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Add the document event listeners
|
|
192
|
+
document.addEventListener('mousemove', handleMouseMove);
|
|
193
|
+
document.addEventListener('mouseup', handleMouseUp);
|
|
194
|
+
|
|
195
|
+
// Change cursor during dragging
|
|
196
|
+
document.body.style.cursor = 'move';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function handleMouseMove(e: MouseEvent) {
|
|
200
|
+
if (!isDragging || !embedEditorElement) return;
|
|
201
|
+
|
|
202
|
+
// Calculate the movement delta
|
|
203
|
+
const dx = e.clientX - initialMousePos.x;
|
|
204
|
+
const dy = e.clientY - initialMousePos.y;
|
|
205
|
+
|
|
206
|
+
// Update position based on original position plus delta
|
|
207
|
+
embedEditorElement.style.left = `${initialEditorPos.left + dx}px`;
|
|
208
|
+
embedEditorElement.style.top = `${initialEditorPos.top + dy}px`;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function handleMouseUp() {
|
|
212
|
+
if (!isDragging) return;
|
|
213
|
+
|
|
214
|
+
isDragging = false;
|
|
215
|
+
|
|
216
|
+
// Remove the document event listeners
|
|
217
|
+
document.removeEventListener('mousemove', handleMouseMove);
|
|
218
|
+
document.removeEventListener('mouseup', handleMouseUp);
|
|
219
|
+
|
|
220
|
+
// Reset cursor
|
|
221
|
+
document.body.style.cursor = '';
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Clipboard Interaction Handlers
|
|
226
|
+
* Provides copy functionality via the copy button
|
|
227
|
+
* with visual feedback via toast notifications
|
|
228
|
+
*/
|
|
229
|
+
// Add this helper function at the top of your script
|
|
230
|
+
let isToastVisible = false;
|
|
231
|
+
|
|
232
|
+
function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
233
|
+
if (isToastVisible) return;
|
|
234
|
+
|
|
235
|
+
isToastVisible = true;
|
|
236
|
+
toast[type](message, {
|
|
237
|
+
...options,
|
|
238
|
+
duration: 5000,
|
|
239
|
+
unstyled: true,
|
|
240
|
+
position: 'bottom-right',
|
|
241
|
+
classes: {
|
|
242
|
+
toast: 'embed-editor-toast flex items-center gap-3 fixed bottom-5 right-5',
|
|
243
|
+
title: 'embed-editor-toast-title',
|
|
244
|
+
description: 'embed-editor-toast-description',
|
|
245
|
+
closeButton: 'embed-editor-toast-close-button'
|
|
246
|
+
},
|
|
247
|
+
onAutoClose: () => {
|
|
248
|
+
isToastVisible = false;
|
|
249
|
+
},
|
|
250
|
+
onDismiss: () => {
|
|
251
|
+
isToastVisible = false;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Component State Management
|
|
258
|
+
* loading: Prevents premature rendering while initializing
|
|
259
|
+
* embedCodeHeaderRef: References header for DOM measurements
|
|
260
|
+
*
|
|
261
|
+
* Note: Currently loading is simplified as there's no actual data fetching,
|
|
262
|
+
* but the structure supports future async operations
|
|
263
|
+
*/
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Layout Structure
|
|
267
|
+
* The component is organized in layers:
|
|
268
|
+
* 1. Border overlay (z-index: -102)
|
|
269
|
+
* 2. Embed code header (z-index: 100)
|
|
270
|
+
* 3. Props editor (z-index: 10)
|
|
271
|
+
*
|
|
272
|
+
* This layering ensures proper visual hierarchy and interaction handling
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
// These functions are no longer needed since we're making the drag handle always visible
|
|
276
|
+
// But we'll keep them for compatibility with any code that might call them
|
|
277
|
+
function handleHeaderMouseEnter() {
|
|
278
|
+
isDragHandleVisible = true;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function handleHeaderMouseLeave() {
|
|
282
|
+
isDragHandleVisible = false;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** Root wrapper element ref for programmatic positioning */
|
|
286
|
+
let wrapperElement: HTMLElement | null = null;
|
|
287
|
+
let internalPropsEditorRef: any = null;
|
|
288
|
+
|
|
289
|
+
/** Public: update a design value in the internal PropsEditor (for external dimension sync) */
|
|
290
|
+
export function updateValue(propertyId: string, value: any) {
|
|
291
|
+
internalPropsEditorRef?.updateDesignValue?.(propertyId, value);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** Public: set absolute position programmatically (used by parent for layout) */
|
|
295
|
+
export function setPosition(left: number, top: number) {
|
|
296
|
+
if (!wrapperElement) return;
|
|
297
|
+
wrapperElement.style.left = `${left}px`;
|
|
298
|
+
wrapperElement.style.top = `${top}px`;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** Public: get current position */
|
|
302
|
+
export function getPosition() {
|
|
303
|
+
if (!wrapperElement) return { left: 0, top: 0 };
|
|
304
|
+
return {
|
|
305
|
+
left: parseFloat(wrapperElement.style.left) || 0,
|
|
306
|
+
top: parseFloat(wrapperElement.style.top) || 0
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
</script>
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
<!-- HTML -->
|
|
314
|
+
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
315
|
+
<div
|
|
316
|
+
bind:this={wrapperElement}
|
|
317
|
+
class="{standalone ? 'min-h-screen w-full flex items-center justify-center widgetic-colors widgetic-radius bg-dark p-4' : 'embed-editor-inline-wrapper absolute'}"
|
|
318
|
+
>
|
|
319
|
+
<div
|
|
320
|
+
class="{className ? className + ' ' : ''}embed-editor-container
|
|
321
|
+
flex flex-col justify-center relative bg-white widgetic-colors widgetic-radius overflow-hidden"
|
|
322
|
+
style="
|
|
323
|
+
width: 450px;
|
|
324
|
+
height: {!embedCode && !embedSchema ? height + 'px' : !embedSchema ? 'auto' : height + 'px'};
|
|
325
|
+
border: 2px solid hsl(var(--grey2));
|
|
326
|
+
border-radius: var(--radius-large);
|
|
327
|
+
z-index: 0;
|
|
328
|
+
position: relative;
|
|
329
|
+
{style ? ' ' + style : ''}
|
|
330
|
+
"
|
|
331
|
+
>
|
|
332
|
+
{#if loading}
|
|
333
|
+
<div class="loading-text subtext text-grey5 flex items-center justify-center h-full">Loading...</div>
|
|
334
|
+
{:else if !embedCode}
|
|
335
|
+
<div class="flex flex-col items-center justify-center h-full">
|
|
336
|
+
<div class="text-error text-lg font-medium">No embed code available</div>
|
|
337
|
+
<div class="text-grey5 subtext mt-1">Error code: EMBED_CODE_NOT_FOUND</div>
|
|
338
|
+
</div>
|
|
339
|
+
{:else}
|
|
340
|
+
<!-- Embed Code Header and Text Area Container -->
|
|
341
|
+
<section
|
|
342
|
+
class="header-hover-area bg-grey2"
|
|
343
|
+
class:rounded-b-[var(--radius-large)]={!embedSchema}
|
|
344
|
+
aria-label="Embed code header area"
|
|
345
|
+
>
|
|
346
|
+
<!-- Drag Handle -->
|
|
347
|
+
<div class="absolute top-0 left-0 w-full flex justify-center z-[103]">
|
|
348
|
+
<div class="flex items-center justify-center h-6 cursor-move transition-all duration-200 widgetic-colors drag-handle-container">
|
|
349
|
+
<DragHandle class="w-[66px] h-[24px] text-forest-green hover:text-grey3 transition-colors drag-handle" />
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
|
|
353
|
+
<!-- Use the CopyableHeader component -->
|
|
354
|
+
<CopyableHeader
|
|
355
|
+
headerText={embedHeaderText}
|
|
356
|
+
content={embedCode}
|
|
357
|
+
helpText="Read more about embedding"
|
|
358
|
+
helpUrl="/embed"
|
|
359
|
+
showStandaloneCopyButton={true}
|
|
360
|
+
standaloneCopyButtonText="Copy to clipboard"
|
|
361
|
+
showButtonText={false}
|
|
362
|
+
buttonClass="bg-grey2 text-grey7 hover:bg-white rounded-small"
|
|
363
|
+
style="border-top-left-radius: var(--radius-large); border-top-right-radius: var(--radius-large);"
|
|
364
|
+
on:copy={() => {
|
|
365
|
+
showToast('success', 'Copied to clipboard', {
|
|
366
|
+
description: 'Paste it anywhere on your site.',
|
|
367
|
+
icon: OK,
|
|
368
|
+
});
|
|
369
|
+
}}
|
|
370
|
+
/>
|
|
371
|
+
</section>
|
|
372
|
+
|
|
373
|
+
<!-- Props Editor - Only show if embedSchema exists -->
|
|
374
|
+
{#if embedSchema}
|
|
375
|
+
<div class="w-full flex-1 z-10 bg-white overflow-hidden widgetic-colors">
|
|
376
|
+
<ScrollArea
|
|
377
|
+
class="h-full"
|
|
378
|
+
type="hover"
|
|
379
|
+
scrollHideDelay={0}
|
|
380
|
+
scrollbarYClasses="flex touch-none select-none transition-colors w-[24px] px-2 bg-white pt-4 pb-6 [&>div]:w-[8px] [&>div]:bg-grey1 [&>div]:rounded-pill [&>div]:cursor-pointer [&>div]:transition-colors [&>div]:duration-250 [&>div]:hover:bg-grey2 [&>div]:opacity-100"
|
|
381
|
+
>
|
|
382
|
+
<div class="scroll-viewport h-full" data-radix-scroll-area-viewport>
|
|
383
|
+
<div class="min-h-full scroll-content p-0">
|
|
384
|
+
<PropsEditor
|
|
385
|
+
bind:this={internalPropsEditorRef}
|
|
386
|
+
class="z-10"
|
|
387
|
+
width="450px"
|
|
388
|
+
height="100%"
|
|
389
|
+
designSchema={embedSchema}
|
|
390
|
+
contentSchema={null}
|
|
391
|
+
initialDesignValues={initialValues}
|
|
392
|
+
defaultOpen={true}
|
|
393
|
+
showDragHandle={false}
|
|
394
|
+
on:propertyChange={(event: any) => {
|
|
395
|
+
dispatch('propertyChange', event.detail);
|
|
396
|
+
}}
|
|
397
|
+
/>
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
</ScrollArea>
|
|
401
|
+
</div>
|
|
402
|
+
{/if}
|
|
403
|
+
{/if}
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
|
|
407
|
+
<style>
|
|
408
|
+
/* Drag Handle Visibility */
|
|
409
|
+
.header-hover-area {
|
|
410
|
+
position: relative;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.drag-handle-container {
|
|
414
|
+
transition: opacity 0.3s ease;
|
|
415
|
+
/* Ensure the drag handle is always visible on top */
|
|
416
|
+
z-index: 103;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/* Only apply move cursor to the drag handle */
|
|
420
|
+
.drag-handle-container {
|
|
421
|
+
cursor: move;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/* Drag Handle Icon */
|
|
425
|
+
:global(.drag-handle svg) {
|
|
426
|
+
color: hsl(var(--forest-green)) !important;
|
|
427
|
+
transition: color 0.2s ease !important;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* Remove white background on hover for drag handle */
|
|
431
|
+
:global(.drag-handle:hover) {
|
|
432
|
+
background-color: transparent !important;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
:global(.drag-handle:hover svg) {
|
|
436
|
+
color: hsl(var(--grey3)) !important;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* Remove box shadow */
|
|
440
|
+
.embed-editor-container {
|
|
441
|
+
box-shadow: none;
|
|
442
|
+
transform: translateZ(0); /* Force GPU acceleration */
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* Prevent shadow inheritance for PropsEditor */
|
|
446
|
+
:global(.props-editor-container) {
|
|
447
|
+
box-shadow: none !important;
|
|
448
|
+
border: none !important;
|
|
449
|
+
padding: 0 !important;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* Add this to ensure proper border radius inheritance */
|
|
453
|
+
:global(.embed-editor-container .props-editor-container) {
|
|
454
|
+
border-bottom-left-radius: var(--radius-large);
|
|
455
|
+
border-bottom-right-radius: var(--radius-large);
|
|
456
|
+
overflow: visible !important;
|
|
457
|
+
width: 100% !important;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
:global(.embed-editor-container .props-editor-container > div) {
|
|
461
|
+
padding: 0 !important;
|
|
462
|
+
height: 100% !important;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/* Style accordion items to match Design system */
|
|
466
|
+
:global(.embed-editor-container .accordion-item) {
|
|
467
|
+
border: 2px solid hsl(var(--grey2)) !important;
|
|
468
|
+
background: white !important;
|
|
469
|
+
overflow: hidden !important;
|
|
470
|
+
margin-bottom: -2px !important;
|
|
471
|
+
position: relative !important;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/* Style based on item name */
|
|
475
|
+
:global(.embed-editor-container .accordion-item[data-accordion-id="Basic Options"]) {
|
|
476
|
+
border-top-left-radius: var(--radius-medium) !important;
|
|
477
|
+
border-top-right-radius: var(--radius-medium) !important;
|
|
478
|
+
border-bottom-left-radius: 0 !important;
|
|
479
|
+
border-bottom-right-radius: 0 !important;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
:global(.embed-editor-container .accordion-item[data-accordion-id="Advanced Settings"]) {
|
|
483
|
+
border-top-left-radius: 0 !important;
|
|
484
|
+
border-top-right-radius: 0 !important;
|
|
485
|
+
border-bottom-left-radius: var(--radius-medium) !important;
|
|
486
|
+
border-bottom-right-radius: var(--radius-medium) !important;
|
|
487
|
+
margin-bottom: 0 !important;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
:global(.embed-editor-container .accordion-trigger) {
|
|
491
|
+
padding: 16px !important;
|
|
492
|
+
width: 100% !important;
|
|
493
|
+
display: flex !important;
|
|
494
|
+
justify-content: space-between !important;
|
|
495
|
+
align-items: center !important;
|
|
496
|
+
background: white !important;
|
|
497
|
+
border: none !important;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
:global(.embed-editor-container .accordion-trigger:hover .body-medium) {
|
|
501
|
+
text-decoration: underline !important;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
:global(.embed-editor-container .accordion-content) {
|
|
505
|
+
padding: 16px !important;
|
|
506
|
+
border-top: 2px solid hsl(var(--grey2)) !important;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
:global(.embed-editor-container .accordion-content > div) {
|
|
510
|
+
padding: 0 !important;
|
|
511
|
+
background: white !important;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* Style the chevron icon */
|
|
515
|
+
:global(.embed-editor-container .accordion-trigger .chevron) {
|
|
516
|
+
transition: transform 200ms ease-out !important;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
:global(.embed-editor-container .accordion-trigger[data-state="open"] .chevron) {
|
|
520
|
+
transform: rotate(180deg) !important;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/* Style for the embed code text area */
|
|
524
|
+
.embed-code-textarea {
|
|
525
|
+
-webkit-user-select: text !important;
|
|
526
|
+
-moz-user-select: text !important;
|
|
527
|
+
-ms-user-select: text !important;
|
|
528
|
+
user-select: text !important;
|
|
529
|
+
font-family: monospace !important;
|
|
530
|
+
overflow-y: auto !important;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.embed-code-textarea::selection {
|
|
534
|
+
background-color: rgba(59, 130, 246, 0.2) !important;
|
|
535
|
+
color: inherit !important;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.embed-code-textarea::-moz-selection {
|
|
539
|
+
background-color: rgba(59, 130, 246, 0.2) !important;
|
|
540
|
+
color: inherit !important;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.text-wrapper {
|
|
544
|
+
font-family: monospace !important;
|
|
545
|
+
line-height: 1;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/* Ensure inputs maintain their container width */
|
|
549
|
+
:global(.embed-editor-container input),
|
|
550
|
+
:global(.embed-editor-container select),
|
|
551
|
+
:global(.embed-editor-container textarea),
|
|
552
|
+
:global(.embed-editor-container .input-wrapper),
|
|
553
|
+
:global(.embed-editor-container .input-container),
|
|
554
|
+
:global(.embed-editor-container .color-picker-popover) {
|
|
555
|
+
width: 100%;
|
|
556
|
+
min-width: 0;
|
|
557
|
+
box-sizing: border-box;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/* Force width constraints on content */
|
|
561
|
+
:global(.embed-editor-container .props-editor-container) {
|
|
562
|
+
width: 100%;
|
|
563
|
+
min-width: 0;
|
|
564
|
+
overflow: visible;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/* Ensure popover content stays within bounds */
|
|
568
|
+
:global(.embed-editor-container .popover-content) {
|
|
569
|
+
max-width: calc(100% - 2rem);
|
|
570
|
+
min-width: 0;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/* Add scroll visibility styles */
|
|
574
|
+
:global(.embed-editor-container [data-radix-scroll-area-viewport]) {
|
|
575
|
+
width: 100% !important;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
:global(.embed-editor-container .scroll-area) {
|
|
579
|
+
width: 100% !important;
|
|
580
|
+
overflow: visible !important;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/* Button Press Effect */
|
|
584
|
+
:global(.embed-code-header button) {
|
|
585
|
+
transition: background-color 0.1s ease;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/** TOASTER STYLES **/
|
|
589
|
+
/* Toaster Positioning */
|
|
590
|
+
:global(.embed-editor-toast) {
|
|
591
|
+
position: fixed !important;
|
|
592
|
+
bottom: 20px !important;
|
|
593
|
+
right: 20px !important;
|
|
594
|
+
top: auto !important;
|
|
595
|
+
display: flex !important;
|
|
596
|
+
align-items: center !important;
|
|
597
|
+
gap: 12px !important;
|
|
598
|
+
padding: 16px 24px !important;
|
|
599
|
+
background: white !important;
|
|
600
|
+
border-radius: var(--radius-small) !important;
|
|
601
|
+
box-shadow: 0px 0px 15px 3px rgba(0, 0, 0, 0.1) !important;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/* Icon container */
|
|
605
|
+
:global(.embed-editor-toast [data-icon]) {
|
|
606
|
+
order: -1 !important;
|
|
607
|
+
display: flex !important;
|
|
608
|
+
align-items: center !important;
|
|
609
|
+
justify-content: center !important;
|
|
610
|
+
margin: 0 !important;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/* Text container */
|
|
614
|
+
:global(.embed-editor-toast [data-content]) {
|
|
615
|
+
display: flex !important;
|
|
616
|
+
flex-direction: column !important;
|
|
617
|
+
gap: 4px !important;
|
|
618
|
+
margin: 0 !important;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/* Toaster title */
|
|
622
|
+
.embed-editor-title {
|
|
623
|
+
font-size: var(--h6) !important;
|
|
624
|
+
color: hsl(var(--forest)) !important;
|
|
625
|
+
font-weight: 600 !important;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/* Toaster description */
|
|
629
|
+
.embed-editor-toast-description {
|
|
630
|
+
font-size: var(--caption) !important;
|
|
631
|
+
color: hsl(var(--grey3)) !important;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* Toaster icon */
|
|
635
|
+
.embed-editor-toast-icon {
|
|
636
|
+
width: 40px !important;
|
|
637
|
+
height: 40px !important;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/* Toaster close button */
|
|
641
|
+
:global(.embed-editor-toast-close-button) {
|
|
642
|
+
background: hsl(var(--grey7)) !important;
|
|
643
|
+
border: 1px solid hsl(var(--grey5)) !important;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
:global(.embed-editor-toast-close-button:hover) {
|
|
647
|
+
background: hsl(var(--dark)) !important;
|
|
648
|
+
border: 1px solid hsl(var(--grey5)) !important;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
:global(.embed-editor-toast-close-button svg) {
|
|
652
|
+
color: white !important;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/* Accordion Item: Update CSS to handle single items */
|
|
656
|
+
:global(.embed-editor-container .accordion-item[data-position="only"]) {
|
|
657
|
+
border-radius: var(--radius-medium) !important;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
:global(.embed-editor-container .accordion-item[data-position="first"]) {
|
|
661
|
+
border-top-left-radius: var(--radius-medium) !important;
|
|
662
|
+
border-top-right-radius: var(--radius-medium) !important;
|
|
663
|
+
border-bottom-left-radius: 0 !important;
|
|
664
|
+
border-bottom-right-radius: 0 !important;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
:global(.embed-editor-container .accordion-item[data-position="last"]) {
|
|
668
|
+
border-top-left-radius: 0 !important;
|
|
669
|
+
border-top-right-radius: 0 !important;
|
|
670
|
+
border-bottom-left-radius: var(--radius-medium) !important;
|
|
671
|
+
border-bottom-right-radius: var(--radius-medium) !important;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/* Lucide Copy Icon: Set both default and hover colors */
|
|
675
|
+
:global(.lucide-copy) {
|
|
676
|
+
stroke: hsl(var(--error)) !important;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
:global(button:hover .lucide-copy) {
|
|
680
|
+
stroke: hsl(var(--grey7)) !important;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/* Add styles for dots pattern */
|
|
684
|
+
.dots-pattern {
|
|
685
|
+
cursor: move;
|
|
686
|
+
user-select: none;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.dots-pattern:active {
|
|
690
|
+
cursor: grabbing;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/* Add styles for error message */
|
|
694
|
+
:global(.subtext) {
|
|
695
|
+
font-size: 0.875rem;
|
|
696
|
+
line-height: 1.25rem;
|
|
697
|
+
font-weight: 400;
|
|
698
|
+
}
|
|
699
|
+
</style>
|
|
700
|
+
|