From be8388c0d69af8c15f2443a05e7ea4e9db668865 Mon Sep 17 00:00:00 2001 From: averrin Date: Sat, 1 Oct 2022 12:10:33 +0200 Subject: [PATCH] mostly fixes --- .github/workflows/main.yml | 15 +- CHANGELOG.md | 9 ++ module.json | 160 +++++++++++----------- package-lock.json | 79 ++++++++--- package.json | 2 +- src/modules/Integrations.js | 3 +- src/modules/Sequencer.js | 2 + src/modules/Specs.js | 7 +- src/modules/settings.js | 9 +- src/view/components/ModifierItem.svelte | 3 +- src/view/components/SequenceEditor.svelte | 8 +- src/view/components/SequencerTab.svelte | 3 +- 12 files changed, 182 insertions(+), 118 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 72d19b3..85d140f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,19 +23,28 @@ jobs: manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip - # Install packages. - - run: npm install + - run: echo "VERSION:" ${{github.event.release.tag_name}} + + - name: Clear caches + if: ${{ !env.ACT }} + uses: easimon/wipe-cache@main + + - name: NPM install + if: ${{ !env.ACT }} + run: npm install # Build distribution. - run: npm run build # Create a zip file with all files required by the module to add to the release. - - run: zip -r ./module.zip module.json index.js index.js.map style.css assets/ dist/ lang/ packs/ LICENSE AUTHORS + - run: rm -rf ./module.zip + - run: zip -r ./module.zip module.json index.js index.js.map style.css assets/ lang/ packs/ LICENSE AUTHORS # Create a release for this specific version. - name: Update Release with Files id: create_version_release uses: ncipollo/release-action@v1 + if: ${{ !env.ACT }} with: allowUpdates: true # Set this to false if you want to prevent updating existing releases. name: ${{ github.event.release.name }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e2aa5..bedd2ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. ## [Unreleased] +## [0.9.2 - 0.9.3](https://github.com/averrin/director/compare/0.9.2...0.9.3) +Fixed: + * Selects don't react on clicks on text of the selected element + * Small UI issues + +Added: + * You can disable sequencer's modifier to skip its execution without removing. It's useful when you are using one sequence for several effects with different scale or rotation + * Game Icons collection for tags and actions icons (`game-icons` value for the corresponding setting) + ## [0.9.1 - 0.9.2](https://github.com/averrin/director/compare/0.9.1...0.9.2) Fixed: * Stupid bug prevents saving actions and hooks into scene for v9 diff --git a/module.json b/module.json index d798082..a070da7 100644 --- a/module.json +++ b/module.json @@ -1,83 +1,83 @@ { - "title": "Director", - "description": "Control your scenes!", - "authors": [ - { - "name": "Averrin", - "url": "https://github.com/averrin", - "discord": "Averrin#0374" - } - ], - "url": "https://github.com/averrin/director", - "readme": "https://github.com/averrin/director/blob/master/README.md", - "bugs": "https://github.com/averrin/director/issues", - "changelog": "https://github.com/averrin/director/releases/latest/", - "version": "1.0.0", - "esmodules": [ - "index.js" - ], - "styles": [ - "style.css" - ], - "languages": [ - { - "lang": "en", - "name": "English", - "path": "lang/en.json" - } - ], - "manifest": "https://github.com/averrin/director/releases/latest/download/module.json", - "download": "https://github.com/averrin/director/releases/download/0.2.0/module.zip", - "id": "director", - "name": "director", - "relationships": { - "requires": [ - { - "id": "tagger", - "type": "module", - "compatibility": {} - }, - { - "id": "sequencer", - "type": "module", - "compatibility": {} - }, - { - "id": "socketlib", - "type": "module", - "compatibility": {} - }, - { - "id": "warpgate", - "type": "module", - "compatibility": {} - } - ] - }, - "dependencies": [ - { - "name": "tagger", - "type": "module", - "compatibility": {} - }, - { - "name": "sequencer", - "type": "module", - "compatibility": {} - }, - { - "name": "socketlib", - "type": "module", - "compatibility": {} + "title": "Director", + "description": "Control your scenes!", + "authors": [ + { + "name": "Averrin", + "url": "https://github.com/averrin", + "discord": "Averrin#0374" + } + ], + "url": "https://github.com/averrin/director", + "readme": "https://github.com/averrin/director/blob/master/README.md", + "bugs": "https://github.com/averrin/director/issues", + "changelog": "https://github.com/averrin/director/releases/latest/", + "version": "0.10.0-dev", + "esmodules": [ + "index.js" + ], + "styles": [ + "style.css" + ], + "languages": [ + { + "lang": "en", + "name": "English", + "path": "lang/en.json" + } + ], + "manifest": "https://github.com/averrin/director/releases/latest/download/module.json", + "download": "https://github.com/averrin/director/releases/download/0.10.0-dev/module.zip", + "id": "director", + "name": "director", + "relationships": { + "requires": [ + { + "id": "tagger", + "type": "module", + "compatibility": {} + }, + { + "id": "sequencer", + "type": "module", + "compatibility": {} + }, + { + "id": "socketlib", + "type": "module", + "compatibility": {} + }, + { + "id": "warpgate", + "type": "module", + "compatibility": {} + } + ] }, - { - "name": "warpgate", - "type": "module", - "compatibility": {} + "dependencies": [ + { + "name": "tagger", + "type": "module", + "compatibility": {} + }, + { + "name": "sequencer", + "type": "module", + "compatibility": {} + }, + { + "name": "socketlib", + "type": "module", + "compatibility": {} + }, + { + "name": "warpgate", + "type": "module", + "compatibility": {} + } + ], + "compatibility": { + "minimum": "0.8.6", + "verified": "9" } - ], - "compatibility": { - "minimum": "0.8.6", - "verified": "9" - } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ee21353..39e07ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@typhonjs-fvtt/runtime": "^0.0.19", "class-transformer": "^0.5.1", "consola": "^2.15.3", - "crew-components": "../crew-components", + "crew-components": "averrin/crew-components", "daisyui": "^2.22.0", "export-from-json": "^1.6.0", "iconify": "^1.4.0", @@ -42,22 +42,6 @@ "windicss": "^3.5.6" } }, - "../crew-components": { - "version": "0.1.0", - "license": "ISC", - "dependencies": { - "class-transformer": "^0.5.1", - "consola": "^2.15.3", - "fast-sort": "^3.2.0", - "filtrex": "^3.0.0", - "svelte-color-picker": "^1.0.7", - "svelte-select": "5.0.0-beta.14", - "uuid": "^8.3.2" - }, - "devDependencies": { - "svelte-range-slider-pips": "^2.0.3" - } - }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -2202,8 +2186,19 @@ } }, "node_modules/crew-components": { - "resolved": "../crew-components", - "link": true + "version": "0.1.0", + "resolved": "git+ssh://git@github.com/averrin/crew-components.git#6d011d0c0c792196a34a8b675dd553d6f54d163f", + "license": "ISC", + "dependencies": { + "class-transformer": "^0.5.1", + "consola": "^2.15.3", + "fast-sort": "^3.2.0", + "filtrex": "^3.0.0", + "svelte-color-picker": "^1.0.7", + "svelte-copy-to-clipboard": "^0.2.5", + "svelte-select": "5.0.0-beta.14", + "uuid": "^8.3.2" + } }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -3686,6 +3681,11 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, + "node_modules/fast-sort": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fast-sort/-/fast-sort-3.2.0.tgz", + "integrity": "sha512-EgQtkmWo2Icq6uei57fTrZAKayL9b4OISU1613737AuLcIbAZ57tcOtGaK2A7zO54kk97wOnSw6INDA++rjMAQ==" + }, "node_modules/fastparse": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", @@ -3748,6 +3748,11 @@ "node": ">=8" } }, + "node_modules/filtrex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filtrex/-/filtrex-3.0.0.tgz", + "integrity": "sha512-7PUty9Bq+shxb6r1QVo0AmwJVY59HNN76YUD5TIkjtyG6nNhWPTe6dJVq4TKaGdl/V329ayG6rHK1sA31Hmz8Q==" + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -10970,6 +10975,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "optional": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/uglify-js": { "version": "3.17.0", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz", @@ -12975,14 +12994,15 @@ } }, "crew-components": { - "version": "file:../crew-components", + "version": "git+ssh://git@github.com/averrin/crew-components.git#6d011d0c0c792196a34a8b675dd553d6f54d163f", + "from": "crew-components@averrin/crew-components", "requires": { "class-transformer": "^0.5.1", "consola": "^2.15.3", "fast-sort": "^3.2.0", "filtrex": "^3.0.0", "svelte-color-picker": "^1.0.7", - "svelte-range-slider-pips": "^2.0.3", + "svelte-copy-to-clipboard": "^0.2.5", "svelte-select": "5.0.0-beta.14", "uuid": "^8.3.2" } @@ -13970,6 +13990,11 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, + "fast-sort": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fast-sort/-/fast-sort-3.2.0.tgz", + "integrity": "sha512-EgQtkmWo2Icq6uei57fTrZAKayL9b4OISU1613737AuLcIbAZ57tcOtGaK2A7zO54kk97wOnSw6INDA++rjMAQ==" + }, "fastparse": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", @@ -14017,6 +14042,11 @@ "to-regex-range": "^5.0.1" } }, + "filtrex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filtrex/-/filtrex-3.0.0.tgz", + "integrity": "sha512-7PUty9Bq+shxb6r1QVo0AmwJVY59HNN76YUD5TIkjtyG6nNhWPTe6dJVq4TKaGdl/V329ayG6rHK1sA31Hmz8Q==" + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -19056,6 +19086,13 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, + "typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "optional": true, + "peer": true + }, "uglify-js": { "version": "3.17.0", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz", diff --git a/package.json b/package.json index a4a9289..b483cbf 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@typhonjs-fvtt/runtime": "^0.0.19", "class-transformer": "^0.5.1", "consola": "^2.15.3", - "crew-components": "github:averrin/crew-components", + "crew-components": "averrin/crew-components", "daisyui": "^2.22.0", "export-from-json": "^1.6.0", "iconify": "^1.4.0", diff --git a/src/modules/Integrations.js b/src/modules/Integrations.js index 356b544..ef0aab0 100644 --- a/src/modules/Integrations.js +++ b/src/modules/Integrations.js @@ -1,4 +1,4 @@ -import { capitalize } from "crew-components/helpers"; +import { capitalize, logger } from "crew-components/helpers"; import { argSpecs as _argSpecs } from "./Specs.js"; import { argSpecs } from "crew-components/specs"; @@ -9,6 +9,7 @@ export default function initIntegrations() { initFxMasterIntegration(); Hooks.call("DirectorInitIntegrations"); + logger.info("Init Director integrations") argSpecs.push(..._argSpecs); } diff --git a/src/modules/Sequencer.js b/src/modules/Sequencer.js index 65b0b81..9305a6a 100644 --- a/src/modules/Sequencer.js +++ b/src/modules/Sequencer.js @@ -347,6 +347,7 @@ controlled.forEach(c => c.control({releaseOthers: false}));`; } let currentModifier; for (const m of section.modifiers) { + if (m.enabled === false) continue; const args = await this.makeArgs(m); let modName = m.type; if (currentModifier) { @@ -481,6 +482,7 @@ export class Modifier { this.setType(type) this.args = args || []; this.version = 1; + this.enabled = true; } setType(type, sectionType) { this._spec = modifierSpecs.filter(s => s.group == sectionType).find(s => s.id == type); diff --git a/src/modules/Specs.js b/src/modules/Specs.js index 06d6208..75b8a14 100644 --- a/src/modules/Specs.js +++ b/src/modules/Specs.js @@ -243,7 +243,7 @@ export const modifierSpecs = [ //Effect { id: 'file', group: 'effect', args: [{ type: 'effect_file', label: 'file' }], cat: "Required" }, - { id: 'atLocation', group: 'effect', args: [{ type: 'position', label: 'pos' }, {type: 'offset', label: 'offset', option: true}], cat: "Required" }, + { id: 'atLocation', group: 'effect', args: [{ type: 'position', label: 'pos' }, { type: 'offset', label: 'offset', option: true }], cat: "Required" }, //{ id: 'name', group: 'effect', args: [{ type: 'string', label: 'name' }], cat: "Generic" }, { id: 'animateProperty', group: 'effect', args: [ @@ -319,7 +319,7 @@ export const modifierSpecs = [ { type: 'bool', label: 'bindAlpha', option: true, default: true }, { type: 'bool', label: 'followRotation', option: true, default: true }, { type: 'float', label: 'randomOffset', option: true }, -{type: 'offset', label: 'offset', option: true}, + { type: 'offset', label: 'offset', option: true }, ], cat: 'Move' }, { id: 'moveTowards', group: 'effect', args: [{ type: 'position', label: 'pos' }, { type: "ease", label: "ease", option: true }], cat: 'Move' }, @@ -662,7 +662,6 @@ export function addHook(hook) { export const argSpecs = [ { id: "effect_file", var_types: ["effect_file", "expression"], options: (value) => { - let files = []; try { if (value && value.startsWith("jb2a")) { @@ -679,7 +678,7 @@ export const argSpecs = [ } catch (e) { //filepath } - return files; + return [value, ...files]; } }, { diff --git a/src/modules/settings.js b/src/modules/settings.js index 74ab373..8627275 100644 --- a/src/modules/settings.js +++ b/src/modules/settings.js @@ -1,6 +1,8 @@ import { moduleId, SETTINGS } from '../constants.js'; import { foundry } from './foundry.js'; -import {theme} from "./stores.js" +import { theme } from "./stores.js" +import { setIconCollection } from "crew-components/specs" +setIconCollection("game-icons") export let setting = key => { return game.settings.get(moduleId, key); @@ -168,11 +170,12 @@ export function initSettings(app) { game.settings.register(moduleId, SETTINGS.ICON_COLLECTION, { name: "Icon collection for actions", - hint: "Examples: mdi, material-symbols, openmoji. More: https://icon-sets.iconify.design", + hint: "Examples: game-icons, mdi, material-symbols, openmoji. More: https://icon-sets.iconify.design", scope: "client", config: true, - default: "mdi", + default: "game-icons", type: String, + onChange: v => setIconCollection(v) }); // game.settings.registerMenu(moduleId, { diff --git a/src/view/components/ModifierItem.svelte b/src/view/components/ModifierItem.svelte index f8cd350..877cf18 100644 --- a/src/view/components/ModifierItem.svelte +++ b/src/view/components/ModifierItem.svelte @@ -56,7 +56,8 @@ {/if} -
+
+ dispatch("change")} /> dispatch("delete", modifier)} size="xs" />
diff --git a/src/view/components/SequenceEditor.svelte b/src/view/components/SequenceEditor.svelte index d0047e6..e20a55a 100644 --- a/src/view/components/SequenceEditor.svelte +++ b/src/view/components/SequenceEditor.svelte @@ -136,7 +136,10 @@
-
+
argSpecs.find((s) => s.id == arg.type).var_types.includes(v.type) @@ -199,6 +202,7 @@ parent={item} on:changeType={(e) => setModType(e, item, modifier)} on:changeArg={(e) => setModArg(e, modifier, ...e.detail)} + on:change={updateSequences} on:delete={(e) => deleteModifier(item, e.detail)} vars={seq.variables} variables={true} diff --git a/src/view/components/SequencerTab.svelte b/src/view/components/SequencerTab.svelte index 9216462..f7ccaf4 100644 --- a/src/view/components/SequencerTab.svelte +++ b/src/view/components/SequencerTab.svelte @@ -115,7 +115,6 @@ seq = seqs.find((s) => s.id == seq.id); return seqs; }); - openModal = false; } async function stop() { @@ -168,7 +167,7 @@ {/if} -
Save
+