diff --git a/package-lock.json b/package-lock.json index 9e86f69..8e6e8b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -535,9 +535,9 @@ } }, "node_modules/@bufbuild/protobuf": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.10.1.tgz", - "integrity": "sha512-ckS3+vyJb5qGpEYv/s1OebUHDi/xSNtfgw1wqKZo7MR9F2z+qXr0q5XagafAG/9O0QPVIUfST0smluYSTpYFkg==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.10.2.tgz", + "integrity": "sha512-uFsRXwIGyu+r6AMdz+XijIIZJYpoWeYzILt5yZ2d3mCjQrWUTVpVD9WL/jZAbvp+Ed04rOhrsk7FiTcEDseB5A==", "devOptional": true, "license": "(Apache-2.0 AND BSD-3-Clause)" }, @@ -1996,9 +1996,9 @@ } }, "node_modules/@types/node": { - "version": "22.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.2.tgz", - "integrity": "sha512-LPM2G3Syo1GLzXLGJAKdqoU35XvrWzGJ21/7sgZTUpbkBaOasTj8tjwn6w+hCkqaa1TfJ/w67rJSwYItlJ2mYw==", + "version": "22.19.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.3.tgz", + "integrity": "sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==", "devOptional": true, "license": "MIT", "dependencies": { @@ -2441,9 +2441,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.22", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.22.tgz", - "integrity": "sha512-ARe0v/t9gO28Bznv6GgqARmVqcWOV3mfgUPn9becPHMiD3o9BwlRgaeccZnwTpZ7Zwqrm+c1sUSsMxIzQzc8Xg==", + "version": "10.4.23", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.23.tgz", + "integrity": "sha512-YYTXSFulfwytnjAPlw8QHncHJmlvFKtczb8InXaAx9Q0LbfDnfEYDE55omerIJKihhmU61Ft+cAOSzQVaBUmeA==", "dev": true, "funding": [ { @@ -2461,10 +2461,9 @@ ], "license": "MIT", "dependencies": { - "browserslist": "^4.27.0", - "caniuse-lite": "^1.0.30001754", + "browserslist": "^4.28.1", + "caniuse-lite": "^1.0.30001760", "fraction.js": "^5.3.4", - "normalize-range": "^0.1.2", "picocolors": "^1.1.1", "postcss-value-parser": "^4.2.0" }, @@ -2506,9 +2505,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.9.6", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.6.tgz", - "integrity": "sha512-v9BVVpOTLB59C9E7aSnmIF8h7qRsFpx+A2nugVMTszEOMcfjlZMsXRm4LF23I3Z9AJxc8ANpIvzbzONoX9VJlg==", + "version": "2.9.7", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.7.tgz", + "integrity": "sha512-k9xFKplee6KIio3IDbwj+uaCLpqzOwakOgmqzPezM0sFJlFKcg30vk2wOiAJtkTSfx0SSQDSe8q+mWA/fSH5Zg==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3842,16 +3841,6 @@ "dev": true, "license": "MIT" }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-normalize-package-bin": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", diff --git a/public/CHANGELOG.md b/public/CHANGELOG.md index 567cb0b..f22d4bc 100644 --- a/public/CHANGELOG.md +++ b/public/CHANGELOG.md @@ -1,5 +1,8 @@ All notable changes to this project will be documented in this file. +## [1.9.0] - 2025-12-14 +- You can now share spritesheets to edit them later or share them with others + ## [1.8.0] - 2025-11-23 - Fix context menu location - You can now reposition all sprites in current frame diff --git a/public/ads.txt b/public/ads.txt deleted file mode 100644 index ef98de4..0000000 --- a/public/ads.txt +++ /dev/null @@ -1 +0,0 @@ -google.com, pub-3715260871588949, DIRECT, f08c47fec0942fa0 \ No newline at end of file diff --git a/src/components/ShareModal.vue b/src/components/ShareModal.vue new file mode 100644 index 0000000..284881f --- /dev/null +++ b/src/components/ShareModal.vue @@ -0,0 +1,119 @@ + + + diff --git a/src/components/SpritePreview.vue b/src/components/SpritePreview.vue index 06124b0..894a767 100644 --- a/src/components/SpritePreview.vue +++ b/src/components/SpritePreview.vue @@ -1,9 +1,9 @@ @@ -257,7 +274,9 @@ import SpritePreview from '@/components/SpritePreview.vue'; import SpritesheetSplitter from '@/components/SpritesheetSplitter.vue'; import GifFpsModal from '@/components/GifFpsModal.vue'; + import ShareModal from '@/components/ShareModal.vue'; import { useExportLayers } from '@/composables/useExportLayers'; + import { useShare } from '@/composables/useShare'; import { useLayers } from '@/composables/useLayers'; import { getMaxDimensionsAcrossLayers } from '@/composables/useLayers'; import { useSettingsStore } from '@/stores/useSettingsStore'; @@ -299,6 +318,7 @@ const activeTab = ref<'canvas' | 'preview'>('canvas'); const isSpritesheetSplitterOpen = ref(false); const isGifFpsModalOpen = ref(false); + const isShareModalOpen = ref(false); const uploadInput = ref(null); const jsonFileInput = ref(null); const spritesheetImageUrl = ref(''); @@ -378,6 +398,23 @@ isGifFpsModalOpen.value = false; }; + // Share functionality + const { share } = useShare(layers, columns, toRef(settingsStore, 'negativeSpacingEnabled'), toRef(settingsStore, 'backgroundColor'), toRef(settingsStore, 'manualCellSizeEnabled'), toRef(settingsStore, 'manualCellWidth'), toRef(settingsStore, 'manualCellHeight')); + + const shareFunction = () => share(); + + const openShareModal = () => { + if (!visibleLayers.value.some(l => l.sprites.length > 0)) { + alert('Please upload or import sprites before sharing.'); + return; + } + isShareModalOpen.value = true; + }; + + const closeShareModal = () => { + isShareModalOpen.value = false; + }; + const handleSplitSpritesheet = (spriteFiles: SpriteFile[]) => { processImageFiles(spriteFiles.map(s => s.file)); }; diff --git a/src/views/ShareView.vue b/src/views/ShareView.vue new file mode 100644 index 0000000..cfaef44 --- /dev/null +++ b/src/views/ShareView.vue @@ -0,0 +1,286 @@ + + + + +