From 89ae60b04d2c5af27277f07633bb87d046f85c9c Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Thu, 16 Nov 2023 14:54:49 -0500 Subject: [PATCH] Bumps mwdk to 3.0.1. Fixes font paths. Fixes issue w loading v1 qsets in mwdk creator. --- package.json | 2 +- src/assets/icomoon.css | 10 +++++----- src/src-assets/legacyQsetSrv.coffee | 4 +++- yarn.lock | 8 ++++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 0e6def10..dffe2661 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ }, "version": "2.3.1", "dependencies": { - "materia-widget-development-kit": "~3.0.0", + "materia-widget-development-kit": "^3.0.1", "micromarkdown": "^0.3.0" }, "scripts": { diff --git a/src/assets/icomoon.css b/src/assets/icomoon.css index b7dcf3e5..07574c8f 100644 --- a/src/assets/icomoon.css +++ b/src/assets/icomoon.css @@ -1,10 +1,10 @@ @font-face { font-family: 'icomoon'; - src: url('fonts/icomoon.eot?iwicyl'); - src: url('fonts/icomoon.eot?iwicyl#iefix') format('embedded-opentype'), - url('fonts/icomoon.ttf?iwicyl') format('truetype'), - url('fonts/icomoon.woff?iwicyl') format('woff'), - url('fonts/icomoon.svg?iwicyl#icomoon') format('svg'); + src: url('assets/fonts/icomoon.eot?iwicyl'); + src: url('assets/fonts/icomoon.eot?iwicyl#iefix') format('embedded-opentype'), + url('assets/fonts/icomoon.ttf?iwicyl') format('truetype'), + url('assets/fonts/icomoon.woff?iwicyl') format('woff'), + url('assets/fonts/icomoon.svg?iwicyl#icomoon') format('svg'); font-weight: normal; font-style: normal; font-display: block; diff --git a/src/src-assets/legacyQsetSrv.coffee b/src/src-assets/legacyQsetSrv.coffee index c90d3793..3b0a9bbc 100644 --- a/src/src-assets/legacyQsetSrv.coffee +++ b/src/src-assets/legacyQsetSrv.coffee @@ -21,7 +21,9 @@ angular.module "Adventure" item.type = "Adventure" item.nodeId = item.options.id - item.id = item.options.id + # extreme edge-case detection to ensure a mwdk mock id isn't being passed around + # this would generally only affect a v1 qset when viewed in the context of the mwdk + item.id = if typeof(item.options.id) is "string" and item.options.id.match(/^(mwdk-mock-id-[A-Za-z0-9\-]+)$/)[0] then item.options.id = 0 else item.options.id delete item.assets diff --git a/yarn.lock b/yarn.lock index b8a7da84..d7ea813e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4546,10 +4546,10 @@ materia-widget-dependencies@0.2.0: resolved "https://registry.yarnpkg.com/materia-widget-dependencies/-/materia-widget-dependencies-0.2.0.tgz#ebec53a9c10991bacf8b8ea9d6dfba5cd40ed912" integrity sha512-eqab8DdPD0tzEicJWfgc/BJko/MSZarECmXENNwt4NUr757HCQJl7M+q70eXYO84Ssk3kHySTELgOTLES/FODg== -materia-widget-development-kit@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/materia-widget-development-kit/-/materia-widget-development-kit-3.0.0.tgz#266e7f2e3d774845838e25d1d775c93cd3f418fb" - integrity sha512-sybUgRn7BGUIyiLHecTrwMumZrFUI2kW7f/2+D9v7GiNCbJDPLqNA04KL38hiy69ISNhGcEgL17TVXsYf6QD0Q== +materia-widget-development-kit@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/materia-widget-development-kit/-/materia-widget-development-kit-3.0.1.tgz#16b48010d68c52a2382f117e628b714c5a2be47d" + integrity sha512-qVd9yzFPleu+FAYvboiA+EGvbP1e2GsVvhl4IG/YIxNXCvEtP7jZcCtpqXVY9p8piUPBAmxXY5E/NAS06iXRIw== dependencies: "@babel/core" "^7.22.17" "@babel/preset-env" "^7.20.2"